This is really simple if you know what to do .
Now go to Directories
- Download OpenCV : install ; check the path where it is installed. for eg C:\Opencv2.x
- Download DevCPP: install ;
Once done with both
Open Dev Cpp.Go to TOOLS - COMPILER OPTIONS . ADD new compiler (click on plus sign).
Name it OpenCV.
Add these lines and tick
Add these foll commands while calling compiler
-L"C:\OpenCV\lib" -lcxcore210 -lcv210 -lcvaux210 -lhighgui210 -lml210
while doing so change the lib path( C:\OpenCV\lib) according to the path you have saved.GO to the lib folder in opencv dir and check for the above files linked .eg cxcore210 check if there is some other name instead and replace accordingly.
Add these lines and tick
Add these foll commands to the linker command line
-lcxcore210 -lcv210 -lcvaux210 -lhighgui210 -lml210
first in Binaries Add path to opencv Bin folder
C:\OpenCV\bin
again change it according to your bin path
then go to Libraries Add path to opencv Lib folder
C:\OpenCV\lib
again change it according to your lib path
then go to C includes Add path to opencv Include folder
C:\OpenCV\include
again change it according to your include path
then go to C++ includes Add path to opencv Include folder
C:\OpenCV\include
again change it according to your include path
Now go to Environment Variables and edit path variable
and add Opencv/bin to path and save.
Again the bin path should be according to your install dir opencv path. change it accordingly.
click ok and your are done .
go to samples and run them.
if u get errors
Make sure you have selected operating compiler as openCV.
Project -Project options - Compiler
cheers