Drawing a line using centroid point in opencv
问题 How do I pass a line through the center of a contour? I have the center coordinates of my contour. 回答1: This is how you solve this question - Original image - Result image - You first need to do basic filtering and find the contour. Then - 1) Find out the area of contour (minAreaRect) 2) Extract points from the contour (BoxPoints) 3) Convert it to a numpy array (np.array) 4) Order the points (perspective.order_points) 5) Take out Top-left, Top-right, Bottom-right and Bottom-left(tl, tr, br,