compile opencv in centos
来源:互联网 发布:网络品牌策划 编辑:程序博客网 时间:2024/06/05 01:50
(1) 源
cat /etc/centos-release
sudo yum -y update
yum list available opencv*
(2)工具
sudo yum groupinstall ‘Development Tools’
sudo yum install cmake git pkgconfig
(3)一些依赖
sudo yum install libpng-devel libjpeg-turbo-devel jasper-devel openexr-devel libtiff-devel libwebp-devel
sudo yum install libdc1394-devel libv4l-devel gstreamer-plugins-base-devel
sudo yum install gtk2-devel
(4)
sudo yum install tbb-devel eigen3-devel
(5)python pip
$ curl “https://bootstrap.pypa.io/get-pip.py” -o “get-pip.py”
$ sudo python get-pip.py
(6)python分割环境
~/.bashrc by adding these two lines to the file.
$ source /usr/bin/virtualenvwrapper.sh
(7) 虚拟环境
Now is the time to create a virtual environment, let’s call it cv
$ mkvirtualenv cv
You will notice a (cv) indicator at your command line. It means that we are in the virtual environment where we will be installing OpenCV. You can exit this environment by typing
$ deactivate
if you are not in the cv virtual environment, just type in
$ workon cv
(8)python环境
$ python –version
and you should see Python 2.7 version.
Install Python 2.7 development tools
$ sudo yum install python-devel
Install NumPy since OpenCV is using its arrays (and it is a very powerful package as well)
$ sudo pip install numpy
(9)install opencv
$ cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D BUILD_EXAMPLES=ON \
-D BUILD_OPENCV_PYTHON2=ON .. sudo make
Check the following folder and see if OpenCV is installed
/usr/local/lib/python2.7/site-packages
(10) 虚拟环境安装
Now is the time to create a symbolic link to OpenCV library into the site-packages directory of the cv virtual environment:
Your installation is successfuly completed. You can confirm it by going into the virtual environment and importing OpenCV library.
import cv2
cv2.version
3.1.0’
- compile opencv in centos
- How to compile opencv in
- Compile opencv
- How To Compile OpenCV based programs in Linux
- Compile C++ code in Matlab with OpenCV support
- opencv android compile
- Compile FFmpeg on CentOS
- 【工控机开发】OpenCV compile error /lib/libopencv_highgui.so could not read symbols: File in wrong format
- Compile mysql in vmware
- compile xulrunning in windows
- compile configuration in vs2010
- MPI compile 设置 centos 7
- compile c file in linux
- Compile Linux Kernel in Ubuntu
- Compile zmap in Mac OSX
- Compile Hadoop in Docker container
- Linux compile opencv cuda program ----simple example.
- Compile FFmpeg on CentOS / RHEL / Fedora
- 防止滑步
- inux下的gcc和gdb 以及库的使用
- vim 常用快捷键 二
- timer和ScheduledExecutorService延时器与定时器的使用
- 性能测试之初相识
- compile opencv in centos
- Java中关于多重继承的问题
- 23.Linux
- Java常用API(转载)
- NYOJ XYNUYOJ 郁闷的c小加(一)(数据结构)
- hdoj 1024 Max Sum Plus Plus(最大m子段和)=-=
- MVC框架简介,SSH 和SSM
- 安卓动画(旋转,平移,透明,缩放,帧动画)
- LCS 最大公共序列算法