当前位置:网站首页>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.
边栏推荐
- 如何使用Houdini进行程序化优化?
- 通过单总线调用ds18b20的问题
- 入门文档04 一个任务依赖另外一个任务时,需要按顺序执行
- 快问快答—腾讯云服务器常见问题解答
- Spark源码-任务提交流程之-6-sparkContext初始化
- [Day1] (Super detailed steps) Build a soft RAID disk array
- Configuration of TensorFlow ObjecDetectionAPI under Anaconda3 of win10 system
- The spark operator - repartition operator
- Wireshark抓包及常用过滤方法
- Hard Disk Partitioning and Permanent Mounting
猜你喜欢
随机推荐
Spark源码-任务提交流程之-6.2-sparkContext初始化-TaskScheduler任务调度器
【Day8】 RAID磁盘阵列
spark源码-任务提交流程之-5-CoarseGrainedExecutorBackend
D39_欧拉角与四元数
spark源码-任务提交流程之-2-YarnClusterApplication
Why can't I add a new hard disk to scan?How to solve?
你要找的cocos面试答案都在这里了!
入门文档04 一个任务依赖另外一个任务时,需要按顺序执行
D39_向量
每日一题-最长有效括号-0724
如何用UE5渲染一个可爱的茶壶屋?
线上问题排查流程
Unity huatuo 革命性热更系列1.3 huatuo示例项目源码分析与启发
TensorFlow ObjecDetectionAPI在win10系统Anaconda3下的配置
新一代解析技术——云解析
[Pytorch study notes] 8. How to use WeightedRandomSampler (weight sampler) when the training category is unbalanced data
Spark源码-任务提交流程之-6.1-sparkContext初始化-创建spark driver端执行环境SparkEnv
【Day1】(超详细步骤)构建软RAID磁盘阵列
dsf5.0 弹框点确定没有返回值的问题
IP地址及子网的划分