Ask Your Question

Revision history [back]

Yes using closing or openning does not solve your problem.

You can try connectedComponentsWithStat and use gravity center to look for nearest neighbours. Then you can can fixed a distance threshold to connect components.