close

首先, 先下載安裝OpenCV2.4.10, 安裝方式請參考下面這篇:

Quick Installation for OpenCV 2.4.10 with Visual Studio 2013

版本: Visual Studio 2013 and OpenCV 2.4.10

準備建立四種不同屬性管理員專案,

可以方便以後使用OpenCV2.4.10直接下載使用,

免除重複設定include & library環境

1. VS2013OpenCV2410X86Release

2. VS2013OpenCV2410X86Debug

3. VS2013OpenCV2410X64Debug

4. VS2013OpenCV2410X64Release

--------------------------------------------------

1. 建立C++ Win32 Console Application

2. 命名colorInRange

image

image

記得DLL

image

image

image

------------------------------------------------------------------

3. 新增屬性專案 VS2013OpenCV2410X86Release.props

image

滑鼠雙擊VS2013OpenCV2410X86Release進入編輯

image

image

include路徑

C:\OpenCV\OpenCV2410\include

C:\OpenCV\OpenCV2410\include\opencv

image

library路徑

image
opencv_calib3d2410.lib
opencv_contrib2410.lib
opencv_core2410.lib
opencv_features2d2410.lib
opencv_flann2410.lib
opencv_gpu2410.lib
opencv_highgui2410.lib
opencv_imgproc2410.lib
opencv_legacy2410.lib
opencv_ml2410.lib
opencv_nonfree2410.lib
opencv_objdetect2410.lib
opencv_ocl2410.lib
opencv_photo2410.lib
opencv_stitching2410.lib
opencv_superres2410.lib
opencv_ts2410.lib
opencv_video2410.lib
opencv_videostab2410.lib

image

--------------------------------------------------

仿照步驟3, 依樣畫葫蘆

4. 新增屬性專案 VS2013OpenCV2410X86Debug.props

image

image

滑鼠雙擊VS2013OpenCV2410X86Debug進入編輯

image

include路徑

C:\OpenCV\OpenCV2410\include

C:\OpenCV\OpenCV2410\include\opencv

image

library路徑

image

opencv_calib3d2410d.lib
opencv_contrib2410d.lib
opencv_core2410d.lib
opencv_features2d2410d.lib
opencv_flann2410d.lib
opencv_gpu2410d.lib
opencv_highgui2410d.lib
opencv_imgproc2410d.lib
opencv_legacy2410d.lib
opencv_ml2410d.lib
opencv_nonfree2410d.lib
opencv_objdetect2410d.lib
opencv_ocl2410d.lib
opencv_photo2410d.lib
opencv_stitching2410d.lib
opencv_superres2410d.lib
opencv_ts2410d.lib
opencv_video2410d.lib
opencv_videostab2410d.lib

image

--------------------------------------------------

預設 Debug Wind32 | Release Win32 , 接下來建立X64版本

image

BUILD->Configuration Manager

image

新增x64版本(從Win32複製一份)

image

可以看到新增的 Debug x64 | Release x64

image

新增x64屬性管理, 先刪除剛才複製VS2013OpenCV2410Debug

image

--------------------------------------------------

仿照步驟3, 點選Debgu | x64, 滑鼠右鍵點選Add New Project Property Sheet

image

5. 新增屬性專案 VS2013OpenCV2410X64Debug.props

image

include路徑

C:\OpenCV\OpenCV2410\include

C:\OpenCV\OpenCV2410\include\opencv

image

library路徑

image

opencv_calib3d2410d.lib
opencv_contrib2410d.lib
opencv_core2410d.lib
opencv_features2d2410d.lib
opencv_flann2410d.lib
opencv_gpu2410d.lib
opencv_highgui2410d.lib
opencv_imgproc2410d.lib
opencv_legacy2410d.lib
opencv_ml2410d.lib
opencv_nonfree2410d.lib
opencv_objdetect2410d.lib
opencv_ocl2410d.lib
opencv_photo2410d.lib
opencv_stitching2410d.lib
opencv_superres2410d.lib
opencv_ts2410d.lib
opencv_video2410d.lib
opencv_videostab2410d.lib

image

--------------------------------------------------

6. 新增屬性專案 VS2013OpenCV2410X64Release.props

新增x64屬性管理, 先刪除剛才複製VS2013OpenCV2410Release

image

Add New Project Property Sheet

image

image

include路徑

C:\OpenCV\OpenCV2410\include

C:\OpenCV\OpenCV2410\include\opencv

image

library路徑

image

opencv_calib3d2410.lib
opencv_contrib2410.lib
opencv_core2410.lib
opencv_features2d2410.lib
opencv_flann2410.lib
opencv_gpu2410.lib
  opencv_highgui2410.lib
  opencv_imgproc2410.lib
  opencv_legacy2410.lib
opencv_ml2410.lib
opencv_nonfree2410.lib
opencv_objdetect2410.lib
opencv_ocl2410.lib
opencv_photo2410.lib
opencv_stitching2410.lib
opencv_superres2410.lib
opencv_ts2410.lib
opencv_video2410.lib
opencv_videostab2410.lib

image

--------------------------------------------------

經過以上設定可以得到, 四個設定好的屬性管理員

版本: Visual Studio 2013 and OpenCV 2.4.10

可以方便以後使用OpenCV2.4.10直接下載使用,

免除重複設定include & library環境

1. VS2013OpenCV2410X86Release

2. VS2013OpenCV2410X86Debug

3. VS2013OpenCV2410X64Debug

4. VS2013OpenCV2410X64Release

image



--------------------------------------------------

參考資料:

1. Quick Installation for OpenCV 2.4.10 with Visual Studio 2013

2. 利用C# 拉UI並傳參數給OpenCV C++ DLL

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 me1237guy 的頭像
    me1237guy

    天天向上

    me1237guy 發表在 痞客邦 留言(0) 人氣()