mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
Merge remote-tracking branch 'upstream/3.4' into merge-3.4
This commit is contained in:
@@ -433,18 +433,18 @@ imread_( const String& filename, int flags, Mat& mat )
|
||||
/// set the filename in the driver
|
||||
decoder->setSource( filename );
|
||||
|
||||
CV_TRY
|
||||
try
|
||||
{
|
||||
// read the header to make sure it succeeds
|
||||
if( !decoder->readHeader() )
|
||||
return 0;
|
||||
}
|
||||
CV_CATCH (cv::Exception, e)
|
||||
catch (const cv::Exception& e)
|
||||
{
|
||||
std::cerr << "imread_('" << filename << "'): can't read header: " << e.what() << std::endl << std::flush;
|
||||
return 0;
|
||||
}
|
||||
CV_CATCH_ALL
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "imread_('" << filename << "'): can't read header: unknown exception" << std::endl << std::flush;
|
||||
return 0;
|
||||
@@ -472,16 +472,16 @@ imread_( const String& filename, int flags, Mat& mat )
|
||||
|
||||
// read the image data
|
||||
bool success = false;
|
||||
CV_TRY
|
||||
try
|
||||
{
|
||||
if (decoder->readData(mat))
|
||||
success = true;
|
||||
}
|
||||
CV_CATCH (cv::Exception, e)
|
||||
catch (const cv::Exception& e)
|
||||
{
|
||||
std::cerr << "imread_('" << filename << "'): can't read data: " << e.what() << std::endl << std::flush;
|
||||
}
|
||||
CV_CATCH_ALL
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "imread_('" << filename << "'): can't read data: unknown exception" << std::endl << std::flush;
|
||||
}
|
||||
@@ -534,18 +534,18 @@ imreadmulti_(const String& filename, int flags, std::vector<Mat>& mats)
|
||||
decoder->setSource(filename);
|
||||
|
||||
// read the header to make sure it succeeds
|
||||
CV_TRY
|
||||
try
|
||||
{
|
||||
// read the header to make sure it succeeds
|
||||
if( !decoder->readHeader() )
|
||||
return 0;
|
||||
}
|
||||
CV_CATCH (cv::Exception, e)
|
||||
catch (const cv::Exception& e)
|
||||
{
|
||||
std::cerr << "imreadmulti_('" << filename << "'): can't read header: " << e.what() << std::endl << std::flush;
|
||||
return 0;
|
||||
}
|
||||
CV_CATCH_ALL
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "imreadmulti_('" << filename << "'): can't read header: unknown exception" << std::endl << std::flush;
|
||||
return 0;
|
||||
@@ -573,16 +573,16 @@ imreadmulti_(const String& filename, int flags, std::vector<Mat>& mats)
|
||||
// read the image data
|
||||
Mat mat(size.height, size.width, type);
|
||||
bool success = false;
|
||||
CV_TRY
|
||||
try
|
||||
{
|
||||
if (decoder->readData(mat))
|
||||
success = true;
|
||||
}
|
||||
CV_CATCH (cv::Exception, e)
|
||||
catch (const cv::Exception& e)
|
||||
{
|
||||
std::cerr << "imreadmulti_('" << filename << "'): can't read data: " << e.what() << std::endl << std::flush;
|
||||
}
|
||||
CV_CATCH_ALL
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "imreadmulti_('" << filename << "'): can't read data: unknown exception" << std::endl << std::flush;
|
||||
}
|
||||
@@ -749,16 +749,16 @@ imdecode_( const Mat& buf, int flags, Mat& mat )
|
||||
}
|
||||
|
||||
bool success = false;
|
||||
CV_TRY
|
||||
try
|
||||
{
|
||||
if (decoder->readHeader())
|
||||
success = true;
|
||||
}
|
||||
CV_CATCH (cv::Exception, e)
|
||||
catch (const cv::Exception& e)
|
||||
{
|
||||
std::cerr << "imdecode_('" << filename << "'): can't read header: " << e.what() << std::endl << std::flush;
|
||||
}
|
||||
CV_CATCH_ALL
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "imdecode_('" << filename << "'): can't read header: unknown exception" << std::endl << std::flush;
|
||||
}
|
||||
@@ -794,16 +794,16 @@ imdecode_( const Mat& buf, int flags, Mat& mat )
|
||||
mat.create( size.height, size.width, type );
|
||||
|
||||
success = false;
|
||||
CV_TRY
|
||||
try
|
||||
{
|
||||
if (decoder->readData(mat))
|
||||
success = true;
|
||||
}
|
||||
CV_CATCH (cv::Exception, e)
|
||||
catch (const cv::Exception& e)
|
||||
{
|
||||
std::cerr << "imdecode_('" << filename << "'): can't read data: " << e.what() << std::endl << std::flush;
|
||||
}
|
||||
CV_CATCH_ALL
|
||||
catch (...)
|
||||
{
|
||||
std::cerr << "imdecode_('" << filename << "'): can't read data: unknown exception" << std::endl << std::flush;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user