canny segmentation level set

hi guys, thank u in advance for reading this.

Can I use the Canny Edge level set to refine this segmentation I obtained using a simple binary thresholding? I want to delete all those little points and keep only the big ones (they are vessels)…

I would use a binary eroding filter until only remnants of the large regions remain, then use that map as seeds to reconstruct the original regions.

Hi @mattias and thank u for your reply! Do u know if I can use that level set even if the regions I want to segment are not ‘‘closed’’ regions?
Thanks in advance for any help

This is the result I get if I first label all connected regions then keep the four largest regions in your image.


So I think that’s a possible solution for you as well.

Thank u again Mattias for your quick answer. Can I ask u which values of the level set parameters did u use?

Since I don’t have the original data I simply used the equivalent of a Connected Component Image Filter to label each connected region in your binary image then I used a Label Shape Statistics Image Filter to extract the four largest regions.


Another good option to be aware of is the BinaryOpeningByReconstructionImageFilter.

1 Like

thank u both for your reply!

1 Like