Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Well, at lines 112 and 132 you have the bounding rectangle. At those points, add an if statement that only returns true if that rectangle is larger than 200*300, and wraps the parts where it does the drawing.

One thing to note. The criteria you are using to sort is the length of the contour. The largest contour may be the largest, but be less than the threshold size, while the second largest may be larger than it. I think. I honestly haven't used contours much.