Dictionary
Thesaurus
Reference
Translate
Web
Bicubic interpolation
1 reference results for: Bicubic interpolation
Wikipedia
In mathematics, bicubic interpolation is an extension of cubic interpolation for interpolating data points on a two dimensional regular grid. The interpolated surface is smoother than corresponding surfaces obtained by bilinear interpolation or nearest-neighbor interpolation. Bicubic interpolation can be accomplished using either Lagrange polynomials, cubic splines or cubic convolution algorithm.

In image processing, bicubic interpolation is often chosen over bilinear interpolation or nearest neighbor in image resampling, when speed is not an issue. Images resampled with bicubic interpolation are smoother and have fewer interpolation artifacts.

Bicubic spline interpolation

Suppose the function values f and the derivatives f_x, f_y and f_{xy} are known at the four corners (0,0), (1,0), (0,1), and (1,1) of the unit square. The interpolated surface can then be written

p(x,y) = sum_{i=0}^3 sum_{j=0}^3 a_{ij} x^i y^j.

The interpolation problem consists of determining the 16 coefficients a_{ij}. Matching p(x,y) with the function values yields four equations,

  1. f(0,0) = p(0,0) = a_{00}
  2. f(1,0) = p(1,0) = a_{00} + a_{10} + a_{20} + a_{30}
  3. f(0,1) = p(0,1) = a_{00} + a_{01} + a_{02} + a_{03}
  4. f(1,1) = p(1,1) = textstyle sum_{i=0}^3 sum_{j=0}^3 a_{ij}

Likewise, eight equations for the derivatives in the x-direction and the y-direction

  1. f_x(0,0) = p_x(0,0) = a_{10}
  2. f_x(1,0) = p_x(1,0) = a_{10} + 2a_{20} + 3a_{30}
  3. f_x(0,1) = p_x(0,1) = a_{10} + a_{11} + a_{12} + a_{13}
  4. f_x(1,1) = p_x(1,1) = textstyle sum_{i=1}^3 sum_{j=0}^3 a_{ij} i
  5. f_y(0,0) = p_y(0,0) = a_{01}
  6. f_y(1,0) = p_y(1,0) = a_{01} + a_{11} + a_{21} + a_{31}
  7. f_y(0,1) = p_y(0,1) = a_{01} + 2a_{02} + 3a_{03}
  8. f_y(1,1) = p_y(1,1) = textstyle sum_{i=0}^3 sum_{j=1}^3 a_{ij} j

And four equations for the cross derivative xy.

  1. f_{xy}(0,0) = p_{xy}(0,0) = a_{11}
  2. f_{xy}(1,0) = p_{xy}(1,0) = a_{11} + 2a_{21} + 3a_{31}
  3. f_{xy}(0,1) = p_{xy}(0,1) = a_{11} + 2a_{12} + 3a_{13}
  4. f_{xy}(1,1) = p_{xy}(1,1) = textstyle sum_{i=1}^3 sum_{j=1}^3 a_{ij} i j

where the expressions above have used the following identities,

p_x(x,y) = textstyle sum_{i=1}^3 sum_{j=0}^3 a_{ij} i x^{i-1} y^j
p_y(x,y) = textstyle sum_{i=0}^3 sum_{j=1}^3 a_{ij} x^i j y^{j-1}
p_{xy}(x,y) = textstyle sum_{i=1}^3 sum_{j=1}^3 a_{ij} i x^{i-1} j y^{j-1}.

This procedure yields a surface p(x,y) on the unit square [0,1] times [0,1] which is continuous and with continuous derivatives. Bicubic interpolation on an arbitrarily sized regular grid can then be accomplished by patching together such bicubic surfaces, ensuring that the derivatives match on the boundaries.

If the derivatives are unknown, they are typically approximated from the function values at points neighbouring the corners of the unit square, ie. using finite differences.

Bicubic convolution algorithm

Bicubic spline interpolation is required to solve the linear system described above for each grid cell. An interpolator with similar properties can be obtained by applying convolution with the following kernel in both dimensions:

W(x) =
begin{cases} (a+2)|x|^3-(a+3)|x|^2+1 & text{for } 0 < |x| leq 1 a|x|^3-5a|x|^2+8a|x|-4a & text{for } 1 < |x| leq 2 0 & text{otherwise} end{cases} where a is usually set to -0.5 or -0.75.

This approach was proposed by Keys who showed that a=-0.5 (which corresponds to cubic Hermite spline) produces the best approximation of the original function.

If we use the matrix notation for the common case a=-0.5, we can express the equation in a more friendly manner:

p(t) =
tfrac{1}{2} begin{bmatrix}

1 & t & t^2 & t^3

end{bmatrix} begin{bmatrix}

0 & 2 & 0 & 0 -1 & 0 & 1 & 0 2 & -5 & 4 & -1 -1 & 3 & -3 & 1

end{bmatrix} begin{bmatrix}

a_{-1} a_0 a_1 a_2

end{bmatrix} for t between 0 and 1 for one dimension (must be applied once in x and again in y)

Use in computer graphics

The bicubic algorithm is frequently used for scaling images and video for display (see bitmap resampling). It preserves fine detail better than the common bilinear algorithm.

References

See also

External links

Share This:Share This: digg.comShare This: ma.gnolia.comShare This: www.stumbleupon.comShare This: del.icio.usShare This: FacebookShare This: favorites.live.comShare This: www.technorati.comShare This: furl.netShare This: myweb2.search.yahoo.comShare This: www.google.com