Specifications
Interpolation in Geometric Transformation Functions
B-7
B
For each source pixel intersecting with the rectangle, Figure B-3 shows the
corresponding weight value.
(3) To compute the pixel value in the destination image, divide this
weighted sum by the rectangle area
(xSrc*ySrc)/(xDst*yDst)
.
Here
xSrc
,
xDst
,
ySrc
,and
yDst
are parameters passed to the functions
iplDecimate and iplResize to set the decimation ratios
xDst
/
xSrc
and
yDst
/
ySrc
.
Figure B-3 Super-sampling Weights
1
1
1
1
1
1
∆
1
∆
1
∆
1
∆
2
∆
2
∆
2
∆
3
∆
3
∆
2
x
∆
3
∆
1
x
∆
3
To use super-sampling, set the value IPL_INTER_SUPER for the parameter
interpolate
.