Python + opencv on ubuntu & arm

ARM 83浏览

1. python2.7 is installed on ubuntu

2. apt-get install python-pip

3.pip install numpy sklearn

4.apt-get install libopencv-dev

5.apt-get install libcv-dev

6.apt-get install python-opencv

7. test: 

    --->import cv2

    --->img = cv2.imread("demo.jpg")

    --->cv2.imwrite("new-demo.jpg", img)

    if you get new-demo.jpg it says python+opencv ok

8. pip install imutils

9. test usb camera

    camera = cv2.VideoCapture(0)

    img = camera.read()

    cv2.imwrite("capture.jpg", img)