Clean up C API backport ready changes

pull/19595/head
Suleyman TURKMEN 4 years ago
parent c073e09956
commit 178240ccf1
  1. 2
      modules/core/src/kmeans.cpp
  2. 2
      modules/core/test/test_math.cpp
  3. 4
      modules/imgproc/src/hough.cpp
  4. 2
      modules/ts/src/ts.cpp

@ -247,7 +247,7 @@ double cv::kmeans( InputArray _data, int K,
_bestLabels.create(N, 1, CV_32S, -1, true); _bestLabels.create(N, 1, CV_32S, -1, true);
Mat _labels, best_labels = _bestLabels.getMat(); Mat _labels, best_labels = _bestLabels.getMat();
if (flags & CV_KMEANS_USE_INITIAL_LABELS) if (flags & KMEANS_USE_INITIAL_LABELS)
{ {
CV_Assert( (best_labels.cols == 1 || best_labels.rows == 1) && CV_Assert( (best_labels.cols == 1 || best_labels.rows == 1) &&
best_labels.cols*best_labels.rows == N && best_labels.cols*best_labels.rows == N &&

@ -168,7 +168,7 @@ void Core_PowTest::run_func()
b = b.reshape(1); b = b.reshape(1);
for( int i = 0; i < a.rows; i++ ) for( int i = 0; i < a.rows; i++ )
{ {
b.at<float>(i,0) = (float)fabs(cvCbrt(a.at<float>(i,0))); b.at<float>(i,0) = (float)fabs(cubeRoot(a.at<float>(i,0)));
for( int j = 1; j < a.cols; j++ ) for( int j = 1; j < a.cols; j++ )
b.at<float>(i,j) = (float)fabs(cv::cubeRoot(a.at<float>(i,j))); b.at<float>(i,j) = (float)fabs(cv::cubeRoot(a.at<float>(i,j)));
} }

@ -323,7 +323,7 @@ HoughLinesSDiv( InputArray image, OutputArray lines, int type,
xc = (float) col + 0.5f; xc = (float) col + 0.5f;
/* Update the accumulator */ /* Update the accumulator */
t = (float) fabs( cvFastArctan( yc, xc ) * d2r ); t = (float) fabs( fastAtan2( yc, xc ) * d2r );
r = (float) std::sqrt( (double)xc * xc + (double)yc * yc ); r = (float) std::sqrt( (double)xc * xc + (double)yc * yc );
r0 = r * irho; r0 = r * irho;
ti0 = cvFloor( (t + CV_PI*0.5) * itheta ); ti0 = cvFloor( (t + CV_PI*0.5) * itheta );
@ -391,7 +391,7 @@ HoughLinesSDiv( InputArray image, OutputArray lines, int type,
xc = (float) x[index] + 0.5f; xc = (float) x[index] + 0.5f;
// Update the accumulator // Update the accumulator
t = (float) fabs( cvFastArctan( yc, xc ) * d2r ); t = (float) fabs( fastAtan2( yc, xc ) * d2r );
r = (float) std::sqrt( (double)xc * xc + (double)yc * yc ) * isrho; r = (float) std::sqrt( (double)xc * xc + (double)yc * yc ) * isrho;
ti0 = cvFloor( (t + CV_PI * 0.5) * istheta ); ti0 = cvFloor( (t + CV_PI * 0.5) * istheta );
ti2 = (ti * stn - ti0) * 5; ti2 = (ti * stn - ti0) * 5;

@ -339,7 +339,7 @@ void BaseTest::safe_run( int start_from )
void BaseTest::run( int start_from ) void BaseTest::run( int start_from )
{ {
int test_case_idx, count = get_test_case_count(); int test_case_idx, count = get_test_case_count();
int64 t_start = cvGetTickCount(); int64 t_start = cv::getTickCount();
double freq = cv::getTickFrequency(); double freq = cv::getTickFrequency();
bool ff = can_do_fast_forward(); bool ff = can_do_fast_forward();
int progress = 0, code; int progress = 0, code;

Loading…
Cancel
Save