0
最近我在开发使用OpenCV
的android应用程序。现在我遇到一个问题:如何将List <MatofPoint>转换为opencv中的Mat?
Imgproc.findContours(grayMat, contours1, new Mat(), Imgproc.RETR_LIST, Imgproc.CHAIN_APPROX_SIMPLE);
此功能后,我想打电话给Imgproc.MatchShapes
检测2个图像是否匹配。但是在Java版本下,MatchShapes需要Mat类型的参数。
如何将List<MatOfPoint>
转换为Mat?
不知道Java,但contours1应该是某事像ListOfListOfPoints(因为每个轮廓应该是点的列表) – Micka
,你不需要从看到[MatOfPoint类扩展垫] [1] [1]:http://stackoverflow.com/questions/12380594/opencv-android-convert-matofpoint-to-mat – Sinned