0

I would like to connect the channels to the closest point possible so that no channel remains unconnected as shown in the before and after binary images below.

Is there any approach/idea to follow?

Image 1

Image 1 - Before.

Image 2

Image 2 - After.

MoeAmine
  • 5,976
  • 2
  • 18
  • 21
  • I've been staring at the images for 5 minutes and I can't find a pattern. Could you edit your after picture to highlight what exactly you want? – rayryeng Nov 30 '17 at 00:36
  • You can do a closing morphological operation with appropriate kernel size to connect the nearby channels. But you need to be more specific as some of the blobs in the after image are still isolated. – I.Newton Nov 30 '17 at 05:54
  • @rayryeng kindly check this image. The new channels are made with red. Basically, I want no dead end channels. All/most of the channels have to be connected to either a big black object or another channel (doesn't matter to what connected). Thanks. Image: https://imgur.com/a/9XLUW – MoeAmine Nov 30 '17 at 08:41
  • @I.Newton I have no idea what that is frankly speaking but it will be an interesting starting point I believe. bwmorph seems to be what you are referring to. In addition, it is OK if some of the dead ends are not connected, say 10%. Thanks. – MoeAmine Nov 30 '17 at 08:46

0 Answers0