Sophie

Sophie

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

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_SIMILARITY_AREA(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_similarity_area, im_similarity - apply a similarity transform to
an image 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>#include &lt;vips/vips.h&gt;</b> 
<p> int im_similarity_area(in, out, s,
a, dx, dy, x, y, w, h) <br>
<b>IMAGE *in, *out;</b> <br>
<b>double s, a, dx, dy;</b> <br>
<b>int x, y;</b> <br>
<b>int w, h;</b> 
<p> int im_similarity(in, out, s, a, dx, dy) <br>
<b>IMAGE *in, *out;</b> <br>
<b>double s, a, dx, dy;</b> 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
<b>im_similarity_area()</b> applies a similarity
transformation on the image held by the IMAGE descriptor in and puts the
result at the location pointed by the IMAGE descriptor out. in many have
any number of bands, be any size, and have any non-complex type. 
<p> The transformation
is described by s, a, dx, dy.  The point (x,y) in the input is mapped onto
point (X,Y) in the output by 
<p> <tt> </tt>&nbsp;<tt> </tt>&nbsp;X = s * x - a * y + dx<br>
 <tt> </tt>&nbsp;<tt> </tt>&nbsp;Y = a * x + s * y + dy<br>
 
<p> s and a do not correspond to scale and angle of the transformation; the
actual scale and angle are given by the equations: 
<p> <tt> </tt>&nbsp;<tt> </tt>&nbsp;scale = sqrt(s*s +
a*a) <br>
 <tt> </tt>&nbsp;<tt> </tt>&nbsp;angle = arctan(s/a).<br>
 
<p> The area of the output image given by x, y, w, h is generated. (0,0) is
 the position of the transformed top-left-hand corner of the input image.
Function im_similarity_area resamples the transformed image using bilinear
interpolation. 
<p> im_similarity works exactly as im_similarity_area, but calculates
x, y, w, h for you such that the rectangle described just encloses all
of the transformed input pixels. 
<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
The functions return 0 on success
and -1 on error. 
<h2><a name='sect4' href='#toc4'>Bugs</a></h2>
As with most resamplers, im_similarity performs poorly
at the edges of images. 
<h2><a name='sect5' href='#toc5'>See&nbsp;Also</a></h2>
<a href='similarity.1.html'>similarity(1)</a>
, <a href='similarity_area.1.html'>similarity_area(1)</a>
 
<h2><a name='sect6' href='#toc6'>Authors</a></h2>
N.
Dessipris -&nbsp;13/01/1992 <br>
J.Ph. Laurent -&nbsp;12/12/92 <br>
J. Cupitt -&nbsp;22/02/93  <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'>Authors</a></li>
</ul>
</body>
</html>