Tuesday, June 8, 2010

How to Install OpenCV 2.1 on your Windows using Cmake GUI

Download “OpenCV-2.1.0-win.zip” and extract it to “C:\Program Files\OpenCV\OpenCV210”. This folder now should include subfolders like

  • C:\Program Files\OpenCV\OpenCV210\3rdparty
  • C:\Program Files\OpenCV\OpenCV210\apps
  • C:\Program Files\OpenCV\OpenCV210\data
  • C:\Program Files\OpenCV\OpenCV210\utils
  • And also should include CmakeLists.txt, (C:\Program Files\OpenCV\OpenCV210\CmakeLists.txt)

Download “cmake-2.8.1-win32-x86.exe” and install Cmake GUI.

  • Where is the source code? > C:\Program Files\OpenCV\OpenCV210\
  • Where to build the binaries? > C:\Program Files\OpenCV\OpenCV210\
  • Library files (C:\Program Files\OpenCV\OpenCV210\lib) and Binaries (C:\Program Files\OpenCV\OpenCV210\bin) are going to be put in corresponding folders.
  • Click “Configure” for a second time and the red lines will turn white. Then click on “Generate”.
  • “OpenCV.sln” will be put in C:\Program Files\OpenCV\OpenCV210\.
Open “OpenCV.sln” using Microsoft Visual Studio 2008 and build whatever you need, Right Click on cv, cxcore, highgui or other library components you may wish and click on “Build” both in Debug and Release modes.

No comments:

Post a Comment