Friday, April 22, 2011

Episode_1_Making_Your_Own_Library

After you have finished all the steps in episode 0, let's get things done and make our own opencv library.

Under your opencv installation directory (In my computer it is under D:\021_OpenCV_2.1\OpenCV-2.1), put a new folder. Call it build_result. Open CMake GUI. From there, add a link to your opencv directory in  the source code textbox. In the second textbox, select our build_result folder. Look at the picture below:
picture 0_build_folder

picture 1_directories
Click configure. Select visual studio 10 from the list as generator. After you see the red screen with all the settings, check which one you would like to install along with the libraries. For me I installed some examples and documentations. Click generate. In a glimpse of an eye, tada. Your libraries are now built inside the build_result folder.
picture 2_done_extracting
Open the OpenCV.sln with visual c++ 2010. Compile with using debug mode. Build solution!
picture 3_open_solution
picture 4_debug_mode
This is taking some time. Again, let's make some noodles.
picture 5_noodles

After it is done. Change the configuration to release mode. Build solution!
picture 6_release_mode

This is now taking much longer time. At the meantime might be you can take a bath or clean your room.
...
After a while
...

When you are done with both procedures, your opencv libraries are correctly installed under:
D:\021_OpenCV_2.1\OpenCV-2.1.0\build_result\lib
Debug and Release folders.

Inside you can find necessary libraries for your software development with opencv. Another important directory is the bin directory. Everytime you need to make a project, you need to copy some dlls from that location.

This is the end of episode 1, now congratulations! Your computer is equipped with opencv!




Enjoy Image Processing,
Erya Fathurrahman, ST, B.Eng

0 comments:

Post a Comment