【OpenCV】VisualStudio上项目应用OpenCV 之OpenCV配置

Suppose you have installed Microsoft VisualStudio 2010

1、 Download OpenCV 2.3.1 at http://opencv.org/downloads.html

2、Create a Win32 console application

3、 Config opencv      …

         3.1  Menu Project> $ProjectName Properties

         3.2 Choose Configuration Manager . . . and add X64 platform

         3.3 At configuration field, choose All configuration

                   3.3.1 At configuration properties > C/C++ >   AdditionalInclude , add opencv include folders

                                     $opencv\build\includeDirectories

                                     $opencv\build\opencv

                                     $opencv\build\opencv2

                   NOTE: $opencv is a folder thatyou have installed opencv

                   3.3.2 At configuration properties > Linker > Additional Library Directories ,add opencv library folder

                          $opencv\build\X64\vc10\lib

         3.4 At configuration field, choose Debug mode

                   3.4.1 At configuration properties > Linker > Additional dependencies > add dependencies libraries

opencv_calib3d231d.lib

opencv_contrib231d.lib

opencv_core231d.lib

opencv_features2d231d.lib

opencv_flann231d.lib

opencv_gpu231d.lib

opencv_haartraining_engined.lib

opencv_highgui231d.lib

opencv_imgproc231d.lib

opencv_legacy231d.lib

opencv_ml231d.lib

opencv_objdetect231d.lib

opencv_ts231d.lib

opencv_video231d.lib

 

 NOTE:

1 . These aforementionedfile are located at  .\opencv\build\x64\vc10\lib\

2. How to extract allfilenames in a folder

 “win+R” > “cmd+Enter” > cd “$folder”> type in “dir” > ‘Enter > right click choose “Mark” > Drag toselect all filename > Copy and Print

3. In Debug mode ,thelibraries name are with “d” before “.” While without “d” in Release mode

3.5 Atconfiguration field , choose Release mode

                  3.5.1 At configuration properties >Linker > Additional dependencies > add dependencies libraries

opencv_calib3d231.lib

opencv_contrib231.lib

opencv_core231.lib

opencv_features2d231d.lib

opencv_flann231.lib

opencv_gpu231.lib

opencv_haartraining_engine.lib

opencv_highgui231.lib

opencv_imgproc231.lib

opencv_legacy231.lib

opencv_ml231.lib

opencv_objdetect231.lib

opencv_ts231.lib

opencv_video231.lib

NOTE:

1 . These aforementionedfile are located at  .\opencv\build\x64\vc10\lib\

2. How to extract allfilenames in a folder

 “win+R” > “cmd+Enter” > cd “$folder”> type in “dir” > ‘Enter > right click choose “Mark” > Drag toselect all filename > Copy and Print

3. In Debug mode ,thelibraries name are with “d” before “.” While without “d” in Release mode

         3.6 Add $opencv\build\x64\v10\bin to System Environment Path

Let’s Start!

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值