Ask Your Question

Revision history [back]

for (int i = 0; i < contours.size(); i++) { MatOfPoint contour = contours.get(i); Rect rect = Imgproc.boundingRect(contour); Mat subMat = new Mat(srcOriginal,rect); HighGui.imshow("contours : " + i , subMat); }