Intel® Integrated Performance Primitives Developer Guide and Reference

ID 790148
Date 11/07/2023
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

Super Sampling

If the destination image is much smaller than the source image, the other interpolation algorithms may skip some pixels in the source image (that is, these algorithms not necessarily use all source pixels when computing intensity of the destination pixels).

The super-sampling algorithm is as follows:

  1. Divide the source image rectangular ROI (or the whole image, if there is no ROI) into equal rectangles, each rectangle corresponding to some pixel in the destination image. Note that each source pixel is represented by a 1x1 square.

  2. Compute a weighted sum of source pixel values for all pixels that are in the rectangle or have a non-zero intersection with the rectangle. If a source pixel is fully contained in the rectangle, the value of that pixel is taken with weight 1. If the rectangle and the square of the source pixel have an intersection of area a < 1, that pixel's value is taken with weight a.

    Figure Supersampling Weights shows the corresponding weight value for each source pixel intersecting with the rectangle.

  3. To compute the pixel value in the destination image, divide this weighted sum by the ratio of the source and destination rectangle areas SSrc/ SDst = 1/xFactor*yFactor.

    Here xFactor, and yFactor are the parameters of the functions that specify the factors by which the x and y dimensions of the source image ROI are changed.

Note that supersampling interpolation can be used only for xFactor<1, and yFactor<1.

To use the supersampling interpolation, use the functions with the Super suffix (pass interpolation=ippSuper to GetSize functions).

Supersampling Weights