码迷,mamicode.com
首页 > 编程语言 > 详细

ubuntu下python opencv搭建

时间:2015-06-05 22:25:02      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:

编译器安装:
sudo
apt-get install build-essential cmake pkg-config
图片库:
sudo
apt-get install libjpeg-dev libtiff-dev libjasper-dev libpng-dev
显示GUI用的库:
sudo
apt-get install libgtk2.0-dev
加载视频的库:
sudo
apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
优化opencv性能:
sudo
apt-get install libatlas-base-dev gfortran
sudo apt-get install python-dev
pip install numpy
下载opencv源代码:
 wget -O opencv-2.4.10.zip http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.10/opencv-2.4.10.zip/download
 unzip opencv-2.4.10.zip
 cd opencv-2.4.10

利用cmake编译源代码:
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON ..
make
$ sudo make install
$ sudo ldconfig

 

ubuntu下python opencv搭建

标签:

原文地址:http://www.cnblogs.com/premier/p/4553265.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!