From 75813a773933fa83c6c775c261c398efe54e0fb6 Mon Sep 17 00:00:00 2001 From: wangbing Date: Sun, 17 Jul 2022 23:30:28 +0800 Subject: [PATCH] 111 --- src/main/java/Test.java | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/main/java/Test.java b/src/main/java/Test.java index 3cc4b51..e975bf8 100644 --- a/src/main/java/Test.java +++ b/src/main/java/Test.java @@ -140,6 +140,7 @@ public class Test extends DllLoad { Imgproc.line(src, point[3], point[0], new Scalar(0, 0, 255)); Mat dst = new Mat(src,rotatedRect.boundingRect()); + show(dst); Mat dst2 = new Mat(dst.size(), dst.type()); //旋转中心点 @@ -152,8 +153,7 @@ public class Test extends DllLoad { Mat matrix2D = Imgproc.getRotationMatrix2D(cp, angle, scale); Imgproc.warpAffine(dst,dst2,matrix2D,dst2.size(),Imgproc.INTER_NEAREST); - show(dst2); - HighGui.waitKey(); +// show(dst2); // Mat mat = new Mat(); // Imgproc.Sobel(src, mat, -1, 0, 1); @@ -170,8 +170,7 @@ public class Test extends DllLoad { // Imgproc.drawContours(src, matOfPoints, -1, new Scalar(0, 255, 0), 1, Imgproc.LINE_AA); } - HighGui.imshow("轮廓", src); - HighGui.waitKey(); + show(src); // // // 创建输出单通道图像 // Mat grayImage = new Mat(src.rows(), src.cols(), CvType.CV_8SC1); @@ -181,7 +180,5 @@ public class Test extends DllLoad { // HighGui.imshow("Processed Image", grayImage); // Imgcodecs.imwrite("D://2.jpg", grayImage); // HighGui.waitKey(); - - System.out.println(src); } }