Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Draw the rectangle, and then use some cv function to figure out the percent of the points of the object in the contour of the rectangle.

Draw You can use cv2.moments(cnt) to get the rectangle, center of gravity of you object, and then use some cv function to figure out calculate the percent distance between it and the center of the points box to decide if it's at the center of the object in the contour of the rectangle.it.