why image not loaded
I load it by cvLoadImage and chek pointer after that. If it's NULL, image not loaded. But I need to know why ( bad format, file or path not found, e.g. ). How can I do this ?
I load it by cvLoadImage and chek pointer after that. If it's NULL, image not loaded. But I need to know why ( bad format, file or path not found, e.g. ). How can I do this ?
Kindly next time don't forget to update the error with question.
cvLoadImage is C interface in OpenCv that is old interface better to go for C++ interface , you need to study some basics of OpenCv
Follow these Books
Better to use C++ interface
of opencv , use imread
for image load rather than cvLoadImage
Example
Mat image = imread ("image path");
imshow ("myimage" , image);
Thanks for answer !
I have no error, at the wrong load (check NULL pointer after cvLoadImage ) I know, that something went not so and print "ERROR", but I don't know why. I need to know why image not loaded.
Use IplImage because further I use cvCvtColor and cvCvtPixToPlane which don't work with mat... ou, try to do with mat.data and it works)
However, the question in other :) How to understand the reason for which the photo wasn't loaded?
You not so understood me :(( I write the program for processing of a large number of a photo, at the wrong loading to the log is written "ERROR" , but it is necessary that there was also a cause of error, like "ERROR : WRONG PATH" or "ERROR : BAD FORMAT ". Can I do this using OpenCV ?
Asked: 2014-08-29 11:08:16 -0600
Seen: 434 times
Last updated: Aug 29 '14
Error: Couldn't load opencv_java from loader...
Visual Studio throws an exception when I run a simple program
OpenCV Error: Assertion failed (s >= 0) in setSize
Getting Error "Image reader can not be created from -vec vector.vec and -bg bkg.dat"
OpenCV Error : Assertion failed during haartraining
OpenCV: what() function is not implemented