Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Hello.

g++ pro.cpp -lopencv_calib3d -lopencv_imgproc -lopencv_contrib -lopencv_legacy -lopencv_core -lopencv_ml -lopencv_features2d -lopencv_objdetect -lopencv_flann -lopencv_video -lopencv_highgui -o pro

It was a BBBBEEEEEiiiiiiiCCCCHHHHH installing then is was a nightmare compiling code. cmake install cmake to compile code. Cmake dose not work that well!!!!!!!!!!!!!!!!!!!!!!!!!!! for anything!!!!!

I use this to compile my code:

    "g++ p.cpp -o p `pkg-config --cflags --libs opencv`"

This web site help allot:

http://stackoverflow.com/questions/15320267/package-opencv-was-not-found-in-the-pkg-config

Could not find my .bash_profile so I just type the each line into the terminal:

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH

I run it with:

./pro

or if i am to supply an image:

./pro butterfly.jpg

#include <opencv2/objdetect/objdetect.hpp>

#include <opencv2/highgui/highgui.hpp>

#include <opencv2/imgproc/imgproc.hpp>

#include <opencv/highgui.h>

#include <ostream>

#include <stdio.h>

#include <stdlib.h>

using namespace cv;

using namespace std;

In old code i replace includes with the above and it work fine and as well with the new stuff.

Good luck,

keghn

Hello.

g++ pro.cpp -lopencv_calib3d -lopencv_imgproc -lopencv_contrib -lopencv_legacy -lopencv_core -lopencv_ml -lopencv_features2d -lopencv_objdetect -lopencv_flann -lopencv_video -lopencv_highgui -o pro

It was a BBBBEEEEEiiiiiiiCCCCHHHHH installing then is was a nightmare compiling code. cmake install cmake to compile code. Cmake dose not work that well!!!!!!!!!!!!!!!!!!!!!!!!!!! for anything!!!!!

I use this to compile my code:

    "g++ p.cpp -o p `pkg-config --cflags --libs opencv`"

This web site help allot:

http://stackoverflow.com/questions/15320267/package-opencv-was-not-found-in-the-pkg-config

Could not find my .bash_profile so I just type the each line into the terminal:

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig

export PKG_CONFIG_PATH

I run it with:

./pro

or if i am to supply an image:

./pro butterfly.jpg

#include <opencv2/objdetect/objdetect.hpp>

#include <opencv2/highgui/highgui.hpp>

#include <opencv2/imgproc/imgproc.hpp>

#include <opencv/highgui.h>

#include <ostream>

#include <stdio.h>

#include <stdlib.h>

using namespace cv;

using namespace std;

In old code i replace includes with the above and it work fine and as well with the new stuff.

Good luck,

keghn