当前位置:网站首页>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.
边栏推荐
- Getting Started Document 09 Standalone watch
- dsf5.0 弹框点确定没有返回值的问题
- 【Day8】使用LVM扩容所涉及的命令
- UE5再次更新!扫描或手动建模面部模型可直接转为绑定好的Metahuman
- I/O性能与可靠性
- [Paper Intensive Reading] The relationship between Precision-Recall and ROC curves
- 每日一题-三数之和-0716(2)
- 【Day8】RAID Disk Array
- [Paper Intensive Reading] Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation (R-CNN)
- CIPU,对云计算产业有什么影响
猜你喜欢
随机推荐
The spark operator - repartition operator
spark source code - task submission process - 2-YarnClusterApplication
每日一题-最长回文子串-0714
Remembering my first CCF-A conference paper | After six rejections, my paper is finally accepted, yay!
Image compression failure problem
Hard Disk Partitioning and Permanent Mounting
Configuration of TensorFlow ObjecDetectionAPI under Anaconda3 of win10 system
Apache配置反向代理
小度 小度 在呢!
【Day8】(超详细步骤)使用LVM扩容
每日一题-删除链表的倒数第 N 个结点-0718
什么?CDN缓存加速只适用于加速静态内容?
spark源码-任务提交流程之-4-container中启动executor
Getting Started Doc 08 Conditional Plugins
论那些给得出高薪的游戏公司底气到底在哪里?
调用TensorFlow Objection Detection API进行目标检测并将检测结果保存至本地
vim的三种模式
lvm logical volume and disk quota
[Day8] (Super detailed steps) Use LVM to expand capacity
Unity huatuo 革命性热更系列1.3 huatuo示例项目源码分析与启发