How to install OpenCV 2.0 on win32

Jive Dadson picture Jive Dadson · Feb 1, 2010 · Viewed 15.9k times · Source

I need to install OpenCV on Win32. I do not have it installed currently. I downloaded OpenCV-2.0.0a-win32.exe and ran it. What the heck do I do now? There are no .lib's and whatnot.

I found some instructions for building the release using cmake at http://opencv.willowgarage.com/wiki/InstallGuide . I downloaded the latest and greatest cmake, and tried to follow the instructions, but I was guessing. No joy.

I specified VC++9 when I did the "configure," but cmake built a VC++ 6 dsw file. No vcproj. I converted the dsw into a vc++9 vcproj anyway, just to see if it would work. Nope. It compiled lots of files, but many failed because it could not find omp.h. Sure enough, it's not there, anywhere. The build log said, 'A tool returned an error code from "Performing Custom Build Step".'

I am lost.

Ideally, I would like to find a full installation with all the files pre-built for Win32 vc++ 2008. Failing that, I need instructions that even I can follow. Short sentences and small words, but lots of them.

Please help!

UPDATE: I tried to build just CXCORE. It complained, "cannot open file 'VCOMPD.lib'" There's that OMP again.

Answer

Jive Dadson picture Jive Dadson · Feb 16, 2010

For version 2.0, you must build the project from source.

Here's what you will need:

  1. The OpenCV installer.
  2. CMake. Here's the CMake installer.
  3. Instructions for using CMake to install OpenCV-2.0.01-win32. Those instructions need an extra step if you are using a vc++ Express edition. In that case you must un-check ENABLE_OPENMP when running the CMake GUI.
  4. Instructions for setting up an application project. (Thanks to mloskot for this find.)