m.opencv.org/t/opencv-4-7-c-17-windows-10-imread-warn-cutoff-empty-return/12089
My issue:
Code: Select all
[ WARN:[email protected]] global loadsave.cpp:248 cv::findDecoder imread_(''): can't open/read file: check file path/integrity OpenCV Exception: OpenCV(4.9.0) C:\GHA-OCV-1_work\ci-gha-workflow\ci-gha-workflow\opencv\modules\highgui\src\window.cpp:449: error: (-215:Assertion failed) !winname.empty() in function 'cv::namedWindow'
https://github.com/opencv/opencv/issues/24632
https://foru
Console app C++ 17 X64 unicode Compiler: VS 2022
Program
Code: Select all
#include <iostream>
#include <opencv2/opencv.hpp>
#include <Windows.h>
int main()
{
try {
cv::Mat img = cv::imread("C:\\Users\\S06\\Downloads\\panneau.jpg", cv::IMREAD_COLOR);
cv::namedWindow("Image", cv::WINDOW_AUTOSIZE);
cv::imshow("Image", img);
cv::waitKey(0);
}
catch (const cv::Exception& e) {
std::cerr << "OpenCV Exception: " << e.what() << std::endl;
system("pause");
return -1;
} catch (const std::exception& e) {
std::cerr << "Standard Exception: " << e.what() << std::endl;
system("pause");
return -1;
} catch (...) {
std::cerr << "Unknown Exception" << std::endl;
system("pause");
return -1;
}
system("pause");
return 0;
}