Gray value interpolation is a method that is necessary for image transformations because images are no continuous functions but digitized, i.e., consist of pixels associated with (discrete) gray values. If an image is, e.g., rotated and downscaled as in figure 1.1, a resulting pixel of the output image does not correspond to exactly one pixel of the input image anymore. Instead, it may contain parts of more than one pixel of the original image. Therefore, a method to calculate the gray value of the resulting pixel is required. One possible method is to use the gray value of exactly one pixel of the original image, e.g., the one whose center lies closest to the center of the resulting pixel. This means, however, that information contained in the original image, and with it image quality, might be lost in the transformation process. The alternative is to interpolate between the gray values of more than one pixel of the original image.
There are several ways to interpolate between more than one pixel, depending on the number of pixels that are considered and their influence on the resulting gray value. A detailed description of the different interpolation methods that are used in HALCON operators is given in the following chapter.