环境:visual studio2010 opencv2.4.10
1、项目—demo(自己取项目名称)属性---配置属性—VC++目录—包含目录:D:\opencv\opencv\build\include;)
2、配置属性—VC++目录—库目录:D:\opencv\opencv\build\x86\vc10\lib 3、链接器—输入—附加依赖项—添加一下这些(针对Debug调试): opencv_ml2410d.lib 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_objdetect2410d.lib opencv_ts2410d.lib opencv_video2410d.lib opencv_nonfree2410d.lib opencv_ocl2410d.lib opencv_photo2410d.lib opencv_stitching2410d.lib opencv_superres2410d.lib
opencv_videostab2410d.lib 4.按F5运行,若出现这样的情况:无法找到系统文件,缺少…..demo.exe程序。则需下载 u 将其解压后文件夹中包含的bin文件夹,复制到D:\opencv\opencv\build\common\tbb里;若还不行,可关掉当前文件,重新建立新项目,再进行配置! u 完成以后,计算机属性---高级系统设置—环境变量---选择path—双击—添加路径:D:\opencv\opencv\build\x86\vc10\bin;D:\opencv\opencv\build\common\tbb\ia32\vc10 配置完成!!!!!! 永久的配置:
上述步骤创建的两个属性表OpenCV_debug_property.props 和OpenCV_release_property.props保存到一个常用的文件夹中。当创建新工程时,只需在属性管理器中添加上述两个属性表就可,快速完成配置OpenCV的步骤。
|