How can I reduce the Moiré effect in machine vision images?

The Moiré effect appears as unwanted repetitive or wavy patterns when a camera captures a fine, regular structure that interacts with the pixel grid of the image sensor. It is particularly common when imaging objects with fine, repetitive patterns, such as textiles, meshes, screens, printed patterns, or other structured surfaces.

In machine vision applications, Moiré can reduce image quality and make fine details more difficult to evaluate reliably.

Why does the Moiré effect occur?

A camera sensor consists of a regular matrix of individual photosensitive pixels. When the captured object contains a pattern with a similar spatial frequency, the two regular structures can interfere with each other. This can create additional patterns that are not actually present on the object.

The effect becomes more noticeable when fine details are captured with high sharpness and are close to the sensor's resolution limit.

How can I reduce Moiré patterns?

Depending on the application, several measures can help reduce the Moiré effect:

  • Change the camera or object angle: Slightly rotating the camera or the object can alter the interaction between the object pattern and the sensor pixel grid. Experiment with different angles to find a position that minimizes the effect.

  • Change the camera position: Even a small change in the camera's viewing angle or distance can significantly reduce Moiré patterns.

  • Adjust the focus: Moiré is often more pronounced when fine structures are captured with maximum sharpness. Slightly reducing the sharpness of these structures by adjusting the focus can help.

  • Use a different lens or focal length: Changing the lens or focal length changes the magnification and spatial frequency of the pattern on the sensor. This can help avoid problematic interference.

  • Consider optical filtering: In applications where Moiré cannot be sufficiently reduced through positioning, focus, or lens selection, an appropriate optical filter or other application-specific imaging technique may provide additional suppression.

There is no universal setting that eliminates Moiré in every application. The most effective solution depends on the object structure, camera resolution, lens, working distance, and imaging geometry. In practice, changing the camera angle, working distance, or optical setup is often a good first step.