← Discover
ASTERXOR / Discover

The stripes your camera invented

A fine pattern meets a pixel grid. Their disagreement becomes a pattern of its own.

A densely drawn diagonal grating beside broad diagonal bands produced by sampling it on a 100 by 100 grid.
Left: a finely drawn synthetic surface. Right: the values captured on a coarse point-sampling grid. No camera was used.
DiscoverASTERXOR / LEON LEUNG

How can a photograph contain stripes that were never on the shirt?

A tightly woven fabric can look perfectly ordinary until a camera turns it into rippling bands. The subject has not changed. The photograph has acquired a new pattern while measuring the old one. This is one route to moiré, and a small synthetic experiment makes the trick unusually easy to see.

A sharp-looking pattern can be the wrong pattern.
THE MEASUREMENT

The gaps matter as much as the pixels

Imagine measuring a striped surface at regularly spaced points. Each point reports a brightness. It cannot report what happened in the gap before the next point. If the stripes change slowly enough, those measurements describe them well. If many changes fit between the points, another pattern can fit the same evidence.

Real sensor pixels collect light across an area, and lenses soften detail before it reaches them. Our model deliberately starts with the simpler case: perfect point samples and a monochrome pattern. It leaves out those protections so that the ambiguity is visible on its own.

A densely drawn diagonal grating beside broad diagonal bands produced by sampling it on a 100 by 100 grid.
FIG 01Left: a finely drawn synthetic surface. Right: the values captured on a coarse point-sampling grid. No camera was used.
THE SURPRISE

Two different waves can leave the same dots

In the line plot, the blue wave repeats 0.92 times per pixel spacing. The gold wave repeats only 0.08 times. One is busy; the other moves slowly. Yet at every integer pixel position, their brightness values agree. Between the sample points they tell completely different stories.

This is aliasing: different signals acquire the same sampled identity. For a simple, regularly sampled brightness signal, frequencies must stay below half a cycle per sample to avoid this ambiguity under the usual band-limited assumptions. Our 0.92-cycle pattern exceeds that boundary and appears as a much slower variation.

A fast blue cosine and slow gold cosine intersect at all nineteen white sample points.
FIG 02The white samples sit on both curves. The gold curve is a possible explanation of the dots, although it is not the source.
IN TWO DIMENSIONS

The false pattern has a direction

Now extend the line into a surface. The generated grating advances 0.92 cycles per horizontal pixel and 0.03 per vertical pixel. Sampling on a 100 × 100 grid produces the same values as a broad grating with components −0.08 and 0.03. That changed relationship also changes the apparent angle of the bands.

The next image changes only the horizontal component, from 0.90 to 0.92 to 0.94. Each small adjustment produces a different broad pattern on the same grid. This helps explain why a slight change of framing can make moiré move dramatically. The experiment demonstrates the mechanism, not the response of a particular lens or camera.

Three sampled gratings with horizontal source frequencies 0.90, 0.92 and 0.94 cycles per pixel show different broad diagonal bands.
FIG 03Three source spacings, one sampling grid. The broad bands change width and direction even though the original gratings differ only slightly.
THE TRADE-OFF

Blur can preserve a more truthful picture

The surprising defense is to remove some fine detail before sampling. An optical low-pass filter does this physically in some cameras. A digital low-pass filter can do a related job before an image is reduced in size. Both aim to keep unsupported detail from returning disguised as something larger.

For our second synthetic surface, we add genuine broad shading to the fine stripes. An ideal Gaussian prefilter, with a width parameter of 0.6 pixel, reduces the fine-pattern amplitude by 99.76% while retaining 98.87% of the broad shading amplitude. These are measured properties of this constructed signal, not promised camera improvements.

The order matters. After the samples have confused the two patterns, blurring cannot know which variation was real. Filtering first can prevent the confusion; filtering later may simply make the false bands softer.

Unfiltered point samples show diagonal interference, prefiltered samples show smooth broad vertical shading, and a reference shows the broad shading alone.
FIG 04The same brightness scale is used throughout. Prefiltering suppresses the false diagonal bands while keeping most of the intended broad vertical shading.
BACK TO PHOTOGRAPHY

What to try when fabric starts rippling

A small change in distance, focal length or camera angle may change how a repeating texture meets the sensor grid. Check the result rather than assuming the change will help. A different framing can move the problem, reduce it or produce a new pattern. Review the original file as well as the resized preview, because resizing is another sampling step.

Color adds further complications. Many cameras measure different colors at neighboring sensor sites and estimate the missing values. Fine textures can therefore acquire false colors as well as false brightness bands. Our grayscale demonstration does not simulate a color-filter array, demosaicing, sharpening or any manufacturer’s processing.

THE LARGER IDEA

More visible detail is not always more information

Moiré is unsettling because the result can look organized and confident. The broad stripes are easy to see. Their clarity does not make them faithful. A recording system can produce a persuasive structure precisely because it did not collect enough information to distinguish the alternatives.

The useful habit is to ask what was measured, at what spacing, and what was removed before measurement. Those questions matter whenever a continuous world becomes a grid. Sometimes the more honest image is the one that gives up a little sharpness.

Further reading

Nikon · Moiré & False Color ↗NI · Sampling, bandwidth and aliasing ↗NumPy · Discrete Fourier Transform ↗

All illustrations were generated from the local calculation. Dense patterns may acquire additional artifacts when your screen or browser resizes them.

THE THOUGHT TO TAKE AWAY

The camera does not need to imagine anything. A grid can invent a pattern simply by leaving things out.