This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cv2 | |
import urllib | |
import urllib.request | |
import numpy as np | |
req = urllib.request.urlopen('http://192.168.1.207/webcapture.jpg?command=snap&chanel=1') | |
arr = np.asarray(bytearray(req.read()), dtype=np.uint8) | |
img = cv2.imdecode(arr, -1) # 'Load it as it is' | |
cv2.imshow('lalala', img) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
OR only: pip install opencv-python | |
- Step 1: Expanding File System | |
- Expanding the Filesystem is necessary so that the OpenCV library compiles properly. To expand your file system, go to the terminal and type the following command. | |
sudo raspi-config | |
- Step 2: Updating System | |
- Updating is necessary before proceeding with the further installation. | |
sudo apt-get update && sudo apt-get upgrade |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install console-common | |
//sudo dpkg-reconfigure console-data | |
From the full list, select pc / qwerty / US american / Standard / Standard |