Sophie

Sophie

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

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_LRMOSAIC(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_lrmosaic, im_tbmosaic - mosaic two images using a zero order procedure

<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
#include &lt;vips/vips.h&gt; 
<p> int  <br>
im_lrmosaic( IMAGE *ref, IMAGE *sec, IMAGE *out,  <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int bandno, <br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int xref, int yref, int xsec, int ysec, <br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int halfcorrelation, int halfarea,<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int balancetype,<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int mwidth )<br>
 
<p> int  <br>
im_tbmosaic( IMAGE *ref, IMAGE *sec, IMAGE *out,  <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int bandno, <br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int xref, int yref, int xsec, int ysec, <br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int halfcorrelation, int halfarea,<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int balancetype,<br>
 <br>
<tt> </tt>&nbsp;<tt> </tt>&nbsp;int mwidth )<br>
 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
im_lrmosaic() and im_tbmosaic() are used to mosaic two images
(left-right and top-bottom respectively).  Both input images are held by the
IMAGE descriptors reference and secondary whereas the output is written
on the IMAGE descriptor out. 
<p> In order to carry out mosaicing, the coordinates
of one tie point are required.  The tie point is expected to be in the overlapping
area and has coordinates (xref, yref) on the reference image and (xsec,
ysec) on the secondary image. The tie-point is not used as a start point
for the search, but is used to specify the overlap of the two images.  
<p>
The functions split the overlap area into three parts (top, middle and
bottom; or left, middle and right) and search the reference image in each
part for the 20 best high contrast points. These 60 points are then searched
for in the secondary image, giving a set of 60 possible corrected vectors.

<p> A straight line is fitted through the 60 vectors, and points discarded
which lie a significant distance from the line. The line is then refitted
to the remaining points, and the process repeated until either all remaining
points lie on a straight line, or too many points have been discarded. 
<p>
If a good straight line fit is found, ref and sec are joined. If no fit
was found, the functions fail with an error message. Note that these functions
 detect rotation: if the straight line found requires sec to be rotated,
they also fail with an error message. 
<p> Each function requires three more
parameters: 
<p> halfcorrelationsize - sets the size of the fragments of ref
    for which the function searches sec. The actual window<br>
    will be of size 2*halfcorrelationsize+1. We recommend a<br>
    value of 5.<br>
 
<p> halfareasize - sets the size of the area of sec that is    searched. The
actual area searched will be of size<br>
    2*halfareasize+1. We recommend a value of 14.<br>
 
<p> balancetype - sets the style of the balancing the functions     perform.
Balancing finds the average value of pixels in<br>
    the overlap area, and scales the left and right images<br>
    (or top and bottom images) so as to make the images<br>
    match in average overlap. Possible values are:<br>
 
<p>       0 - means do no balancing.<br>
 
<p>       1 - means keep the left image unadjusted and adjust <br>
       the contrast of the right image to match the left.<br>
 
<p>       2 - means keep the right image unadjusted and scale <br>
       the left image to match it.<br>
 
<p>       3 - means adjust the contrast of both the left and <br>
       right images to bring both averages to a middle<br>
       value. The middle value chosen is weighted by the<br>
       number of pixels in each image: large images will be<br>
       adjusted less than small images.<br>
 
<p> Balancing is useful for mosaicing frames from photographic or video sources
where exact colour control is impossible and exposure varies from frame
to frame.  Balancing is only allowed for uncoded uchar images. 
<p> The final
"mwidth" parameter sets the maximum blend width, see <a href='im_lrmerge.3.html'>im_lrmerge(3)</a>
. 
<p> See
also im_global_balance() for a better way of balancing large mosaics. 
<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_tbmerge.3.html'>im_tbmerge(3)</a>
, <a href='im_global_balance.3.html'>im_global_balance(3)</a>
.  <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>
</ul>
</body>
</html>