ubuntu下安装OpenCV2.0
2011-09-07 18:02
519 查看
版本:ubuntu9.04 gcc 4.4.1
opencv2.0
目的:在PC机的linux系统上运行一个虹膜识别的程序,没有窗口。
参考文档:http://opencv.willowgarage.com/wiki/InstallGuide%20%3A%20Debian,http://blog.csdn.net/ranruoyu1003/article/details/6098847
先安装必要的包(不必安装上面文档全部提到的包)命令如下:
apt-get install build-essential
apt-get install zlib1g-dbg zlib1g zlib1g-dev
apt-get install libpng12-dev
apt-get install libjasper-dev
上面安装的这三个库必须要,否刚Opencv装不能运行成功(至少对我来说是这样的,开始就是没装这三个库总是出错,后来装了就好使了)。在安装这三个库的过程中可能会出现一些版本不符合的情况,这可以用新立得->包管理->强制,强制安装某一个版本。
接下来就是解压编译,confiugre的参数如下:
./configure --without-gtk --without-carbon --without-quicktime--without-1394libs --without-ffmpeg --without-python --without-swig--enable-shared --prefix=/opt/x86/opencv2.0/ --libdir=/opt/x86/opencv2.0/lib --includedir=/opt/x86/opencv2.0/include
说明:
--without-gtk //不用gtk
--without-carbon //与MC/OS相关
--without-quicktime
--without-1394libs
--without-ffmpeg
--without-python //不提共python语言接口
--without-swig //不提共swig语言接口
--enable-shared //编译成共享库
--prefix=/opt/x86/opencv2.0/ //安装路径
--libdir=/opt/x86/opencv2.0/lib
--includedir=/opt/x86/opencv2.0/include
configure运行后的总结报告如下:
make
make install (用root权限运行,因为这里是安装到根目录下)
在~/.bashrc文件最后加如下内容:
在/etc/ld.so.conf 文件的最后加上:/opt/x86/opencv2.0/lib
或者在/etc/ld.so.conf.d/目录下建一个文件opencv.conf,文件的内容为:/opt/x86/opencv2.0/lib
export PKG_CONFIG_PATH=/opt/x86/opencv2.0/lib/pkgconfig
到此,OK了!
opencv2.0
目的:在PC机的linux系统上运行一个虹膜识别的程序,没有窗口。
参考文档:http://opencv.willowgarage.com/wiki/InstallGuide%20%3A%20Debian,http://blog.csdn.net/ranruoyu1003/article/details/6098847
先安装必要的包(不必安装上面文档全部提到的包)命令如下:
apt-get install build-essential
apt-get install zlib1g-dbg zlib1g zlib1g-dev
apt-get install libpng12-dev
apt-get install libjasper-dev
上面安装的这三个库必须要,否刚Opencv装不能运行成功(至少对我来说是这样的,开始就是没装这三个库总是出错,后来装了就好使了)。在安装这三个库的过程中可能会出现一些版本不符合的情况,这可以用新立得->包管理->强制,强制安装某一个版本。
接下来就是解压编译,confiugre的参数如下:
./configure --without-gtk --without-carbon --without-quicktime--without-1394libs --without-ffmpeg --without-python --without-swig--enable-shared --prefix=/opt/x86/opencv2.0/ --libdir=/opt/x86/opencv2.0/lib --includedir=/opt/x86/opencv2.0/include
说明:
--without-gtk //不用gtk
--without-carbon //与MC/OS相关
--without-quicktime
--without-1394libs
--without-ffmpeg
--without-python //不提共python语言接口
--without-swig //不提共swig语言接口
--enable-shared //编译成共享库
--prefix=/opt/x86/opencv2.0/ //安装路径
--libdir=/opt/x86/opencv2.0/lib
--includedir=/opt/x86/opencv2.0/include
configure运行后的总结报告如下:
make
make install (用root权限运行,因为这里是安装到根目录下)
在~/.bashrc文件最后加如下内容:
在/etc/ld.so.conf 文件的最后加上:/opt/x86/opencv2.0/lib
或者在/etc/ld.so.conf.d/目录下建一个文件opencv.conf,文件的内容为:/opt/x86/opencv2.0/lib
export PKG_CONFIG_PATH=/opt/x86/opencv2.0/lib/pkgconfig
到此,OK了!
相关文章推荐
- ubuntu14.04 PCL1.8 OPENNI2.0 OPENCV3.0安装小结
- Ubuntu 安装 opencv 2.0
- Ubuntu10.04下安装OpenCV2.0过程及说明
- 1 ubuntu下编译安装opencv2详细教程以及python调用opencv方法
- Ubuntu 14.04 安装 OpenCV-3.2.0
- 安装 PlayBook NDK 2.0 on Ubuntu 11.10
- 【ubuntu】Ubuntu14.04安装opencv-3.2
- ubuntu14.04安装opencv3.0.0的操作方法
- Ubuntu16.04下安装OpenCV3.2.0
- ubuntu下安装opencv 1.0【加额外库】
- Ubuntu 16.04 LTS 安装OpenCV
- ubuntu安装opencv
- 在vs2008中安装opencv2.0/opencv2.1的详细步骤
- ubuntu16.04安装opencv3.1.0(整理)
- ubuntu16.04安装OpenCV3.0.0
- Ubuntu14+OpenCV3.1+Caffe虚拟机安装笔记(三)
- ubuntu16.04安装OpenCV
- ubuntu 系统 opencv3.1.0 安装
- [转]Ubuntu上安装TL-WN725N 2.0无线网卡驱动
- Ubuntu安装opencv(官网安装教程)