Last post is a gentle introduction of Moire Pattern. In this post we will give a simplistic explanation for Moire Pattern. The post will progress in the following manner: we start by considering a very simple case of vertical gratings followed by a more rigorous treatment. Then we will build a simple model out of it. Finally we’ll try to explain why undersampling will cause Moire.

Warm up

The simplest Moire Pattern is in the form of superimposing two gratings consisting of vertical bars. (To save time, this example is taken from wikipedia directly.)

The first grating (upper) has a step (space between two black bars) of p_1 . WLOG we assume the second grating (bottom) has slightly wider step say p_2 = p_1 + \Delta\ (where \Delta = \delta{p_1}). For convenience we also assume the widths of the black bars are the same, say l. Now let’s count. For the first line (let’s say position 0) the two graphs overlap completely. At position 1, the composition of the two bars has a width of l + \delta{p_1}. Inductively, at position n the width of the two bars has a width of l + n\delta{p_1}. Until n\delta{p_1} > l and the two vertical bars no longer overlap. Moving further, we say a cycle is complete when the two bars overlap completely again, when n\delta{p_1} = p_1 . That implies n = \frac{1}{\delta}. In the picture we see a half cycle length d = \frac{1}{2}n{p_1+\delta{p_1}} = \frac{p_1+\delta{p_1}}{2\delta}. Then 2d = \frac{p_1+\delta{p_1}}{\delta} is the period of the larger “pattern” (i.e. Moire Pattern).

(Somewhat) Formal treatment

First we introduce spatial frequency. For simplicity we consider only 1-D situation, with intensity being a function of x. It is often measured in cycles/degree, or cycles/[mm on retina].

Let
\displaystyle I_1(x) = I_0\sin(2\pi{k_1}x + \phi_1) and
\displaystyle I_2(x) = I_0\sin(2\pi{k_2}x + \phi_2) . Superimposing two patterns, we have

\displaystyle I_1 + I_2 = I_0\sin(2\pi{k_1}x + \phi_1) + \sin(2\pi{k_2}x + \phi_2) \\  = 2I_0\cos(\pi({k_1-k_2})x + \frac{\phi_1 - \phi_2}{2})\sin(\pi({k_1+k_2})x + \frac{\phi_1 + \phi_2}{2})

The term \sin{(\pi({k_1+k_2})x + \frac{\phi_1 + \phi_2}{2})} is the envelope. Visually it is exactly the Moire Pattern.

Human perception of spatial frequencies

I suggest here for a full discussion of this topic; I will only give two important results. The first is the sensitivity curve. Just like hearing, our visual perception of spatial frequencies has limits. If the frequency is too high we will not be able to distinguish the lines; we will see them as one whole block. If the frequency is too low it suffers from low contrast; the lines are too wide apart and the change in intensity is too gradual we don’t think we have seen any patterns.

Another result is that our visual perception system has a “smooth function”. No matter how discontinued and pixlized an image is, we perceive it as a smooth object. The impulse response looks like this:

Definition of Moire

Now we give an informal definition of Moire Pattern. First we observe it’s some sort of “envelope”, whose frequency is lower than the original pattern. Then from human’s perspective, certain spatial frequencies are more prominent than the others. Moire Pattern arises when our eye’s sensitivity of f_{Moire} is around the prominent area (10 cycles/degree).

A Moire Pattern is a low-frequency (secondary) pattern that forms naturally on some high-frequency (major) patterns. Due to human eyes’ sensitivity curve against spatial frequencies, Moire Pattern is visible or even dominant when it happens to have more sensitivity to our visual perception than the original frequency.

 

Sampling and Moire

First consider the simple case. In the first example let sampling period p_{sample} = p_1 + \delta{p_1}\ (0<\delta<1). Now for in the first period we have two lines covered and the intensity in this point is 2I. In the next period it covers only one vertical bar. It will remain I till the next cycle. According to the calculation we have done, 2d = \frac{p_1+ \delta{p_1}}{\delta} is the period of the Moire Pattern caused by the sampling.

The sine wave. Recall that \displaystyle I_1(x) = I_0\sin(2\pi{k_1}x + \phi_1) where k_1 = \frac{1}{p_1}.
If the sampling period is \displaystyle p_{sample} = p_1 + \delta{p_1}\ (0<\delta<1), then the first point sampled will be

\displaystyle I_1(p_1 + \delta{p_1}) = I_0\sin(2\pi{k_1}({p_1 + \delta{p_1}}) + \phi_1) \\  = I_0\sin(2\pi + 2\pi\frac{1}{p_1} \delta{p_1} + \phi_1) \\  = I_0\sin(2\pi\delta + \phi_1)

Inductively for points 2…n, \displaystyle I_1(x_n) = I_0\sin(2\pi\delta{n} + \phi_1) . The values have a period of \frac{p_1 +\delta{p_1}}{\delta}.

Last question. After sampling we have lost information about the original image. How can we be sure that the pattern we see is a Moire Pattern due to undersampling, or actually a low-frequency object? A modern explanation is that our brain “completes” the information automatically. When we see a low-resolution picture of a supposedly high-frequency image pattern (i.e. hair or textile), we immediately recognize it. We certainly don’t expect our hair to have some horizontal bars on them. \spadesuit

Advertisements