From 178240ccf1f83f00ca065ae0acb1b9b9272ef722 Mon Sep 17 00:00:00 2001 From: Suleyman TURKMEN Date: Fri, 1 Jan 2021 21:25:43 +0300 Subject: [PATCH] Clean up C API backport ready changes --- modules/core/src/kmeans.cpp | 2 +- modules/core/test/test_math.cpp | 2 +- modules/imgproc/src/hough.cpp | 4 ++-- modules/ts/src/ts.cpp | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/core/src/kmeans.cpp b/modules/core/src/kmeans.cpp index 544882ef1d..3e72ddf6a4 100644 --- a/modules/core/src/kmeans.cpp +++ b/modules/core/src/kmeans.cpp @@ -247,7 +247,7 @@ double cv::kmeans( InputArray _data, int K, _bestLabels.create(N, 1, CV_32S, -1, true); 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) && best_labels.cols*best_labels.rows == N && diff --git a/modules/core/test/test_math.cpp b/modules/core/test/test_math.cpp index ab0d52778d..ba464b7c5c 100644 --- a/modules/core/test/test_math.cpp +++ b/modules/core/test/test_math.cpp @@ -168,7 +168,7 @@ void Core_PowTest::run_func() b = b.reshape(1); for( int i = 0; i < a.rows; i++ ) { - b.at(i,0) = (float)fabs(cvCbrt(a.at(i,0))); + b.at(i,0) = (float)fabs(cubeRoot(a.at(i,0))); for( int j = 1; j < a.cols; j++ ) b.at(i,j) = (float)fabs(cv::cubeRoot(a.at(i,j))); } diff --git a/modules/imgproc/src/hough.cpp b/modules/imgproc/src/hough.cpp index 79f34521e8..1743e9a9db 100644 --- a/modules/imgproc/src/hough.cpp +++ b/modules/imgproc/src/hough.cpp @@ -323,7 +323,7 @@ HoughLinesSDiv( InputArray image, OutputArray lines, int type, xc = (float) col + 0.5f; /* 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 ); r0 = r * irho; 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; // 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; ti0 = cvFloor( (t + CV_PI * 0.5) * istheta ); ti2 = (ti * stn - ti0) * 5; diff --git a/modules/ts/src/ts.cpp b/modules/ts/src/ts.cpp index c7226ba0a3..7f4fdd978a 100644 --- a/modules/ts/src/ts.cpp +++ b/modules/ts/src/ts.cpp @@ -339,7 +339,7 @@ void BaseTest::safe_run( int start_from ) void BaseTest::run( int start_from ) { int test_case_idx, count = get_test_case_count(); - int64 t_start = cvGetTickCount(); + int64 t_start = cv::getTickCount(); double freq = cv::getTickFrequency(); bool ff = can_do_fast_forward(); int progress = 0, code;