@@ -52,70 +52,79 @@ public class TestOpenCV {
5252 private static final String TEST_OP = "cv.GaussianBlur" ;
5353 private static final String TEST_OP_ALIAS = "filter.gauss" ;
5454 private static final String EXPECTED_HELP = //
55- "cv.GaussianBlur:\n " //
56- + "\t - (in1, @CONTAINER container1, in2, in3) -> None\n " //
57- + "\t - (in1, @CONTAINER container1, in2, in3, in4, in5) -> None" ;
55+ "cv.GaussianBlur:\n " //
56+ + "\t - (in1, @CONTAINER container1, in2, in3) -> None\n " //
57+ + "\t - (in1, @CONTAINER container1, in2, in3, in4, in5) -> None" ;
5858
5959 private static final String EXPECTED_HELP_VERBOSE = //
60- "cv.GaussianBlur:\n " //
61- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
62- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.GpuMat\n " //
63- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.GpuMat\n " //
64- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
65- + "\t \t > in3 : java.lang.Double\n " //
66- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.Size,double,double,int)\n " //
67- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.GpuMat\n " //
68- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.GpuMat\n " //
69- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
70- + "\t \t > in3 : java.lang.Double\n " //
71- + "\t \t > in4 : java.lang.Double\n " //
72- + "\t \t > in5 : java.lang.Integer\n " //
73- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
74- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.Mat\n " //
75- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.Mat\n " //
76- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
77- + "\t \t > in3 : java.lang.Double\n " //
78- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Size,double,double,int)\n " //
79- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.Mat\n " //
80- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.Mat\n " //
81- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
82- + "\t \t > in3 : java.lang.Double\n " //
83- + "\t \t > in4 : java.lang.Double\n " //
84- + "\t \t > in5 : java.lang.Integer\n " //
85- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
86- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.UMat\n " //
87- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.UMat\n " //
88- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
89- + "\t \t > in3 : java.lang.Double\n " //
90- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.Size,double,double,int)\n " //
91- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.UMat\n " //
92- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.UMat\n " //
93- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
94- + "\t \t > in3 : java.lang.Double\n " //
95- + "\t \t > in4 : java.lang.Double\n " //
96- + "\t \t > in5 : java.lang.Integer" ;
60+ "cv.GaussianBlur:\n " //
61+ +
62+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
63+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.GpuMat\n " //
64+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.GpuMat\n " //
65+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
66+ + "\t \t > in3 : java.lang.Double\n " //
67+ +
68+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.Size,double,double,int)\n " //
69+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.GpuMat\n " //
70+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.GpuMat\n " //
71+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
72+ + "\t \t > in3 : java.lang.Double\n " //
73+ + "\t \t > in4 : java.lang.Double\n " //
74+ + "\t \t > in5 : java.lang.Integer\n " //
75+ +
76+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
77+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.Mat\n " //
78+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.Mat\n " //
79+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
80+ + "\t \t > in3 : java.lang.Double\n " //
81+ +
82+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Size,double,double,int)\n " //
83+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.Mat\n " //
84+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.Mat\n " //
85+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
86+ + "\t \t > in3 : java.lang.Double\n " //
87+ + "\t \t > in4 : java.lang.Double\n " //
88+ + "\t \t > in5 : java.lang.Integer\n " //
89+ +
90+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
91+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.UMat\n " //
92+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.UMat\n " //
93+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
94+ + "\t \t > in3 : java.lang.Double\n " //
95+ +
96+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.Size,double,double,int)\n " //
97+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.UMat\n " //
98+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.UMat\n " //
99+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
100+ + "\t \t > in3 : java.lang.Double\n " //
101+ + "\t \t > in4 : java.lang.Double\n " //
102+ + "\t \t > in5 : java.lang.Integer" ;
97103
98104 private static final String EXPECTED_USAGE = //
99- "cv.GaussianBlur:\n " //
100- + "\t - (in1, @CONTAINER container1, in2, in3) -> None" ;
105+ "cv.GaussianBlur:\n " //
106+ + "\t - (in1, @CONTAINER container1, in2, in3) -> None" ;
101107
102108 private static final String EXPECTED_USAGE_VERBOSE = //
103- "cv.GaussianBlur:\n " //
104- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
105- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.GpuMat\n " //
106- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.GpuMat\n " //
107- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
108- + "\t \t > in3 : java.lang.Double\n " //
109- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
110- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.Mat\n " //
111- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.Mat\n " //
112- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
113- + "\t \t > in3 : java.lang.Double\n " //
114- + "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
115- + "\t \t > in1 : org.bytedeco.opencv.opencv_core.UMat\n " //
116- + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.UMat\n " //
117- + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
118- + "\t \t > in3 : java.lang.Double" ;
109+ "cv.GaussianBlur:\n " //
110+ +
111+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.GpuMat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
112+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.GpuMat\n " //
113+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.GpuMat\n " //
114+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
115+ + "\t \t > in3 : java.lang.Double\n " //
116+ +
117+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Mat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
118+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.Mat\n " //
119+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.Mat\n " //
120+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
121+ + "\t \t > in3 : java.lang.Double\n " //
122+ +
123+ "\t - org.bytedeco.opencv.global.opencv_imgproc.GaussianBlur(org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.UMat,org.bytedeco.opencv.opencv_core.Size,double)\n " //
124+ + "\t \t > in1 : org.bytedeco.opencv.opencv_core.UMat\n " //
125+ + "\t \t > container1 : @CONTAINER org.bytedeco.opencv.opencv_core.UMat\n " //
126+ + "\t \t > in2 : org.bytedeco.opencv.opencv_core.Size\n " //
127+ + "\t \t > in3 : java.lang.Double" ;
119128
120129 /**
121130 * Verify we get all the expected ops for {@link #TEST_OP}
@@ -140,8 +149,8 @@ public void testUsage() {
140149 int stDev = 100 ;
141150 Size size = new Size (5 , 5 );
142151
143- OpBuilder .Arity3_IV_OV <Mat , Size , Integer , Mat > builder =
144- ops . ternary ( TEST_OP ).input (src , size , stDev ).output (opsFish );
152+ OpBuilder .Arity3_IV_OV <Mat , Size , Integer , Mat > builder = ops . ternary (
153+ TEST_OP ).input (src , size , stDev ).output (opsFish );
145154
146155 // Check help strings from the builder perspective
147156 assertEquals (EXPECTED_USAGE , builder .help ());
@@ -159,7 +168,7 @@ public void testUsage() {
159168 // Repeat with alias
160169 opsFish = new Mat (src .rows (), src .cols (), src .type ());
161170 ops .ternary (TEST_OP_ALIAS ).input (src , size , stDev ).output (opsFish )
162- .compute ();
171+ .compute ();
163172
164173 // Verify the images are the same once more
165174 verifyMats (opencvFish , opsFish );
@@ -184,7 +193,7 @@ private void verifyMats(Mat expectedMat, Mat actualMat) {
184193 * Helper method to open sample data via OpenCV
185194 */
186195 private Mat openFish () {
187- return imread (new File (
188- getClass (). getResource ( "/HappyFish.jpg" ). getFile ()) .getAbsolutePath ());
196+ return imread (new File (getClass (). getResource ( "/HappyFish.jpg" ). getFile ())
197+ .getAbsolutePath ());
189198 }
190199}
0 commit comments