<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;">Hello,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Brad</div><div><br></div><div><br></div><div><br></div><div>[1] <a href="http://hdl.handle.net/10380/3279" style="font-weight: bold; text-decoration: none; color: rgb(55, 78, 158); font-family: arial, helvetica, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255, 250, 236);">http://hdl.handle.net/10380/3279</a></div><div>[2] <a href="http://itk.org/Insight/Doxygen/html/classitk_1_1HistogramThresholdImageFilter.html">http://itk.org/Insight/Doxygen/html/classitk_1_1HistogramThresholdImageFilter.html</a></div><div>[3] <a href="http://itk.org/Insight/Doxygen/html/classitk_1_1HistogramThresholdCalculator.html">http://itk.org/Insight/Doxygen/html/classitk_1_1HistogramThresholdCalculator.html</a></div><span style="font-family: arial, helvetica, sans-serif; font-size: 13px; line-height: 18px; background-color: rgb(255, 250, 236);"></span><div><br></div><div><div><div>On Nov 12, 2014, at 8:14 AM, Girish Mallya Udupi <<a href="mailto:indianzeppelin@gmail.com">indianzeppelin@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr">Hi Zein,<div><br></div><div>As you might know, Otsu's method <b>assumes </b>that the histogram of the image is bi-modal. i.e., there are two classes of pixels forming two peaks separated by a valley. </div><div>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.</div><div><br></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 12, 2014 at 12:43 PM, Zein Salah <span dir="ltr"><<a href="mailto:zeinsalah@gmail.com" target="_blank">zeinsalah@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex; position: static; z-index: auto;"><div dir="ltr"><div><div>Hello,<br><br></div>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.. <br><br>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? <br><br>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?<br><br></div><div>Any ideas would be welcome!!<br><br></div><div>Much thanks,<br><br></div>Zein<br><br></div>
<br>_______________________________________________<br>
Community mailing list<br>
<a href="mailto:Community@itk.org" target="_blank">Community@itk.org</a><br>
<a href="http://public.kitware.com/mailman/listinfo/community" target="_blank">http://public.kitware.com/mailman/listinfo/community</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr">Regards,<br>Girish</div></div>
</div></div>
_____________________________________<br>Powered by <a href="http://www.kitware.com">www.kitware.com</a><br><br>Visit other Kitware open-source projects at<br><a href="http://www.kitware.com/opensource/opensource.html">http://www.kitware.com/opensource/opensource.html</a><br><br>Kitware offers ITK Training Courses, for more information visit:<br>http://www.kitware.com/products/protraining.php<br><br>Please keep messages on-topic and check the ITK FAQ at:<br>http://www.itk.org/Wiki/ITK_FAQ<br><br>Follow this link to subscribe/unsubscribe:<br>http://public.kitware.com/mailman/listinfo/insight-users<br></blockquote></div><br></div></body></html>