[OpenCV under Visual Studio 2012 Ultimate]
[Tentative experimentation for x86]
Thereare really sofew materials for installing the OpenCV(2.4.3) for Visual Studio 2012. Hence, I have read several blogs to do it, and fortunately Igot it.
----------------------------------------------------------------------------------------------------------------------------
[Envrionment]:
[1] OpenCV 2.4.3
[2] Winodws Eight
[3] Visual Studio 2012 Ultimate
[Steps]:
[1]Based onthat you have installed the visual studio 2012 under windows eight.
[2]Download the opencv2.4.3 fromhttp://opencv.org/, you may choose the windows vision.
And it will prompt the download page automatically.
[3]Double-Click the excutive file(.exe), which will help you unzip it, accurately not "installing".
And now, we assume thewhole directory is -->H:\MySoftware\OpenCV\opencv\
[4]Thenceforth, you get a documentation folder named "opencv", which includes a lot of files
for current domainant platforms ie: Winodws, Mac, Linux/Unix, iOS, Android.
Make sure, you get the folder called "build", which is extreme significant for us.
[5]Add the items for your "Path" system variable. Carefully I push two directories into the "Path".
(1)H:\MySoftware\OpenCV\opencv\build\x86\vc10\bin\
(2)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\
Maybe, the second one is meaningless.
Step by step, complish it.
[6]Restart the Visual Studio 2012, if you have runned it.
[7]Now, we may create a new VC++ project under VS2012.
I founded the Win32 Console Application and chose the "Empty Project".
[8]Look up at your VS2012 File Bar, and manipulate follow under sequence:
View -- Other Windows -- Property Manager, so you get the little"Propert Manager Window".
[9]Concentrate the "tree", you get theone like this:
yourSolutionName:
@Debug|Win32
#Microsoft.Cpp.Win32.user
#Application
#Unicode Support
#Core Windows.Libraries
@Release|Win32
#Microsoft.Cpp.Win32.user
..... .....
[10]Right-Click theorange onecalled "Microsoft.Cpp.Win32.user", and tap the "Properties" item.
[11]Thereby, a simple window show you where you will work.
[12]Press the "VC++ Directories" the resident on the left tree.
[13]Focus on the right part. And click the "Include Directories" and edit it by pressing the down-arrow.
Add the three items into it.
(1)H:\MySoftware\OpenCV\opencv\build\include\
(2)H:\MySoftware\OpenCV\opencv\build\include\opencv\
(3)H:\MySoftware\OpenCV\opencv\build\include\opencv2\
Save it after you have done.
[14]Further more, tap theitem "Library Directories" and edit it too.
Push one directory into it :H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\
And save it.
[Additionally]Press the "Linker" one the left tree, and choose "Input". Concentrate the right part,
and edit the "Additional Directories" by adding three items:
(1)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_core243d.lib
(2)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_highgui243d.lib
(3)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_imgproc243d.lib
And save it.
[15]Now, you can "cultivate" some opencv codes in your empty project.
[For example]:
#include "highgui.h";
int main(int argc , char** argv)
{
IplImage* img= cvLoadImage("./hello.jpg"); //Be sure you have a picture in the root dir
cvNamedWindow("Test One", CV_WINDOW_AUTOSIZE);
cvShowImage("Test One",img);
cvWaitKey(0);
cvReleaseImage(&img);
cvDestroyWindow("Test One");
return 0;
}
//Happily, you may find the visual studio 2012 can auto-complete the part of the function
//, which stands for the success of including the opencvheader file.
//But if you attempt to run it, vs2012 will prompt error saying "Lacking MSVCP100D.dll".
//So Awful.
[16]So let's solve this problem and try to think about "WHY".
(Reason:)You may remember or not,we choose the folder which is named "vc10".
That stands for "Visual Studio 2010" not "2012", so maybe there is something
gone awayfrom 2010 to 2012. To conquer it, we can find the nut called "MSVCP100D.dll"
, get it and put it into theright place.
[17]So"google" is a good buddy, get sufficient results of"MSVCP100D.dll", and you can choose one
for downloading.
[18]Put this guy into the "Windows\System32\" folder, just it.
[19]Run yourOpenCVProjectagain. What was worse, a "POP" again. This time it complain about
"NO MSVCR100D.dll". Look at it again: it is not "MSVCP100D.dll" but "MSVCR100D.dll".
[20]So, you may have got the method: google it --> download it -->put it into Windows\System32\.
[21]Now, come back to your cute Visual Studio 2012 andRUNyour OpenCV Project
(Whose codes you have done) again.
[22]HeHe, it works........................
[23]So, you get the OpenCV now, and it is the lastest one. Enjoy it.
----------------------------------------------------------------------------------------------------------------------------
[Notice]
The method above just show the [Debug Modle]. If you desire to get the [Release One], come back to the
[STEP NINE] and choose the
GREEN ONE, and the setting for the "Linker" changing to :
(1)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_core243.lib
(2)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_highgui243.lib
(3)H:\MySoftware\OpenCV\opencv\build\x86\vc10\lib\opencv_imgproc243.lib
Remeber save it.
There is no "d", becuase the character "d"stands for "DEBUG" in this area.
----------------------------------------------------------------------------------------------------------------------------
[SO CUET THE OPENCV IS]
分享到:
相关推荐
Opencv配置Visual Studio方法和opencv的下载网址
在网上下的很多vs2010配置OpenCV2.4.3都没成功,自己经过测试成功后,写成文档记录下来,已在vs2010上配置成功Opencv2.4.3
opencv在visual studio 2013 下的配置 1.软件准备:opencv安装包,visual studio2013 2.安装visual studio 3.配置vs的opencv编译和链接 4.测试
详细介绍了OpenCV安装配置,Visual Studio2010的安装问题,介绍了OpenCV和VS2010之间的配置
vs2012 + opencv2.4.3 + vs2012 + win7 编译库
OpenCV 4.2.0 Visual Studio 2017 32位 已经编译好lib库,DLL文件,带有配置步骤,实测可以用。
采用OpenCV/Visual Studio环境,调用电脑摄像头,实时监控视频内移动的物体并框选、警报,对进入视频内的人进行人脸识别及追踪,可通过滑动条调节框选移动物体尺寸的阈值,警报阈值,闭操作核的大小以适应不同的监测...
《深入理解OpenCV:实用计算机视觉项目解析》系统地介绍如何使用OpenCV来构建与计算机视觉相关的应用,如增强现实、车牌识别、人脸检测等。每章都会介绍一个典型的计算机视觉应用问题,并并提供相关的背景介绍及全部...
【Android OpenCV】Visual Studio 创建支持 OpenCV 库的 CMake 工程 ③ ( CMake 工程中配置 OpenCV 库文件 | 拷贝 OpenCV 函数库文件 ) https://hanshuliang.blog.csdn.net/article/details/128516414 源码快照 ...
OpenCV2.4.3+VS2012+win7配置,完整操作,非常简单!
【Android OpenCV】Visual Studio 创建支持 OpenCV 库的 CMake 工程 ① ( 下载 OpenCV 库 | Windows 中安装 OpenCV 库 ) https://hanshuliang.blog.csdn.net/article/details/128515811 博客资源 一、下载 OpenCV ...
opencv在Visual Studio中的配置需要耗费好长的时间,这个小软件在主要用于opencv在vs中的自动配置,只需点几个按键,便可完成opencv环境的自动配置。
摘要视图订阅标签: opencv分类:目录(?【OpenCV入门教程之一】 安装OpenCV:OpenCV 3.0、OpenCV 2.4.8、526660人阅读
1. 版本:OpenCV 4.5.5 2. 编译器:Visual Studio 2022 (VC17) 3. 平台: Windows 10 x64 4. 说明:没有CUDA和CUDANN,仅仅有常用的图片、视频处理部分内容。
1 Introduction to OpenCV 2 core module. The Core Functionality 3 imgproc module. Image Processing 4 highgui module. High Level GUI and Media 5 calib3d module. Camera calibration and 3D reconstruction ...
Opencv 2.4.3的opencv_createsamples.exe和opencv_haartraining.exe
opencv android studio开发配置opencv android studio开发配置opencv android studio开发配置
Opencv3.10+Visual Studio2017环境配置检测代码代码就是读取一张图片方便新手入门参考
Learning OpenCV: Computer Vision in C++ with the OpenCV Library(第二版 C++版)