Ask Your Question

Installation procedure for OpenCV on Windows

asked 2012-07-22 21:18:27 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >50 is welcome to improve it.

Hello everyone,

I am a beginner in OpenCV. I worked in matlab earlier. I have downloaded the opencv library 2.4.2 and I have no idea on how to build library files, etc. I have also downloaded and installed Microsoft Visual C++ 2010 Express. Please guide me with step by step procedure to do all the stuff and begin my project.

I am using Windows 7 64 bit.

Thank you in advance

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2012-07-26 12:53:49 -0600

mjepson gravatar image

The opencv tutorials are a bit outdated. I have had some trouble getting 2.4.2 to run myself. After some trial and error (and combining information from various tutorials) I have finally got it to work, without using CMake or building stuff. See my tutorial here: Installation guide: OpenCV 2.4 with Microsoft Visual C++ 2010

edit flag offensive delete link more


i don't think there is any reason to not use CMake

yes123 gravatar imageyes123 ( 2012-07-26 18:27:59 -0600 )edit

I think there's one: Because it's not necessary, as there are prebuilt lib's and dll's available in the installation folder. I didn't mean to offend anyone, but if you read my tutorial, you'll see that I just use the precompiled dll's and libs that come with OpenCV 2.4.2.

mjepson gravatar imagemjepson ( 2012-07-27 07:02:21 -0600 )edit

i didn't downvote you, indeed i don't think you answer needed a downvoted

yes123 gravatar imageyes123 ( 2012-07-27 15:41:00 -0600 )edit

Here is my +1, but I would suggest to provide updates for existing OpenCV tutorials, to make them more useful. There is no point in posting duplicating instructions everywhere. You can work on a pull request for existing tutorial (, or submit a new one (

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-28 03:27:23 -0600 )edit

And CMake has one very attractive feature. You can build your library (you should always design libraries, and then link them in your apps) for many platforms with a single build script. This is how you can easily write cross-platform libraries and then use them for your Win/Lin/iOS/Android development. I know it may be an overkill for a Windows demo, but it may become a good engineering practice, you will feel it ;-)

Kirill Kornyakov gravatar imageKirill Kornyakov ( 2012-07-28 03:32:53 -0600 )edit

answered 2012-07-22 22:48:25 -0600

updated 2012-07-24 07:47:54 -0600

Kirill Kornyakov gravatar image
edit flag offensive delete link more

Question Tools


Asked: 2012-07-22 21:18:27 -0600

Seen: 1,438 times

Last updated: Jul 26 '12