No Subject
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
No Subject
****
Auto-threshold (Count/Size) is an iterative method. It assumes that the gray
level histogram is the sum of two normal intensity distributions (two
classes): Object pixels and background pixels. The threshold is usually not
obvious because the two distributions overlap. The trick is to find where
the two distributions intersect (By the way, even when the histogram has a
clear valley, the threshold is not necessarily at the bottom of that
valley).
For each gray level (t) along the histogram (h(t)), the algorithm calculates
the variance of the two portions of the histogram lying on each side of t
(v1(t) and v2(t)). It picks the gray level (threshold) that minimizes the
sum of the two normalized variances. This variance is sometimes called the
"within-class" variance, and can be expressed as:
vw(t) = s1(t).v1(t)/S + s2(t).v2(t)/S
where:
s1(t) = Sum(h(i), i=1->t),
s2(t) = Sum(h(i), i=t+1->n),
S = Sum(h(i), i = 1->n),
n = size of histogram.
In practice, instead of minimizing vw(t), the algorithm maximizes the
"between-class" variance. It's faster, more complicated to explain, but it's
the same exact thing.
****
Hope this helps.
Jean-Paul Martin
-----Original Message-----
From: John McLaughlin [mailto:jmclaughlin@rigel.com]
Sent: Monday, December 17, 2001 6:05 PM
To: imagepro-users@lists.mediacy.com
Subject: ImagePro>IPP's thresholding algorithm
Hi,
I was wondering if I could get an explanation of how IPP sets
it's threshold when performing a Count/Size function on bright objects.
I searched the IPP manuals and the email archive but couldn't find anything
that specifically answers my question.
thanks,
John McLaughlin
Rigel, Inc.
240 East Grand Avenue
South San Francisco, CA
94080
------_=_NextPart_001_01C18754.30EB8AB0
Content-Type: text/html;
charset="iso-8859-1"
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META content="MSHTML 5.00.2919.6307" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><SPAN class=433433223-17122001>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><SPAN
class=433433223-17122001>></SPAN> I was wondering if I could get an
explanation of how IPP sets</FONT></FONT></FONT></DIV>
<DIV><FONT size=2><FONT color=#0000ff><FONT face=Arial><SPAN
class=433433223-17122001>> </SPAN>it's threshold when performing a Count/Size
function on bright objects.<SPAN
class=433433223-17122001>..</SPAN></FONT></FONT></FONT></DIV><FONT size=2><FONT
color=#0000ff><FONT face=Arial>
<P>From an earlier posting:</SPAN></FONT></FONT></FONT></P>
<P><FONT size=2>**** </FONT></P>
<P><FONT size=2>Auto-threshold<SPAN class=433433223-17122001>
(Count/Size)</SPAN> is an iterative method. It assumes that the gray level
histogram is the sum of two normal intensity distributions (two
classes): <SPAN class=433433223-17122001>Object</SPAN> pixels and
background pixels. The threshold is usually not obvious because the two
distributions overlap. The trick is to find where the two distributions
intersect<SPAN class=433433223-17122001> </SPAN> <SPAN
class=433433223-17122001>(</SPAN>By the way, even when the histogram has a clear
valley, the threshold is not necessarily at the bottom of that valley<SPAN
class=433433223-17122001>).</SPAN></FONT></P>
<P><FONT size=2>For each gray level (t) along the histogram (h(t)), the
algorithm calculates the variance of the two portions of the histogram lying on
each side of t (v1(t) and v2(t)). It picks the gray level (threshold) that
minimizes the sum of the two normalized variances. This variance is sometimes
called the "within-class" variance, and can be expressed as:</FONT></P>
<P><FONT size=2>vw(t) = s1(t).v1(t)/S + s2(t).v2(t)/S</FONT></P>
<P><FONT size=2>where: </FONT></P>
<P><FONT size=2>s1(t) = Sum(h(i), i=1->t), </FONT></P>
<P><FONT size=2>s2(t) = Sum(h(i), i=t+1->n), </FONT></P>
<P><FONT size=2>S = Sum(h(i), i = 1->n), </FONT></P>
<P><FONT size=2>n = size of histogram.</FONT></P>
<P><FONT size=2><SPAN class=433433223-17122001>In practice, instead of
m</SPAN><SPAN class=433433223-17122001>inimizing</SPAN> vw(t)<SPAN
class=433433223-17122001>,</SPAN> <SPAN class=433433223-17122001>the
algorithm</SPAN> maximiz<SPAN class=433433223-17122001>es</SPAN> the
"between-class" variance. <SPAN class=433433223-17122001>It's
faster, more complicated to expla</SPAN><SPAN
class=433433223-17122001>in, but it's the same exact thing.
</SPAN></FONT></P>
<P><FONT size=2><SPAN class=433433223-17122001></SPAN></FONT><FONT size=2>****
</FONT></P>
<P><FONT size=2><SPAN class=433433223-17122001>Hope this
helps.</SPAN></FONT></P>
<P><FONT size=2><SPAN class=433433223-17122001>Jean-Paul
Martin</SPAN></FONT></P></DIV>
<BLOCKQUOTE style="MARGIN-RIGHT: 0px">
<DIV class=OutlookMessageHeader><FONT size=2>-----Original
Message-----<BR><B>From:</B> John McLaughlin
[mailto:jmclaughlin@rigel.com]<BR><B>Sent:</B> Monday, December 17, 2001 6:05
PM<BR><B>To:</B> imagepro-users@lists.mediacy.com<BR><B>Subject:</B>
ImagePro>IPP's thresholding algorithm<BR><BR></DIV></FONT>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2> I was wondering if I could get
an explanation of how IPP sets</FONT></DIV>
<DIV><FONT face=Arial size=2>it's threshold when performing a Count/Size
function on bright objects.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I searched the IPP manuals and the email archive
but couldn't find anything</FONT></DIV>
<DIV><FONT face=Arial size=2>that specifically answers my
question. </FONT></DIV>
<DIV> </DIV>
<DIV><FONT face=Arial size=2>thanks, </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>John McLaughlin<BR>Rigel, Inc.<BR>240 East Grand
Avenue<BR>South San Francisco,
CA<BR>94080<BR></DIV></BLOCKQUOTE></FONT></BODY></HTML>
------_=_NextPart_001_01C18754.30EB8AB0--