diff --git a/modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java b/modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java index 61a3f9d14a4ca7caa330876bd2fe415f0cca7211..fa0f2ce2dcf081b32838d414e12bb0f4b7199574 100644 --- a/modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java +++ b/modules/java/android_test/src/org/opencv/test/imgproc/imgprocTest.java @@ -766,8 +766,12 @@ public class imgprocTest extends OpenCVTestCase { } public void testFitEllipse() { - Mat points = new Mat(1, 5, CvType.CV_32FC2); - points.put(0, 0, 0.0, 0.0, -1.0, 1.0, 1.0, 1.0, 1.0, -1.0, -1.0, -1.0); + List points = new ArrayList(); + points.add(new Point( 0, 0)); + points.add(new Point(-1, 1)); + points.add(new Point( 1, 1)); + points.add(new Point( 1, -1)); + points.add(new Point(-1, -1)); RotatedRect rrect = new RotatedRect(); rrect = Imgproc.fitEllipse(points); diff --git a/modules/java/gen_java.py b/modules/java/gen_java.py index f3fc38e38613539df72196ca796f4b17cc57b3cc..f676b52b779ca8efbc9e3f620c7d8f6f306528fc 100644 --- a/modules/java/gen_java.py +++ b/modules/java/gen_java.py @@ -484,6 +484,7 @@ func_arg_fix = { 'solvePnPRansac' : { 'objectPoints' : 'vector_Point3f', 'imagePoints' : 'vector_Point2f', }, 'calcOpticalFlowPyrLK' : { 'prevPts' : 'vector_Point2f', 'nextPts' : 'vector_Point2f', 'status' : 'vector_uchar', 'err' : 'vector_float', }, + 'fitEllipse' : { 'points' : 'vector_Point2f', }, }, # '', i.e. no class } # func_arg_fix