当前位置:网站首页>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)
- The spark operator - repartition operator
- Getting Started Doc 08 Conditional Plugins
- 专有宿主机CDH
- 入门文档03 区分开发与生产环境(生产环境才执行‘热更新’)
- 入门文档11 自动添加版本号
- 什么是阿里云·速成美站?
- Unity3D中的ref、out、Params三种参数的使用
- 【Day8】Knowledge about disk and disk partition
- 【Day8】RAID Disk Array
猜你喜欢
随机推荐
【Machine Learning】1 Univariate Linear Regression
D39_欧拉角与四元数
CIPU,对云计算产业有什么影响
单臂路由与三成交换机
云游戏未来展望
URP渲染管线实战教程系列 之URP渲染管线实战解密(一)
ROS视频教程
静态路由
入门文档05 使用cb()指示当前任务已完成
Dsf5.0 bounced points determine not return a value
腾讯云云函数SCF—入门须知
每日一题-两数相加-0711
spark算子-parallelize算子
【Day5】软硬链接 文件存储,删除,目录管理命令
UE5再次更新!扫描或手动建模面部模型可直接转为绑定好的Metahuman
Getting Started 11 Automatically add version numbers
UE4美术你有必要了解的数学基础
【Day8】Knowledge about disk and disk partition
Why can't I add a new hard disk to scan?How to solve?
spark算子-wholeTextFiles算子









