Since this is a fairly delicate topic that can lead to ambiguity, it is worth devoting a section to how image transformations are implemented in practice.
Let be a general bijective transformation
| (1.128) |
| (1.129) |
Since images are quantized into pixels rather than continuous, the
transformation cannot be used directly in real applications:
it may leave holes in the second image or map the same point from the first
image multiple times.
For these reasons, image processing always uses the inverse transformation
, which returns, for every point in the destination image
, the point in the source image
from which to sample the color:
The source image is also made up of pixels, but knowing the point
makes it straightforward to use techniques such as linear
interpolation to obtain the pixel value.
If the function is very complex and the same transformation
must be applied to multiple images, computational time can be saved by
creating a Look-Up Table (LUT) of elements
with the same dimensions as the destination image, storing
the result of the transformation (1.130) for each element.
Paolo medici