2010年8月31日 星期二

Code Blocks 環境安裝 OpenCV


在教學前大家當然要先安裝 "code Blocks" and "OpenCV" 兩個程式
安裝過程我就省略了,直接從如何在 code Blocks 環境下使用 OpenCV 開始教起
(圖一)開啟 code Blocks 選擇 settings -> Compiler and debugger
(圖二)選擇 Linker settings 然後在 Other linker Options
輸入 -lhighgui -lcv -lcxcore -lcvaux -lcvcam

(圖三)選擇 Search directories 選擇 Compiler
輸入

C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\cv\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cvaux\include
C:\Program Files\OpenCV\otherlibs\cvcam\include
(圖四)繼續在 Search directories 選擇 Linker
輸入
C:\Program Files\OpenCV\lib
這樣就大功告成啦~~!!

沒有留言: