Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > 7faa4cd12598db7d59564e3dc9a0913c > files > 524

vips-7.18.2-1mdv2010.0.i586.rpm

<!-- manual page source format generated by PolyglotMan v3.2, -->
<!-- available at http://polyglotman.sourceforge.net/ -->

<html>
<head>
<title>IM_STDIF(3) manual page</title>
</head>
<body bgcolor='white'>
<a href='#toc'>Table of Contents</a><p>

<h2><a name='sect0' href='#toc0'>Name</a></h2>
im_stdif, im_stdif_raw - statistical differentiation of an image 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>#include
&lt;vips/vips.h&gt;</b> 
<p> int im_stdif(in, out, a, m0, b, s0, xw, yw) <br>
IMAGE *in, *out; <br>
double a, m0, b, s0; <br>
int xw, yw; 
<p> int im_stdif_raw(in, out, a, m0, b, s0, xw, yw) <br>
IMAGE *in, *out; <br>
double a, m0, b, s0; <br>
int xw, yw; 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
im_stdif() preforms statistical differencing according
to the formula given in page 45 of the book "An Introduction to Digital
Image Processing" by Wayne Niblack. This transformation emphasises the way
in which a pel differs statistically from its neighbours. It is useful for
enhancing low-contrast images with lots of detail, such as X-ray plates. 
<p>
At point (i,j) the output is given by the eqn: 
<p>   vout(i,j) = a*m0 + (1-a)*meanv
+ <br>
           (vin(i,j) - meanv) * (b*s0) / (s0+b*stdv)<br>
 
<p> Values a, m0, b and s0 are entered, while meanv and stdv are the values
calculated over a moving window of size xw, yw centred on pixel (i,j). m0
is the new mean, a is the weight given to it. s0 is the new standard deviation,
b is the weight given to it. Try: 
<p>   im_stdif $VIPSHOME/pics/huysum.v fred.v
0.5 128 0.5 50 11 11<br>
 
<p> The opreation works on one-band UCHAR images only, and writes a one-band
UCHAR image as its result. The output image has the same size as the input
- a black border is added to mark uncomputable pixels. 
<p> im_stdif_raw() behaves
exactly as im_stdif(), but does not add the border of black pixels. 
<p> 
<h2><a name='sect3' href='#toc3'>Return
Value</a></h2>
All functions returns 0 on success and -1 on error. 
<h2><a name='sect4' href='#toc4'>See Also</a></h2>
<a href='im_lhisteq.3.html'>im_lhisteq(3)</a>
,
<a href='im_histgr.3.html'>im_histgr(3)</a>
, <a href='im_hsp.3.html'>im_hsp(3)</a>
, <a href='im_heq.3.html'>im_heq(3)</a>
. 
<h2><a name='sect5' href='#toc5'>Copyright</a></h2>
1991-1996, The National Gallery
and Birkbeck College <p>

<hr><p>
<a name='toc'><b>Table of Contents</b></a><p>
<ul>
<li><a name='toc0' href='#sect0'>Name</a></li>
<li><a name='toc1' href='#sect1'>Synopsis</a></li>
<li><a name='toc2' href='#sect2'>Description</a></li>
<li><a name='toc3' href='#sect3'>Return Value</a></li>
<li><a name='toc4' href='#sect4'>See Also</a></li>
<li><a name='toc5' href='#sect5'>Copyright</a></li>
</ul>
</body>
</html>