系统配置:Ubuntu 12.04
安装步骤:
1.官网下载OpenCV2.4.5 http://opencv.org/
解压到home/用户名/opencv2.4.5
2.安装cmake
$sudo apt-get install cmake
3.编译opencv
(1)在刚才opencv的解压目录下新建build文件夹
$cd ~/opencv2.4.5
$mkdir build
$cd build
$cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..
(2)运行makefile(注:该过程持续时间较长)
$make
$sudo make install
4.测试是否安装成功
$cd ~/opencv2.4.5/samples/c
$g++ `pkg-config –cflags opencv` -o mydelaunay delaunay.c `pkg-config –libs opencv`
注:pkg-config –cflags opencv两边的`是Esc下面那个
相关阅读:Ubuntu 12.04 安装 OpenCV2.4.2 http://www.linuxidc.com/Linux/2012-09/70158.htm
更多Ubuntu相关信息见Ubuntu 专题页面 http://www.linuxidc.com/topicnews.aspx?tid=2