I see a "moiré" pattern in my captured images. What can I do?
The Moiré Effect
The word "moiré" was first used by weavers and it derives from the word mohair, a kind of cloth made from the fine hair of an Angora goat. The physical nature of moiré lies in the interference between two or more regular structures with different spatial frequencies. You can see this effect in real life as you walk past two fences located one behind the other or when you look at folded sheer stockings.
The Mathematik.com web site has a very good animation that shows the moiré effect. Click here to see the animation.
The moiré effect can produce interesting and beautiful geometric patterns. In the machine vision world, however, the phenomenon can degrade the quality and resolution of captured images. It can occur when the image from a camera is reproduced on a computer display and then rendered in a screened or dot-matrix format. The fine matrix of dots in the original image almost always conflicts with the matrix of dots in the reproduction. This generates a characteristic criss-cross pattern on the reproduced image. Moiré patterns can also be created by plotting a series of curves on a computer screen. In this case, the interference is caused by the rasterization of the finite-sized pixels. For example, the illustrations below show a number of concentric circles plotted with a range of uniform spacings. Note the phantom lines and curves that appear.
A similar effect appears if you overlay two dot grids with a regular structure and you rotate them with respect to each other:
When you capture an image with a Basler camera, it is digitized by a matrix of photosensitive elements. Each photosensitive element in the matrix is a discrete unit and the elements are arranged in a regular pattern. If the captured image also has a very regular pattern (e.g., a jacket with a fine fabric weave), that pattern will be superimposed on the matrix of photo elements. The superimposition of the pattern in the captured image on the pattern in the photo element matrix can cause interference and may result in moiré patterns.
There are several different techniques for limiting moiré effects:
- If your captured images show a heavy moiré effect, try rotating the camera or the object. Experiment with the angle of rotation to achieve the minimal moiré pattern.
- Change the position of the camera. A simple change in the camera angle can result in significant moiré reduction.
- Change the focus. The moiré effect is most noticeable in images with high sharpness. Overlapped fine details boost the effect.
- Try a lens with a different focal length. This can reduce the moiré effect.
In some cases, you may not be able to completely eliminate the moiré effect by using these techniques. But they should at least give you a noticeable improvement in your results.