1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 15:23:05 +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
@@ -375,7 +375,7 @@ bool SVMSGDImpl::isTrained() const
void SVMSGDImpl::write(FileStorage& fs) const
{
if( !isTrained() )
CV_Error( CV_StsParseError, "SVMSGD model data is invalid, it hasn't been trained" );
CV_Error( cv::Error::StsParseError, "SVMSGD model data is invalid, it hasn't been trained" );
writeFormat(fs);
writeParams( fs );
@@ -437,7 +437,7 @@ void SVMSGDImpl::readParams( const FileNode& fn )
svmsgdTypeStr == "ASGD" ? ASGD : -1;
if( svmsgdType < 0 )
CV_Error( CV_StsParseError, "Missing or invalid SVMSGD type" );
CV_Error( cv::Error::StsParseError, "Missing or invalid SVMSGD type" );
params.svmsgdType = svmsgdType;
@@ -447,7 +447,7 @@ void SVMSGDImpl::readParams( const FileNode& fn )
marginTypeStr == "HARD_MARGIN" ? HARD_MARGIN : -1;
if( marginType < 0 )
CV_Error( CV_StsParseError, "Missing or invalid margin type" );
CV_Error( cv::Error::StsParseError, "Missing or invalid margin type" );
params.marginType = marginType;
@@ -517,7 +517,7 @@ void SVMSGDImpl::setOptimalParameters(int svmsgdType, int marginType)
break;
default:
CV_Error( CV_StsParseError, "SVMSGD model data is invalid" );
CV_Error( cv::Error::StsParseError, "SVMSGD model data is invalid" );
}
}
} //ml