RazorArt

Raster · 01.5

Sampling

Everything on a grid is a measurement taken at intervals, and what falls between the intervals is gone.

In this entry

0 parts · Raster 01.5

A photographic test target of converging line pairs pinned to a board under even light
Everything on a grid is a measurement taken at intervals, and what falls between the intervals is gone.

Photo: RazorArt asset kit

When you commit to a grid, you commit to losing something

Every pixel in a raster image is a measurement — one colour value captured at one point in a regular grid. The grid is built before the image exists, and anything that falls between its nodes is not recorded. That loss is not a bug; it is the fundamental bargain of discrete representation.

The mathematics behind this was formalised long before digital images existed. Harry Nyquist and Claude Shannon established that a signal can be reconstructed perfectly from samples only if the sampling rate is at least twice the highest frequency present in the signal. In images, frequency means how rapidly colour or brightness changes across a surface. A fine-weave fabric, a distant brick wall, a single-pixel hairline — all of these contain detail at high spatial frequencies. Sample them on a grid too coarse to capture those frequencies, and the detail does not simply disappear: it reappears as a false, lower-frequency pattern. That false pattern is aliasing.

An open computer chassis with large memory boards exposed, laboratory bench, close
A block of memory where every pixel has an address is what made painting on a screen possible at all.From The framebuffer · Photo: RazorArt asset kit

The practical consequence is visible the moment you photograph a wire fence at a distance or display sharp diagonal text at a small size: a regular interference pattern emerges from what should be a smooth or random structure. The staircase on a diagonal line drawn to the pixel grid is the same phenomenon — the original geometry oscillates faster than the grid can follow, so the grid lies about it. Bresenham's line algorithm chooses which pixels lie honestly closest to the true line, but the aliasing itself is not eliminated; the best an integer grid can do is minimise the worst-case error.

Raster images used in professional colour work carry a further sampling layer: the colour space into which measurements are recorded is itself a discretisation of the continuous spectrum of light. Each pixel stores three or four channel values rather than a full spectral curve, and information outside the recording gamut is clipped at the moment of capture. Once clipped, it cannot be recovered from the stored file, however carefully the image is later processed.

The only cure for sampling artefacts is to anti-alias before or at the point of sampling — pre-filtering the input to remove detail the grid cannot represent, so that false patterns are suppressed rather than recorded. This is why the Shannon–Nyquist theorem sits at the foundation of every pipeline from camera sensor to screen: the decision about how many samples to take is irreversible, and taking too few poisons everything downstream.

Every pixel in a raster image is a measurement — one colour value captured at one point in a regular grid.

The grid is a commitment. You make it once.

A hand-drawn diagram of a diagonal line crossing a squared grid on graph paper, pencil beside it
A straight line rarely agrees with the grid, so an algorithm has to decide which pixels it lands on using only integers.From Bresenham's line · Photo: RazorArt asset kit
A row of monitors on a plain studio desk showing the same image, seen from the side
Every entry in raster ends up on a bench like this one.Photo: RazorArt asset kit

Related in Raster