List of usage examples for org.opencv.utils Converters Mat_to_vector_Point
public static void Mat_to_vector_Point(Mat m, List<Point> pts)
From source file:org.openpnp.vision.FluentCv.java
License:Open Source License
public FluentCv getContourMaxRects(List<MatOfPoint> contours, List<RotatedRect> rect) { List<Point> contoursCombined = new ArrayList<>(); for (MatOfPoint mp : contours) { List<Point> points = new ArrayList<>(); Converters.Mat_to_vector_Point(mp, points); for (Point point : points) { contoursCombined.add(point); }/*from w w w . j a v a 2s . c o m*/ } contours.clear(); MatOfPoint points = new MatOfPoint(); points.fromList(contoursCombined); return getContourRects(Collections.singletonList(points), rect); }