All Topics  
Bilinear interpolation

 

   Email Print
   Bookmark   Link






 

Bilinear interpolation



 
 
In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, bilinear interpolation is an extension of linear interpolation
Linear interpolation

Linear interpolation is a method of curve fitting using linear polynomials. It is heavily employed in mathematics , and numerous applications including computer graphics....
 for interpolating
Interpolation

In the mathematics subfield of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points....
 functions of two variables on a regular grid
Regular grid

A regular grid is a tessellation of the Euclidean plane by congruent rectangles or a Honeycomb of rectilinear parallelepipeds . Grids of this type appear on graph paper and may be used in finite element analysis as well as finite volume methods and finite difference methods....
. The key idea is to perform linear interpolation first in one direction, and then again in the other direction.

Suppose that we want to find the value of the unknown function f at the point P = (x, y).






Discussion
Ask a question about 'Bilinear interpolation'
Start a new discussion about 'Bilinear interpolation'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In mathematics
Mathematics

Mathematics is the study of quantity, structure, space, change, and related topics of pattern and form. Mathematicians seek out patterns whether found in numbers, space, natural science, computers, imaginary abstractions, or elsewhere....
, bilinear interpolation is an extension of linear interpolation
Linear interpolation

Linear interpolation is a method of curve fitting using linear polynomials. It is heavily employed in mathematics , and numerous applications including computer graphics....
 for interpolating
Interpolation

In the mathematics subfield of numerical analysis, interpolation is a method of constructing new data points within the range of a discrete set of known data points....
 functions of two variables on a regular grid
Regular grid

A regular grid is a tessellation of the Euclidean plane by congruent rectangles or a Honeycomb of rectilinear parallelepipeds . Grids of this type appear on graph paper and may be used in finite element analysis as well as finite volume methods and finite difference methods....
. The key idea is to perform linear interpolation first in one direction, and then again in the other direction.

Bilinear Interpolation
Suppose that we want to find the value of the unknown function f at the point P = (x, y). It is assumed that we know the value of f at the four points Q11 = (x1y1), Q12 = (x1y2), Q21 = (x2y1), and Q22 = (x2y2).

We first do linear interpolation in the x-direction. This yields

 

We proceed by interpolating in the y-direction.

This gives us the desired estimate of f(x, y).

If we choose a coordinate system in which the four points where f is known are (0, 0), (0, 1), (1, 0), and (1, 1), then the interpolation formula simplifies to Or equivalently, in matrix operations:

Contrary to what the name suggests, the interpolant is not linear. Instead, it is of the form so it is a product of two linear functions. Alternatively, the interpolant can be written as where

In both cases, the number of constants (four) correspond to the number of data points where f is given. The interpolant is linear along lines parallel
Parallel (geometry)

Parallelism is a term in geometry and in everyday life that refers to a property in Euclidean space of two or more line s or plane , or a combination of these....
 to either the or the direction, equivalently if or is set constant. Along any other straight line, the interpolant is quadratic
Quadratic function

A quadratic function, in mathematics, is a polynomial function of the form , where . The graph of a function of a quadratic function is a parabola whose major axis is parallel to the y-axis....
.

The result of bilinear interpolation is independent of the order of interpolation. If we had first performed the linear interpolation in the y-direction and then in the x-direction, the resulting approximation would be the same.

The obvious extension of bilinear interpolation to three dimensions is called trilinear interpolation
Trilinear interpolation

Trilinear interpolation is a method of multivariate interpolation on a Three dimensional space regular grid. It approximates the value of an intermediate point within the local axial rectangular prism linearly, using data on the lattice points....
.

Application in image processing

In computer vision
Computer vision

Computer vision is the science and technology of machines that see. As a scientific discipline, computer vision is concerned with the theory for building artificial systems that obtain information from images....
 and image processing
Image processing

In electrical engineering and computer science, image processing is any form of signal processing for which the input is an , such as photographs or video frame; the output of image processing can be either an image or a set of characteristics or parameters related to the image....
, bilinear interpolation is one of the basic resampling
Resampling

Resampling is the digital process of changing the sample rate or dimensions of digital imagery or audio by temporally or areally analysing and sampling the original data....
 techniques.

It is a texture mapping
Texture mapping

Texture mapping is a method for adding detail, surface texture, or colour to a computer-generated imagery or 3D model. Its application to 3D graphics was pioneered by Dr Edwin Catmull in his Ph.D....
 technique that produces a reasonably realistic image, also known as bilinear filtering
Bilinear filtering

Bilinear filtering is a texture filtering method used to smooth Texture mappings when displayed larger or smaller than they actually are.Most of the time, when drawing a textured shape on the screen, the texture is not displayed exactly as it is stored, without any distortion....
 or bilinear texture mapping. An algorithm is used to map a screen pixel location to a corresponding point on the texture map. A weighted average of the attributes (color, alpha, etc.) of the four surrounding texels is computed and applied to the screen pixel. This process is repeated for each pixel forming the object being textured

When an image needs to be scaled-up, each pixel of the original image needs to be moved in certain direction based on scale constant. However, when scaling up an image, there are pixels (i.e. Hole) that are not assigned to appropriate pixel values. In this case, those holes should be assigned to appropriate image values so that the output image does not have non-value pixels.

Typically bilinear interpolation can be used where perfect image transformation, matching and imaging is impossible so that it can calculate and assign appropriate image values to pixels. Unlike other interpolation techniques such as nearest neighbor interpolation
Nearest neighbor interpolation

Nearest-neighbor interpolation is a simple method of multivariate interpolation in 1 or more dimensions. Interpolation is the problem of approximating the value for a non-given point in some space, when given some values of points around that point....
 and bicubic interpolation
Bicubic interpolation

In mathematics, bicubic interpolation is an extension of cubic interpolation for interpolation data points on a two dimensional regular grid. The interpolated surface is Smooth function than corresponding surfaces obtained by bilinear interpolation or nearest-neighbor interpolation....
, bilinear Interpolation uses the 4 nearest pixel values which are located in diagonal direction from that specific pixel in order to find the appropriate color intensity value of a desired pixel.

See also

  • Bicubic interpolation
    Bicubic interpolation

    In mathematics, bicubic interpolation is an extension of cubic interpolation for interpolation data points on a two dimensional regular grid. The interpolated surface is Smooth function than corresponding surfaces obtained by bilinear interpolation or nearest-neighbor interpolation....
  • Trilinear interpolation
    Trilinear interpolation

    Trilinear interpolation is a method of multivariate interpolation on a Three dimensional space regular grid. It approximates the value of an intermediate point within the local axial rectangular prism linearly, using data on the lattice points....
  • Spline interpolation
    Spline interpolation

    In the mathematics field of numerical analysis, spline interpolation is a form of interpolation where the interpolant is a special type of piecewise polynomial called a spline ....
  • Lanczos resampling
    Lanczos resampling

    Lanczos resampling is a multivariate interpolation method used to compute new values for any digitally sampled data. It is often used to resize digital images, but could be used for any other digital signal....
  • Stairstep interpolation
    Stairstep interpolation

    In , stairstep interpolation is a general method for interpolating the pixels after enlarging an image. The key idea is to interpolate multiple times in small increments using any interpolation algorithm that is better than nearest-neighbor interpolation, such as bilinear interpolation, and bicubic interpolation....