I wanted to fill the inner gaps and segment these three points either. I couldn't use morphology methods because like erosion because it makes inner gaps larger. Actually I was thinking of geometry methods but I didn't have any idea about how to discriminate inner and boundary gaps. My output image should be something like this. Thanks