关于OpenCV2.4.9在VS2012上的配置
今天写着篇文章是由于自从上次电脑换硬盘今天再次安装OpenCV又遇到了一些问题,最后终于搞定,,,,用的版本是2.4.9,,,因为第一次配置用3.0的没有配置成功,而2.4.9的配置成功.
首先当然是下载OpenCV了就不说了,假设读者已经下载了
首先配置环境变量
如果有就在后面添加 ;F:\OpenCV2_4_9\opencv\build\x86\vc11\bin;F:\OpenCV2_4_9\opencv\build\x64\vc11\bin
不要丢掉前面的分号
F:\OpenCV2_4_9\opencv\build\x86\vc11\bin;F:\OpenCV2_4_9\opencv\build\x64\vc11\bin
目录随自己的文件目录而定,,,我把86的和64的全加进来了
接着
在后面追加上 ;F:\OpenCV2_4_9\opencv\build\x86\vc11\bin;F:\OpenCV2_4_9\opencv\build\x64\vc11\bin
我们要调用OpenCV的源码首先当然是把--OpenCV的源文件啦...头文件啦..还有链接文件啦(编译过后把使用到的源文件链接在一起的文件)
如果没有--另一种方式
opencv_ml249d.lib
opencv_calib3d249d.lib
opencv_contrib249d.lib
opencv_core249d.lib
opencv_features2d249d.lib
opencv_flann249d.lib
opencv_gpu249d.lib
opencv_highgui249d.lib
opencv_imgproc249d.lib
opencv_legacy249d.lib
opencv_objdetect249d.lib
opencv_ts249d.lib
opencv_video249d.lib
opencv_nonfree249d.lib
opencv_ocl249d.lib
opencv_photo249d.lib
opencv_stitching249d.lib
opencv_superres249d.lib
opencv_videostab249d.lib
opencv_objdetect249.lib
opencv_ts249.lib
opencv_video249.lib
opencv_nonfree249.lib
opencv_ocl249.lib
opencv_photo249.lib
opencv_stitching249.lib
opencv_superres249.lib
opencv_videostab249.lib
opencv_calib3d249.lib
opencv_contrib249.lib
opencv_core249.lib
opencv_features2d249.lib
opencv_flann249.lib
opencv_gpu249.lib
opencv_highgui249.lib
opencv_imgproc249.lib
opencv_legacy249.lib
opencv_ml249.lib
其实是添加的这个里面的内容
好回到
开始测试程序了
显示一张图片,,,123是图片的名字,要把图片放在
你也可以指定路径直接写图片的详细路径
出现这中错误
解决方案
http://blog.csdn.net/fightingforcv/article/details/50345499