[ITK] [ITK-users] Too many label objects detected when only 3
Girish Mallya Udupi
indianzeppelin at gmail.com
Fri Apr 10 12:07:47 EDT 2015
That's correct.
Apart from looking at the number of label objects to confirm the
correctness of the labeling, it is also usually useful to convert the label
map to a label image and display/save that image (especially when the input
binary image is not coming from an internal binarization process).
On Fri, Apr 10, 2015 at 3:11 PM, Chr. Rossmanith <
cr at neuro.ma.uni-heidelberg.de> wrote:
> Hi,
>
> your image isn't a true binary image but has some gray values close to 0
> (black) and some gray values close to 255 (white). I've converted it to a
> pure black-white PNG and now three regions should be detected. I guess JPG
> does some anti aliasing which introduces the additional grey values.
>
> Christina Rossmanith
>
>
>
>
> On 10.04.2015 14:32, Francisco Lopez de la Franca wrote:
>
> Hi all.
> I've just tested itk::BinaryImageToShapeLabelMapFilter with an B/W image
> (see attachment) containing only 3 object.
>
> I call the following methods:
>
> > binaryImageToShapeLabelMapFilter->ComputePerimeterOn();
> > binaryImageToShapeLabelMapFilter->SetInputForegroundValue(255);
> > binaryImageToShapeLabelMapFilter->SetOutputBackgroundValue(0);
> > binaryImageToShapeLabelMapFilter->Update();
>
> > LabelMapType::Pointer labelMap =
> binaryImageToShapeLabelMapFilter->GetOutput();
>
> > int nrOfLabelObjects = labelMap->GetNumberOfLabelObjects();
>
> When I display the number of of label objects, the result is 246.
>
> Does anybody know why this behaviour?
>
> Thanks a lot.
> My best regards.
>
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects athttp://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:http://www.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://public.kitware.com/mailman/listinfo/insight-users
>
>
>
> _____________________________________
> 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://www.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://public.kitware.com/mailman/listinfo/insight-users
>
>
--
Regards,
Girish
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/community/attachments/20150410/e0984e5c/attachment.html>
-------------- next part --------------
_____________________________________
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://www.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://public.kitware.com/mailman/listinfo/insight-users
More information about the Community
mailing list