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.
2 | No.2 Revision |
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.