Method

VipsImageconvi

Declaration [src]

int
vips_convi (
  VipsImage* in,
  VipsImage** out,
  VipsImage* mask,
  ...
)

Description [src]

Integer convolution. This is a low-level operation, see vips_conv() for something more convenient.

mask is converted to an integer mask with rint() of each element, rint of scale and rint of offset. Each output pixel is then calculated as

sigma[i]{pixel[i] * mask[i]} / scale + offset

The output image always has the same VipsBandFormat as the input image.

For VipsBandFormat images, vips_convi() uses a fast vector path based on half-float arithmetic. This can produce slightly different results. Disable the vector path with --vips-novector or VIPS_NOVECTOR or vips_vector_set_enabled().

::: seealso vips_conv().

Parameters

out VipsImage
 

Output image.

 The argument will be set by the function.
 The instance takes ownership of the data, and is responsible for freeing it.
mask VipsImage
 

Convolve with this mask.

 The data is owned by the caller of the function.
... none
 

NULL-terminated list of optional named arguments.

Return value

Returns: int
 

0 on success, -1 on error.