码迷,mamicode.com
首页 > 其他好文 > 详细

《OpenCV图像处理编程实例》

时间:2019-08-11 12:53:46      阅读:87      评论:0      收藏:0      [点我收藏+]

标签:地址   工程   lib   flann   控制台   err   ogr   lease   图像处理   

《OpenCV图像处理编程实例》例程复现

随书代码下载:http://www.broadview.com.cn/28573

 

总结+遇到的issue解决:

第一章

1.VS2015安装OpenCV2.4.11

四步骤:

1)步骤一:下载Windows安装包OpenCV2.4.11并解压,本人为:D:\ProgramFiles\opencv2

2)步骤二:配置OpenCV2.4.11的环境变量,本人为:D:\ProgramFiles\opencv2\opencv\build\x86\vc12\bin

注意:此处实际此处与系统32位还是64位无关,而与在VS2015工程项目中配置的平台相关,所以,本人电脑64位系统,若添加D:\ProgramFiles\opencv2\opencv\build\x86\vc12\bin,在VS2015工程项目中配置的平台中选择x86,而若若添加D:\ProgramFiles\opencv2\opencv\build\x86\vc12\bin D:\ProgramFiles\opencv2\opencv\build\x64\vc12\bin在VS2015工程项目中配置的平台选择x86和x64均可但是步骤三配置VS工程目录要对应。

3)步骤三:配置VS工程目录

包括:新建空白项目Win32控制台应用程序,属性页面:配置:选择“Debug”平台选择“Win32”需要配置3处:VC++目录(包含目录、库目录)和链接器——“输入”(附加依赖项)

选择“Release”平台选择“Win32”需要配置3处:同上。

本人配置的为:配置:选择“Debug”平台选择“Win32”需要配置3处:VC++目录(包含目录:D:\ProgramFiles\opencv2\opencv\build\include、D:\ProgramFiles\opencv2\opencv\build\include\opencv、D:\ProgramFiles\opencv2\opencv\build\include\opencv2;库目录:D:\ProgramFiles\opencv2\opencv\build\x86\vc12\lib)和链接器——“输入”(附加依赖项:opencv_calib3d2411d.lib
opencv_contrib2411d.lib
opencv_core2411d.lib
opencv_features2d2411d.lib
opencv_flann2411d.lib
opencv_gpu2411d.lib
opencv_highgui2411d.lib
opencv_imgproc2411d.lib
opencv_legacy2411d.lib
opencv_ml2411d.lib
opencv_nonfree2411d.lib
opencv_objdetect2411d.lib
opencv_ocl2411d.lib
opencv_photo2411d.lib
opencv_stitching2411d.lib
opencv_superres2411d.lib
opencv_ts2411d.lib
opencv_video2411d.lib
opencv_videostab2411d.lib

配置:选择“Release”平台选择“Win32”需要配置3处:VC++目录(包含目录:D:\ProgramFiles\opencv2\opencv\build\include、D:\ProgramFiles\opencv2\opencv\build\include\opencv、D:\ProgramFiles\opencv2\opencv\build\include\opencv2;库目录:D:\ProgramFiles\opencv2\opencv\build\x86\vc12\lib)和链接器——“输入”(附加依赖项:opencv_calib3d2411.lib
opencv_contrib2411.lib
opencv_core2411.lib
opencv_features2d2411.lib
opencv_flann2411.lib
opencv_gpu2411.lib
opencv_highgui2411.lib
opencv_imgproc2411.lib
opencv_legacy2411.lib
opencv_ml2411.lib
opencv_nonfree2411.lib
opencv_objdetect2411.lib
opencv_ocl2411.lib
opencv_photo2411.lib
opencv_stitching2411.lib
opencv_superres2411.lib
opencv_ts2411.lib
opencv_video2411.lib
opencv_videostab2411.lib

注意:1)以本人配置的位列,若要配置64位系统库目录应为:D:\ProgramFiles\opencv2\opencv\build\x64\vc12\lib

   (2)若库目录配置为staticlib,这样开发出来的软件将包含opencv库,可以运行于没有安装配置OpenCV开发环境的系统中。如若配置,库目录应为:D:\ProgramFiles\opencv2\opencv\build\x64\vc12\staticlib

4)步骤四:测试OpenCV开发环境是否正确配置。

注意:此处的图像地址一定要正确,本人的是:D:\\Working\\opencvimg\\images\\flower.jpg

2.

 

3.

 

《OpenCV图像处理编程实例》

标签:地址   工程   lib   flann   控制台   err   ogr   lease   图像处理   

原文地址:https://www.cnblogs.com/Alliswell-WP/p/OpenCV_Learning01.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!