Add a warning message using CV_LOG__WARNING().
This way api behaviour is preserved. Outputs are
the same but user gets an extra warning in case
fopen() fails to access image file for some reason.
This would help new users and also debugging
complex apps which use imread()
Signed-off-by: nickjackolson <metedurlu@gmail.com>
FILE* f= fopen( filename.c_str(), "rb" );
/// in the event of a failure, return an empty image decoder
- if( !f )
+ if( !f ) {
+ CV_LOG_WARNING(NULL, "imread_('" << filename << "'): can't open/read file: check file path/integrity");
return ImageDecoder();
+ }
// read the file signature
String signature(maxlen, ' ');