Ask Your Question

MarcinXY's profile - activity

2019-10-03 11:01:33 -0600 received badge  Famous Question (source)
2017-03-21 03:36:33 -0600 received badge  Notable Question (source)
2016-09-02 13:19:52 -0600 received badge  Popular Question (source)
2016-04-21 14:55:13 -0600 received badge  Student (source)
2015-06-11 11:24:13 -0600 received badge  Supporter (source)
2015-06-11 10:19:02 -0600 commented answer OpenCV with QT cv::imread problem.

I will remember that. Thank You for helpful hints!

2015-06-11 04:12:57 -0600 received badge  Scholar (source)
2015-06-11 04:12:44 -0600 commented answer OpenCV with QT cv::imread problem.

Yes! This is it! Thank You mr berak. You are a life saver!

2015-06-11 02:09:43 -0600 asked a question OpenCV with QT cv::imread problem.

Dear QT an OpenCV users,

I have installed with CMake actual OpenCV 3.0.0 on my machine. I'm using QT Creator 5.3 with MinGW 32bit (my OS is Win7 64bit).

This simple example code is successfully compiled:

#include <opencv2/opencv.hpp>
#include <opencv2/highgui/highgui.hpp>
using namespace cv;
int main(int argc, char *argv[])
{
namedWindow("Output",1);
Mat output = Mat::zeros(120,350,CV_8UC3);
putText(output,"Hello World :)", cvPoint(15,70),FONT_HERSHEY_PLAIN,3, cvScalar(0,255,0),4);
imshow("Output",output);
waitKey(0);
return 0;
}

It works! So my .pro file, headers, libs, patch etc. should be ok...

But when I try to use something my own, by adding just one line to this code like this:

Mat src = imread("C:/test.bmp",1);

I get the following error during compilation:

undefined reference to `cv::imread(cv::String const&, int)'

I don't really know what I'm doing wrong :( I have been searching in google etc. People have this issue but they have undefined references with all cv:: functions. I can't understand what is wrong there if my example code works (cv::imshow etc. are works).

Those libs in my .pro file are not enought? Please, have a look:

INCLUDEPATH += E://OpenCV//release//install//include
LIBS += "E:\OpenCV\release\lib\libopencv_core300.dll.a"
LIBS += "E:\OpenCV\release\lib\libopencv_highgui300.dll.a"
LIBS += "E:\OpenCV\release\lib\libopencv_imgproc300.dll.a"
LIBS += "E:\OpenCV\release\lib\libopencv_features2d300.dll.a"
LIBS += "E:\OpenCV\release\lib\libopencv_calib3d300.dll.a"

Thanks a lot in advance for any help.