Hello friends. The following program WORKED to read image files, but it stopped working and gave the following error:
global loadsave.cpp:268 cv::findDecoder imread_(''): can't open/read file: check file path/integrity
#include <opencv2/imgcodecs.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using namespace cv;
using namespace std;
Mat img;
int main() {
cout << "Iniciando meu primeiro projeto com OpenCV\n";
// string imagename = "C:\\opencv\\sources\\samples\\data\\lena.jpg";
string imagename = "D:\\imgteste\\test.png";
img = imread(imagename, IMREAD_COLOR);
if (img.empty())
{
cout << "Nao foi possivel abrir/ler a imagem : " << imagename << endl;
return 1;
}
imshow("Imagem da famosa Lena", img);
waitKey(0);
}
Windows 11 and Visual Studio Community updated
Windows 11 - Visual Studio Community 2022 - OpenCV 10.0.0
Anyone with the same problem, or suggestion?