1 | initial version |
OpenCV expects a contour to be a list of points of connected pixels, in which the starting point is the top-most one (with lowest Y coordinate). Then, each point on the list has to be connected with the previous one in a counter-clockwise fashion.
Imagine a circle defined as list of points: the top-most point (lowest Y coordinate) is number one in the list, then follows each point in a counter-clockwise fashion.
Priority goes like this:
Number 1 in list -> top-most point (lowest Y coordinate pixel) Number n in the list -> connected to the n-1 pixel with the following priority:
2 | No.2 Revision |
OpenCV expects a contour to be a list of points of connected pixels, in which the starting point is the top-most one (with lowest Y coordinate). Then, each point on the list has to be connected with the previous one in a counter-clockwise fashion.
Imagine a circle defined as list of points: the top-most point (lowest Y coordinate) is number one in the list, then follows each point in a counter-clockwise fashion.
Priority goes like this:
Number 1 in list -> top-most point (lowest Y coordinate pixel)
pixel)
Number n in the list -> connected to the n-1 pixel with the following priority: