[ITK-users] [ITK] Otsu Filter for object/background separation
Bradley Lowekamp
blowekamp at mail.nih.gov
Tue Dec 2 10:21:54 EST 2014
Hello,
ITK has a histogram based thresholding framework contributed by Richard Beare through the Insight Journal [1]. At the heart of the frame work is the HistrogramThrsholdImageFilter[2], and the HistogramThresholdCalculator[3]. With this framework you should be able to write a calculator to behave as you want and then pass it to the filter with the HistogramThreshold::SetCalculator method.
Also you may want to run the binary segmentation results through the LabelMap framework to analyze the statistics of the shape of the objects and selecting the one you are looking for or rejecting the results.
Brad
[1] http://hdl.handle.net/10380/3279
[2] http://itk.org/Insight/Doxygen/html/classitk_1_1HistogramThresholdImageFilter.html
[3] http://itk.org/Insight/Doxygen/html/classitk_1_1HistogramThresholdCalculator.html
On Nov 12, 2014, at 8:14 AM, Girish Mallya Udupi <indianzeppelin at gmail.com> wrote:
> Hi Zein,
>
> As you might know, Otsu's method assumes that the histogram of the image is bi-modal. i.e., there are two classes of pixels forming two peaks separated by a valley.
> All the method (and the corresponding ITK filter) does is calculate the threshold which maximizes the inter-class variance and apply it on the image.
>
>
> On Wed, Nov 12, 2014 at 12:43 PM, Zein Salah <zeinsalah at gmail.com> wrote:
> Hello,
>
> I have been using the otsu filter for doing object-from-background separation. However, I noticed that the filter always comes out with an separation threshold, even if the image does NOT actually have a "reasonable" background, see the attached image, e.g..
>
> My question is: is it possible to control the filter in such a way that it only generate a threshold if there is really a background?
>
> Practically, I could, in a post-processing step, do a decision weather the separation is feasible or not, e.g. computing the comparing the statistics of the two separated areas (average intensity, variance, etc.). But I thought the otsu filter already does such things internally, right? Is it possible to inquire such data from the filter?
>
> Any ideas would be welcome!!
>
> Much thanks,
>
> Zein
>
>
> _______________________________________________
> Community mailing list
> Community at itk.org
> http://public.kitware.com/mailman/listinfo/community
>
>
>
>
> --
> Regards,
> Girish
> _____________________________________
> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/insight-users/attachments/20141202/a8947f7b/attachment.html>
More information about the Insight-users
mailing list