Sophie

Sophie

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

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>CONVOLUTION(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_conv, im_conv_raw, im_convf, im_convf_raw,  im_convsep, im_convsep_raw,
im_convsepf, im_convsepf_raw, im_convsub -  convolves an image with a generalised
mask 
<h2><a name='sect1' href='#toc1'>Synopsis</a></h2>
#include &lt;vips/vips.h&gt; 
<p> int im_conv(in, out, mask) <br>
IMAGE *in, *out; <br>
INTMASK *mask; 
<p> int im_conv_raw(in, out, mask) <br>
IMAGE *in, *out; <br>
INTMASK *mask; 
<p> int im_convf(in, out, mask) <br>
IMAGE *in, *out; <br>
DOUBLEMASK *mask; 
<p> int im_convf_raw(in, out, mask) <br>
IMAGE *in, *out; <br>
DOUBLEMASK *mask; 
<p> int im_convsep(in, out, mask) <br>
IMAGE *in, *out; <br>
INTMASK *mask; 
<p> int im_convsep_raw(in, out, mask) <br>
IMAGE *in, *out; <br>
INTMASK *mask; 
<p> int im_convsepf(in, out, mask) <br>
IMAGE *in, *out; <br>
DOUBLEMASK *mask; 
<p> int im_convsepf_raw(in, out, mask) <br>
IMAGE *in, *out; <br>
DOUBLEMASK *mask; 
<p> int im_convsub(in, out, mask, xskip, yskip) <br>
IMAGE *in, *out; <br>
INTMASK *mask; <br>
int xskip, yskip; 
<p> int im_shrink(in, out, xfactor, yfactor) <br>
IMAGE *in, *out; <br>
double xfactor, yfactor; 
<p> 
<h2><a name='sect2' href='#toc2'>Description</a></h2>
These functions convolve the image
<b>in</b> with the matrix <b>mask</b> and put the result in the image <b>out.</b> 
<p> Input should
be non-complex.  The size and type of the output image are the same as the
size of the input.  To output a larger type (for example, to output an int
image from convolution of a byte image, avoiding clipping), cast the input
image up with  <a href='im_clip2fmt.3.html'><b>im_clip2fmt(3)</a>
.</b> 
<p> The output image is the same size as the
input. The edge pixels are calculated by expanding the input image using
<a href='im_embed.3.html'><b>im_embed(3)</b></a>
 in mode 1 (replicating edge pixels) just enough so that the
output can match the input. 
<p> The output at each point is divided by scale
and then the offset is added. Both offset and scale are held in mask. 
<p> The
<b>im_conv*(3)</b> functions have &rsquo;raw&rsquo; versions which do not add the border: instead
the  output image is smaller than the input. 
<p> <a href='im_conv.3.html'><b>im_conv(3)</b></a>
 and <a href='im_conv_raw.3.html'><b>im_conv_raw(3)</b></a>

convolve any non-complex input image to make an output image of the same
type. Rounding is appropriate to the image type. 
<p> <a href='im_convf.3.html'><b>im_convf(3)</b></a>
 and <a href='im_convf_raw.3.html'><b>im_convf_raw(3)</b></a>

convolves to float (double if the input is double). The function expects
a double mask. 
<p> <a href='im_convsep.3.html'><b>im_convsep(3)</b></a>
 and <a href='im_convsep_raw.3.html'><b>im_convsep_raw(3)</b></a>
 carry out convolution
using an 1xN or Nx1 separable mask.   
<p> The function scales the output result
by dividing it with scale*scale. The scale factor should therefore be the
sqrt of the scale of the square NxN mask. 
<p> Rounding is appropriate to the
image type.  It works on any non-complex image, and writes the output in
the same format as the input. The function expects integer mask. 
<p> <a href='im_convsepf.3.html'><b>im_convsepf(3)</b></a>

and <a href='im_convsepf_raw.3.html'><b>im_convsepf_raw(3)</b></a>
 convolves to float (double if the input is double).
The function expects a double mask. 
<p> <a href='im_convsub.3.html'><b>im_convsub(3)</b></a>
 convolves the byte image
pointed by in and writes the result as a byte output. Using this function
the input image is subsampled on both directions by an integer factor of
xskip horizontally and an integer factor of yskip vertically. During the
covolution, values are rounded before division. Both input and output are
bytes.  Output is clipped between 0 and 255. The function expects an integer
mask. 
<p> 
<h2><a name='sect3' href='#toc3'>Return Value</a></h2>
The functions returns 0 on success and -1 on error. 
<h2><a name='sect4' href='#toc4'>See
Also</a></h2>
<a href='im_read_imask.3.html'>im_read_imask(3)</a>
, <a href='im_compass.3.html'>im_compass(3)</a>
, <a href='im_fastcor.3.html'>im_fastcor(3)</a>
, <a href='im_log_dmask.3.html'>im_log_dmask(3)</a>
, <a href='im_clip2fmt.3.html'>im_clip2fmt(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>