[ITK Community] [Insight-developers] Detect holes in binary images

Bradley Lowekamp blowekamp at mail.nih.gov
Fri Feb 7 08:00:02 EST 2014


Hello,

Hole come in a variety of shapes sized and definitions.  Depending on there exact morphological shape that you are interested in it may very how to detect them. ITK has a large number of morphological filter which can be used to.

At a basic level to get you started, I'd suggest inverting you binary image, with the NotImageFilter. Then running ConnectedComponentImageFilter, to give each isolated hole a unique label. Then the LabelStatisticsImageFilter to get basic size and shape information.

If additional morphological filtering is needed I'd recommend try out SimpleITK in Python, so that a large number of filters can be played with to get the desired filtered effect.

Hope that helps,
Brad

On Feb 7, 2014, at 7:32 AM, elhadj meljane <elhadj.meljane at gmail.com> wrote:

> Hi all,
> I would appreciate suggestions to detect holes in binary images. The
> holes are of different sizes (small medium).  I am not looking to fill
> these holes but just to detect their locations.
> 
> Thank you.
> 
> Best,
> Elhadj
> _______________________________________________
> Powered by www.kitware.com
> 
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
> 
> Kitware offers ITK Training Courses, for more information visit:
> http://kitware.com/products/protraining.php
> 
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
> 
> Follow this link to subscribe/unsubscribe:
> http://www.itk.org/mailman/listinfo/insight-developers

_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html

Kitware offers ITK Training Courses, for more information visit:
http://kitware.com/products/protraining.php

Please keep messages on-topic and check the ITK FAQ at:
http://www.itk.org/Wiki/ITK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.itk.org/mailman/listinfo/insight-developers



More information about the Community mailing list