Bilinear filtering

Bilinear filtering or bilinear interpolation is an extension of the linear interpolation to determine the intermediate values ​​in a two-dimensional rectangular grid. It is often used as a graphics filter for scaling of raster graphics and textures to display in the rendered images.

Mathematical Description

It is assumed that the value is to be determined within a function. This should continue to be surrounded by four grid points and fixed. In order to approximately determine the value ( by linear interpolation ) is ( horizontally or vertically, horizontally here ) linearly interpolated between the grid points initially in a fixed direction. Here, and points lying between the grid points in the horizontal direction.

By the same method and then the two points is interpolated between the values ​​.

If the grid points of the function given in regular size and so the equation reduces to

This equation can be summarized in matrix notation as follows.

An extension of this method to an additional third dimension is called trilinear interpolation.

Application in computer graphics

With bilinear filtering of the sample center are closest four colors in each axis ( u and v) are interpolated linearly in each case. For this, the two values ​​between the upper and the lower texels along the u-axis are linearly interpolated. These two values ​​are then linearly interpolated along the v axis. This two-step linear interpolation is bilinear interpolation her name. The Shares are only of the sample position dependent, but not the size of the projection of the pixel in the texture space. Although this results in a minification ( the texture is very compressed ) to sampling errors because too few Texel be followed, but acts at a Maxifikation ( the texture is greatly increased ) smoothing, since in this case considered the same four neighboring texels at each pixel, but weighted differently be. The texels are plain words weighted more heavily whose center is closer to the sample center, where getting all four adjacent texels are considered.

Particular importance is the bilinear filtering on the real-time rendering to on modern graphics cards. Here, the bilinear filtering is a common method for anti-aliasing of textures. Bilinear interpolators can be relatively easy to implement circuitry by cascaded linear interpolators.

If you were to scale the texture by point sampling, one would recognize the Texel as small blocks, so that the result would be very " pixelated " and ugly. This process took place in old computer games, whose graphic was purely calculated by the CPU instead.

Graphics programs usually offer also bicubic filtering. This increases the computational complexity significantly, but in many cases provides better quality.

Further filtering

  • Trilinear filtering
  • Mip mapping
124529
de