mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 23:33:05 +04:00
Merge pull request #22754 from mshabunin:c-cleanup
C-API cleanup for OpenCV 5.x (imgproc, highgui) * imgproc: C-API cleanup * imgproc: increase cvtColor test diff threshold * imgproc: C-API cleanup pt.2 * imgproc: C-API cleanup pt.3 * imgproc: C-API cleanup pt.4 * imgproc: C-API cleanup pt.5 * imgproc: C-API cleanup pt.5 * imgproc: C-API cleanup pt.6 * highgui: C-API cleanup * highgui: C-API cleanup pt.2 * highgui: C-API cleanup pt.3 * highgui: C-API cleanup pt.3 * imgproc: C-API cleanup pt.7 * fixup! highgui: C-API cleanup pt.3 * fixup! imgproc: C-API cleanup pt.6 * imgproc: C-API cleanup pt.8 * imgproc: C-API cleanup pt.9 * fixup! imgproc: C-API cleanup pt.9 * fixup! imgproc: C-API cleanup pt.9 * fixup! imgproc: C-API cleanup pt.9 * fixup! imgproc: C-API cleanup pt.9 * fixup! imgproc: C-API cleanup pt.9 * fixup! imgproc: C-API cleanup pt.9
This commit is contained in:
@@ -357,7 +357,7 @@ public class ImgprocTest extends OpenCVTestCase {
|
||||
H1.put(0, 0, 1, 2, 3);
|
||||
H2.put(0, 0, 4, 5, 6);
|
||||
|
||||
double distance = Imgproc.compareHist(H1, H2, Imgproc.CV_COMP_CORREL);
|
||||
double distance = Imgproc.compareHist(H1, H2, Imgproc.HISTCMP_CORREL);
|
||||
|
||||
assertEquals(1., distance, EPS);
|
||||
}
|
||||
@@ -636,7 +636,7 @@ public class ImgprocTest extends OpenCVTestCase {
|
||||
Mat dstLables = getMat(CvType.CV_32SC1, 0);
|
||||
Mat labels = new Mat();
|
||||
|
||||
Imgproc.distanceTransformWithLabels(gray128, dst, labels, Imgproc.CV_DIST_L2, 3);
|
||||
Imgproc.distanceTransformWithLabels(gray128, dst, labels, Imgproc.DIST_L2, 3);
|
||||
|
||||
assertMatEqual(dstLables, labels);
|
||||
assertMatEqual(getMat(CvType.CV_32FC1, 8192), dst, EPS);
|
||||
@@ -813,7 +813,7 @@ public class ImgprocTest extends OpenCVTestCase {
|
||||
Mat linePoints = new Mat(4, 1, CvType.CV_32FC1);
|
||||
linePoints.put(0, 0, 0.53198653, 0.84675282, 2.5, 3.75);
|
||||
|
||||
Imgproc.fitLine(points, dst, Imgproc.CV_DIST_L12, 0, 0.01, 0.01);
|
||||
Imgproc.fitLine(points, dst, Imgproc.DIST_L12, 0, 0.01, 0.01);
|
||||
|
||||
assertMatEqual(linePoints, dst, EPS);
|
||||
}
|
||||
@@ -1040,7 +1040,7 @@ public class ImgprocTest extends OpenCVTestCase {
|
||||
Mat img = new Mat(sz, sz, CvType.CV_8U, new Scalar(128));
|
||||
Mat circles = new Mat();
|
||||
|
||||
Imgproc.HoughCircles(img, circles, Imgproc.CV_HOUGH_GRADIENT, 2, img.rows() / 4);
|
||||
Imgproc.HoughCircles(img, circles, Imgproc.HOUGH_GRADIENT, 2, img.rows() / 4);
|
||||
|
||||
assertEquals(0, circles.cols());
|
||||
}
|
||||
@@ -1054,7 +1054,7 @@ public class ImgprocTest extends OpenCVTestCase {
|
||||
int radius = Math.min(img.cols() / 4, img.rows() / 4);
|
||||
Imgproc.circle(img, center, radius, colorBlack, 3);
|
||||
|
||||
Imgproc.HoughCircles(img, circles, Imgproc.CV_HOUGH_GRADIENT, 2, img.rows() / 4);
|
||||
Imgproc.HoughCircles(img, circles, Imgproc.HOUGH_GRADIENT, 2, img.rows() / 4);
|
||||
|
||||
assertEquals(1, circles.cols());
|
||||
}
|
||||
@@ -1308,7 +1308,7 @@ public class ImgprocTest extends OpenCVTestCase {
|
||||
contour1.put(0, 0, 1, 1, 5, 1, 4, 3, 6, 2);
|
||||
contour2.put(0, 0, 1, 1, 6, 1, 4, 1, 2, 5);
|
||||
|
||||
double distance = Imgproc.matchShapes(contour1, contour2, Imgproc.CV_CONTOURS_MATCH_I1, 1);
|
||||
double distance = Imgproc.matchShapes(contour1, contour2, Imgproc.CONTOURS_MATCH_I1, 1);
|
||||
|
||||
assertEquals(2.81109697365334, distance, EPS);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user