The OpenVX Specification  a73e458
Interpolation Constants

## Detailed Description

The image reconstruction filters supported by image resampling operations.

The edge of a pixel is interpreted as being aligned to the edge of the image. The value for an output pixel is evaluated at the center of that pixel.

This means, for example, that an even enlargement of a factor of two in nearest-neighbor interpolation will replicate every source pixel into a 2x2 quad in the destination, and that an even shrink by a factor of two in bilinear interpolation will create each destination pixel by average a 2x2 quad of source pixels.

Samples that cross the boundary of the source image have values determined by the border mode - see The border mode list. and VX_NODE_BORDER.

vxScaleImageNode
VX_KERNEL_SCALE_IMAGE
vxWarpAffineNode
VX_KERNEL_WARP_AFFINE
vxWarpPerspectiveNode
VX_KERNEL_WARP_PERSPECTIVE

## Macros

#define VX_INTERPOLATION_AREA   (VX_ENUM(VX_ID_KHRONOS, VX_ENUM_INTERPOLATION, 0x2))
Output values are determined by averaging the source pixels whose areas fall under the area of the destination pixel, projected onto the source image.

#define VX_INTERPOLATION_BILINEAR   (VX_ENUM(VX_ID_KHRONOS, VX_ENUM_INTERPOLATION, 0x1))
Output values are defined by bilinear interpolation between the pixels whose centers are closest to the sample position, weighted linearly by the distance of the sample from the pixel centers.

#define VX_INTERPOLATION_NEAREST_NEIGHBOR   (VX_ENUM(VX_ID_KHRONOS, VX_ENUM_INTERPOLATION, 0x0))
Output values are defined to match the source pixel whose center is nearest to the sample position.