OpenCV 2.0 Installation on Windows XP and Visual Studio 2008

Jan 13, 2010 | Tags: OpenCV | del.icio.us del.icio.us | digg Digg

Many of us thought of doing project in computer vision using OpenCV library. But beginners find it difficult to use the OpenCV library because of the installation problem. So here is quick tutorial to install OpenCV 2.0. This tutorial assumes that you use windows XP and visual studio 2008 Express Edition. Send your questions and feedback to shrinivas [at] iitg.ernet.in

Related Articles

The Downloads

21 Comments

Y-axeln on Jan 14, 2010:

Wow, what a coincidence! I was struggling with this for an hour earlier today, and you posted this just yesterday!

I ended up using MinGW and Eclipse CTD instead however (which was even more complicated to get working, since it will only build using GCC 4.4.0, not 3.x.x or 4.4.1..)

Awesome site! I am just starting my final year project now, which is a robotics/machine vision/control theory project that will use OpenCV in part. Your tutorials and guides have made it a lot easier to get started with the library!

And it is terribly inspiring, now i've got tons of crazy projects I feel like doing involving webcams and image processing.

Y-axeln on Jan 16, 2010:

There are some slight typos in the pdf that any reader should take notice of:
on page 5 it says

C:/OpenCV2.0/vs2008/debug
C:/OpenCV2.0/vs2008/Release

when it refers to the dll directories where it is supposed to say

C:/OpenCV2.0/vs2008/lib/debug
C:/OpenCV2.0/vs2008/lib/Release

respectively.

shri on Jan 18, 2010:

Y-axeln,
thanks
thats right I am sorry,
and the correction is:

C:/OpenCV2.0/vs2008/lib/debug
C:/OpenCV2.0/vs2008/lib/Release

as you rightly pointed out
thank you.

shri on Jan 19, 2010:

I am trying out svm for facial expression classification
any help about training and prediction using svm

thanks in advance

Cosmin on Jan 23, 2010:

Hello, i followed your tutorial and i installed opencv with visual studio 2008, but when i debug and run the program it says highgui200.dll not found. This only happens when i have to include the highgui.h header file.
Any ideas?

PS: i get no errors at building process.

Thanks.

shri on Jan 25, 2010:

Cosmin,

check in the properties of the project (linker option) is set perfectly,(19th step) (not .dll but .lib)

if it is perfect, then check the as explained at step 13. if in this step if you cannot see the highgui200.lib then goto cmake process.

Joseph on Feb 1, 2010:

Hi,
Thank you for the instructions, they are very helpful. I had the same problem as Cosmin. I can build several projects just fine, and when I take out the commands from highgui200, it works fine. If I use the highgui200 commands, it will build and says no errors, but when I run the program it gives a message highgui200.dll not found.

I double checked that the folders were all generated correctly and it looks just like the document described. And the linker is the same too. And I set the paths correctly. I even tried dropping a copy of the dll in my working directory, and it gives the same message.

I am using windows 7 x32, I dont know if this is something pertaining to the operating system.

shri on Feb 1, 2010:

joseph

in the linker option don't include highgui200.dll but highgui200.lib then recompile (in the linker option check names of the file it should be .lib not .dll

i have not tried on window 7

SiddeeqHssn on Feb 1, 2010:

hi all thank you very much for this paper. i have the same problem with Joseph & Cosmin but i solve it by make a copy of these files: cv200.dll, cvaux200.dll, cxcore200.dll, cxts200.dll, highgui200.dll, ml200.dll and opencv_ffmpeg200.dll from E:\OpenCV2.0\xyz\bin\Release to Debug directory of the project and everything's ok.

Eduardo on Feb 11, 2010:

Iīm facing the same problem...
highgui200.dll not found
Copying files from release to debug didnīt solve!

deufrai on Feb 12, 2010:

Thank you for sharing all this about OpenVC.
I'm just starting investingating it and most gledly found your site.

Y-axeln : please would there be a chance for you to share your experience with CDT to set you up with OpenCV ?

AGK on Feb 14, 2010:

Hi have the same problem as joseph highgui200.dll not found error!
(I have set it as .lib in Linker...)
I have also done what SiddeeqHssn has done, but of no use.
Windows Vista, VS2008 Professional

Honza on Feb 15, 2010:

Thx SiddeeqHssn. I had the same problem, now it works fine. Is possible to make it working without copy of files to project Debug folder?? Thanks a lot.

Dhanushka on Feb 19, 2010:


Hi ,
I have same proble. highgui200.lib not found error...please can you explain little how did you came up with your solution Honza.....

Abhi on Feb 19, 2010:

Thanks yaar, it was a great help. I was dying since the last few days to get it working. The VS2008 integration problem even forced me to migrate to linux (was hassle free).
There is still a small mistake:
PATH should be
C:/OpenCV2.0/vs2008/bin/Debug
C:/OpenCV2.0/vs2008/bin/Release
instead of
C:/OpenCV2.0/vs2008/lib/Debug
C:/OpenCV2.0/vs2008/lib/Release

Saqib on Feb 21, 2010:

The same installation guide works fine for Windows 7 too except for highgui200.dll error which can be soloved by following the solution suggested by SiddeeqHssn. Thanx a lot every1 it gve me a good start....

Mark on Feb 23, 2010:

Yes, i had the same highgui problem. You must change the path directories.

Thank you so much for this tutorial !!!

Mark

bangonkali on Feb 27, 2010:

dude, i have to thank you! thank you very much! and to all those who solved that linker problem. i had the same problem. anyway, it's solved now. i've been doing this for hours already. thanks!

Mark on Mar 2, 2010:

I have been using the above PDF to install OpenCV. Thankyou very much - I found it incredibly useful.

Unfortunately the last instruction 22 is unclear.

21. Then open command prompt by Start->Run->cmd,

22. Change dir to the project debug folder and execute the .exe file by giving the image file
as the argument ( make sure that the file is in debug folder for simplicity )

What am I meant to type in the command prompt here? I know "cd" changes the directory.
But where is the debug folder?
And how do I give the image file as the argument? (Does that mean typing the name of the image file before or after)
What is the image file I am looking for? Is that "imageload.cpp", or is it some *.img file?

Sorry to bother you, but could you please help me here?

Nash on Mar 3, 2010:

'cd' to where imageload.exe is located, and run it like this:

imageload.exe C:\photos\myphoto.jpg

Lucas on Mar 5, 2010:

I followed SiddeeqHssn explanation but didn't solve it. It would still ask me for the same library but with a 'd' at the end. (example: 'cxcore200d.dll' instead of 'cxcore200.dll'). I just made a copy of the 'cxcore200' file, changed its name (added a 'd') and also pasted it in the Debug folder of the project. Not an elegant solution but it solved the problem.

Leave a comment

Name (required)
Email (will not be published) (required)
Website

Characters left = 1000

Tags

Recent Posts

  1. OpenCV Utility: Reading Image Pixels Value
  2. OpenCV Circular ROI
  3. OpenCV 2.0 Installation on Windows XP and Visual Studio 2008
  4. Runtime ROI Selection using Mouse
  5. Real Time Eye Tracking and Blink Detection
View Archives

About the Author

avatar Cool PHP programmer writing cool PHP scripts. Feel free to contact
Tel. +62 31 8662872
+62 856 338 6017
ICQ 489571630
Skype dede_bl4ckheart
Yahoo dede_bl4ckheart
Google nashruddin.amin

Recommended Sites:

Hacker's HTTP Client
HTML and CSS Tutorials
Stop Dreaming Start Action
Online Quran and Translation