1

I'm quite new around the qt creator and I'm sick of it's building errors and tones of undefined errors. Eventually i installed opencv3.2 with no error. Noti can use opencv libraries but i can't read the files like "image.jpg". I tried everything. Path is %100 correct slashes are correct. There were no error during the cmake installation. Pls give me hand :D


LIBS += C:\opencv3.2\build\bin\libopencv_core320.dll
LIBS += C:\opencv3.2\build\bin\libopencv_highgui320.dll
LIBS += C:\opencv3.2\build\bin\libopencv_imgcodecs320.dll
LIBS += C:\opencv3.2\build\bin\libopencv_imgproc320.dll
LIBS += C:\opencv3.2\build\bin\libopencv_features2d320.dll
LIBS += C:\opencv3.2\build\bin\libopencv_calib3d320.dll
try {
     Mat image = imread("D:\\Adsız.jpeg",0);
     if (!image.data)
         cout << "Data is empty" << endl;
    
     namedWindow("My image");
     imshow("My image",image);
     waitKey();
} catch (const exception& e) {

}

Output

10:50:24: Starting C:\Users\YUNUS EMRE\Qt Workspace\build-OpenCVTest-Desktop_Qt_5_15_0_MinGW_32_bit-Release\release\OpenCVTest.exe ...
Data is empty
OpenCV Error: Assertion failed (size.width>0 && size.height>0) in imshow, file C:\opencv3.2\sources\modules\highgui\src\window.cpp, line 312
[]10:50:27: C:\Users\YUNUS EMRE\Qt Workspace\build-OpenCVTest-Desktop_Qt_5_15_0_MinGW_32_bit-Release\release\OpenCVTest.exe exited with code 0

It returns empty image.

TheArchitect
  • 1,160
  • 4
  • 15
  • 26

1 Answers1

1

I solved the problem by installing Opencv 4.4.0 . It was a little bit hard to install but i figured it out thanks for replies.