[Insight-users] finding connected components (grayscale)

Kevin H. Hobbs hobbsk at ohiou.edu
Tue Dec 21 12:17:16 EST 2010


On 12/21/2010 11:56 AM, David Pastor wrote:
> Dear all,
>  
> I'm trying to find a filter to label objects in a grayscale image, but
> it seems that u can only do that after binarization (either to get a
> label image or a label map). Is there any way to find connected objects
> directly in grayscale?
>  
> Best,
> David
> 

You are correct, usually you threshold the image first to produce a
binary image and then find the connected objects in the binary image.
There are some filters that can help with this :

http://www.itk.org/Doxygen/html/classitk_1_1ConnectedThresholdImageFilter.html#_details

http://www.itk.org/Doxygen/html/classitk_1_1ThresholdMaximumConnectedComponentsImageFilter.html#_details

http://www.itk.org/Doxygen/html/classitk_1_1IsolatedConnectedImageFilter.html#_details

There are also far more advanced methods to extract objects in an image
you may want to read the segmentation section of the ITK Guide

http://www.itk.org/ItkSoftwareGuide.pdf

Often you find the edges of the object with something like a gradient
magnitude filter and then fill the object in with something like the
fast marching filter or one of the other level set filters.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
URL: <http://www.itk.org/pipermail/insight-users/attachments/20101221/2598a2d1/attachment.pgp>


More information about the Insight-users mailing list