Resampling in vImage

Learn how vImage resamples image data during geometric operations.


Most vImage geometric functions use resampling kernels, which combine data from a target pixel and other nearby pixels to calculate a value for the destination pixel. Resampling image data reduces unwanted artifacts, like interference patterns, in the destination image.

This procedure is somewhat similar to that used for convolution. However—in contrast to convolution—for geometric operations, the resampling kernel itself is resampled during the process of pairing kernel values against the sampled pixel data. The kernel is evaluated at both fractional and integral pixel locations. This has implications for the nature of the kernel—which must be supplied as a function rather than as a matrix. A resampling kernel function is also called a resampling filter, or simply a filter.

For almost all geometric operations, vImage supplies a default resampling filter unless you set the flag kvImageHighQualityResampling, in which case vImage uses a higher-quality filter. However, the performance of that filter may be slower.

The reflection and high-level rotation functions don’t resample. The shear functions can either use a default resampling filter or, if you require more control, a custom filter that you provide.

See Also


Affine Transforms

Translate, rotate, and scale images.

Image Reflection

Reflect images horizontally and vertically.

Image Shearing

Shear images horizontally and vertically.

Image Rotation

Rotate images by arbitrary angles or by multiples of 90 degrees.

Image Scaling

Scale interlaced and planar images.