当前位置:网站首页>OpenCV3.0 is compatible with VS2010 and VS2013
OpenCV3.0 is compatible with VS2010 and VS2013
2022-08-05 06:10:00 【cql_cqu】
Reprint: https://blog.csdn.net/fioletfly/article/details/47280727?utm_source=blogxgwz0
1. Basic configuration of OpenCV3.0
I have been tormented by OpeCV3.0 these days, mainlyIt is due to the current Visual Studio switching between 2010 and 2013.So sometimes, although I configure it well, there are always various errors in order to make these two versions run.It's really confusing. I won't talk about the configuration here. Baidu has a lot of them, and the configuration of the 2.x version is almost the same.
Configuration on VS2013:
Include Library Directories



The above configuration is basically ok.
VS2010 configuration:



2. Problems arise
To give a simple example to illustrate the problem, findFunction of contours: findcontours.
void findContours(InputOutputArray image, OutputArrayOfArrays contours, OutputArray hierar-
chy, int mode, int method, Point offset=Point())
void findContours(InputOutputArray image, OutputArrayOfArrays contours, OutputArray hierar-
chy, int mode, int method, Point offset=Point())
I thought that according to the basic configuration, it can run on VS2010 and VS2013 at the same time, because it is configured in the project propertiesOK, see the picture above.Running the same piece of code and processing the same image, the next problem comes.Here I want to tell you that I used VS2010 first, so openCV3.0 was the first to be applied to VS2010, so it ran very well in VS2010, but there were various strange problems when porting to VS2013.
For detailed questions, see the comparison chart:

The contour points found in VS2010 are correct

The contour points found in VS2013 are about to crash,so big
So here is a direct error.
3. Finding the problem
After thinking about it for a long time, I don't know where the error is, and I always suspect that my image hasThe problem, but I didn't see anything famous when I checked it.Here, I carefully debugged and checked the code, and finally got a prompt
, it is really a great VS2013 attachment, otherwise I really can't see it.

This is a few meanings, I didn't joinhave you come in?Oh wait, it doesn't seem to be, because the dependent library only adds these names, and does not add specific addresses.In the dependent library, only
only requires the reference of the lib file. I thought that it would be no problem to directly reference the dll file.But it still seems to have no effect, that is to say, the dll will not be called here, and this dll will not be called from the dependent library.I checked the Internet later,
The things in the bin directory of your opencv configuration are under the directory below
C:\Windows\System32\opencv_world300d.dll
4. Problem Solving
According to the above tips, we only need to copy several folders of the ...\opencv\build\x86\vc12\bin file to C:\Windows\System32.But half of the problem is solved, then VS2010 can't be used again, so this is a toss.It seems that it will be used as much as possible to run on a platform in the future.
5. Tail
Here I need to remind everyone: According to my experiment, the latest version of openCV3.0 seems to beVS2010 is not supported, because there are only vc11 and vc12 in the build file. That is to say, only VS2012 and VS2013 are supported. It seems to give up VS2010. I wonder if there are any experts who can solve this problem.Or use vc11 or vc12 directly in VS2010, this has not been tried, you can try it, it seems that compiling with CMake can be used in VS2010, VS2008, VS2005, etc.
Currently I am using the openCV3.0 Beta version which supports vs2010, vs2012, vs2013.You can try this version, the beta version is relatively stable.
I hope this can help everyone, these tangled people.
边栏推荐
猜你喜欢
![[Paper Intensive Reading] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation (R-CNN)](/img/a7/fc3fe440f5e57362d44ae875b7d436.png)
[Paper Intensive Reading] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation (R-CNN)

入门文档04 一个任务依赖另外一个任务时,需要按顺序执行

dsf5.0新建页面访问时重定向到首页的问题

2020年手机上最好的25种免费游戏

图片压缩失效问题

I/O性能与可靠性

硬核!Cocos开发面试必备十问,让你offer拿到手软

Account and Permission Management

Getting Started Document 01 series in order

入门文档05 使用cb()指示当前任务已完成
随机推荐
入门文档03 区分开发与生产环境(生产环境才执行‘热更新’)
Getting Started Doc 08 Conditional Plugins
D46_给刚体施加的力
IJCAI 2022|Boundary-Guided Camouflage Object Detection Model BGNet
OpenCV3.0 兼容VS2010与VS2013的问题
入门文档07 分阶段输出
偷题——腾讯游戏开发面试问题及解答
huatuo 革命性热更新解决方案系列1·1 为什么这么NB?huatuo革命Unity热更新
【Day1】(超详细步骤)构建软RAID磁盘阵列
“元宇宙”是个啥?都有哪些大招?
Getting Started 04 When a task depends on another task, it needs to be executed in sequence
每日一题-寻找两个正序数组的中位数-0713
网站ICP备案是什么呢?
Contextual non-local alignment of full-scale representations
Getting Started Documentation 12 webserve + Hot Updates
[Day1] VMware software installation
CIPU,对云计算产业有什么影响
添加新硬盘为什么扫描不上?如何解决?
Spark源码-任务提交流程之-6.1-sparkContext初始化-创建spark driver端执行环境SparkEnv
Getting Started Document 01 series in order