Removed old C API usage in new findContours implementation.

This commit is contained in:
Alexander Smorkalov 2024-04-10 11:19:55 +03:00
parent d0ec39206a
commit 5bad694b7f
3 changed files with 3 additions and 5 deletions

View File

@ -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_> 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;

View File

@ -39,7 +39,6 @@
//
//M*/
#include "opencv2/imgproc/types_c.h"
#include "test_precomp.hpp"
#include <opencv2/highgui.hpp>

View File

@ -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"