1 | initial version |
You can use the minimum and maximum values of the rectangle to know. If the contour has passed, then the initial coordinate (x0, y0) and the end coordinate (x0 + x.width, y0 + y.height) rectangle, will be to the left side of the line you marked in the image.