[Insight-users] Otsu Threshold
Luis Ibanez
luis.ibanez at kitware.com
Sat, 28 Feb 2004 11:25:56 -0500
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.
>