I have been looking to close contour for shapes that are similar to circles or rounded objects.
I found a very interesting answer here.
I thought my problem was solved until I tested with different images.
This is my mask from OpenCV canny AFTER dilating. As you can see, there is a big gap at the bottom.
If the shape was a circle, I could try to recreate the circle, but the thing is the shape could be different. I could look like a cucumber or a rugby balloon.
I wonder if it's actually possible to connect the contour without doing a straight line, which will make me lose a lot of information.
Approximating the "curveness" or "straightness" according to the neighbor?