Python + opencv on ubuntu & arm

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/yueqian_scut/article/details/80097308

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

扫描二维码关注公众号,回复: 3189463 查看本文章

8. pip install imutils

9. test usb camera

    camera = cv2.VideoCapture(0)

    img = camera.read()

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

猜你喜欢

转载自blog.csdn.net/yueqian_scut/article/details/80097308