I want to close the open contours like the picture :
And I want to close the open contour as shown in the picture and make it a single contour (single shape) . (Different colors in the picture show different contours).
:
How can I do that?
I've tried the approxPoly , but did not succeed.