Merge pull request #21067 from NickJackolson:nickjackolson/imread-warning

This commit is contained in:
Alexander Alekhin 2021-11-18 22:48:40 +00:00
commit 585484cb06
2 changed files with 4 additions and 1 deletions

View File

@ -226,8 +226,10 @@ static ImageDecoder findDecoder( const String& filename ) {
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, ' ');

View File

@ -67,6 +67,7 @@ static Mat checkMask(InputArray _mask, Size size)
void cv::seamlessClone(InputArray _src, InputArray _dst, InputArray _mask, Point p, OutputArray _blend, int flags)
{
CV_INSTRUMENT_REGION();
CV_Assert(!_src.empty());
const Mat src = _src.getMat();
const Mat dest = _dst.getMat();