You are here:Home » image processing » Linking OpenCV library in DEVC++

Linking OpenCV library in DEVC++

Configuration of Dev-C++

OpenCV - OpenCV is a computer vision library originally developed by Intel. It is free for commercial and research use under the open source BSD license.OpenCV provides cross-platform middle-to-high level API that includes about 300 C functions and a few C++ classes. Also there are constantly improving Python bindings to OpenCV, see interfaces/swig/python and samples/python. OpenCV has no strict dependencies on external libraries, though it can use some (such as libjpeg, ffmpeg, GTK+ etc.).




I found opencv very fast as compared to other image processing libraries namely the tool box provided by MATLAB. But to use it you have to learn how to link it in you favorite IDE. In this post I am posting the linking of opencv library in my favorite IDE DEVC++ by BloodShed. Bloodshed Dev-C++ is distributed under the GNU General Public License. and free for use as compared to Microsoft's VisualC++. Moreover it produces a minimal no of file while compiling. One other feature of DEVc++ is that it is easy to link opencv in it.

For this tutorial I assume that you have installed opencv in C:\ drive of WINDOWS.

[NOTE- For OpenCV 2 or Higher versions see here how to integrate it with DEV C++ ]

In Dev-C++ open the menu "Tools->Compiler options".
In the first tab("Compiler") you need to check the box "Add these commands to the linker command line" and type the following line in the text bow below:
-lhighgui -lcv -lcxcore -lcvaux -lcvcam




Go to the sub-tab "Libraries" in the tab "Directories" and add there C:\Program Files\OpenCV\lib to the paths:




Now switch to the sub-tabs "C Includes" and "C++ Includes" and add this paths:
C:\Program Files\OpenCV\cxcore\include
C:\Program Files\OpenCV\cv\include
C:\Program Files\OpenCV\otherlibs\highgui
C:\Program Files\OpenCV\cvaux\include
C:\Program Files\OpenCV\otherlibs\cvcam\include

0 comments:

Post a Comment