Friday 3 May 2019

image quality - What is moiré? How can we avoid it?


What is the image defect called "moiré"? What causes it, and how can we avoid or reduce it? Is it related to "false color"?



Answer




Moiré is a form of aliasing whereby false patterns can be observed in an image.


Imagine a lighthouse which sends a pulse of light every 5 seconds, and a camera (or other observer) which sees the lighthouse for three seconds and is then blocked from seeing it for three seconds:


lighthouse:        *....*....*....*....*....*....*....*...
observer: ***...***...***...***...***...***...***

observed pattern: *...................*....*....*........

What is actually a regular pulsing is observed as a highly uneven pattern due to temporal aliasing, caused by the sampling frequency being close to but different from the frequency of the phenomenon being observed. This is why wagon wheels can appear to spin backwards when observed with a movie camera with fixed framerate.


Moiré is exactly the same phenomenon but is an example of spatial rather than temporal aliasing. When a regular pattern of light and dark like a manmade fibre cloth is imaged by a sensor with a fixed pattern of pixels the evenness of the fibres gives way to an artificial pattern at a much lower frequency (more widely spaced):


Moiré on parrot feathers



Image by Fir0002/Flagstaffotos. License


Aliasing is at its worst when the frequency of the pattern is close to the sampling frequency (the density of pixels in the sensor). Low frequency patterns aren't a problem. An anti-aliasing filter blurs the image therefore reducing the frequency of the input and chance of aliasing. The downside is that this also blurs non-repeating patterns which would not cause noticeable aliasing.


Instead of reducing the image frequency by blurring, aliasing can also be mitigating by increasing the sampling frequency, i.e. having more megapixels (without increasing sensor size or lens sharpness). Digital medium format cameras have lots of megapixels but still suffer from aliasing due to sharper lenses.


Anti-aliasing filters are fitted to almost all 35mm DSLR sensors as standard. They can be removed; I know of one company that does this:


http://www.maxmax.com/hot_rod_visible.htm


The advantage is greater sharpness but more moiré. If you only shoot random natural textures then this is probably a good idea. Some digital MF cameras and backs lack an AA filter. Opinion is divided on why, given how bad aliasing can be on fabrics and the fact the MF is frequently used for fashion. My view is that these images are probably shot at f/32–f/45 with giant lighting power packs, and the diffraction acts as an AA filter.


Moiré can be reduced in software, but only to an extent, it's usually much better to use an AA filter. You can get screw-on anti-alias filters for lenses if your sensor lacks an AA filter.




Moiré is related to false colour due to the demosiacing process. As (most) digital sensors are monochrome devices, alternating colour filters are placed over each pixel and the colours interpolated to produce a full colour image. When observing a high frequency monochrome pattern, adjacent pixels with different colour filters may see peaks and troughs in the signal respectively, and this can be (falsely) interpreted as different colours being present in the input.


No comments:

Post a Comment

Why is the front element of a telephoto lens larger than a wide angle lens?

A wide angle lens has a wide angle of view, therefore it would make sense that the front of the lens would also be wide. A telephoto lens ha...