[Insight-users] Otsu Threshold
Luis Ibanez
luis.ibanez at kitware.com
Tue, 02 Mar 2004 10:39:07 -0500
Hi Radhika,
Luca kindly contributed his code yesterday at 12:47 pm
Thanks to the fact that he provided tests for his
classes the code is in the Toolkit today at 10:32 am.
IMAGINE publishing a paper in a Journal at that speed :-)
---
You may want to look at the files:
Insight/Code/Algorithms
itkOtsuMultipleThresholdsCalculator.txx
itkOtsuMultipleThresholdsCalculator.h
itkHistogramAlgorithmBase.txx
itkHistogramAlgorithmBase.h
Insight/Code/BasicFilters
itkThresholdLabelerImageFilter.txx
itkThresholdLabelerImageFilter.h
and their test files:
Insight/Testing/Code/Algorithms
itkOtsuMultipleThresholdsCalculatorTest.cxx
Insight/Testing/Code/BasicFilters
itkThresholdLabelerImageFilterTest.cxx
Please let us know if you have further questions.
Thanks
Luis
-------------------------------
Radhika Sivaramakrishna wrote:
> Hi Luis,
> Thanks for the more detailed explanation of what the Otsu threshold
> calculator does. When will Luca's code be available in ITK? Has that
> been logged in as a new feature request?
>
> Thanks
> Radhika
>
>
> -----Original Message-----
> From: Luis Ibanez [mailto:luis.ibanez at kitware.com]
> Sent: Saturday, February 28, 2004 8:26 AM
> To: Radhika Sivaramakrishna
> Cc: ITK
> Subject: Re: [Insight-users] Otsu Threshold
>
>
> Hi Radhika,
>
> There may be a conceptual interpretation problem here.
>
> The OtsuThreshold calculator is not supposed to return
> the mininum between two peaks in a histogram.
>
> What this calculator computes is the intensity value
> that can be used to separate the histogram in two
> classes such that inter class variance is maximized.
>
> In this context, the Otsu calculator doesn't care at
> all about peaks and valleys. You could get a 'valid'
> threhold even for a uniform histogram.
>
> ('valid' in terms of the definition of what an Otsu
> threshold is).
>
>
> If you actually want to select a minimum in the histogram,
> the solution would be to write a variance of this calculator,
> (maybe taking advantage of the Statistics classes that already
> compute the histogram for you), and then parse the histogram
> in order to identify minima. Note that there are scale-space
> issues here, you will have to smooth the histogram using a
> particular sigma that will define the minimum size of valley
> that you consider to be significant.
>
>
> If you write such a calculator, and you are willing to
> contribute it to the toolkit we will be happy to include
> it in the repository.
>
> Note that Luca
> http://www.itk.org/pipermail/insight-users/2004-February/007040.html
> has developed a variant of this calculator in order to support
> multiple thresholds (still defined as those that maximize
> inter-class variability). His code will hopefully be included in
> the toolkit soon.
>
>
>
> Regards,
>
>
> Luis
>
>
>
> -------------------------------
> Radhika Sivaramakrishna wrote:
>
> > Hi Luis,
> >
> > I am using Otsu threshold for segmenting tissue from from the
> > background. It appears to work very well in most cases, however some
> >
> > Cases it fails for unknown reasons.
> >
> > In these cases, I have looked at the histogram, and I can clearly see
> > two well distinguished peaks for background and tissue, however, it
> > appears to give me a threshold that is past the 2^nd peak (tissue peak)
> > instead of between the two peaks. Could you explain why this might be
> > happening. I tried to play with the number of bins for this case but
> > everytime it bypassed the actual threshold and gave back something past
> > the tissue peak.
> >
> > Thanks
> >
> > Radhika
> >
> >
> >
> > -----------------------------------------------------
> >
> > Confidentiality Notice.
> >
> > This email message is for the sole use of the intended recipient(s) and
> > may contain confidential and privileged information. Any unauthorized
> > review, use, disclosure or distribution is prohibited. If you are not
> > the intended recipient, please contact the sender by reply email and
> > destroy all copies of the original message. If you are the intended
> > recipient, please be advised that the content of this message is subject
> > to access, review and disclosure by the sender's Email System
> Administrator.
> >
>
>
>
> -----------------------------------------------------
> Confidentiality Notice.
> This email message is for the sole use of the intended recipient(s) and
> may contain confidential and privileged information. Any unauthorized
> review, use, disclosure or distribution is prohibited. If you are not
> the intended recipient, please contact the sender by reply email and
> destroy all copies of the original message. If you are the intended
> recipient, please be advised that the content of this message is subject
> to access, review and disclosure by the sender's Email System Administrator.
>