apt-get 安装opencv2
sudo apt-get install libcv-dev
1 | sudo apt-get install libcv-dev |
apt-get安装Python cv2扩展
sudo apt-get install python-opencv
1 | sudo apt-get install python-opencv |
测试一下cv2模块是否可以加载:
$ pythonPython 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import cv2>>>
1 2 3 4 5 6 | $ python Python 2.7.6 (default, Oct 26 2016, 20:30:19) [GCC 4.8.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import cv2 >>> |
OK
转自:https://blog.csdn.net/qq_40525008/article/details/80292593