Method

VipsImageconvasep

Declaration [src]

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

Description [src]

Approximate separable integer convolution. This is a low-level operation, see vips_convsep() for something more convenient.

The image is convolved twice: once with mask and then again with mask rotated by 90 degrees. mask must be 1xn or nx1 elements. Elements of mask are converted to integers before convolution.

Larger values for layers give more accurate results, but are slower. As layers approaches the mask radius, the accuracy will become close to exact convolution and the speed will drop to match. For many large masks, such as Gaussian, layers need be only 10% of this value and accuracy will still be good.

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

::: tip “Optional arguments” * layers: gint, number of layers for approximation

::: seealso vips_convsep().

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.