)
CodePudding user response:
Describe the outline a the Rect type of bounding box, you put the extracted from the Rect, limit the Rect. Width and the Rect. Height line, for example,Vector
FindContours (img, contours, CV_RETR_EXTERNAL CV_CHAIN_APPROX_NONE);
for (int i=0; I & lt; Contours. The size (); I++)
{
The Rect r0=boundingRect (Mat (contours [I]));
Float rate=(float) r0. Width/(float) r0. Height;
If (rate constraints)
{}
}
CodePudding user response:
To compared with preset to the Size is ok, is out of range,