The steps are:
- Download CMake and install it (in the installation wizard choose to add CMake to the system PATH).
- Download the 'release' version of OpenCV.
- Extract the archive to a directory of your choice. I will be using
c:/opencv/
. - Launch CMake GUI.
- Browse for the source directory
c:/opencv/
. - Choose where to build the binaries. I chose
c:/opencv/release
. - Click 'Configure'. In the screen that opens choose the generator according to your compiler. In our case it's 'MinGW Makefiles'.
- Wait for everything to load, afterwards you will see this screen:
- Change the settings if you want, or leave the defaults. When you're done, press 'Configure' again. You should see 'Configuration done' at the log window, and the red background should disappear from all the cells.
- At this point CMake is ready to generate the makefile with which we will compile OpenCV with our compiler. Click 'Generate' and wait for the makefile to be generated. When the process is finished you should see 'Generating done'. From this point we will no longer need CMake.
- Browse for the source directory
- Open MinGW shell (The following steps can also be done from Windows' command prompt).
- Enter the directory
c:/opencv/release/
. - Type
mingw32-make
and press enter. This should start the compilation process. - When the compilation is done OpenCV's binaries are ready to be used.
- For convenience, we should add the directory
C:/opencv/release/bin
to the system PATH. This will make sure our programs can find the needed DLL's to run. - Config in Eclipse
- Project properties => GCC C++ Compiler => Includes, add this as new line "C:\opencv_2_4_13\build\include"
- In MinGW Linker, add these lines at Libraries
libopencv_contrib2413
libopencv_core2413
libopencv_features2d2413
libopencv_flann2413
libopencv_gpu2413
libopencv_highgui2413
libopencv_imgproc2413
libopencv_legacy2413
libopencv_ml2413
libopencv_nonfree2413
libopencv_objdetect2413
libopencv_photo2413
libopencv_stitching2413
libopencv_ts2413
libopencv_video2413
libopencv_videostab2413
And "C:\opencv_2_4_13\{your_build}\lib" in Libraby search
Done.
0 comments :
Post a Comment