OpenCV & Visual Studio 2008 in Windows Vista. July 28, 2009
Posted by mnikhil4 in Open CV.trackback
Here is a simple guide for using OpenCV Visual Studio 2008 in Windows Vista.
I assume that you have a fair working knowledge of Visual Studio & esp. C/C++.
Installing OpenCV
OpenCV can be downloaded from
SourceForge at: http://sourceforge.net/projects/opencvlibrary/ .
Run the executable and (hopefully) you would have OpenCV installed in your system. Also, the SourceForge site has some documentation which you can use after getting a bit comfortable with OpenCV.
Before working in Visual Studio, go to “C:\Program Files\OpenCV\bin” and copy
“*100.dll” files to ”C:\Windows\System32″.
The files are : cv100.dll , cvaux100.dll, cvcam100.dll, cxcore100.dll & highgui100.dll.
Setting Up the environment in Visual Studio 2008.
1. Open Visual Studio 2008.
2. Goto Tools > Options > Projects & Solutions > VC++ Directories.
3. Choose Library Files from the drop down menu & include the following paths :
“C:\Program Files\OpenCV\lib”
4. Choose Include Files from the drop down menu & include the following paths :
“C:\Program Files\OpenCV\cv\include”
“C:\Program Files\OpenCV\cxcore\include”
“C:\Program Files\OpenCV\otherlibs\highgui”
“C:\Program Files\OpenCV\cvaux\include”
“C:\Program Files\OpenCV\otherlibs\cvcam\include”
5. Choose Source Files from the drop down menu & include the following paths :
“C:\Program Files\OpenCV\cv\src”
“C:\Program Files\OpenCV\cxcore\src”
“C:\Program Files\OpenCV\cvaux\src”
“C:\Program Files\OpenCV\otherlibs\highgui”
“C:\Program Files\OpenCV\otherlibs\cvcam\src\windows”
6. Select from menu “File”->”New…”->”Projects” tab & Choose or “Win32 console application”.
7. In the Win Application Wizard .. For Application type choose Console Application & uncheck all other options.
8. Finish it the “*.cpp” windows will come where you can start coding.
9. Next Click on Project > Properties -> Configuration Properties -> Linker -> Input
In additional dependencies include the following lib files
“cv.lib highgui.lib cxcore.lib”
10. Press Ok & start with the code.
If there is no complication error or something other, your program wil show the desired output.
For Programs you can also check the Sample Folders.
Comments»
No comments yet — be the first.