I am really new to OpenCV and I was wondering why my debug string for empty matrix is running when I check if I have a png in my directory. I can confirm that I do indeed have an image by given name in the specified directory.
relevant code:
cv::Mat imgTrainingNumbers;
imgTrainingNumbers = cv::imread("C:/Users/.../source/repos/AutoTrader/training_chars2.png");
if (imgTrainingNumbers.empty()) { // if unable to open image
std::cout << "error: image not read from file\n\n"; // show error message on command line
return(0); // and exit program
}
the program does run up until it tries to open an image. I am confused, why does it do this and what am I doing wrong?

