A Simple Model for Sharpness in Digital Cameras – Defocus

This series of articles has dealt with modeling an ideal imaging system’s ‘sharpness’ in the frequency domain.  We looked at the effects of the hardware on spatial resolution: diffraction, sampling interval, sampling aperture (e.g. a squarish pixel), anti-aliasing OLPAF filters.  The next two posts will deal with modeling typical simple imperfections in the system: defocus and spherical aberrations.

Defocus = OOF

Defocus means that the sensing plane is not exactly where it needs to be for image formation in our ideal imaging system: the image is therefore out of focus (OOF).  Said another way, light from a distant star would go through the lens but converge either behind or in front of the sensing plane, as shown in the following diagram, for a lens with a circular aperture:

Figure 1. Back Focus, In Focus, Front Focus.
Figure 1. Top to bottom: Back Focus, In Focus, Front Focus.  To the right is how the relative PSF would look like on the sensing plane.  Image under license courtesy of Brion.

The Point Spread Function (PSF) on the sensing plane appears to be a uniform disk of light – and that’s indeed what geometrical optics predicts.  It would therefore be tempting to assume that the MTF of defocus is just the normalized modulus of the Fourier Transform of a uniform disk, which we know from past articles to be an Airy disk, this time in the frequency domain[1]. That is a correct assumption when the optical path error is of the order of a couple of wavelengths of the incident light or more.

Defocus and Diffraction

However a couple of wavelengths of defocus optical path difference (OPD, better defined in reference 2 below) is a very large error, Lord Rayleigh suggesting that an unaberrated system should stay within \frac{1}{4}\lambda OPD.  But as distances dip below a couple of wavelengths OPD, diffraction plays an increasingly large role in determining the final shape of the PSF and consequent MTF.  H.H. Hopkins derived a formula for the MTF of sub-wavelength defocus as a function of OPD W_{020}, as outlined in his 1955 paper[2]    and adapted by Jeff Conrad[3] for our uses here:

(1)   \begin{equation*} MTF_{defocus} = \frac{4}{\pi a}\displaystyle\int_{0}^{\sqrt{1-s^2}}sin[a(\sqrt{1-y^2}-s)]dy \end{equation*}

with

  • a = 8\pi\cdot W_{020} \cdot s
  • W_{020} = the maximum Optical Path Difference in wavelengths of light at the edge of the aperture, and
  • s = the linear spatial frequency f normalized for diffraction extinction: s = \frac{f}{\lambda N}.
  • The MTF is zero when s is greater than 1.

The equation yields a 1D radial slice of the 2D MTF of defocus.  Since the function is circularly symmetric the 2D MTF can be obtained by simply rotating the function around the central axis.  From the same paper we also gather that d_z, the error in the position of the sensing plane with respect to the optical axis is given by

(2)   \begin{equation*} d_z = 8N^2\cdot W_{020}\cdot\lambda \end{equation*}

in the same units as \lambda the wavelength of light, with N the lens f-number.

cirles_of_confusion_lens_diagram-labeled
Figure 2. Annotated extract from Figure 1, under license.

And, with paraxial approximation, the diameter k of the defocus disk on the sensing plane is

(3)   \begin{equation*} k = \frac{d_z}{N} \end{equation*}

k in the same units as d_z.

The Effect of Defocus on MTF

We are now ready to show the effects of different amounts of defocus on an ideal diffraction limited imaging system with a circular aperture by applying equation (1), which fortunately is easy to solve numerically[4].  It produces the following MTF curves for different amounts of optical path difference W_{020}, with f-number N = 5 and wavelength \lambda = 0.5 microns chosen to be consistent with Hopkins’ paper:

effect-of-defocus-on-mtf

The top most line has no defocus therefore it represents pure diffraction, as expected.  The others show increasing amounts of defocus, starting from lord Rayleigh’s criterion for in-focus at 0.25\lambda.

Also note that beyond about \frac{2}{3}\lambda OPD the relative response curve goes negative.  This indicates phase inversion, an example of which is seen on the cutout of the Siemens star on the cover of Boreman’s book.  Since MTF is the modulus of the function these negative values should in fact be rectified but I left them there this time to emphasize the point.

As mentioned, this equation refers to the the radial 1D MTF of a circularly symmetric function, so the relative 2D MTF plot can be obtained by simply rotating this slice through 360 degrees.

Spherical Aberrations Next.

 

Notes and References

1. See this Berkeley paper for the FT of a uniform disk.
2. The Frequency Response of a Defocused Optical System, H.H. Hopkins, Proceedings of the Royal Society, 19 July 1955.
3. The spatial frequency s used in Hopkins’ original paper is actually twice that used in this version of the formula, which was obtained from an excellent Jeff Conrad paper, Equation 117.
4. The Matlab/Octave scripts used to generate these plots can be downloaded from here.