From 518735b50921e4aa30eb2ed989632ca466bf6a7c Mon Sep 17 00:00:00 2001 From: MaximSmolskiy Date: Sat, 30 Aug 2025 00:42:33 +0300 Subject: [PATCH] Remove useless variables from fitEllipse tests --- modules/imgproc/test/test_fitellipse.cpp | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/modules/imgproc/test/test_fitellipse.cpp b/modules/imgproc/test/test_fitellipse.cpp index fff88212c5..215b318e26 100644 --- a/modules/imgproc/test/test_fitellipse.cpp +++ b/modules/imgproc/test/test_fitellipse.cpp @@ -64,13 +64,11 @@ TEST(Imgproc_FitEllipse_Issue_6544, accuracy) { TEST(Imgproc_FitEllipse_Issue_10270, accuracy) { vector pts; - float scale = 1; - Point2f shift(0, 0); - pts.push_back(Point2f(0, 1)*scale+shift); - pts.push_back(Point2f(0, 2)*scale+shift); - pts.push_back(Point2f(0, 3)*scale+shift); - pts.push_back(Point2f(2, 3)*scale+shift); - pts.push_back(Point2f(0, 4)*scale+shift); + pts.push_back(Point2f(0, 1)); + pts.push_back(Point2f(0, 2)); + pts.push_back(Point2f(0, 3)); + pts.push_back(Point2f(2, 3)); + pts.push_back(Point2f(0, 4)); // check that we get almost vertical ellipse centered around (1, 3) RotatedRect e = fitEllipse(pts); @@ -82,13 +80,11 @@ TEST(Imgproc_FitEllipse_Issue_10270, accuracy) { TEST(Imgproc_FitEllipse_JavaCase, accuracy) { vector pts; - float scale = 1; - Point2f shift(0, 0); - pts.push_back(Point2f(0, 0)*scale+shift); - pts.push_back(Point2f(1, 1)*scale+shift); - pts.push_back(Point2f(-1, 1)*scale+shift); - pts.push_back(Point2f(-1, -1)*scale+shift); - pts.push_back(Point2f(1, -1)*scale+shift); + pts.push_back(Point2f(0, 0)); + pts.push_back(Point2f(1, 1)); + pts.push_back(Point2f(-1, 1)); + pts.push_back(Point2f(-1, -1)); + pts.push_back(Point2f(1, -1)); // check that we get almost circle centered around (0, 0) RotatedRect e = fitEllipse(pts);