Given an mask image i have certain points as seen in the image, I want to connect the point to the point at the opposite side of it given the list of points/array of point.Well the output would look something like. HOw can i achieve this
looks like a robot path with right angles, viewed from a perspective.
(computational) geometry problem.
you could split the polygon into triangles. a “polygon triangulation”. the rest derives from that.
or it’s a min cost matching of the points, but determining which points are even considered for a match could be tricky.
if you have a contour first, then you also have points all along the “edges” of each “line”.