Method

VipsImagequadratic

Declaration [src]

int
vips_quadratic (
  VipsImage* in,
  VipsImage** out,
  VipsImage* coeff,
  ...
)

Description [src]

Transform an image with a 0, 1, 2, or 3rd order polynomial.

The transform we compute:

x = x' + a              : order 0     image shift only
  + b x' + c y'         : order 1     + affine transf.
  + d x' y'             : order 2     + bilinear transf.
  + e x' x' + f y' y'   : order 3     + quadratic transf.

y = y' + g
  + h y' + i x'
  + j y' x'
  + k y' y' + l x' x'

where:

x', y' = coordinates of srcim
x, y   = coordinates of dstim
a .. l = coefficients

The coefficients are in the input matrix, ordered as:

a g
--
b h
c i
--
d j
--
e k
f l

The matrix height may be 1, 3, 4, 6

::: tip “Optional arguments” * interpolate: VipsInterpolate, use this interpolator (default bilinear)

::: seealso vips_affine().

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.
coeff VipsImage
 

Horizontal quadratic.

 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.