A Simple Model for Sharpness in Digital Cameras – AA

This article will discuss a simple frequency domain model for an AntiAliasing (or Optical Low Pass) Filter, a hardware component sometimes found in a digital imaging system[1].  The filter typically sits just above the sensor and its objective is to block as much of the aliasing and moiré creating energy above the monochrome Nyquist spatial frequency while letting through as much as possible of the real image forming energy below that, hence the low-pass designation.

Downsizing Box 4X
Figure 1. The blue line indicates the pass through performance of an ideal anti-aliasing filter presented with an Airy PSF (Original): pass all spatial frequencies below Nyquist (0.5 c/p) and none above that. No filter has such ideal characteristics and if it did its hard edges would result in undesirable ringing in the image.

In consumer digital cameras it is often implemented  by introducing one or two birefringent plates in the sensor’s filter stack.  This is how Nikon shows it for one of its DSLRs:

d800-aa1
Figure 2. Typical Optical Low Pass Filter implementation  in a current Digital Camera, courtesy of Nikon USA (yellow displacement ‘d’ added).

Birefringent plates are typically made of a material such as lithium niobate or crystalline quartz glass.  They split normally incident beams of light into two, the new beam displaced by a known distance (d) related to the material’s thickness.  In some implementations a single plate is used, providing antialiasing action in one direction only (e.g. D610, a7II, XA1, etc.).  In others two plates are used, one for the horizontal and one for the vertical direction as shown in Figure 2 (e.g. D800, 5DS, K5, etc.).

As pixel pitch decreases below 5 microns sometimes no AA filter  is used at all.  In this case the manufacturer is hoping that the low pass function will be provided by physical constraints placed on the increasingly smaller sensing elements (e.g. lens blur, diffraction, defocus, motion/vibration blur etc.).  In practice this works better with natural scenes where detail tends to be randomly spaced within the field of view.  Aliasing may indeed be harder to spot in those conditions with the 3-5um pixel pitch common in today’s leading digital cameras.  Unfortunately once one sees it, it is impossible to unsee – and from then on one tends to notice it everywhere.

2 and 4 Dot Beam Splitting AAs

In the more generic case of Figure 2 a single spot of light (an impulse) reaching the filter stack is first split into two horizontally by the H-aligned birefringent plate.  The resulting two ‘dots’ are then split vertically by a second V-aligned birefringent plate, presumably by the same displacement (d).  This arrangement is called a four-dot beam splitter:

4-dot-beam-splitter
Figure 3. Effect of a 4-dot beam splitter on the sensing plane in two dimensions; and just the x-axis profile.

Assuming linearity and space invariance we can use transfer function theory to model this anti-aliasing filter configuration in isolation.  The birefringent plates act on one axis at the time so we can represent what happens to impulse \delta(x,y) as it is split horizontally with displacement (d) along the axes separately and in one dimension.  The ideal transfer function is simply the sum of two delta functions separated by distance (d), each with half the energy of the original impulse[2].  The impulse response of part of an imaging system to incoherent light is known as its intensity Point Spread Function:

    \[ PSF_{AA_{2dot}} = \frac{1}{2}[\delta(x) + \delta(x-d)] \]

The relative spectral frequency response in the horizontal direction (x) of such a filter is the normalized magnitude of its Fourier transform[3].  It represents the MTF of an ideal 2-dot beam splitter in the direction of the split, with spatial frequency f in cycles per the same units as displacement d (e.g. microns or pixel pitch):

(1)   \begin{equation*} MTF_{AA_{2dot}} = |cos(2\pi \frac{d}{2} f)| \end{equation*}

For a 4-dot beam splitter a horizontal split along the x axis is followed by the same function rotated 90 degrees in the vertical direction along the y axis.  Subsequent MTFs in an imaging system multiply, so the transfer function of the ideal anti-aliasing optical low pass filter in two dimensions is then

(2)   \begin{equation*} MTF_{AA_{4dot}} =  |cos(2\pi \frac{d_x}{2} f_x)| |cos(2\pi \frac{d_y}{2} f_y)| \end{equation*}

with spatial frequencies f_{x} and f_{y} in cycles per the same units as displacement d (e.g. microns or pixels).

Spatial Frequency Properties of Birefringent AA

The shape of the relative MTF in one dimension produced by formula (1) is obviously a cosine, starting with a value of 1 at zero frequency and decreasing monotonically until hitting a first zero at \frac{\pi}{2}, so the frequency there is

(3)   \begin{equation*} f_{MTF0_1} = \frac{1}{2d} \end{equation*}

in units of cycles/pixel pitch if d is expressed in pixels.  Because the MTF represents the magnitude of the cosine, the curve is then rectified and bounces back, producing a mirror image of its trajectory up to the zero.  Here it is in isolation for a displacement of 0.7 pixel pitch (or 0.35×2 half displacements as also sometimes seen in the literature)

birefringent-aa
Figure 4. Birefringent AA MTF cosine for a displacement of 0.7 pixel pitch, with a zero at 1/2d = 0.714 cycles/pixel pitch.

This function gets multiplied element-by-element with the captured signal spectrum.  Note the strong attenuation past the Nyquist frequency (0.5 c/p), the expected zero at f = \frac{1}{2\cdot0.7} = 0.7143 c/p and the rectified bounce beyond that.  The fact that a birefringent AA lets through higher frequencies may not be a relevant issue because at frequencies around 1 cycle/pixel pitch there is usually little energy  in the signal of a captured image as a result of the combination of the MTF of the lens and pixel aperture discussed in previous articles – so less need for low pass filtering.  However, outstanding modern lenses coupled with other sensor design choices like smaller effective pixel aperture can result in relevant amounts of energy there.

Note also the undesired attenuation in the desirable frequencies below Nyquist, with this fairly typical optical low pass filter reducing contrast of frequencies near 0.5 c/p by more than half.  This is the reason why many current digital cameras are not equipped with an antialiasing filter, favoring real and imaginary ‘sharpness’ at the cost of the possibility of more visible aliasing and moiré.  Better, ‘sharper’ filters can be implemented but at the expense of cost and complexity, see for instance Canon’s more advanced 16-dot High-Res LPF.

MTF of 4-dot AA

Here is what the spatial frequency response of an ideal 4-dot beam splitter looks like in two dimensions, with the same displacement d = 0.7 pixel pitch in both the horizontal and vertical directions

aa-2d-solid
Figure 5. Two dimensional MTF of 4-dot beam splitter anti-aliasing filter, for displacement d = 0.7 pixel pitch in both the x and y directions, frequency units of cycles/pixel pitch.

Below the same anti-aliasing filter is shown directly from above. Note that it makes little difference to MTF values when reading off a directional radial slice through the origin just a few degrees from the horizontal or vertical axis – but as the angle increases things change.  For instance in the case of d = 0.7 pixel pitch the zero for a 9 degree slice through the origin is at 0.72 c/p vs 0.71 c/p for the zero on the horizontal axis.  But the zero for a 45 degree radial slice occurs at 1.01 cycles per pixel pitch.  Recall that pixel pitch is the horizontal or vertical distance between the centers of two contiguous pixels in photographic sensors.

aa-2d
Figure 6. Same as Figure 5 but seen from above

Can the Strength of an AA Filter Be Measured?

Indeed it can, as originally shown by Frans van den Bergh[1].  Here for instance is an example based on two Canon DSLRs, identical in setup other than the fact that the 5DS has an anti-aliasing filter while the 5DSR does not.  The aggregate MTFs shown were measured from the green channels of slanted edges in DPR’s studio scene raw captures using MTF Mapper.   The edges were slanted about 9 degrees off the horizontal sensing plane.

mtf-5ds-and-5dsr-g-hcrop
Figure 7. Aggregate MTFs measured on same sensor, same lens, same setup: one camera with AA, one without.

The drop in response (0.25 vs 0.3 c/p at MTF50, MTF of 0.125 vs 0.25 at Nyquist) and the zero around 0.73 c/p caused by the anti-aliasing filter are quite obvious in the 5DS.  Every digital camera with AA I have measured over the last few years has shown zeros in the range of 0.62-0.80 cycles/pixel (0.81-0.62 pixel pitch displacement d).  Here for instance is the Canon EOS R which displays the null at the ‘weaker AA’ end of the range, just short of 0.8 c/p for a displacement of about 0.63 pixels

Figure 8. Canon EOS R mounting a 50mm/1.2 lens at f/5.6. First null for its Antilaliasing filter is just short of 0.8 c/p.

The EOS R, as well as the Canon 5D mark IV which appears to have the same anti-aliasing characteristics, show the null in both the horizontal and vertical directions.

On the other hand some cameras like the D610 appear to have an AA in one direction only.  Below for instance is the ratio of the MTF curves derived from the vertical and horizontal edges  in the same DPR studio scene raw capture.  Assuming the same aberrations and rotational symmetry the ratio should pretty well be one and the same.  Instead it looks like a cosine, the MTF of a birefringent AA.  So the D610 and its siblings apparently only filter the signal in the vertical direction (ignore values in frequencies above the first null, things become unreliable there because we are dividing two very small noisy numbers together).

d610-aa
Figure 9. ‘Measured’ MTF of the D610’s AA 2-dot Beam Splitter: it apparently only filters the signal in the vertical direction.

Here the AA  filter is relatively stronger, with a null around 0.64c/p which corresponds to a displacement of about a 0.78 pixel pitch.  I guess if you are going to filter in one direction only you might as well go strong.  And of course the EOS R has somewhat smaller pixels (0.53 vs 0.59um pitch for the D610): the smaller the pixel the higher the impact of diffraction and aberrations, hence the less the need for an AA.

Figure 10. MTF in the vertical direction of a Nikon D610 sporting a Nikkor 200mm/4 at f/8 near the center of the field of view. The ant-ialiasing null is at around 0.64 c/p for a 0.78 pixel pitch displacement.

In case you are curious, below is instead the Sony a6300 which does not show an AA signature in either direction, the ratio between the MTF curves off the horizontal and vertical edges being pretty well unity throughout (ignoring a little noise).

a6300-g-ch-dpr-100-200-iso
Figure 11. The Sony a6300 does not show the characteristic null caused by an antialiasing filter because it does not have one.

Finally be aware that AA-caused nulls hit the x-axis where there is little energy and more noise by definition. Therefore SNR is low and the exact frequency of the zero can bounce around a bit.

Adding to the Model

In conclusion we have one more component that, ignoring phase, can be multiplied into our simplified model for the spatial frequency response of an imaging system: a birefringent anti-aliasing filter per equation (2) above

    \[ MTF_{AA_{4dot}} =  \left|cos(2\pi \frac{d_x}{2} f_x)\right| \left|cos(2\pi \frac{d_y}{2} f_y)\right| \]

with spatial frequencies f_{x} and f_{y} in cycles per the same units as displacement d (e.g. microns or pixels) in the horizontal and vertical directions respectively.

Defocus is next.

 

PS.  In 2020 Canon introduced the 1D X Mark III with a new 16-dot AA configuration that they call a High-Res LPF.  This article eviscerates the theoretical implications of the new design.

Notes and References

1. Frans van den Bergh introduced me to this subject a few years ago through this excellent blog article.
2. There is a good discussion of this subject in Modulation Transfer Function in Optical and Electro-Optical Systems. Glenn D Boreman. SPIE Press 2001. p. 40 and in this thesis by  Branko Petljanski, one of Boreman’s Phd students.
3. See for instance here for why two impulses in the spatial domain Fourier Transform into a cosine in the frequency domain

 

2 thoughts on “A Simple Model for Sharpness in Digital Cameras – AA”

  1. So is A6300’s AA filter so weak that it is as if without OLPF?

    If that is the case, is not this the best of both worlds, where the AA filter prevents moirè but does not compromise sharpness?

    By the way, do you have an idea if A6500 the same or any different?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.