Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 12

Cannot display image loaded from disk in release build

Previous: Comment by unxnut for Hi everyone,I have been unable to find a solution for my problem, where cv::Mat image = cv::imread("path/to/file.jpg"); works in debug, but not in release build.I am using Visual C++ on Windows and OpenCV 2.4.2. My code just finds a file on disk and reads it using cv::imread. When in Debug mode, I can use cv::imshow to show the loaded image and it will. When in a release build, it won't. I have discovered that for some reason the loaded image in the release build has 1 channel, while the same image in a debug build has three.The exception is:OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in unknown function, file ......\src\opencv\modules\core\src\array.cpp, line 2482The include, and lib folders are the same for my release build as my debug build. I don't understand what's going wrong, but I would like to be able to create a release build of my program for the production environment.
$
0
0
Hi everyone, I have been unable to find a solution for my problem, where cv::Mat image = cv::imread("path/to/file.jpg"); works in debug, but not in release build. I am using Visual C++ on Windows and OpenCV 2.4.2. My code just finds a file on disk and reads it using `cv::imread`. When in Debug mode, I can use `cv::imshow` to show the loaded image and it will. When in a release build, it won't. I have discovered that for some reason the loaded image in the release build has 1 channel, while the same image in a debug build has three. The exception is: OpenCV Error: Bad flag (parameter or structure field) (Unrecognized or unsupported array type) in unknown function, file ..\..\..\src\opencv\modules\core\src\array.cpp, line 2482 The include, and lib folders are the same for my release build as my debug build. I don't understand what's going wrong, but I would like to be able to create a release build of my program for the production environment.

Viewing all articles
Browse latest Browse all 12

Trending Articles