Sophie

Sophie

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

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_MULTIPLY(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_cmulnorm, im_multiply - multiply two images 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
<b>#include &lt;vips/vips.h&gt;</b>

<p> <b>int im_cmulnorm(in1, in2, out)</b> <br>
<b>IMAGE *in1, *in2, *out;</b> 
<p> <b>int im_multiply(in1, in2, out)</b> <br>
<b>IMAGE *in1, *in2, *out;</b> 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
These functions operate on two images
held by image descriptors in1 and in2 and write the result to the image
descriptor out.  Input images in1 and in2 should have the same channels
and the same sizes; however they can be of different types.  Only the history
of the image descriptor pointed by in1 is copied to out. 
<p> <a href='im_multiply.3.html'><b>im_multiply(3)</b></a>

applied to two integer images multiplies the two images and writes the
output  as: 
<p>  in1    | uchar   char   ushort  short  uint  int <br>
  -------+-----------------------------------------<br>
  in2    |<br>
  uchar  | ushort  short  ushort  short  uint  int<br>
  char   | short   short  short   short  int   int<br>
  ushort | ushort  short  ushort  short  uint  int<br>
  short  | short   short  short   short  int   int<br>
  uint   | uint    int    uint    int    uint  int<br>
  int    | int     int    int     int    int   int<br>
 
<p> If one or more of the images is a floating point type, the output is
FMTFLOAT, unless one or more of the inputs is FMTDOUBLE, in which case
the output is also FMTDOUBLE. 
<p> If one or more of the images is a complex
type, the output is FMTCOMPLEX, unless one or more of the inputs is FMTDPCOMPLEX,
in which case the output is also FMTDPCOMPLEX. 
<p> For complex input pels (x1,y1)
and (x2,y2), im_multiply() writes  (x1*x2 - y1*y2, x1*y2 + x2*y1). 
<p> <a href='im_cmulnorm.3.html'><b>im_cmulnorm(3)</b></a>

multiplies two complex images. The complex output is normalised to 1 by
dividing both the real and the imaginary part of each pel with the norm;
for instance if the complex multiplication produces (a,b) then the output
written by this function is (a/norm, b/norm), where norm=a*a+b*b.  Result
is checked for norm=0.  The function is useful for phase correlation.  Both
inputs should be complex. 
<p> Result is float complex if both inputs are float
complex.  In any other case the result is double complex. 
<p> 
<h2><a name='sect3' href='#toc3'>Bugs</a></h2>
None of the
functions checks the result for over/underflow. 
<h2><a name='sect4' href='#toc4'>Return Value</a></h2>
All functions
return 0 on success and -1 on error. 
<h2><a name='sect5' href='#toc5'>See Also</a></h2>
<a href='im_subtract.3.html'>im_subtract(3)</a>
, <a href='im_lintra.3.html'>im_lintra(3)</a>
,
<a href='im_add.3.html'>im_add(3)</a>
. 
<h2><a name='sect6' href='#toc6'>Author</a></h2>
N. Dessipris - 22/04/1991 <br>
J. Cupitt (im_multiply) - 22/04/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'>Bugs</a></li>
<li><a name='toc4' href='#sect4'>Return Value</a></li>
<li><a name='toc5' href='#sect5'>See Also</a></li>
<li><a name='toc6' href='#sect6'>Author</a></li>
</ul>
</body>
</html>