1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-29 23:33:05 +04:00

Remove more C code

This commit is contained in:
Vincent Rabaud
2025-09-25 13:31:30 +02:00
parent 9282afa0c7
commit b88c3dff4f
4 changed files with 6 additions and 8 deletions
+3 -3
View File
@@ -864,8 +864,8 @@ public:
TermCriteria termcrit;
termcrit.type = TermCriteria::COUNT + TermCriteria::EPS;
termcrit.maxCount = std::max((params.termCrit.type & CV_TERMCRIT_ITER ? params.termCrit.maxCount : MAX_ITER), 1);
termcrit.epsilon = std::max((params.termCrit.type & CV_TERMCRIT_EPS ? params.termCrit.epsilon : DEFAULT_EPSILON), DBL_EPSILON);
termcrit.maxCount = std::max((params.termCrit.type & TermCriteria::MAX_ITER ? params.termCrit.maxCount : MAX_ITER), 1);
termcrit.epsilon = std::max((params.termCrit.type & TermCriteria::EPS ? params.termCrit.epsilon : DEFAULT_EPSILON), DBL_EPSILON);
int iter = 0;
switch(params.trainMethod){
@@ -901,7 +901,7 @@ public:
int count = inputs.rows;
int iter = -1, max_iter = termCrit.maxCount*count;
double epsilon = (termCrit.type & CV_TERMCRIT_EPS) ? termCrit.epsilon*count : 0;
double epsilon = (termCrit.type & TermCriteria::EPS) ? termCrit.epsilon*count : 0;
int l_count = layer_count();
int ivcount = layer_sizes[0];