You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

What it calculates

Bilinear interpolation is an extension on linear interpolation. Linear interpolation uses two points to interpolate in one dimension where bilinear interpolation uses 4 points to interpolate in two dimensions. We always interpolate for a point (the point to be interpolated Ptbi), so regardless if the output is a scalar, regular or irregular grid; the output is reduced to points for which a value is calculated individually. In the case of scalar values, this reduction means using it's X and Y coordinates from the associated location. For regular or irregular grids, the X and Y coordinates of each cell center is used. The input can only be a regular grid. 

This leaves us with a collection of Ptbi's and an input grid. First the 4 surrounding cell centers (Ps) for the Ptbi are selected from input grid.

 

Now the values of these 4 points are used to calculate the interpolated value as shown below (first interpolate twice on the X axis, then from the resulting points once on the Y axis).

 

Some exceptions:

  • If the Ptbi has the same location as one of the Ps's, the resulting value for Ptbi will be that of the Ps.
  • If the Ptbi is on a horizontal or vertical line between 2 Ps's, the resulting value for Ptbi will be a linear interpolation between those two Ps's.
  • If there are less then 4 surrounding points (when for example the Ptbi is outside the input grid), there will be no resulting value for Ptbi

 

Schema

 

  • No labels