Bilinear interpolation 2026-10-31
On a rectangle, bilinear interpolation is linear in each coordinate separately and matches the four corner values. With normalized coordinates , it is . A multigrid method can use it to prolong a coarse correction to finer-grid nodes. It is not generally an affine function of the pair , since it can contain a mixed term.
Image resampling 2026-11-05
Image resampling evaluates image data on a new sampling grid, often while resizing, rotating or rectifying an image. An output pixel is mapped to a source location, which may lie between stored source pixels. An interpolation rule estimates its value; a boundary rule handles locations outside the recorded image.[ref]
Geometric Image Transformations in the OpenCV documentation. Detailed Description, inverse mapping, interpolation and extrapolation
For example, bilinear interpolation at the center of four source samples with values gives their equally weighted mean, 25. Nearest-neighbor interpolation instead selects one sample and retains its value. These methods trade smoothness against preservation of discrete labels. Reducing image size also changes the sampling rate: a low-pass filter before subsampling can suppress aliasing, whereas interpolation alone cannot guarantee its removal. Stereo rectification uses image resampling to construct aligned virtual views without physically moving either camera.
A multigrid method alternates local error damping with correction on coarser grids. For clarity write times the five-point stencil and , incorporating Dirichlet boundary data into the right side. One two-grid cycle proceeds as follows.
- Apply a few smoothing sweeps, for example weighted Jacobi iteration with weight , to damp grid-scale oscillations in the error.
- Form the fine-grid linear-system residual and restrict it to the grid of spacing . An example is the full-weighting restriction stencil , centered at a coarse-grid point.
- Solve the coarse error equation , with homogeneous error boundary data. The coarse-grid operator may be the rediscretized Poisson operator at spacing , or the Galerkin coarse-grid operator with consistent transfer operators.
- Prolong the correction to the fine grid, for example by bilinear interpolation, and update .
- Apply a few further smoothing sweeps to damp oscillatory components introduced by interpolation.
The coarse solve is performed recursively, with a direct solve on the smallest grid, giving a V-cycle. Smoothing treats oscillations that are cheap for local relaxation to remove; coarse-grid correction treats errors that appear smooth on the fine grid. The scaling of the residual and coarse operator must agree if one instead uses the paper's unscaled stencil.