OpenCV Compilation steps on windows

1 Install CMAKE

http://www.cmake.org/cmake/resources/software.html

Add C:Program Files (x86)CMake 2.8bin to PATH environmental variable

2 Install MingW

http://www.mingw.org/

add C:MinGWbin to PATH environmental variable

3 Install MSYS

http://www.mingw.org/wiki/msys/

add C:Python26Scripts to PATH environmental variable

4 Install Opencv

http://tenet.dl.sourceforge.net/project/opencvlibrary/opencv-win/2.4.1/OpenCV-2.4.1.exe

The exe is actually just an extractor. It extracts all the files to a specified location..

Extract the files

Launch CMD and start CMake GUI by entering the following

The cmake gui is launched and using the gui;

Browse source to the opencv directory you extracted to early

Browse build to a directory where you want your build to be saved. I created a build directory in my extracted opencv folder

Click on configure to create MINGW Make files

The cmake-gui will generate the files showing progress

Once done, A red screen will appear. Click configure again. Keep clicking configure until you have no red screen to show success. If need be edit any variables.

Click generate to create MINGW make files and close cmake-gui and go back to cmd;

Navigate to the opencv extract foder directory

Type “cmake –build build”  on the console.

Cmake build will continue to install. Wait for a while

Then add C:opencvbin; to PATH

Copy cv2.pyd from  C:”Extract folder” opencvbuildpython2.6  to  C:Python26Libsite-packages.  This depends of your python package

4 COMMENTS

  1. Just want to say your article is as astonishing. The clearness to your
    put up is just nice and i could assume you are an expert on this subject.
    Well together with your permission let me to take hold of your RSS
    feed to keep up to date with coming near near post. Thanks 1,000,
    000 and please keep up the enjoyable work.

LEAVE A REPLY

Please enter your comment!
Please enter your name here