【OpenCV3】OpenCV3.0 在WIN8+VS2012环境下的配置
一、配置環境變量
1.1、在OpenCV官網http://opencv.org/下載OpenCV最新版本OpenCV3.0 ALPHA?,并解壓到指定安裝路徑下(這里安裝到D:\OpenCV300下)如下圖所示
1.2、為OpenCV3.0添加環境變量:計算機 -->?屬性?-->?高級系統設置
1.3、在系統屬性對話框內點擊“系統變量”
1.4、配置環境變量:將“;D:\OpenCV300\opencv\build\x86\vc11\bin”路徑加入到Path環境變量中(注意:盤符前加上分號),如下:
二、在VS2012中配置編譯環境:
2.1、?新建一個VC++項目。
2.2、打開:視圖->屬性管理->Microsoft.Cpp.Win32.user->屬性,如下圖:
2.3、在VC++目錄->包含目錄,添加:
???????? D:\OpenCV300\opencv\build\include
???????? D:\OpenCV300\opencv\build\include\opencv
???????? D:\OpenCV300\opencv\build\include\opencv2
2.4、在VC++目錄->庫目錄,添加:
???????? D:\OpenCV300\opencv\build\x86\vc11\lib
???????? D:\OpenCV300\opencv\build\x86\vc11\staticlib
?????????(注意:64位機器選擇x64,VS2008選擇vc10, vs2012選擇vc11, vs選擇vs12)
2.5、在連接器->輸入->附加依賴項,添加:
????????????? IlmImfd.lib
???????????? ?libjasperd.lib
?????????????libjpegd.lib
?????????????libpngd.lib
?????????????libtiffd.lib
libwebpd.lib
opencv_calib3d300d.lib
opencv_core300d.lib
opencv_features2d300d.lib
opencv_flann300d.lib
opencv_highgui300d.lib
opencv_imgcodecs300d.lib
opencv_imgproc300d.lib
opencv_ml300d.lib
opencv_objdetect300d.lib
opencv_photo300d.lib
opencv_shape300d.lib
opencv_stitching300d.lib
opencv_superres300d.lib
opencv_ts300d.lib
opencv_video300d.lib
opencv_videoio300d.lib
opencv_videostab300d.lib
opencv_world300d.lib
zlibd.lib
IlmImf.lib
libjasper.lib
libjpeg.lib
libpng.lib
libtiff.lib
libwebp.lib
opencv_calib3d300.lib
opencv_core300.lib
opencv_features2d300.lib
opencv_flann300.lib
opencv_highgui300.lib
opencv_imgcodecs300.lib
opencv_imgproc300.lib
opencv_ml300.lib
opencv_objdetect300.lib
opencv_photo300.lib
opencv_shape300.lib
opencv_stitching300.lib
opencv_superres300.lib
opencv_ts300.lib
opencv_video300.lib
opencv_videoio300.lib
opencv_videostab300.lib
opencv_world300.lib
??????????????? zlib.lib
??????? 至此,配置完畢(注意保存)~
總結
以上是生活随笔為你收集整理的【OpenCV3】OpenCV3.0 在WIN8+VS2012环境下的配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【OpenCV3】双线性插值
- 下一篇: 【OpenCV3】图像的读取、显示与保存