Resampling

Definition

General definition

Let :

  • \(I_s\) be the source discrete image, defined on the regular sampling grid

\[\mathscr{G}_s = \{ (x,y) = (j,i) \in \mathbb{Z}^2 \}\]
  • \(F_s : \Omega_s \to \mathbb{R}\) be the continuous image associated with \(I_s\), defined on the continuous footprint

\[\Omega_{F_s} = \left[ - \frac{1}{2}, H_s + \frac{1}{2} \right] \times \left[ - \frac{1}{2}, W_s + \frac{1}{2} \right]\]
  • \(I_d\) be the destination discrete image, defined on its own sampling grid

\[\mathscr{G}_d = \{ (x',y') = (j',i') \in \mathbb{Z}^2 \}\]

Resampling is the process of determining, for each destination sampling point \((x', y') \in \mathscr{G}_d\), a corresponding location \((u,v)\) in the source continous domain \(\Omega_s\) and assigning a value based on the continuous image \(F_s\):

\[I_d[i',j'] \approx F_s(u,v)\]

Formally, resampling requires a rule that associates to every \((x',y') \in \mathscr{G}_d\) a point \((u,v) \in \Omega_s\). This rule may come from:

  • a simple geometric transform (zoom, rotation, shear),

  • a known analytic mapping,

  • or a general remapping grid

Because the continuous image \(F\) is not explicitly known, it must be reconstructed from the discrete source image using an interpolation model (nearest, linear, cubic, cardinal B-Splines, physical kernels, etc.).

Thus, resampling consists conceptually of two steps:

  1. A geometric mapping

  2. A radiometric interpolation

Forward and Backward Mappings

There are two fundamental ways to define the correspondance between source and destination sampling grids.

Forward Mapping (Source \(\to\) Destination)

A forward (or push-forward) transformation specifies how each source sampling point moves in the continuous destination plane:

\[g: \mathscr{G}_s \to \Omega_d,\; (x', y') = g_x(x,y), g_y(x,y)\]

Conceptually:

  • each soure pixel center \((x,y) \in \mathscr{G}_s\) is mapped to a continuous location \((x', y')\),

  • these mapped points must then be projected back onto the destination sampling grid \(\mathscr{G}_d\) to produce the discrete image.

Backward Mapping (Destination \(\to\) Source)

A backward (or pull-back) transformation directly expresses, for each destination sampling point, where to sample the source:

\[f: \mathscr{G}_d \to \Omega_s,\; (u, v) = f_x(x',y'), f_y(x',y')\]

Thus each destination pixel center \((x',y')\) retrieves its value by sampling the continuous source image at (u, v).

Classical Geometric Transformations

Both forward and backward mappings can represent common geometric transformations:

  • Zoom / Scaling

    Changes pixel spacing; resampling evaluates \(F_s\) on a uniformly scaled grid

  • Dezoom / Downsampling

    Similar to scaling but coarser; often requires low-pass filtering to limit aliasing artefacts

  • Rotation

    The new sampling grid is a rotated version of the original one.

  • General Remapping Functions

    Arbitrary mappings \((x',y') \longmapsto (x,y)\), e.g., warping fields, distortion corrections, etc.

  • User-provided Sampling Grids

    Arbitrary sets of continuous coordinates, possibly subsampled.

  • translation,

User-provided Sampling Grids

GridR implements a geometric transformation by evaluating images on arbitrary sets of continuous coordinates.

This process is referred to as grid resampling in GridR.

For this resampling pipeline, the sampling grid is always defined in the backward (destination \(\to\) source) sense: for each pixel center \((j,i)\) of the destination discrete image, the grid provides the continuous coordinates \((x,y)\) in the source image from which the value must be interpolated.

This is consistent with the pixel-center convention adopted throughout GridR, where the center of pixel \((i,j)\) is located at continuous coordinates \((j,i)\).

Formally, given a destination pixel center \((j,i)\), the backward grid provides

\[(x,y) = \Phi(i,j)\]

where \(\Phi : \mathbb{Z}^2 \to \mathbb{R}^2\) is the backward geometric transformation

Subsampled Grids

To reduce disk/memory footprint and/or to limit the upstream computation required to build the transformation, GridR allows the backward sampling grid \(\Phi\) to be stored at a lower spatial resolution than the destination image.

In this case, full-resolution coordinates \((x,y)\) for every destination pixel center are reconstructed using bilinear interpolation on the subsampled grid.