1 | initial version |
Is this helping?
if (area > largest_area)
{
largest_area = area;
largest_contour_index = i; //Store the index of largest contour
}
}
bounding_rect = boundingRect(contours[largest_contour_index]); // Find the bounding rectangle for biggest contour
Ncontours.push_back(contours[largest_contour_index]);
rectangle(thr, bounding_rect, cv::Scalar(255, 255, 255));