Sophie

Sophie

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

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_LITECOR(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_litecor - perform light correction 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>#include &lt;vips/vips.h&gt;</b> 
<p> <b>int
im_litecor(in, white, out, clip, factor)</b> <br>
<b>IMAGE *in, *out;</b> <br>
<b>int clip;</b> <br>
<b>double factor;</b> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<a href='im_litecor.3.html'><b>im_litecor(3)</b></a>
 performs light correction on the
image held by the IMAGE descriptor in, with respect to a reference white
image held by the IMAGE descriptor white. The result is written onto the
IMAGE descriptor out.  The function works on byte one channel images only.

<p> The flag clip can take two values 0 and 1.  If clip is 1 then the input
is corrected with reference to the maximum value of white (maxw) as follows.

<p>  pel_out = factor * pel_in * maxw / pel_white.<br>
 
<p> If clip is 0 then the output is scaled with the maximum possible output
set to 255.  In this case factor is not used but it must be set to a dummy
value. 
<p> The basic reason for lighting correction is that the input frame
does not have a uniform distribution of white light due to the optical
response of the lens.  The function accepts a white image which is a simple
multiple of the input image in size; for example it is possible that the
white is a subsampled version of in; however the sizes of in must be an
exact multiple of the white.  If clip is set to 0, lighting correction is
carried out and the result is scaled between 0 and 255.  This can be used
 to correct individual frames. 
<p> If multiband images are grabbed, then flag
should be set to 1, since no scaling must be done.  In this case the factor
can reduce the number of clipped pels if overshooting occurs in the brightest
band.  The program prints the number of clipped pels with <a href='im_warning.3.html'>im_warning(3)</a>
.

<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
The function returns 0 on success and -1 on error. 
<h2><a name='sect4' href='#toc4'>Bugs</a></h2>
clip==0
case not working too well. 
<h2><a name='sect5' href='#toc5'>See&nbsp;Also</a></h2>
<a href='im_add.3.html'>im_add(3)</a>
, <a href='im_lintra.3.html'>im_lintra(3)</a>
, <a href='im_multiply.3.html'>im_multiply(3)</a>
.

<h2><a name='sect6' href='#toc6'>Copyright</a></h2>
<br>
N. Dessipris 
<h2><a name='sect7' href='#toc7'>Author</a></h2>
N. Dessipris - 05/12/1991 <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'>Bugs</a></li>
<li><a name='toc5' href='#sect5'>SeeAlso</a></li>
<li><a name='toc6' href='#sect6'>Copyright</a></li>
<li><a name='toc7' href='#sect7'>Author</a></li>
</ul>
</body>
</html>