Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > c109337651527e96d7bb9adc83c5b18a > files > 297

libvips-devel-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_GLOBAL_BALANCE(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_global_balance, im_global_balancef - perform global mosaic balancing
on  an image 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
#include &lt;vips/vips.h&gt; 
<p> int  <br>
im_global_balance( IMAGE *in, IMAGE *out, double gamma ) 
<p> int  <br>
im_global_balance_float( IMAGE *in, IMAGE *out, double gamma ) 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
These
functions takes an image assembled with the mosaicing functions (im_*merge*(),
im_*mosaic*()), take it apart, and reassemble it, globally optimising the
image balance.  This is useful for assembling image mosaics from sources
where the exposure is uncontrolled and may vary from tile to tile --- such
as video, or photographic sources. 
<p> The function finds a set of factors,
one for each of the input images, and scales each image by its factor before
reassembling. The factors are chosen so as to minimise the average grey-level
difference between neighboring images at their overlaps.  Trivial overlaps
(where the width and height of the overlap are both less than 20 pixels)
are ignored. 
<p> The gamma parameter is the gamma of the image input system.
It is used during brightness adjustment. Set to 1.0 to disable gamma, to
1.6 for a typical IR vidicon camera, or 2.3 for a typical video camera. 
<p> It
relies on information left by the mosaicing functions in ".desc" files. If
the ".desc" file of the input image has been corrupted, or is strangely
complicated, or if any of the original input images have been moved or
deleted, the function can fail. 
<p> The function will fail for mosaics larger
than about 7 by 7 frames, since it will run out of file descriptors (UNIX
sets a limit of 256 per process).  To balance larger mosaics, just assemble
them in 7x7 sections, balancing and saving each part in turn, before loading,
assembling and balancing the final image.  The function can also fail if
there are significant mosaicing errors. 
<p> im_global_balancef() works as im_global_balance(),
but outputs a float rather than a uchar image. This lets you adjust the
range of the image manually, if the automatically-found scales are causing
burn-out. 
<p> 
<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
All functions return 0 on success and -1 on error. 
<h2><a name='sect4' href='#toc4'>See
Also</a></h2>
<a href='im_lrmerge.3.html'>im_lrmerge(3)</a>
, <a href='im_lrmosaic.3.html'>im_lrmosaic(3)</a>
. 
<h2><a name='sect5' href='#toc5'>Copyright</a></h2>
Birkbeck College and the National
Gallery, 1991 - 1995. <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>