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
Hi.. just a suggestion, use ctrl+alt+prtsc to take the screen shot of the current active window.
ReplyDeleteThnx !
Deletefor a simple program i'm getting the error lik this..error: `Mat' undeclared (first use in this function)
ReplyDeletedid u include the corresponding libraries .
Deletehi thanx fr the tut
ReplyDeletether is no lib or bin folder inside opencv instead
i hav lib and bin inside each of these folders C:\opencv\build\x86\ mingw, vc9, vc10 ,vc11
which one i hav to choose inside them der are no specific named files as cxcore etc
am using opencv 2.4.5
plz help am new to cv
Open vc9 vc10 or vc11 and you find lib and bin folder there
Deletehey bro while i am going to do this thing in netbeans javacv.im getting error that's java.exe not found in correct directory.do you have any idea about this.
ReplyDeleteHey bro is it necessary that openCV library should be in C drive??
ReplyDeletecan you please explain this point clearly:
ReplyDelete"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."
cant get it clear,,wat is it???
Use path to open Cv folder of Your computer this is path to opencv folder on his computer
DeleteI followed all these steps but i am facing the same problem #include "opencv.hpp" No such directory or file.Compilation error.
ReplyDeletedoes this work for Opencv 3.2 as well?
ReplyDeleteThis comment has been removed by the author.
ReplyDeleteThe text written under Compiler Option=>compiler is Not clearly visible please write as a comment here
ReplyDeleteThank you/ . . .
ReplyDeleteHow can i read sample project from you?
ReplyDeleteThere is no //lib or //bin folder
ReplyDeleteSlot Machine - DrmCD
ReplyDeleteSlot Machine · 1. Megaways · 하남 출장샵 2. Wheel of Fortune · 3. Big Fish · 4. King Kong Deluxe Deluxe 구미 출장마사지 · 1xbet 먹튀 5. 세종특별자치 출장샵 Slot Machine · 속초 출장샵 6. King of Spades.