Specifications

Intel
®
Image Processing Library Reference Manual
B-6
B
Figure B-2 Cubic Interpolation
x
y
y
S3
D(x
S
,y
S
)
y
S2
y
S1
y
S0
x
S3
x
S1
x
S0
x
S2
F
0
(x)
F
1
(x)
F
2
(x)
F
3
(x)
x
S
y
S
intensity
Super-Sampling
If the destination image is much smaller than the source image, the above
interpolation algorithms may skip some pixels in the source image (that is,
these algorithms not necessarily use all source pixels when computing the
destination pixels’ intensity). In order to use all pixel values of the source
image, the
iplDecimate and iplResize functions support the super-
sampling algorithm, which is free of the above drawback.
The super-sampling algorithm is as follows:
(1) Divide the source image’s 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
a1x1 square.
(2) Compute a weighted sum of source pixel values for all pixels that are
contained in the rectangle or have a non-zero intersection with the
rectangle. If a source pixel is fully contained in the rectangle, that pixel’s
value is taken with weight 1. If the rectangle and the source pixel’s square
have an intersection of area a < 1, that pixel’s value is taken with weight a.