Photography Notes on Depth of field 1

This exposition introduces some basic and well-known ideas on depth of field. The papers by J. Conrad [C], L. Even [E], D. Kerr [K], R. Wheeler [W], and the Wikipedia articles in the references were used. The excellent book by A. Adams [Ad] was also used.

For a typical camera lens (i.e., a ``thin convex lens in air''), the focal length $f$ is the distance from the center of the lens to the ``principal focal point'' of the lens. The principal focal point is that point behind the lens that an object at infinity2 (on the axis of the lens) focuses to. This is illustrated below.

Figure 1: An illustration of the focal length [F].
\includegraphics[height=6cm,width=12cm]{mts-plus-lens_sage3.eps}
\includegraphics[height=4cm,width=4cm]{Focal-length_wikipedia2.eps}

Define the object plane to be the plane of the object you are photographing (parallel to the plane of the lens) and want to look sharp in your photo. (Again, the object is assumed to be on the axis of the lens.) The light from the object converges behind the lens to a small region called the image. The image plane is a plane (parallel to the lens) which intersects this image region. You want the plane of the digital sensor (or camera film) to be at or very near the image plane, or else the photo will not have the object in focus.

We assume that the camera has the property that if it focuses on a (stright) line or circle then it captures a line or circle on the film or digital sensor. (Of course, in reality, the lens imperfections and the light diffraction have an effect, but this hypothesis is nearly true in many cases.) In other words, we assume that the camera is a ``projective transformation'' [Pe] from the plane of the object to the plane of the film or sensor.

Suppose that the object is ``at infinity'' (say, some distant mountains) and the plane of the digital sensor is the same as the image plane, so that the mountains will be in focus in your photo. The distance from the lens to the sensor plane is the focal length $f$. The light from a small disk (also on the axis of the lens) a distance $u$ in front of the lens will meet the sensor plane but it's image in the photo will not be in focus. If the disk is very small in diameter then its blurred image on the photo is sometimes called a circle of confusion. By abuse of terminology, below the circle of confusion $c$ will denote the maximum diameter (usually measured in mm) on the $8''\times 10''$ photo for which there is an acceptable blur in the circle of confusion. Suppose now that the distance between the lens and sensor plane (say that the lens is fixed and the sensor plane is moved back) is increased in such a way that this small disk is in focus in the photo. Call this new distance between the lens and the sensor plane $v$.

Lemma 1   The focal length $f$, the distance from the lens to the object to photograph $u$, and the distance from lens to the image focus plane $v$ are then related by the lens equation


\begin{displaymath}
\frac{1}{u} + \frac{1}{v} = \frac{1}{f} .
\end{displaymath}

Remark 1   As $v$ is decreased, $u$ must be increased. For example, consider a normal lens for a $35$ mm camera with a focal length of $f = 50$ mm. To focus an object $1$ m away ($u = 1000$ mm), we solve for $v=
\frac{1}{\frac{1}{f}-\frac{1}{u}}=1000/19=52.63...$. Therefore, the lens must be moved $2.6$ mm further away from the image plane, to $v = 52.6$ mm.

proof: This is proven using projective geometry in Evens [E]. It turns out to be remarkably simple, under the right hypotheses, so it is given here. Recall, we assumed that the camera is a projective transformation.

It is known that projective transformations preserve the cross-ratio (Theorem 35.4, [Pe]):


\begin{displaymath}
\{u,0,f,\infty\} = \{v,0,\infty,f\},
\end{displaymath}

where


\begin{displaymath}
\{a,b,c,d\} = \frac{\frac{a-c}{b-c}}{\frac{a-d}{b-d}}
\end{displaymath}

is the cross-ratio. Some simple algebra gives the identity claimed. $\Box$

The depth of field (DOF) is the portion of a scene that appears sharp in the image [DoF]. However, more precisely, it is the area near the object plane in which the circles of confusion are acceptably small (where ``acceptably small'' has some precise pre-defined meaning, e.g., 0.2mm for a photo blown up to an $8''\times 10''$ print). Although a lens can precisely focus at only one distance, the decrease in sharpness is gradual on either side of the focused distance, so that within the DOF, the unsharpness is imperceptible under normal viewing conditions. See Figure 2 for an example of an image with a ``small'' (or ``short'') DOF.

Figure 2: An image with a small depth of field.
\includegraphics[height=4cm,width=6cm]{snowflake.eps}

The lens aperture is the circular opening in the lens allowing light to pass through. The actual diameter of opening is called the effective aperture. By convention, the aperture is measured as a quotient relative to the focal length $f$. For example, the aperture $f/2$ is an opening which is half the focal length, so if $f=50mm$ then the effective aperture would be a disc of diameter $25mm$. In general, if the aperture is $f/N$ (where $N\geq 1$) then $N$ is called the f-number or f-stop. The larger $N$ is, the smaller the aperture. Two apertures (or f-stops3) are said to differ by a full stop if they differ by a factor of $\sqrt{2}$. Usually the stop numbers fall into the sequence


\begin{displaymath}
1, \sqrt{2}, 2, 2\sqrt{2}, 4, 4\sqrt{2}, 8, 8\sqrt{2}, 16,
16 \sqrt{2}, 32, 32\sqrt{2}, ... ,
\end{displaymath}

which might be rounded up or down to


\begin{displaymath}
1, 1.4, 2, 2.8, 4, 5.6, 8, 11, 16, 22, 32, 45, ... .
\end{displaymath}

The larger the f-stop, the smaller the aperture.

Figure 3: An aperture slide card for an old-fashioned camera.
\includegraphics[height=3cm,width=8cm]{aperture_wikipedia.eps}

Remark 2   Here is an analogy taken from Wikipedia [A], [P]: The pupil of the eye is its aperture. Refraction in the cornea causes the effective aperture to differ slightly from the physical pupil diameter. The effective aperture of the human eye is typically about 4 mm in diameter, although it can range from 2 mm (which has a relatively large f-stop) in a brightly lit place to 8 mm (which has a comparitively small f-stop) in the dark.

Shutter speed: We use aperture and shutter speed settings to control the amount of light from the subject that reaches the film/sensor. The formula expressing this exposure relationship is


\begin{displaymath}
{\rm exposure} = {\rm intensity}\times {\rm time},
\end{displaymath}

or $E = I\cdot t$. Here the time $t$ is measured by the shutter speed. Shutter speed settings are measured in a geometric series (in seconds):


\begin{displaymath}
1, 1/2, 1/4, 1/8, 1/16, 1/32, 1/64, ...,
\end{displaymath}

which is often rounded to


\begin{displaymath}
1, 1/2, 1/4, 1/8, 1/15, 1/30, 1/60, ...\ .
\end{displaymath}

There are a number of (f-stop, shutter speed) combinations which (in theory) give the same exposure. For example,


\begin{displaymath}
(f/22,1/2), (f/16,1/4), (f/11,1/8), (f/8,1/15), (f/5.6,1/30), (f/4,1/60),
\end{displaymath}


\begin{displaymath}
(f/2.8,1/125), (f/2,1/250), (f/1.4,1/500), (f/1,1/1000),
\end{displaymath}

all have the same exposure.

The hyperfocal distance $H$ is the distance beyond which all circles of confusion are acceptably small (where ``acceptably small'' has some precise meaning), for a lens focused at ``infinity''.

Let $f$ be the lens focal length, $N$ be the lens f-number, and $c$ be the circle of confusion. The hyperfocal distance is given by


\begin{displaymath}
H = \frac {f^2} {N c}.
\end{displaymath} (1)

Let $s$ be the distance at which the camera is focused (the ``subject distance''). When $s$ is large in comparison with $f$, the distance $D_N$ (called the near limit depth of field) from the camera to the near limit of DOF and the distance $D_F$ (called the far limit depth of field) from the camera to the far limit of DOF are


\begin{displaymath}
D_{\mathrm N} \approx \frac {H s} {H + s}
\end{displaymath} (2)

and
\begin{displaymath}
D_{\mathrm F} \approx \frac {H s} {H - s},
\end{displaymath} (3)

for $s < H$ [C], page 5. When the subject distance is the hyperfocal distance, $D_{\mathrm F} = \infty$, we have


\begin{displaymath}
D_{\mathrm N} = \frac H 2 .
\end{displaymath}

Example 2   Let's compute the hyperfocal distance for a $50$ mm lens at $f / 16$ using a circle of confusion of $c=0.03$ mm: $H = \frac{50^2}{(16)(0.03)}= 5208.333...$ mm. If we focus the lens at a distance of $5.2$ m, then everything from half that distance ($2.6$ m) to infinity will be acceptably sharp in our photograph4. If we focus the lens at a distance of $200$ mm (about 8''), then everything from about $192$ mm to $208$ mm will be acceptably sharp in our photograph (see Figure 2 for a photo having approximately these parameters).

We end this paper with the proof of equations (1), (2), and (3) following Conrad [C]. In both [C] and [DoF], there appears the following

Figure 4: Geometry of depth of field.
\includegraphics[height=5cm,width=9cm]{dof-symm2.eps}
Using the similar triangles $\triangle xyz$ and $\triangle xy'z'$ in Figure 4, we have


\begin{displaymath}
\frac{\nu_N-\nu}{\nu_N}=\frac{c}{d}.
\end{displaymath}

Likewise, one can use similar triangles to verify


\begin{displaymath}
\frac{\nu-\nu_F}{\nu}=\frac{c}{c+d},
\end{displaymath}

which (with some algebraic manipulations) implies $\frac{\nu-\nu_F}{\nu_F}=\frac{c}{d}$. By definition, the stop number is the focal length $f$ divided by the aperture $d$: $N=f/d$. This and the above equations give

\begin{displaymath}
\nu_N=\frac{f\nu}{f-Nc},
\end{displaymath}

and

\begin{displaymath}
\nu_F=\frac{f\nu}{f+Nc}.
\end{displaymath}

The lens equation


\begin{displaymath}
\frac{1}{\nu}+\frac{1}{u}=\frac{1}{f}
\end{displaymath}

(where we use $s$ in place of $u$ in the above diagram) gives $\nu = sf/(s-f)$, and similarly, $\nu_N=D_Nf/(D_N-f)$ and $\nu_F=D_Ff/(D_F-f)$). Some algebra gives


\begin{displaymath}
D_N=\frac{sf^2}{f^2+Nc(s-f)}
\end{displaymath}

and

\begin{displaymath}
D_F=\frac{sf^2}{f^2-Nc(s-f)}.
\end{displaymath}

Since typically $s$ is large compared to $f$, these imply


\begin{displaymath}
D_N\approx \frac{sf^2}{f^2+Ncs}
\end{displaymath}

and

\begin{displaymath}
D_F\approx \frac{sf^2}{f^2-Ncs}.
\end{displaymath}

Taking the limit as $D_F\to \infty$ and solving for the hyperfocal distance $s$ gives (1). Using $H=f^2/Nc$, it is easy to verify these last two displayed equations imply (2), (3). $\Box$



david joyner 2008-08-15