September 4,2007 17:16


編譯OpenCV的步驟 (for Linux)

1. 下載OpenCV (opencv-1.0.0.tar.gz 或最新的)

2. 解壓文件
tar zxvf opencv-1.0.0.tar.gz
cd opencv-1.0.0

3. 檢查軟體配置
./configure (執行 ./configure 命令,直到提示"Now run make ..."為止)

4. 編譯OpenCV

make install (用root)

a . 添加路徑/usr/local/lib到文件/etc/
b. ldconfig

7. 測試
g++ `pkg-config opencv.pc --libs --cflags opencv` samples/c/drawing.c -o drawing

8. 執行

編譯OpenCV的步驟 (for VC6)

1. 下載OpenCV

a. 檢查C:\Program Files\OpenCV\bin是否已經被加入到環境變數PATH
b. 在VC6裡 , Tools->Option ->Directories 的 Include files 裡加入
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\cv\include
C:\Program Files\OpenCV\cvaux\include
C:\Program Files\OpenCV\ml\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\otherlibs\cvcam\include

c.在VC6裡 , Tools->Option ->Directories 的 Library files 裡加入
C:\Program Files\OpenCV\lib

3.編譯OpenCV Sample Code
a. 使用VC6開啟一個新的Console Application 專案.
b. Copy C:\Program Files\OpenCV\samples\c 裡任一Sample Code.
c. 在VC6編譯器裡 Project->Settings->Link 加上
cxcore.lib cv.lib ml.lib cvaux.lib highgui.lib cvcam.lib.
d. 開始編譯專案.

  • yumiwang 發表於樂多回應(1)引用(0)OpenCV編輯本文
    樂多分類:工作/職場切換閱讀版型 │昨日人次:4 │累計人次:5231


    Does your website have a contact page? I’m having trouble locating it but, I’d like to shoot you an e-mail. I’ve got some recommendations for your blog you might be interested in hearing. Either way, great blog and I look forward to seeing it grow over time.
    | 檢舉 | Posted by Leah at May 20,2014 02:28