Ask Your Question

newbie's profile - activity

2013-01-06 01:04:27 -0600 asked a question OpenCV some Functions are "unknown"

Hello,

I want to use the Rectangel function: void rectangle(Mat& img, Point pt1, Point pt2, const Scalar& color, int thickness=1, int lineType=8, int shift=0)

I'm programming in Qt Creator on a Ubuntu PC(x86). Till now my application is working(opening a camera stream and making some filtering) now I want to draw a rectangle in the window, but the compiler says "error: 'Rectangle' was not declared in this scope" and the same happens if I want to use the Function SetImageROI

I guess it's a primitive mistake(any file is missing?), it seems like that I'm "blind" !

Here my .pro file and the headers I included in main.cpp

.pro file:

INCLUDEPATH += /usr/local/include/opencv2

LIBS += -L/usr/local/lib \
-lopencv_core \
-lopencv_highgui \
-lopencv_imgproc \
-lopencv_features2d \
-lopencv_calib3d \
-lopencv_flann \
-lopencv_gpu \
-lopencv_legacy \
-lopencv_ml \
-lopencv_nonfree \
-lopencv_objdetect \
-lopencv_photo \
-lopencv_stitching \
-lopencv_ts \
-lopencv_video \`enter code here`
-lopencv_videostab

main.cpp:

#include <opencv2/opencv.hpp>