diff --git a/modules/imgproc/src/contours_new.cpp b/modules/imgproc/src/contours_new.cpp index 1481ad9021..0b82496aaa 100644 --- a/modules/imgproc/src/contours_new.cpp +++ b/modules/imgproc/src/contours_new.cpp @@ -297,7 +297,7 @@ public: ~ContourScanner_() {} inline bool isInt() const { - return (this->mode == CV_RETR_FLOODFILL); + return (this->mode == RETR_FLOODFILL); } inline bool isSimple() const { @@ -355,7 +355,7 @@ shared_ptr ContourScanner_::create(Mat img, int mode, int metho root.body.brect = Rect(Point(0, 0), size); scanner->ctable.fill(-1); scanner->approx_method2 = scanner->approx_method1 = method; - if (method == CV_CHAIN_APPROX_TC89_L1 || method == CV_CHAIN_APPROX_TC89_KCOS) + if (method == CHAIN_APPROX_TC89_L1 || method == CHAIN_APPROX_TC89_KCOS) scanner->approx_method1 = CV_CHAIN_CODE; return scanner; } @@ -454,7 +454,7 @@ bool ContourScanner_::contourScan(const int prev, int& p, Point& last_pos, const /* find contour parent */ int main_parent = -1; - if (isSimple() || (!is_hole && (mode == CV_RETR_CCOMP || mode == CV_RETR_FLOODFILL)) || + if (isSimple() || (!is_hole && (mode == RETR_CCOMP || mode == RETR_FLOODFILL)) || last_pos.x <= 0) { main_parent = 0; diff --git a/modules/imgproc/test/test_contours.cpp b/modules/imgproc/test/test_contours.cpp index 4a5c61b0e8..560a5b994f 100644 --- a/modules/imgproc/test/test_contours.cpp +++ b/modules/imgproc/test/test_contours.cpp @@ -39,7 +39,6 @@ // //M*/ -#include "opencv2/imgproc/types_c.h" #include "test_precomp.hpp" #include diff --git a/modules/imgproc/test/test_contours_new.cpp b/modules/imgproc/test/test_contours_new.cpp index 3381d31e64..93afab2544 100644 --- a/modules/imgproc/test/test_contours_new.cpp +++ b/modules/imgproc/test/test_contours_new.cpp @@ -2,7 +2,6 @@ // It is subject to the license terms in the LICENSE file found in the top-level directory // of this distribution and at http://opencv.org/license.html -#include "opencv2/imgproc/types_c.h" #include "test_precomp.hpp" #include "opencv2/ts/ocl_test.hpp" #include "opencv2/imgproc/detail/legacy.hpp"