[Insight-users] Otsu Threshold

Radhika Sivaramakrishna radhika.sivaramakrishna at synarc.com
Mon, 1 Mar 2004 11:32:34 -0800


This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_001_01C3FFC3.F20252D0
Content-Type: text/plain

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.

------_=_NextPart_001_01C3FFC3.F20252D0
Content-Type: text/html
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; =
charset=3Dus-ascii">
<META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version =
5.5.2656.87">
<TITLE>RE: [Insight-users] Otsu Threshold</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=3D2>Hi Luis,</FONT>
<BR><FONT SIZE=3D2>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?</FONT></P>

<P><FONT SIZE=3D2>Thanks</FONT>
<BR><FONT SIZE=3D2>Radhika</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>-----Original Message-----</FONT>
<BR><FONT SIZE=3D2>From: Luis Ibanez [<A =
HREF=3D"mailto:luis.ibanez at kitware.com">mailto:luis.ibanez at kitware.com</=
A>] </FONT>
<BR><FONT SIZE=3D2>Sent: Saturday, February 28, 2004 8:26 AM</FONT>
<BR><FONT SIZE=3D2>To: Radhika Sivaramakrishna</FONT>
<BR><FONT SIZE=3D2>Cc: ITK</FONT>
<BR><FONT SIZE=3D2>Subject: Re: [Insight-users] Otsu Threshold</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>Hi Radhika,</FONT>
</P>

<P><FONT SIZE=3D2>There may be a conceptual interpretation problem =
here.</FONT>
</P>

<P><FONT SIZE=3D2>The OtsuThreshold calculator is not supposed to =
return</FONT>
<BR><FONT SIZE=3D2>the mininum between two peaks in a histogram.</FONT>
</P>

<P><FONT SIZE=3D2>What this calculator computes is the intensity =
value</FONT>
<BR><FONT SIZE=3D2>that can be used to separate the histogram in =
two</FONT>
<BR><FONT SIZE=3D2>classes such that inter class variance is =
maximized.</FONT>
</P>

<P><FONT SIZE=3D2>In this context, the Otsu calculator doesn't care =
at</FONT>
<BR><FONT SIZE=3D2>all about peaks and valleys.&nbsp; You could get a =
'valid'</FONT>
<BR><FONT SIZE=3D2>threhold even for a uniform histogram.</FONT>
</P>

<P><FONT SIZE=3D2>('valid' in terms of the definition of what an =
Otsu</FONT>
<BR><FONT SIZE=3D2>&nbsp;&nbsp; threshold is).</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>If you actually want to select a minimum in the =
histogram,</FONT>
<BR><FONT SIZE=3D2>the solution would be to write a variance of this =
calculator,</FONT>
<BR><FONT SIZE=3D2>(maybe taking advantage of the Statistics classes =
that already</FONT>
<BR><FONT SIZE=3D2>compute the histogram for you), and then parse the =
histogram</FONT>
<BR><FONT SIZE=3D2>in order to identify minima.&nbsp; Note that there =
are scale-space</FONT>
<BR><FONT SIZE=3D2>issues here, you will have to smooth the histogram =
using a</FONT>
<BR><FONT SIZE=3D2>particular sigma that will define the minimum size =
of valley</FONT>
<BR><FONT SIZE=3D2>that you consider to be significant.</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>If you write such a calculator, and you are willing =
to</FONT>
<BR><FONT SIZE=3D2>contribute it to the toolkit we will be happy to =
include</FONT>
<BR><FONT SIZE=3D2>it in the repository.</FONT>
</P>

<P><FONT SIZE=3D2>Note that Luca</FONT>
<BR><FONT SIZE=3D2><A =
HREF=3D"http://www.itk.org/pipermail/insight-users/2004-February/007040.=
html" =
TARGET=3D"_blank">http://www.itk.org/pipermail/insight-users/2004-Februa=
ry/007040.html</A></FONT>
<BR><FONT SIZE=3D2>has developed a variant of this calculator in order =
to support</FONT>
<BR><FONT SIZE=3D2>multiple thresholds (still defined as those that =
maximize</FONT>
<BR><FONT SIZE=3D2>inter-class variability). His code will hopefully be =
included in</FONT>
<BR><FONT SIZE=3D2>the toolkit soon.</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>Regards,</FONT>
</P>
<BR>

<P><FONT SIZE=3D2>&nbsp;&nbsp;&nbsp; Luis</FONT>
</P>
<BR>
<BR>

<P><FONT SIZE=3D2>-------------------------------</FONT>
<BR><FONT SIZE=3D2>Radhika Sivaramakrishna wrote:</FONT>
</P>

<P><FONT SIZE=3D2>&gt; Hi Luis,</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; I am using Otsu threshold for segmenting tissue =
from from the </FONT>
<BR><FONT SIZE=3D2>&gt; background. It appears to work very well in =
most cases, however some</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Cases it fails for unknown reasons.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; In these cases, I have looked at the histogram, =
and I can clearly see </FONT>
<BR><FONT SIZE=3D2>&gt; two well distinguished peaks for background and =
tissue, however, it </FONT>
<BR><FONT SIZE=3D2>&gt; appears to give me a threshold that is past the =
2^nd peak (tissue peak) </FONT>
<BR><FONT SIZE=3D2>&gt; instead of between the two peaks. Could you =
explain why this might be </FONT>
<BR><FONT SIZE=3D2>&gt; happening. I tried to play with the number of =
bins for this case but </FONT>
<BR><FONT SIZE=3D2>&gt; everytime it bypassed the actual threshold and =
gave back something past </FONT>
<BR><FONT SIZE=3D2>&gt; the tissue peak.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Thanks</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Radhika</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt;&nbsp; </FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; =
-----------------------------------------------------</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; Confidentiality Notice.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
<BR><FONT SIZE=3D2>&gt; This email message is for the sole use of the =
intended recipient(s) and </FONT>
<BR><FONT SIZE=3D2>&gt; may contain confidential and privileged =
information. Any unauthorized </FONT>
<BR><FONT SIZE=3D2>&gt; review, use, disclosure or distribution is =
prohibited. If you are not </FONT>
<BR><FONT SIZE=3D2>&gt; the intended recipient, please contact the =
sender by reply email and </FONT>
<BR><FONT SIZE=3D2>&gt; destroy all copies of the original message. If =
you are the intended </FONT>
<BR><FONT SIZE=3D2>&gt; recipient, please be advised that the content =
of this message is subject </FONT>
<BR><FONT SIZE=3D2>&gt; to access, review and disclosure by the =
sender's Email System Administrator.</FONT>
<BR><FONT SIZE=3D2>&gt; </FONT>
</P>
<BR>

<P><FONT =
SIZE=3D2>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </FONT>
<BR><FONT =
SIZE=3D2>-----------------------------------------------------&nbsp; =
</FONT>
<BR><FONT SIZE=3D2>Confidentiality Notice. </FONT>
<BR><FONT SIZE=3D2>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.</FONT></P>

</BODY>
</HTML>
------_=_NextPart_001_01C3FFC3.F20252D0--