Ask Your Question

Revision history [back]

I developed an algorithm that performs my task well.

It assumes that within a blob the connection areas are thinner than the non connection areas. So the algorithm performs the following steps:

1 - Measure the distance between all contour points.

2 - For each contour point, select the corresponding, non-sequential point that is separated by the least distance, with the condition that between the pair there are white pixels. (this is shown in the small red and blue dots in the image).

3 - Cluster pairs in groups corresponding to the same separation zone, and select the pair separated by the least distance (bigger colored circles).

4 - Draw a black line between selected pairs.

image description