Interpolation (photography)

from Wikipedia, the free encyclopedia

In digital photography, interpolation (literal translation: "intermediate calculation") describes a process for generating image content

  1. between different pixels of an image (density interpolation)
  2. within individual pixels (color interpolation).

Interpolation is a necessary part of the signal processing path of digital images, as all changes to the amount of pixels and the color can only be realized with this. In the entire processing path between image generation and display, multiple interpolations are made - this always results in a loss of sharpness .

Basics

Each pixel transports image information in two ways:

  1. In interaction with other pixels (only all pixels together result in an image). This is represented by the point density .
  2. Inside the pixel (brightness & color). This is represented by the color depth .
Together with the point density , the color depth forms the matrix of every raster graphic . A pixel is the smallest element of any raster graphic.

In every image processing chain (example: camera - screen - memory - printer) the dot density and color of each image are changed several times. That is u. a. necessary due to the adaptation of the image to the image-presenting medium . Typical for this are the differences between screen and printer, as both require special point densities and use different color spaces .

By means of interpolation, the number of pixels is increased or decreased by the desired value, and the new color value is determined in the event of color and brightness changes. This intermediate calculation does not result in any new image information, but only intermediate values ​​based on the original information.

Density interpolation

The number of pixels in all digital images must be changed several times. As an example, this can be seen in the fish picture opposite:

  • the original image is 800 × 300 pixels
  • In the representation of an average Internet browser , this image is currently displayed with approx. 216 × 82 pixels
  • a printout 20 cm wide at 300 dpi , on the other hand, would require a quantity of 2362 × 886 pixels.

The decrease or increase in the amount of pixels is achieved by interpolation.

The fish in the sample picture consists of 25 × 20 squares. What would the density interpolation look like on 17 × 13 squares or on 27 × 21 squares? These non-integer intermediate calculations represent the core problem of all interpolations and are the cause of various interpolation methods.

Color interpolation

Sample picture with fish

The color and brightness information of pixels are stored together in the color depth of an image. In the image processing chain, the color information of a digital image is changed several times (within the color depth). This can be seen again in the example of the fish picture opposite:

  • if the fish image is printed, the color of the printout always looks different from the display of the color on the screen
  • each screen displays (at least slightly) the color of the fish image differently than another screen

A digitally photographed image is usually processed with 3 color channels in red, green and blue . In the most common case, each color channel has 256 gradations (= 8 bit). What would a color change in the fish image look like, for example halving the brightness?

  • the light blue background has a cyan value of 206; halving is 103
  • the blue fish has a blue value of 255; halving is not possible here, since the color channels only allow integer gradations. It depends on the interpolation method used which new blue value is available after the change in brightness.

Interpolation methods

From a mathematical point of view, interpolation means " intermediate value determination ". The new values ​​are calculated from the known pixel values ​​of an image using interpolation algorithms. The main difference between the various interpolation methods lies in the evaluation of the known pixel values ​​and the resulting definition of the new image content. The common feature of all interpolation methods is the effect on the content of point density and color depth.

Multiple interpolations are often used in every image processing chain. There are always non-integer changes. This type of change results in a loss of information and thus a loss of sharpness . Due to this system-related loss of sharpness, the influence on the impression of sharpness always dominates when choosing the interpolation method .

Typical interpolation methods are pixel repetition, bilinear interpolation, and bicubic interpolation. These are based on the method of a reconstruction filter .

Pixel repetition

With pixel repetition, also called nearest neighbor , the color value of the closest pixel of the input image is assigned to each pixel of the output image. Decreasing point densities or making non-integer changes will erase some of the existing pixel values. Shrinking images with this method can lead to severe aliasing , which manifests itself as image artifacts. When enlarging by means of pixel repetition, there is a block-like, "pixelated" representation.

Bilinear interpolation

With bilinear interpolation, a color value is calculated from the four closest color values.

With bilinear interpolation , the color value of a pixel in the output image is interpolated from the four neighboring color values ​​in the input image. When reducing point densities or non-integer changes, simple value trends (example: strong changes in brightness) are taken into account.

Bicubic interpolation

This method uses analytical functions (i.e. the consideration of tendencies beyond the neighboring pixels) for the recalculation. A color value of the output image is interpolated from the neighboring color values ​​of the input image by means of cubic splines . There are several common cubic splines with different properties; the term “bicubic interpolation” is therefore ambiguous. With the reduction of point densities or non-integer changes, significantly “softer” transitions between the new pixels arise than with simple pixel repetition.

The image processing program GIMP (version 2.7) uses Catmull-Rom splines. With this spline type, the color values ​​at edges overshoot , which manifests itself as a sharpening of the image. The image processing program Paint.NET (version 3.36), on the other hand, uses cubic B-splines, which lead to a more blurred representation.

Compare different interpolation methods

Comparison with density interpolations

Comparison with color interpolations

Web links