WEB开发网
开发学院操作系统CentOS CentOS OpenCV在LINUX系统中编译安装 阅读

CentOS OpenCV在LINUX系统中编译安装

 2010-05-30 23:25:48 来源:WEB开发网   
核心提示:CentOS OpenCV已被广泛应用但是也在不断的更新,这里介绍CentOS OpenCV安装设置使用,CentOS OpenCV在LINUX系统中编译安装,帮助大家安装更新CentOS OpenCV系统,如何在Linux下編譯CentOS OpenCV? (OS) (Linux) (CentOS) (Image P

CentOS OpenCV已被广泛应用但是也在不断的更新,这里介绍CentOS OpenCV安装设置使用,帮助大家安装更新CentOS OpenCV系统。如何在Linux下編譯CentOS OpenCV? (OS) (Linux) (CentOS) (Image Processing) (C/C++)
Abstract
CentOS OpenCV是一個C/C++開源的Computer Vision(計算機視覺)函式庫,在Windows上只要直接安裝即可,但在Linux需手動編譯,本文為我在CentOS 5.1的編譯心得。

Introduction
Step 1:
至SourceForge.net : Open Computer Vision Library下載Linux版的opencv-1.0.0.tar.gz。

Step 2:
將opencv-1.0.0.tar.gz解壓縮
[[email protected] ~]# tar -zxvf opencv-1.0.0.tar.gz

Step 3:
進入opencv目錄
[[email protected] ~]# cd opencv-1.0.0

Step 4:
偵測作業環境,設定OpenCV安裝在/usr/local/opencv目錄下
[[email protected] opencv-1.0.0]# ./configure --prefix=/usr/local/opencv

Step 5:
編譯CentOS OpenCV
[[email protected] opencv-1.0.0]# make

Step 6:
安裝CentOS OpenCV
[[email protected] opencv-1.0.0]# make install

Step 7:
更新動態連結庫
[[email protected] opencv-1.0.0]# vi /etc/ld.so.conf
加入
include ld.so.conf.d/*.conf
/usr/local/opencv/lib
存檔後執行
[[email protected] opencv-1.0.0]# ldconfig

Step 8:
測試CentOS OpenCV是否安裝成功
[[email protected] opencv-1.0.0]# cd samples/c
[[email protected] c]# gcc -I/usr/local/opencv/include/opencv -L/usr/local/opencv/lib -lhighgui -lstdc++ drawing.c -o drawing
[[email protected] c]# ./drawing

執行結果

See Also
如何在VC8編譯libdecodeqr? (C/C++) (VC++) (Image Processing)
如何在Linux下編譯libdecodeqr? (OS) (Linux) (CenOS) (Image Processing) (C/C++)
Reference
SourceForge.net : Open Computer Vision Library
劉瑞禎、于仕琪 2006,CentOS OpenCV教程,北京航空航天大學出版社
嘻嘻哈哈工作去的CentOS OpenCV安裝
OT的學習手札的Install OpenCV in Linux-2

Tags:CentOS OpenCV LINUX

编辑录入:爽爽 [复制链接] [打 印]
赞助商链接