Configure Netbeans C++ With OpenCV

CONFIGURE NETBEANS C++ WITH OPENCV
ref: http://www.technical-recipes.com/2015/configure-netbeans-to-use-opencv-in-linux-environments/
1. Create C++ Application Project
File->New Project->C/C++ ->C/C++ Application->Next->’Give it the Project name and the location’ AND CHOOSE C++11->Finish

2. Configure the compiler:
Right Click The project->Properties->Build->C++ Compiler->’Include Directories’: /usr/local/include/opencv ->Apply

3. Add the opencv libraries:
Right Click The project->Properties->Build->Linker->’Additional Library Directories’: /usr/local/lib ->Apply
Right Click The project->Properties->Build->Linker->’Libraries’: Add -> Click Add Library THEN GO TO /usr/local/lib ->CLICK (SIMULTANEOUSLY) libopencv_core.so, libopencv_highgui.so, libopencv_imgproc.so, libopencv_imgcodecs.so
OK

NOTE: TO SHOW VIDEO CAPTURE, ADD libopencv_videoio.so
4. Test
in main.cpp:

BUILD & RUN:
OPENCV VERSION: 3.1.0

RUN FINISHED;

exit value 0;

real time: 0ms; user: 0ms; system: 0ms
SHOW IMAGE main.cpp:

 

VIDEO CAPTURE main.cpp (add linker libopencv_videoio.so) :

 

Leave a Reply

Your email address will not be published. Required fields are marked *