Attention! This forum will be made read-only by Dec-20. Please migrate to https://forum.opencv.org. Most of existing active users should've received invitation by e-mail.
Ask Your Question

x54fd's profile - activity

2019-01-31 01:49:03 -0500 marked best answer Imgproc.minEnclosingTriangle from Java

I'm using opencv-400.jar and I'm trying to call the method minEnclosingTriangle in the following way.

System.loadLibrary(Core.NATIVE_LIBRARY_NAME);      
Mat points = Mat.zeros(4, 2, CvType.CV_32F);      
points.put(1, 0, 1);
points.put(2, 1, 1);
points.put(3, 0, 1);
points.put(3, 1, 1);    
Mat triangle = Mat.zeros(3, 2, CvType.CV_32F);
Imgproc.minEnclosingTriangle(points, triangle);

This results in an error: (-215:Assertion failed) channels() == CV_MAT_CN(dtype) in function 'cv::Mat::copyTo'. Apparently it originates from here: https://github.com/opencv/opencv/blob.... How should I set up 'triangle' to make this work? Thanks in advance.

2019-01-31 01:49:03 -0500 received badge  Scholar (source)
2019-01-31 00:07:38 -0500 commented answer Imgproc.minEnclosingTriangle from Java

Ah, I see. Thanks a lot!

2019-01-30 16:39:30 -0500 asked a question Imgproc.minEnclosingTriangle from Java

Imgproc.minEnclosingTriangle from Java I'm using opencv-400.jar and I'm trying to call the method minEnclosingTriangle i