
In reverse mapping, each pixel in the destination image is computed by sampling the appropriate location in the source image, based on a geometric transformation (e.g. translation, rotation, or affine warp).
(dx, dy)
in the destination image grid.(sx, sy) in the source
image:(sx, sy) = inverse_transform(dx, dy)
(sx, sy)
will typically fall between pixels in the source
image.(dx, dy):(sx, sy).value =
(1 - fx) * (1 - fy) * I(x, y) +
fx * (1 - fy) * I(x+1, y) +
(1 - fx) * fy * I(x, y+1) +
fx * fy * I(x+1, y+1)
Where:
(x, y) is the integer
floor of (sx, sy)fx = frac(sx), fy
= frac(sy)I(x, y) is the pixel
value at that coordinate in the source image
Version: 2025-06-03
© Han Kleijn, www.hnsky.org, 2025.
This
work is licensed under a Creative
Commons Attribution 4.0 International License. which
permits unrestricted use, distribution, and reproduction
in any medium, provided the original work is properly cited.