1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 15:53:03 +04:00

Partially back-port #25075 to 4.x

This commit is contained in:
Alexander Smorkalov
2024-03-04 15:51:05 +03:00
parent ef611df09b
commit daa8f7dfc6
111 changed files with 1124 additions and 1124 deletions
+4 -4
View File
@@ -138,7 +138,7 @@ bool CvCascadeImageReader::PosReader::create( const string _filename )
fread( &vecSize, sizeof( vecSize ), 1, file ) != 1 ||
fread( &tmp, sizeof( tmp ), 1, file ) != 1 ||
fread( &tmp, sizeof( tmp ), 1, file ) != 1 )
CV_Error_( CV_StsParseError, ("wrong file format for %s\n", _filename.c_str()) );
CV_Error_( cv::Error::StsParseError, ("wrong file format for %s\n", _filename.c_str()) );
base = sizeof( count ) + sizeof( vecSize ) + 2*sizeof( tmp );
if( feof( file ) )
return false;
@@ -154,14 +154,14 @@ bool CvCascadeImageReader::PosReader::get( Mat &_img )
uchar tmp = 0;
size_t elements_read = fread( &tmp, sizeof( tmp ), 1, file );
if( elements_read != 1 )
CV_Error( CV_StsBadArg, "Can not get new positive sample. The most possible reason is "
CV_Error( cv::Error::StsBadArg, "Can not get new positive sample. The most possible reason is "
"insufficient count of samples in given vec-file.\n");
elements_read = fread( vec, sizeof( vec[0] ), vecSize, file );
if( elements_read != (size_t)(vecSize) )
CV_Error( CV_StsBadArg, "Can not get new positive sample. Seems that vec-file has incorrect structure.\n");
CV_Error( cv::Error::StsBadArg, "Can not get new positive sample. Seems that vec-file has incorrect structure.\n");
if( feof( file ) || last++ >= count )
CV_Error( CV_StsBadArg, "Can not get new positive sample. vec-file is over.\n");
CV_Error( cv::Error::StsBadArg, "Can not get new positive sample. vec-file is over.\n");
for( int r = 0; r < _img.rows; r++ )
{