Why wavy lines appear in photos of PC screens and what is the moiré effect

Why wavy lines appear in photos of PC screens and what is the moiré effect

The arrows and yellow curved lines indicate the obvious moiré effect present in the image.

By pointing our smartphone camera at the computer or television screen, they will almost inevitably appear strange streaks or waves in the captured image. But why does this happen? For a very specific phenomenon, known as moiré effect. And no, it is not due to a camera malfunction, nor to a defect in the captured screen: it is a physical consequence elegant in its logic, which emerges every time two gratings with slightly different characteristics overlap.

To understand why this happens, we need to look at both how a digital screen works and how our camera captures light, because both devices share grid structures that, when they meet, generate impressive visual interference. Moiré is not exclusive to digital photography: we find it in letterpress printing, fabric design, wave physics and even acoustics, where it manifests itself in a way analogous to the so-called beating between two sound waves of almost identical frequency.

What is the moiré effect

The term moire draws his own origins from the textile world: this French term indicates a type of fabric historically made of silk, characterized by a wavy appearance. This effect arises from imperfect overlap of the threads during processingwhich generates a pattern visible to the naked eye. The same logic applies to screens.

Every screen – be it a PC monitor, a television, etc. – is composed of a regular pattern made up of many pixelstiny luminous points arranged according to a precise and uniform structure. Similarly, the sensor of a digital camera is made up of millions of photoreceptors also arranged in a regular grid. When we frame a screen with a camera, we are therefore faced with two grids that “look” at each other. If their spacing, the so-called “step” (i.e. the distance between one element and the next) were identical and perfectly aligned, the moiré would be much reduced. But in reality this almost never happens: two grids have slightly different pitchesor they are inclined to each other of a minimum angle. This minimal discrepancy is enough to generate a third reasonperceptually much coarser than the two originals: moiré in fact.

The mechanism behind all this is analogous to that of wave interference in physics. When two series of lines overlap with a slight difference in pitch, in some points the lines align (generating lighter or areas of a certain color) and in others they move out of phase (generating darker or different colored areas). Moiré can in fact manifest itself both as brightness variation that how chromatic variationdepending on the characteristics of the two devices involved. The eye, observing from a certain distance, does not perceive the individual lines but the alternation of these areas, which form clearly visible bands or curvilinear patterns. The smaller the difference in pitch between the two grids, the wider and more spaced the resulting moiré bands will be; conversely, a greater discrepancy produces closer bands.

The relative angle between the two grids plays an equally important role. When the two gratings are almost parallel, the effect is very pronounced and the bands appear wide. As the angle of inclination between the two increases, the bands get closer until they become so dense that they are no longer perceptible and, in this way, the moiré effect tends to disappear. This explains why, by varying the angle of the camera with respect to the screen, the moiré changes appearance or even disappears. The exact angle at which this occurs depends on various factors (screen resolution, shooting distance, focal length, and so on) and there is therefore no universal threshold valid in every situation.

Moiré effect
An example of moiré effect. Credit: Emin Gabrielyan / Gabrielyan. Public domain image.

How to reduce or eliminate this phenomenon of visual interference

For Reduce moiré in photos or screen shotsthere are various practical solutions: slightly modify the shooting/shooting angle, vary the distance, or act on the focal length of the lens. Some cameras may include optical filters, called anti-aliasing filters, designed to soften fine details and prevent these unwanted patterns from forming. In more modern models, the same goal is often achieved thanks to high pixel density or software algorithms. In the post-production phase, however, it is possible to eliminate the moiré effect from photos using the tools available in various photo editing software.