Color Blob Detection With Rectangle
Can anyone help me to understand this?
public static int getBiggestContourIndex(List<MatOfPoint> contours){
double maxArea = 0;
Iterator<MatOfPoint> each = contours.iterator();
int j = 0;
int k = -1;
while (each.hasNext())
{
MatOfPoint wrapper = each.next();
double area = Imgproc.contourArea(wrapper);
if (area > maxArea){
maxArea = area;
k = j;
}
j++;
}
return k;
}
oh dear, can't read your own code ?
probably just a copy paste ;)
Can you explain why you keep editing the question if it is already solved?