--Install OpenCV-python on RasPi
RaspberryPi
$ sudo apt-get install libopencv-dev
$ sudo apt-get install python-opencv
--If you install with apt-get, it will be 2.3.1 and the old version at the moment (2014/8/16). --If you want to install the latest version, please build by referring to this area.
--Create a python script for checking the operation on RasPi (grayscale conversion) --lena has been dropped from the WEB
cvTest.py
import cv2
img = cv2.imread('lena.jpg')
img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
cv2.imwrite('lena_gray.jpg', img_gray)
--Execute
RaspberryPi
$ python cvTest.py
--The left is the original image and the right is the converted image.
-Install OpenCV on Raspberry Pi
Recommended Posts