Depth of field


In optics, particularly film and photography, the depth of field (DOF) is the distance in front of and beyond the subject that appears to be in focus.

When an object appears to be in focus

Precise focus is possible at only one distance; at that distance, a point object will produce a point image. At any other distance, a point object is defocused, and will produce a circular image. However, when the circle is sufficiently small, it is indistinguishable from a point, and appears to be in focus; it is rendered as “acceptably sharp”. The diameter of the circle increases with distance from the point of focus; the largest circle that is indistinguishable from a point is known as the acceptable circle of confusion, or informally, simply as the circle of confusion. The acceptable circle of confusion is influenced by visual acuity, viewing conditions, and the amount by which the image is enlarged. The increase of the circle diameter with defocus is gradual, so the limits of depth of field are not hard boundaries between sharp and unsharp.

Several other factors, such as subject matter, movement, and the distance of the subject from the camera, also influence when a given defocus becomes noticeable.

For a 35 mm motion picture, the image area on the negative is roughly 22 mm by 16 mm (0.87 in by 0.63 in). The limit of tolerable error is usually set at 0.05 mm (0.002 in) diameter. For 16 mm film, where the image area is smaller, the tolerance is stricter, 0.025 mm (0.001 in). Standard depth-of-field tables are constructed on this basis, although generally 35 mm productions set it at 0.025 mm (0.001 in). Note that the acceptable circle of confusion values for these formats are different because of the relative amount of magnification each format will need in order to be projected on a full-sized movie screen.

(A table for 35 mm still photography would be somewhat different since more of the film is used for each image and the amount of enlargement is usually much less.)

The image format size also will affect the depth of field. The larger the format size, the longer a lens will need to be to capture the same framing as a smaller format. In motion pictures, for example, a frame with a 12 degree horizontal field of view will require a 50 mm lens on 16 mm film, a 100 mm lens on 35 mm film, and a 250 mm lens on 65 mm film. Conversely, using the same focal length lens with each of these formats will yield a progressively wider image as the film format gets larger: a 50 mm lens has a horizontal field of view of 12 degrees on 16 mm film, 23.6 degrees on 35 mm film, and 55.6 degrees on 65 mm film. What this all means is that because the larger formats require longer lenses than the smaller ones, they will accordingly have a smaller depth of field. Therefore, compensations in exposure, framing, or subject distance need to be made in order to make one format look like it was filmed in another format.

Effect of f-number

For a given subject framing, the DOF is controlled by the lens f-number. Increasing the <var>f</var>-number (reducing the aperture diameter) increases the DOF; however, it also reduces the amount of light transmitted, and increases diffraction, placing a practical limit on the extent to which the aperture size may be reduced. Motion pictures make only limited use of this control; to produce a consistent image quality from shot to shot, cinematographers usually choose a single aperture setting for interiors and another for exteriors, and adjust exposure through the use of camera filters or light levels. Aperture settings are adjusted more frequently in still photography, where variations in depth of field are used to produce a variety of special effects.

Camera movements and DOF

When the lens axis is perpendicular to the image plane, as is normally the case, the plane of focus (POF) is parallel to the image plane, and the DOF extends between parallel planes on either side of the POF. When the lens axis is not perpendicular to the image plane, the POF is no longer parallel to the image plane; the ability to rotate the POF is known as the Scheimpflug principle. Rotation of the POF is accomplished with camera movements (tilt, a rotation of the lens about a horizontal axis, or swing, a rotation about a vertical axis). Tilt and swing are available on most view cameras, and are also available with specific lenses on some small- and medium-format cameras.

When the POF is rotated, the near and far limits of DOF are no longer parallel; the DOF becomes wedge-shaped, with the apex of the wedge nearest the camera. The angular DOF then increases with distance from the camera.

Rotating the POF with tilt or swing (or both) can be used either to maximize or minimize the part of an image that is within the DOF.

Artistic considerations

Depth of field can be anywhere from a fraction of an inch to virtually infinite. For instance, a closeup of a person's face may have shallow DOF (with someone just behind that person visible but out of focus—common, for instance, in melodramas and horror films); a shot of rolling hills might have great DOF, with both the foreground and background in focus. A closeup still photograph might employ a very shallow DOF to isolate the subject from a distracting background.

Although tilt and swing are normally used to maximize the part of the image that is within the DoF, they also can be used, in combination with a small <var>f</var>-number, to give selective focus to a plane that isn't perpendicular to the lens axis. With this technique, it is possible to have objects at greatly different distances from the camera in sharp focus and yet have a very shallow DOF. The effect can be interesting because it differs from what most viewers are accustomed to seeing.

Hyperfocal distance

The hyperfocal distance is the nearest focus distance at which the DOF extends to infinity; focusing the camera at the hyperfocal distance results in the largest possible depth of field for a given <var>f</var>-number. Focusing beyond the hyperfocal distance does not increase the far DOF (which already extends to infinity), but it does decrease the DOF in front of the subject, decreasing the total DOF. Some photographers refer to this as “wasting DOF”; however, see The object field method below. Focusing ahead of the hyperfocal distance increases the DOF ahead of the subject, but decreases DOF beyond the subject, including objects near infinity. Of course, this latter approach may be appropriate for images that do not extend to infinity.

The object field method

Traditional depth-of-field formulae and tables assume equal circles of confusion for near and far objects. Some authors, such as Merklinger (1992),[1] have suggested that distant objects often need to be much sharper to be clearly recognizable, whereas closer objects, being larger on the film, do not need to be so sharp. The loss of detail in distant objects may be particularly noticeable with extreme enlargements. Achieving this additional sharpness in distant objects usually requires focusing beyond the hyperfocal distance, sometimes almost at infinity. For example, if photographing a cityscape with a traffic bollard in the foreground, this approach, termed the object field method by Merklinger, would recommend focusing very close to infinity, and stopping down to make the bollard sharp enough. With this approach, foreground objects cannot always be made perfectly sharp, but the loss of sharpness in near objects may be acceptable if recognizability of distant objects is paramount.

Moritz von Rohr also used an object field method, but unlike Merklinger, he used the conventional criterion of a maximum circle of confusion diameter in the image plane, leading to unequal front and rear depths of field.

Near:far distribution

The DOF beyond the subject is always greater than the DOF in front of the subject. When the subject is at the hyperfocal distance or beyond, the far DOF is infinite; as the subject distance decreases, near:far DOF ratio increases, approaching unity at high magnification. The oft-cited &ldquo;rule&rdquo; that 1/3 of the DOF is in front of the subject and 2/3 is beyond is true only when the subject distance is 1/3 the hyperfocal distance.

Depth of field formulae

The basis of these formulae is given in the section Derivation of the DOF formulae;[2] refer to the diagram in that section for illustration of the quantities discussed below.

Hyperfocal Distance

Let be the lens focal length, be the lens f-number, and be the circle of confusion for a given image format. The hyperfocal distance is given by

Moderate-to-large distances

Let be the distance at which the camera is focused (the “subject distance”). When is large in comparison with the lens focal length, the distance from the camera to the near limit of DOF and the distance from the camera to the far limit of DOF are

When the subject distance is the hyperfocal distance,

The depth of field is

For , the far limit of DOF is at infinity and the DOF is infinite; of course, only objects at or beyond the near limit of DOF will be recorded with acceptable sharpness.

Substituting for and rearranging, DOF can be expressed as

Thus, for a given image format, depth of field is determined by three factors: the focal length of the lens, the <var>f</var>-number of the lens opening (the aperture), and the camera-to-subject distance.

Close-up

When the subject distance approaches the focal length, using the formulae given above can result in significant errors. For close-up work, the hyperfocal distance has little applicability, and it usually is more convenient to express DOF in terms of image magnification. Let be the magnification; when the subject distance is small in comparison with the hyperfocal distance,

so that for a given magnification, DOF is independent of focal length. Stated otherwise, for the same subject magnification, all focal lengths give approximately the same DOF. This statement is true <em>only</em> when the subject distance is small in comparison with the hyperfocal distance, however.

The discussion thus far has assumed a symmetrical lens for which the entrance and exit pupils coincide with the front and rear nodal planes, and for which the pupil magnification (the ratio of exit pupil diameter to that of the entrance pupil)[3] is unity. Although this assumption usually is reasonable for large-format lenses, it often is invalid for medium- and small-format lenses.

When , the DOF for an asymmetrical lens is

where is the pupil magnification. When the pupil magnification is unity, this equation reduces to that for a symmetrical lens.

Except for close-up and macro photography, the effect of lens asymmetry is minimal. At unity magnification, however, the errors from neglecting the pupil magnification can be significant. Consider a telephoto lens with and a retrofocus wide-angle lens with , at . The asymmetrical-lens formula gives and , respectively. The symmetrical-lens formula gives in either case. The errors are −33% and 33%, respectively.

Focus and f-number

Not all images require that sharpness extend to infinity; for given near and far DOF limits and , the required f-number is smallest when focus is set to

When the subject distance is large in comparison with the lens focal length, the required <var>f</var>-number is

In practice, these settings usually are determined on the image side of the lens, using measurements on the bed or rail with a view camera, or using lens DOF scales on manual-focus lenses for small- and medium-format cameras. If and are the image distances that correspond to the near and far limits of DOF, the required <var>f</var>-number is minimized when the image distance is

In practical terms, focus is set to halfway between the near and far image distances. The required <var>f</var>-number is

The image distances are measured from the camera's image plane to the lens's image nodal plane, which is not always easy to locate. In most cases, focus and <var>f</var>-number can be determined with sufficient accuracy using the approximate formulae above, which require only the difference between the near and far image distances; view camera users often refer to the difference as the focus spread. Most lens DOF scales are based on the same concept.

Practical complications

The distance scales on most medium- and small-format lenses indicate distance from the camera's image plane. Most DOF formulae, including those in this article, use the object distance from the lens's object nodal plane, which often is not easy to locate. Moreover, for many zoom lenses and internal-focusing non-zoom lenses, the location of the object nodal plane, as well as focal length, changes with subject distance. When the subject distance is large in comparison with the lens focal length, the exact location of the object nodal plane is not critical; the distance is essentially the same whether measured from the front of the lens, the image plane, or the actual nodal plane. The same is not true for close-up photography; at unity magnification, a slight error in the location of the object nodal plane can result in a DOF error greater than the errors from any approximations in the DOF equations.

The asymmetrical lens formulae require knowledge of the pupil magnification, which usually is not specified for medium- and small-format lenses. The pupil magnification can be estimated by looking into the front and rear of the lens and measuring the diameters of the apparent apertures, and computing the ratio (rear diameter divided by front diameter).[4] However, for many zoom lenses and internal-focusing non-zoom lenses, the pupil magnification changes with subject distance, and several measurements may be required.

Limitations

Most DOF formulae, including those discussed in this article, employ several simplifications:

  1. Paraxial (Gaussian) optics is assumed, and technically, the formulae are valid only for rays that are infinitessimally close to the lens axis. However, Gaussian optics usually is more than adequate for determining DOF, and non-paraxial formulae are sufficiently complex that requiring their use would make determination of DOF impractical in most cases.
  2. Lens aberrations are ignored. Including the effects of aberrations is nearly impossible, because doing so requires knowledge of the specific lens design. Moreover, in well-designed lenses, most aberrations are well corrected, and at least near the optical axis, often are almost negligible when the lens is stopped down 2–3 steps from maximum aperture. Because lenses usually are stopped down at least to this point when DOF is of interest, ignoring aberrations usually is reasonable. Not all aberrations are reduced by stopping down, however, so actual sharpness may be slightly less than predicted by DOF formulae.
  3. Diffraction is ignored. DOF formulae imply that any arbitrary DOF can be achieved by using a sufficiently large f-number. Because of diffraction, however, this isn't quite true. Once a lens is stopped down to where most aberrations are well corrected, stopping down further will decrease sharpness in the center of the field. At the DOF limits, however, further stopping down decreases the size of the defocus blur spot, and the overall sharpness may increase. Consequently, choosing an <var>f</var>-number sometimes involves a tradeoff between center and edge sharpness, although viewers typically prefer uniform sharpness to slightly greater center sharpness. The choice, of course, is subjective, and may depend upon the particular image. Eventually, the defocus blur spot becomes negligibly small, and further stopping down serves only to decrease sharpness even at DOF limits. Typically, diffraction at DOF limits becomes significant only at fairly large <var>f</var>-numbers; because large <var>f</var>-numbers typically require long exposure times, motion blur often causes greater loss of sharpness than does diffraction. Combined defocus and diffraction is discussed in Hansma (1996) and in Conrad's Depth of Field in Depth (PDF) and Jacobson's Photographic Lenses Tutorial.
  4. Post-capture manipulation of the image is ignored. Sharpening via techniques such as deconvolution or unsharp mask can increase the DOF in the final image, particularly when the original image has a large DOF. Conversely, noise reduction can reduce the DOF.
  5. For digital capture with color filter array sensors, demosaicing is ignored. Demosaicing alone would normally reduce the DOF, but the demosaicing algorithm used might also include sharpening.

The lens designer cannot restrict analysis to Gaussian optics and cannot ignore lens aberrations. However, the requirements of practical photography are less demanding than those of lens design, and despite the simplifications employed in development of most DOF formulae, these formulae have proven useful in determining camera settings that result in acceptably sharp pictures. It should be recognized that DOF limits are not hard boundaries between sharp and unsharp, and that there is little point in determining DOF limits to a precision of many significant figures.

DOF vs. format size

To a first approximation, DOF is inversely proportional to format size. More precisely, if photographs with the same final-image size are taken in two different camera formats at the same subject distance with the same field of view and <var>f</var>-number, the DOF is, to a first approximation, inversely proportional to the format size. Strictly speaking, this is true only when the subject distance is large in comparison with the focal length and small in comparison with the hyperfocal distance, for both formats, but it nonetheless is generally useful for comparing results obtained from different formats

To maintain the same field of view, the lens focal lengths must be in proportion to the format sizes. Assuming, for purposes of comparison, that the 4&times;5 format is four times the size of 35&nbsp;mm format, if a 4&times;5 camera used a 300&nbsp;mm lens, a 35&nbsp;mm camera would need a 75&nbsp;mm lens for the same field of view. For the same <var>f</var>-number, the image made with the 35&nbsp;mm camera would have four times the DOF of the image made with the 4&times;5 camera.

In many cases, the DOF is fixed by the requirements of the desired image. For a given DOF and field of view, the required <var>f</var>-number is proportional to the format size. For example, if a 35&nbsp;mm camera required 11, a 4×5 camera would require 45 to give the same DOF. For the same ISO speed, the exposure time on the 4&times;5 would be sixteen times as long; if the 35&nbsp;camera required 1/250 second, the 4&times;5 camera would require 1/15 second. In windy conditions, the exposure time with the larger camera might allow motion blur. Adjusting the <var>f</var>-number to the camera format is equivalent to maintaining the same absolute aperture diameter.

The greater DOF with the smaller format can be either an advantage or a disadvantage, depending on the desired effect. For the same amount of foreground and background blur, a small-format camera requires a smaller <var>f</var>-number and allows a shorter exposure time than a large-format camera; however, many point-and-shoot digital cameras cannot provide a very shallow DOF. For example, a point-and-shoot digital camera with a 1/1.8&Prime; sensor (7.18&nbsp;mm&nbsp;&times;&nbsp;5.32&nbsp;mm) at a normal focal length and 2.8 has the same DOF as a 35&nbsp;mm camera with a normal lens at 13.

In some cases, camera movements (tilt or swing) can be used to better fit the DOF to the scene, and achieve the required sharpness at a smaller <var>f</var>-number.

Photolithography

In semiconductor photolithography applications, depth of field is extremely important as integrated circuit layout features must be printed with high accuracy at extremely small size. The difficulty is that the wafer surface is not perfectly flat, but may vary by several micrometres. Even this small variation causes some distortion in the projected image, and results in unwanted variations in the resulting pattern. Thus photolithography engineers take extreme measures to maximize the optical depth of field of the photolithography equipment. To minimize this distortion further, chip makers like IBM are forced to use chemical mechanical polishing machines to make the wafer surface even flatter before lithographic patterning.

Ophthalmology and optometry

A person may sometimes experience better vision in daylight than at night because of an increased depth of field due to constriction of the pupil (i.e., miosis).

Increasing DOF by digital compositing

Focus stacking is a digital image processing technique which combines multiple images taken at different focus distances to give a resulting image with a greater depth of field than any of the individual source images. Available programs for multi-shot DOF enhancement include Helicon Focus and CombineZM.

Getting sufficient depth of field can be particularly challenging in macro photography. The images at right illustrate the increase in DOF that can be achieved by combining multiple exposures.

Other digital techniques include wavefront coding and plenoptic cameras.

Derivation of the DOF formulae

DOF limits

A symmetrical lens is illustrated at right. The subject at distance is in focus at image distance . Point objects at distances and would be in focus at image distances and , respectively; at image distance , they are imaged as blur spots. The depth of field is controlled by the aperture stop diameter ; when the blur spot diameter is equal to the acceptable circle of confusion , the near and far limits of DOF are at and . From similar triangles,

It usually is more convenient to work with the lens <var>f</var>-number than the aperture diameter; the <var>f</var>-number is related to the lens focal length and the aperture diameter by

substituting into the previous equations and rearranging gives

The image distance is related to an object distance by the thin-lens equation

substituting into the two previous equations and rearranging gives the near and far limits of DOF:

sumittha-itn

Hyperfocal distance

Setting the far limit of DOF to infinity and solving for the focus distance gives

where is the hyperfocal distance. Setting the subject distance to the hyperfocal distance and solving for the near limit of DOF gives

For any practical value of , the focal length is negligible in comparison, so that

Substituting the approximate expression for hyperfocal distance into the formulae for the near and far limits of DOF gives

Combining, the depth of field is

Moderate-to-large distances

When the subject distance is large in comparison with the lens focal length,

For , the far limit of DOF is at infinity and the DOF is infinite; of course, only objects at or beyond the near limit of DOF will be recorded with acceptable sharpness.

Close-up

When the subject distance approaches the lens focal length, the focal length no longer is negligible, and the approximate formulae above cannot be used without introducing significant error. At close distances, the hyperfocal distance has little applicability, and it usually is more convenient to express DOF in terms of magnification. Substituting

and

into the formula for DOF and rearranging gives

At the hyperfocal distance, the terms in the denominator are equal, and the DOF is infinite. As the subject distance decreases, so does the second term in the denominator; when , the second term becomes small in comparison with the first, and

so that for a given magnification, DOF is independent of focal length. Stated otherwise, for the same subject magnification, all focal lengths for a given image format give approximately the same DOF. This statement is true only when the subject distance is small in comparison with the hyperfocal distance, however. Multiplying the numerator and denominator of the exact formula by

gives

Decreasing the focal length increases the second term in the denominator, decreasing the denominator and increasing the value of the right-hand side, so that a shorter focal length gives greater DOF. The effect of focal length is greatest near the hyperfocal distance, and decreases as subject distance is decreased. However, the near/far perspective will differ for different focal lengths, so the difference in DOF may not be readily apparent. When the subject distance is small in comparison with the hyperfocal distance, the effect of focal length is negligible, and, as noted above, the DOF essentially is independent of focal length.

Near:far DOF ratio

From the “exact” equations for near and far limits of DOF, the DOF in front of the subject is

and the DOF beyond the subject is

The near:far DOF ratio is

This ratio is always less than unity; at moderate-to-large subject distances, , and

When the subject is at the hyperfocal distance or beyond, the far DOF is infinite, and the near:far ratio is zero. It's commonly stated that approximately 1/3 of the DOF is in front of the subject and approximately 2/3 is beyond; however, this is true only when .

At closer subject distances, it's often more convenient to express the DOF ratio in terms of the magnification

Substitution into the “exact” equation for DOF ratio gives

As magnification increases, the near:far ratio approaches a limiting value of unity.

Focus and f-number

Not all images require that sharpness extend to infinity; the equations for the DOF limits can be combined to eliminate and solve for the subject distance. For given near and far DOF limits and , the subject distance is

The equations for DOF limits also can be combined to eliminate and solve for the required <var>f</var>-number, giving

When the subject distance is large in comparison with the lens focal length, this simplifies to

Most discussions of DOF concentrate on the object side of the lens, but the formulae are simpler and the measurements usually easier to make on the image side. If and are the image distances that correspond to the near and far limits of DOF, the required <var>f</var>-number is minimum when the image distance is

The required <var>f</var>-number is

The image distances are measured from the camera's image plane to the lens's image nodal plane, which is not always easy to locate. In most cases, focus and <var>f</var>-number can be determined with sufficient accuracy using the approximate formulae

which require only the difference between the near and far image distances; focus is simply set to halfway between the near and far distances. View camera users often refer to the difference as the focus spread; it usually is measured on the bed or focusing rail. On manual-focus small- and medium-format lenses, the focus and <var>f</var>-number usually are determined using the lens DOF scales, which often are based on the two equations above.

For close-up photography, the <var>f</var>-number is more accurately determined using

where is the magnification.

sumittha-itn

Asymmetrical lenses

The discussion thus far has assumed a symmetrical lens for which the entrance and exit pupils coincide with the object and image nodal planes, and for which the pupil magnification is unity. Although this assumption usually is reasonable for large-format lenses, it often is invalid for medium- and small-format lenses.

For an asymmetrical lens, the DOF ahead of the subject distance and the DOF beyond the subject distance are given by[5]

where is the pupil magnification.

Combining gives the total DOF:

When , the second term in the denominator becomes small in comparison with the first, and

When the pupil magnification is unity, the equations for asymmetrical lenses reduce to those given earlier for symmetrical lenses.

Effect of lens asymmetry

Except for close-up and macro photography, the effect of lens asymmetry is minimal. A slight rearrangement of the last equation gives

As magnification decreases, the term becomes smaller in comparison with the term, and eventually the effect of pupil magnification becomes negligible. sumittha-itn

References

Further reading

See also

External links

Citations