Misplaced Pages

Depth of field: Difference between revisions

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.
Browse history interactively← Previous editContent deleted Content addedVisualWikitext
Revision as of 05:58, 4 February 2010 editB137 (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers25,120 editsNo edit summary← Previous edit Latest revision as of 10:22, 3 December 2024 edit undoEntranced98 (talk | contribs)Extended confirmed users, Pending changes reviewers, Rollbackers170,622 editsm Reverted edit by 88.98.75.3 (talk) to last version by Citation botTag: Rollback 
(813 intermediate revisions by more than 100 users not shown)
Line 1: Line 1:
{{Short description|Distance between the nearest and the furthest objects that are in focus in an image}}
] with very shallow depth of field.]]
{{Other uses}}
] showing the ] of a ] on a tilted page of text]]
]
]


The '''depth of field''' ('''DOF''') is the distance between the nearest and the farthest objects that are in acceptably sharp ] in an image captured with a ]. See also the closely related ''']'''.
In ], particularly as relates to ] and ], the '''depth of field''' (DOF) is the portion of a scene that appears acceptably sharp in the image. Although a ] can precisely focus at only one distance, the decrease in sharpness is gradual on each side of the focused distance, so that within the DOF, the unsharpness is imperceptible under normal viewing conditions.


==Factors affecting depth of field==
In some cases, it may be desirable to have the entire image sharp, and a large DOF is appropriate. In other cases, a small DOF may be more effective, emphasizing the subject while de-emphasizing the foreground and background. In ], a large DOF is often called ], and a small DOF is often called ].
]. Decreasing the aperture size ('''4''') reduces the size of the blur spots for points not in the focused plane, so that the blurring is imperceptible, and all points are within the {{abbr|DOF|depth of field}}.]]


The DOF is determined by the subject distance (that is, the distance to the plane that is perfectly in focus), the lens ], the lens ], and the ] or ] criterion. For cameras that can only focus on one object distance at a time, depth of field is the distance between the nearest and the farthest objects that are in acceptably sharp focus in the image.{{sfn|Salvaggio|Stroebel|2009| pp=110-}} "Acceptably sharp focus" is defined using a property called the "]".


The depth of field can be determined by ], distance to subject (object to be imaged), the acceptable circle of confusion size, and aperture.<ref name="LondonStone2016">{{Cite book|author1=Barbara London|author2=Jim Stone|author3=John Upton|title=Photography|edition= 8th|year=2005|publisher=Pearson|isbn=978-0-13-448202-6|pages=58}}</ref> Limitations of depth of field can sometimes be overcome with various techniques and equipment. The approximate depth of field can be given by:
For a given format size, at moderate subject distances, DOF is approximately determined by the subject ] and the lens ''f''-number. For a given ''f''-number, increasing the magnification, either by moving closer to the subject or using a lens of greater focal length, decreases the DOF; decreasing magnification increases DOF. For a given subject magnification, increasing the ''f''-number (decreasing the aperture diameter) increases the DOF; decreasing ''f''-number decreases DOF.


<math display="block">
When a picture is taken in two different format sizes from the same distance at the same ''f''-number with lenses that give the same angle of view, the smaller format has greater DOF. When a picture is taken in two different formats from the same distance at the same ''f''-number using lenses of the ''same focal length'', the smaller format has ''less'' DOF.
\text{DOF} \approx \frac{2u^2Nc}{f^2}

]. Decreasing the aperture size&nbsp;('''4''') reduces the size of the blur circles for points not in the focused plane, so that the blurring is imperceptible, and all points are within the DOF.]]
]

Cropping an image and enlarging to the same size final image as an uncropped image taken under the same conditions is equivalent to using a smaller format under the same conditions, so the cropped image has less DOF.

When focus is set to the ], the DOF extends from half the hyperfocal distance to infinity, and the DOF is the largest possible for a given ''f''-number.

The advent of digital technology in photography has provided additional means of controlling the extent of image sharpness; some methods allow extended DOF that would be impossible with traditional techniques, and some allow the DOF to be determined after the image is made.

== Acceptable sharpness ==
]. The depth-of-field scale (top) indicates that a subject which is anywhere between 1 and 2 meters in front of the camera will be rendered acceptably sharp. If the aperture were set to {{f/}}22 instead, everything from 0.7&nbsp;meters to infinity would appear to be in focus.]]
Precise focus is possible at only one distance; at that distance, a point object will produce a point image.<ref>
Strictly, because of lens ] and ], a point object in precise focus is imaged not as a point but rather as a small spot, often called the ''least circle of confusion''. For most treatments of DOF, including this article, the assumption of a point is sufficient.
</ref>
At any other distance, a point object is '']ed'', and will produce a blur spot shaped like the ], which for the purpose of analysis is usually assumed to be circular. When this circular spot 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 '']'', 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 (], 52–53). 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 ] motion picture, the image area on the negative is roughly 22&nbsp;mm by 16&nbsp;mm (0.87&nbsp;in by 0.63&nbsp;in). The limit of tolerable error is usually set at 0.05&nbsp;mm (0.002&nbsp;in) diameter. For ], where the image area is smaller, the tolerance is stricter, 0.025&nbsp;mm (0.001&nbsp;in). Standard depth-of-field tables are constructed on this basis, although generally 35&nbsp;mm productions set it at 0.025&nbsp;mm (0.001&nbsp;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&nbsp;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 ] 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&nbsp;mm lens on 16&nbsp;mm film, a 100&nbsp;mm lens on 35&nbsp;mm film, and a 250&nbsp;mm lens on 65&nbsp;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&nbsp;mm lens has a horizontal field of view of 12&nbsp;degrees on 16&nbsp;mm film, 23.6&nbsp;degrees on 35&nbsp;mm film, and 55.6&nbsp;degrees on 65&nbsp;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.

<gallery>
Image:aperture f22.jpg|{{f/}}22
Image:aperture f8.jpg|{{f/}}8
Image:aperture f4.jpg|{{f/}}4
Image:aperture f2.8.jpg|{{f/}}2.8
Image:Jonquil flowers at f32.jpg|At {{f/}}32, the background competes for the viewer’s attention.
Image:Jonquil flowers at f5.jpg|At {{f/}}5.6, the flowers are isolated from the background.
Image:Kittyplya03042006.JPG|At {{f/}}2.8, the cat is isolated from the background.
</gallery>

==Effect of lens aperture==

For a given subject framing and camera position, the DOF is controlled by the lens ] diameter, which is usually specified as the ], the ratio of lens ] to aperture diameter. Reducing the aperture diameter (increasing the <var>f</var>-number) increases the DOF; however, it also reduces the amount of light transmitted, and increases ], placing a practical limit on the extent to which DOF can be increased by reducing the aperture diameter.

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.

== Obtaining maximum DOF ==
===Lens DOF scales===

Many lenses for small- and medium-format cameras
include scales that indicate the DOF for a given focus distance and
<var>f</var>-number; the 35&nbsp;mm lens in the image above is
typical. That lens includes distance scales in feet and meters; when a
marked distance is set opposite the large white index mark, the focus is
set to that distance. The DOF scale below the distance scales includes
markings on either side of the index that correspond to
<var>f</var>-numbers; when the lens is set to a given <var>f</var>-number,
the DOF extends between the distances that align with the
<var>f</var>-number markings.

===Zone focusing===

When the 35&nbsp;mm lens above is set to <var>f</var>/11 and
focused at approximately 1.4&nbsp;m, the DOF (a “zone” of acceptable sharpness)
extends from 1&nbsp;m to 2&nbsp;m. Conversely, the required focus and <var>f</var>-number
can be determined from the desired DOF limits by locating the near and far DOF
limits on the lens distance scale and setting focus so that the index mark
is centered between the near and far distances; the required
<var>f</var>-number is determined by finding the markings on the DOF scale
that are closest to the near and far distances (], 315). For the 35&nbsp;mm
lens above, if it were desired for the DOF to extend from 1&nbsp;m to 2&nbsp;m,
focus would be set to approximately 1.4&nbsp;m and the aperture set to <var>f</var>/11.
The DOF limits can be determined from a scene by focusing on the farthest object to be
within the DOF and noting the distance on the lens distance scale, and repeating the process
for the nearest object to be within the DOF.
If the near and far distances fall outside the largest <var>f</var>-number markings on the DOF
scale, the desired DOF cannot be obtained; for example, with the 35&nbsp;mm lens above,
it is not possible to have the DOF extend from 0.7&nbsp;m to infinity.

Some distance scales have
markings for only a few distances; for example, the 35&nbsp;mm lens above
shows only 3&nbsp;ft and 5&nbsp;ft on its upper scale. Using other distances
for DOF limits requires visual interpolation between marked distances; because the
distance scale is nonlinear, accurate interpolation can be difficult. In most cases,
English and metric distance markings are not coincident, so using both scales to note
focused distances can sometimes lessen the need for interpolation.
Many ] lenses have smaller distance and DOF scales and fewer
markings than do comparable manual-focus lenses, so that determining focus
and <var>f</var>-number from the scales on an autofocus lens may be more
difficult than with a comparable manual-focus lens. In most cases, determining these settings
using the lens DOF scales on an autofocus lens requires that the lens or camera body be set to manual focus.<ref>
Higher-end models in the ] line of cameras included a feature called
depth-of-field AE (DEP) that set focus and <var>f</var>-number
from user-determined near and far points in much the same manner as using DOF scales
on manual-focus lenses (], 61–62).
The feature has not been included on models introduced after April 2004.
</ref>

On a view camera, the focus and <var>f</var>-number can be obtained by
measuring the '']''
and performing simple calculations; the procedure is described in more detail in the section
].
Some view cameras include DOF calculators that indicate focus and <var>f</var>-number without
the need for any calculations by the photographer (], 67–68; ], 230–31).

===Hyperfocal distance===

The ] 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 (], 55). 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 consider this wasting DOF; however, see ] below for a rationale for doing so. If the lens includes a DOF scale, the hyperfocal distance can be set by aligning the infinity mark on the distance scale with the mark on the DOF scale corresponding to the <var>f</var>-number to which the lens is set. For example, with the 35&nbsp;mm lens shown above set to <var>f</var>/11, aligning the infinity mark with the ‘11’ to the left of the index mark on the DOF scale would set the focus to the hyperfocal distance. Focusing on the hyperfocal distance is a special case of zone focusing in which the far limit of DOF is at infinity.

===The object field method===

Traditional depth-of-field formulas and tables assume equal circles of
confusion for near and far objects. Some authors, such as
],<ref>
Englander describes a similar approach in his paper
. (]);
Conrad discusses this approach, under Different Circles of
Confusion for Near and Far Limits of Depth of Field, and The Object Field
Method, in (])
</ref>
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 ] 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.

Other authors (], 51) have taken the opposite position, maintaining that slight unsharpness in foreground objects is usually more disturbing than than slight unsharpness in distant parts of a scene.

] 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.

== Limited DOF: selective focus ==
Depth of field can be anywhere from a fraction of a millimeter to virtually infinite.
In some cases, such as landscapes, it may be desirable to have the entire image sharp,
and a large DOF is appropriate. In other cases, artistic considerations may dictate that only
a part of the image be in focus, emphasizing the subject while de-emphasizing the background,
perhaps giving only a suggestion of the environment (], 81).
For example, a common technique in ]s and ]s is a closeup of a person's face,
with someone just behind that person visible but out of focus. A ] or
] still photograph might use a small DOF to isolate the subject
from a distracting background. The use of limited DOF to emphasize one part of an image is known
as ''selective focus'', ''differential focus'' or '']''.

Although a small DOF implies that other parts of the image will be unsharp, it does not, by itself,
determine ''how'' unsharp those parts will be. The amount of background (or foreground) blur depends
on the distance from the plane of focus, so if a background is close to the subject, it may be difficult
to blur sufficiently even with a small DOF. In practice, the lens <var>f</var>-number is usually adjusted
until the background or foreground is acceptably blurred, often without direct concern for the DOF.

Sometimes, however, it is desirable to have the entire subject sharp while ensuring that the background
is sufficiently unsharp. When the distance between subject and background is fixed, as is the case with
many scenes, the DOF and the amount of background blur are not independent. Although it is not always
possible to achieve both the desired subject sharpness and the desired background unsharpness, several
techniques can be used to increase the separation of subject and background.

For a given scene and subject magnification, the background blur increases with lens focal length.
If it is not important that background objects be unrecognizable, background de-emphasis can be
increased by using a lens of longer focal length and increasing the subject distance to maintain
the same magnification. This technique requires that sufficient space in front of the subject
be available; moreover, the perspective of the scene changes because of the different camera position,
and this may or may not be acceptable.

]]]
The situation is not as simple if it is important that a background object, such as a sign, be unrecognizable.
The magnification of background objects also increases with focal length, so with the technique just described,
there is little change in the recognizability of background objects.<ref>
Using the ], ], 32–35) describes a situation in which a portrait subject is to be sharp but a distracting sign in the background is to be unrecognizable. He concludes that with the subject and background distances fixed, no <var>f</var>-number will achieve both objectives, and that using a lens of different focal length will make no difference in the result.
</ref>
However, a lens of longer focal length
may still be of some help; because of the narrower angle of view, a slight change of camera position may suffice
to eliminate the distracting object from the field of view.

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.

==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
“rule” 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.

== DOF vs. format size ==

To a first approximation, DOF is inversely proportional to format size
(], 139).
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 ''f''-number, the DOF is, to a first
approximation, inversely proportional to the format size. Though commonly used
when comparing formats, the approximation is valid only when the subject
distance is large in comparison with the focal length of the larger format
and small in comparison with the hyperfocal distance of the smaller format.

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
''f''-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.

If a picture is taken from the same distance using the same lens and ''f''-number,
the image from the smaller format requires greater enlargement for the same size
final image, and has ''less'' DOF.

Cropping an image and enlarging to the same size final image as an uncropped image
taken under the same conditions is equivalent to using a smaller format;
the cropped image has less DOF (], 134, 136–37).

In many cases, the DOF is fixed by the requirements of the desired image.
For a given DOF and field of view, the required ''f''-number is
proportional to the format size. For example, if a 35&nbsp;mm camera
required {{f/}}11, a 4&times;5 camera would require {{f/}}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. The longer
exposure time with the larger camera might result in ],
especially with windy conditions, a moving subject, or an unsteady camera.

Adjusting the ''f''-number to the camera format is equivalent to
maintaining the same absolute aperture diameter; when set to the same absolute
aperture diameters, both formats have the same DOF.

Derivations of these relationships are given under
] in the subsection
].

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
''f''-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 {{f/}}2.8 has the same DOF as a 35&nbsp;mm camera with a normal
lens at {{f/}}13.

==Camera movements and DOF==

When the lens axis is perpendicular to the ], 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 ]. Rotation of the POF is
accomplished with ]
(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 ]s, 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 (], 31–32; ], 71). With tilt,
the height of the DOF increases with distance
from the camera; with swing, the width of the DOF increases with distance.

In some cases, rotating the POF can better fit the DOF to the
scene, and achieve the required sharpness at a smaller <var>f</var>-number.
Alternatively, rotating the POF, in combination with a small <var>f</var>-number,
can ] the part of an image that is within the DOF.

== DOF formulas==

The basis of these formulas is given in the section
];<ref>
Derivations of DOF formulas are given in many texts, including
], 161–166),
], 53–56),
and ], 217–220).
Complete derivations also are given in Conrad's
(])
and van Walree's
.
</ref>
refer to the diagram in that section for illustration of the quantities discussed below.

===Hyperfocal Distance===

Let <math>f</math> be the lens ],
<math>N</math> be the lens ], and <math>c</math> be the
] for a given ]. The
hyperfocal distance <math>H</math> is given by

:<math>H \approx \frac {f^2} {N c} \,.</math>

===Moderate-to-large distances===

Let <math>s</math> be the distance at which the camera is focused (the
“subject distance”). When <math>s</math> is large in comparison with the
lens ], the distance <math>D_{\mathrm N}</math> from the
camera to the near limit of DOF and the distance <math>D_{\mathrm F}</math>
from the camera to the far limit of DOF are

:<math>D_{\mathrm N} \approx \frac {H s} {H + s}</math>

and

:<math>D_{\mathrm F} \approx \frac {H s} {H - s} \mbox{ for } s < H \,.</math>

When the subject distance is the hyperfocal distance,

:<math>D_{\mathrm F} = \infty</math>

and

:<math>D_{\mathrm N} = \frac H 2 \,.</math>

The depth of field <math>D_{\mathrm F} - D_{\mathrm N}</math> is

:<math>
\mathrm {DOF} \approx \frac {2 Hs^2}
{H^2 - s^2} \mbox{ for } s < H \,.
</math> </math>


for a given maximum acceptable circle of confusion {{mvar|c}}, focal length {{mvar|f}}, ] {{mvar|N}}, and distance to subject {{mvar|u}}.<ref name="AllenTriantaphillidou2011">{{Cite book|author1=Elizabeth Allen|author2=Sophie Triantaphillidou|title=The Manual of Photography|url=https://books.google.com/books?id=IfWivY3mIgAC&pg=PA111|year=2011|publisher=Taylor & Francis|isbn=978-0-240-52037-7|pages=111–}}</ref><ref>{{Cite web |title=Depth of field |url=https://graphics.stanford.edu/courses/cs178/applets/dof.html |website=Stanford Computer Graphics Laboratory}}</ref>
For <math>s \ge H</math>, 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 <math>H</math> and rearranging, DOF can be expressed as

:<math>\mathrm {DOF} \approx \frac {2 N c f^2 s^2} {f^4 - N^2 c^2 s^2} \,.</math>

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

===Close-up ===
] package, which is in focus in this macro shot, is 2.5&nbsp;mm higher than the circuit board it is mounted on. In ] even small distances can blur an object out of focus. At {{f/}}32 every object is within the DOF, whereas the closer one gets to {{f/}}5, the fewer the objects that are sharp. The images were taken with a 105&nbsp;mm {{f/}}2.8 ]. At {{f/}}5 the small dust particles at the bottom right corner set examples for the ] phenomenon.]]

When the subject distance <math>s</math> approaches the focal length, using
the formulas 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
<math>m</math> be the magnification; when the subject distance is small in
comparison with the hyperfocal distance,

:<math>\mathrm {DOF} \approx 2 N c \, \frac {m + 1} {m^2} \,,</math>

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 ]s coincide with the front and rear
], and for which the ]
(the ratio of ] diameter to that of the
])<ref>A well-illustrated discussion of pupils and pupil
magnification that assumes minimal knowledge of optics and mathematics is
given in ], 144–147).</ref> is unity.
Although this assumption usually is reasonable for large-format lenses, it
often is invalid for medium- and small-format lenses.

When <math>s \ll H</math>, the DOF for an asymmetrical lens is

:<math>\mathrm {DOF} \approx \frac {2 N c \left ( 1 + m/P \right )}{m^2} \,,</math>

where <math>P</math> 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
<math>P = 0.5</math> and a retrofocus wide-angle lens with <math>P =
2</math>, at <math>m = 1.0</math>. The asymmetrical-lens formula gives
<math>\mathrm {DOF} = 6 N c</math> and <math>\mathrm {DOF} = 3 N c</math>,
respectively. The symmetrical-lens formula gives <math>\mathrm {DOF} = 4 N
c</math> in either case. The errors are &minus;33% and 33%, respectively.


As distance or the size of the acceptable circle of confusion increases, the depth of field increases; however, increasing the size of the aperture (i.e., reducing {{nowrap|f-number}}) or increasing the focal length reduces the depth of field. Depth of field changes linearly with {{nowrap|f-number}} and circle of confusion, but changes in proportion to the square of the distance to the subject and inversely in proportion to the square of the focal length. As a result, photos taken at extremely close range (i.e., so small {{mvar|u}}) have a proportionally much smaller depth of field.
===Focus and <var>f</var>-number from DOF limits===


Rearranging the {{abbr|DOF|depth of field}} equation shows that it is the ratio between distance and focal length that affects {{abbr|DOF|depth of field}};
For given near
and far DOF limits <math>D_{\mathrm N}</math> and <math>D_{\mathrm F}</math>,
the required ] is smallest when focus is set to


<math display="block">
:<math>s = \frac {2 D_{\mathrm N} D_{\mathrm F} }
\text{DOF} \approx 2Nc\left(\frac{u}{f}\right)^2=2Nc\left(1 - \frac{1}{M_T}\right)^2
{D_{\mathrm N} + D_{\mathrm F} } \,.
</math> </math>


Note that <math display="inline">M_T = -\frac{f}{u - f}</math> is the ] which is the ratio of the lateral image size to the lateral subject size.<ref>{{Cite book |last=Hecht |first=Eugene |title=Optics |publisher=Pearson |year=2017 |isbn=978-1-292-09693-3 |edition=5th |pages=172 |chapter=5.2.3 Thin Lenses}}</ref>
When the subject distance is large in comparison with the lens focal
length, the required <var>f</var>-number is


] affects {{abbr|DOF|depth of field}} in counterintuitive ways. Because the circle of confusion is directly tied to the sensor size, decreasing the size of the sensor while holding focal length and aperture constant will {{em|decrease}} the depth of field (by the crop factor). The resulting image however will have a different field of view. If the focal length is altered to maintain the field of view, while holding the {{em|f-number constant}}, the change in focal length will counter the decrease of {{abbr|DOF|depth of field}} from the smaller sensor and {{em|increase}} the depth of field (also by the crop factor). However, if the focal length is altered to maintain the field of view, while holding the {{em|aperture diameter constant}}, the {{abbr|DOF|depth of field}} will remain constant. <ref>{{Cite web |last= Nasse |first= H. H. |date= March 2010 |title= Depth of Field and Bokeh |type= Whitepaper |url=https://lenspire.zeiss.com/photo/app/uploads/2018/04/Article-Bokeh-2010-EN.pdf |website= Zeiss Lenspire}}</ref><ref>{{Cite web |title=Digital Camera Sensor Sizes: How it Influences Your Photography |url=https://www.cambridgeincolour.com/tutorials/digital-camera-sensor-size.htm |website= Cambridge In Colour}}</ref><ref>{{Cite web |last= Malan |first= Francois |date= 6 April 2018 |title= Sensor Size, Perspective and Depth of Field |url= https://photographylife.com/sensor-size-perspective-and-depth-of-field |website= Photography Life }}</ref><ref>{{Cite web |last1= Vinson |first1= Jason |date= 22 January 2016 |title= The Smaller the Sensor Size, the Shallower Your Depth of Field |url= https://fstoppers.com/education/smaller-sensor-size-shallower-your-depth-field-110547 |website= Fstoppers |language= en}}</ref>
:<math>N \approx \frac {f^2} {c}
\frac {D_{\mathrm F} - D_{\mathrm N} } {2 D_{\mathrm N} D_{\mathrm F} } \,.
</math>


===Effect of lens aperture===
When the far limit of DOF is at infinity,
For a given subject framing and camera position, the {{abbr|DOF|depth of field}} is controlled by the lens aperture diameter, which is usually specified as the ] (the ratio of lens focal length to aperture diameter). Reducing the aperture diameter (increasing the {{nowrap|f-number}}) increases the {{abbr|DOF|depth of field}} because only the light travelling at shallower angles passes through the aperture so only cones of rays with shallower angles reach the image plane. In other words, the ] are reduced or increasing the {{abbr|DOF|depth of field}}.<ref>{{Cite web| url = http://physicssoup.wordpress.com/2012/05/18/why-does-a-small-aperture-increase-depth-of-field/| title = Why Does a Small Aperture Increase Depth of Field?| date = 18 May 2012}}{{Self-published source|date=February 2024}}</ref>


For a given size of the subject's image in the focal plane, the same {{nowrap|f-number}} on any focal length lens will give the same depth of field.<ref>{{Cite web |date= 13 January 2009 |last= Reichmann |first= Michael |title= DOF2 |url= https://luminous-landscape.com/dof2// |website= Luminous Landscape}}</ref> This is evident from the above {{abbr|DOF|depth of field}} equation by noting that the ratio {{math|''u''/''f''}} is constant for constant image size. For example, if the focal length is doubled, the subject distance is also doubled to keep the subject image size the same. This observation contrasts with the common notion that "focal length is twice as important to defocus as f/stop",<ref>{{Cite web| url = https://www.kenrockwell.com/sony/lenses/50mm-f12.htm| title = Ken Rockwell}}{{Self-published source|date=February 2024}}</ref> which applies to a constant subject distance, as opposed to constant image size.
:<math>s = 2 D_\mathrm N</math>


Motion pictures make limited use of aperture control; to produce a consistent image quality from shot to shot, cinematographers usually choose a single aperture setting for interiors (e.g., scenes inside a building) and another for exteriors (e.g., scenes in an area outside a building), 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.
and


{{Multiple image
:<math>N \approx \frac {f^2} c \frac 1 { 2 D_\mathrm N }\,.</math>
| align = center
| direction =
| width = 250
| footer = Depth of field for different values of aperture using 50{{nbsp}}mm objective lens and full-frame DSLR camera. Focus point is on the first blocks column.<ref name="photoskop">{{Cite web |url=http://www.photoskop.com/player.html?l=all&ch=3&sec=0 |title=photoskop: Interactive Photography Lessons |date=April 25, 2015}}</ref>{{Better source needed|reason= Citation is to an Adobe Flash animation, which is dead.|date=February 2024}}
| image1 = Dof blocks f1_4.jpg
| caption1 = Aperture{{nbsp}}= {{f/|1.4}}. {{abbr|DOF|depth of field}}{{nbsp}}= 0.8{{nbsp}}cm
| image2 = Dof blocks f4_0.jpg
| caption2 = Aperture{{nbsp}}= {{f/|4.0}}. {{abbr|DOF|depth of field}}{{nbsp}}= 2.2{{nbsp}}cm
| image3 = Dof blocks f22.jpg
| caption3 = Aperture{{nbsp}}= {{f/|22}}. {{abbr|DOF|depth of field}}{{nbsp}}= 12.4{{nbsp}}cm
}}


=== Effect of circle of confusion===
In practice, these settings usually are determined on the image side of the
Precise focus is only possible at an exact distance from a lens;{{Efn|Strictly, at an exact distance from a plane.}} at that distance, a point object will produce a small spot image. Otherwise, a point object will produce a larger or blur spot image that is typically and approximately a circle. When this circular spot is sufficiently small, it is visually indistinguishable from a point, and appears to be in focus. The diameter of the largest circle that is indistinguishable from a point is known as the ], or informally, simply as the circle of confusion.
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 <math>v_{\mathrm N}</math> and <math>v_{\mathrm F}</math>
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
<math>v</math> is


The acceptable circle of confusion depends on how the final image will be used. The circle of confusion as 0.25&nbsp;mm for an image viewed from 25&nbsp;cm away is generally accepted.{{sfn|Savazzi|2011|p=109}}
:<math>v \approx \frac { v_{\mathrm N} + v_{\mathrm F} } {2}
= v_{\mathrm F} + \frac { v_{\mathrm N} - v_{\mathrm F} } {2} \,.
</math>


For ] motion pictures, the image area on the film is roughly 22&nbsp;mm by 16&nbsp;mm. The limit of tolerable error was traditionally set at {{convert|0.05|mm|in|abbr=on}} diameter, while for ], where the size is about half as large, the tolerance is stricter, {{convert|0.025|mm|in|abbr=on}}.<ref>{{Cite book|title=Film and Its Techniques|date=1966|publisher=University of California Press|page=56|url=https://books.google.com/books?id=Ocfs3ZsLresC&q=35+mm+motion+picture+film+circle+of+confusion&pg=PA56|access-date=24 February 2016}}</ref> More modern practice for 35&nbsp;mm productions set the circle of confusion limit at {{convert|0.025|mm|in|abbr=on}}.<ref>{{Cite book|author=Thomas Ohanian and Natalie Phillips|title=Digital Filmmaking: The Changing Art and Craft of Making Motion Pictures|date=2013|publisher=CRC Press|isbn=9781136053542|page=96|url=https://books.google.com/books?id=usMqBgAAQBAJ&q=35+mm+motion+picture+film+circle+of+confusion&pg=PA96|access-date=24 February 2016}}</ref>
In practical terms, focus is set to halfway between the near and far
image distances. The required <var>f</var>-number is


===Camera movements===
:<math>N \approx \frac { v_{\mathrm N} - v_{\mathrm F} } { 2 c } \,.</math>
{{See also|View camera}}


The term "camera movements" refers to swivel (swing and tilt, in modern terminology) and shift adjustments of the lens holder and the film holder. These features have been in use since the 1800s and are still in use today on view cameras, technical cameras, cameras with tilt/shift or perspective control lenses, etc. Swiveling the lens or sensor causes the plane of focus (POF) to swivel, and also causes the field of acceptable focus to swivel with the {{abbr|POF|plane of focus}}; and depending on the {{abbr|DOF|depth of field}} criteria, to also change the shape of the field of acceptable focus. While calculations for {{abbr|DOF|depth of field}} of cameras with swivel set to zero have been discussed, formulated, and documented since before the 1940s, documenting calculations for cameras with non-zero swivel seem to have begun in 1990.
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 formulas above, which require only the
difference between the near and far image distances;
view camera users sometimes refer to the difference
<math>v_{\mathrm N} \, - \, v_{\mathrm F}</math> as the ''focus spread''
(], 55). Most lens DOF scales are based on the same concept.


More so than in the case of the zero swivel camera, there are various methods to form criteria and set up calculations for {{abbr|DOF|depth of field}} when swivel is non-zero. There is a gradual reduction of clarity in objects as they move away from the {{abbr|POF|plane of focus}}, and at some virtual flat or curved surface the reduced clarity becomes unacceptable. Some photographers do calculations or use tables, some use markings on their equipment, some judge by previewing the image.
The focus spread is related to the ]. ], 56)
gives two definitions of the latter. The first is the tolerance of the position of the image plane
for which an object remains acceptably sharp; the second is that the limits of depth of focus
are the image-side conjugates of the near and far limits of DOF. With the first definition,
focus spread and depth of focus are usually close in value though conceptually different.
With the second definition, focus spread and depth of focus are the same.


When the {{abbr|POF|plane of focus}} is rotated, the near and far limits of {{abbr|DOF|depth of field}} may be thought of as wedge-shaped, with the apex of the wedge nearest the camera; or they may be thought of as parallel to the {{abbr|POF|plane of focus}}.{{sfn|Merklinger|1993|pp=49–56}}{{sfn|Tillmanns|1997|p=71}}
===Foreground and background blur===


==Object-field calculation methods==
If a subject is at distance <math>s</math> and the foreground or background is at distance
Traditional depth-of-field formulas can be hard to use in practice. As an alternative, the same effective calculation can be done without regard to the focal length and {{nowrap|f-number}}.{{Efn|Notwithstanding that the {{nowrap|f-number}} is derived from the focal length.}} ] and later Merklinger observe that the effective absolute aperture diameter can be used for similar formula in certain circumstances.{{sfn|Merklinger|1992}}
<math>D</math>, let the distance between the subject and the foreground or background be
indicated by


Moreover, traditional depth-of-field formulas assume equal acceptable circles of confusion for near and far objects. Merklinger{{Efn|Englander describes a similar approach in his paper ; Conrad discusses this approach, under Different Circles of Confusion for Near and Far Limits of Depth of Field, and The Object Field Method, in .}} 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.{{sfn|Merklinger|1992}} 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 ], sometimes almost at infinity. For example, if photographing a cityscape with a ] 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.
:<math>x_\mathrm d = \left | D - s \right | \,.</math>


Other authors such as ] have taken the opposite position, maintaining that slight unsharpness in foreground objects is usually more disturbing than slight unsharpness in distant parts of a scene.{{sfn|Adams|1980|p=51}}
The blur disk diameter <math>b</math> of a detail at distance <math>x_\mathrm d</math>
from the subject can be expressed as a function of the focal length <math>f</math>, subject magnification <math>m_\mathrm{s}</math>, and
<var>f</var>-number <math>N</math> according to


==Overcoming DOF limitations==
:<math>b = \frac {fm_\mathrm s} N \frac { x_\mathrm d } { s \pm x_\mathrm d} \,.</math>
Some methods and equipment allow altering the apparent {{abbr|DOF|depth of field}}, and some even allow the {{abbr|DOF|depth of field}} to be determined after the image is made. These are based or supported by computational imaging processes. For example, ] combines multiple images focused on different planes, resulting in an image with a greater (or less, if so desired) apparent depth of field than any of the individual source images. Similarly, in order to ] the 3-dimensional shape of an object, a ] can be generated from multiple photographs with different depths of field. Xiong and Shafer concluded, in part, "...{{nbsp}}the improvements on precisions of focus ranging and defocus ranging can lead to efficient shape recovery methods."<ref>Xiong, Yalin, and Steven A. Shafer. "." Computer Vision and Pattern Recognition, 1993. Proceedings CVPR'93., 1993 IEEE Computer Society Conference on. IEEE, 1993.</ref>


Another approach is focus sweep. The focal plane is swept across the entire relevant range during a single exposure. This creates a blurred image, but with a convolution kernel that is nearly independent of object depth, so that the blur is almost entirely removed after computational deconvolution. This has the added benefit of dramatically reducing motion blur.<ref>Bando et al. "." ACM Transactions on Graphics, Vol. 32, No. 2, Article 13, 2013.</ref>
The minus sign applies to a foreground object, and the plus sign applies to a background object.


] (LSP) is another technique used to overcome depth of field limitations in macro and micro photography. This method allows for high-magnification imaging with exceptional depth of field. LSP involves scanning a thin light plane across the subject that is mounted on a moving stage perpendicular to the light plane. This ensures the entire subject remains in sharp focus from the nearest to the farthest details, providing comprehensive depth of field in a single image. Initially developed in the 1960s and further refined in the 1980s and 1990s, LSP was particularly valuable in scientific and biomedical photography before digital focus stacking became prevalent.<ref>Root, N. (January 1991) . Journal of Biological Photography, Vol. 59, No. 1, pp. 3-8.</ref><ref name="Clarke2024">Clarke, T. "." The McCrone Group (accessed July 7, 2024).</ref>
The blur increases with the distance from the subject; when <math>b \le c</math>, the detail
is within the depth of field, and the blur is imperceptible. If the detail is only slightly
outside the DOF, the blur may be only barely perceptible.


Other technologies use a combination of lens design and post-processing: ] is a method by which controlled aberrations are added to the optical system so that the focus and depth of field can be improved later in the process.<ref>{{Cite journal|last1=Mary|first1=D.|last2=Roche|first2=M.|last3=Theys|first3=C.|last4=Aime|first4=C.|title=Introduction to Wavefront Coding for Incoherent Imaging|journal=EAS Publications Series|volume=59|year=2013|pages=77–92|issn=1633-4760|doi=10.1051/eas/1359005|bibcode=2013EAS....59...77R |s2cid=120502243 |url=https://www.edp-open.org/images/stories/books/fulldl/eas_59/eas59_pp077-092.pdf |archive-url=https://web.archive.org/web/20220614000804/https://www.edp-open.org/images/stories/books/fulldl/eas_59/eas59_pp077-092.pdf |archive-date=2022-06-14 |url-status=live }}</ref>
For a given subject magnification, <var>f</var>-number, and distance from the subject
of the foreground or background detail, the degree of detail blur varies with the lens focal length.
For a background detail, the blur increases with focal length; for a foreground detail,
the blur decreases with focal length. For a given scene, the positions of the subject,
foreground, and background usually are fixed, and the distance between subject and the
foreground or background remains constant regardless of the camera position; however, to maintain
constant magnification, the subject distance must vary if the focal length is changed.
For small distance between the foreground or background detail, the effect of focal length is small;
for large distance, the effect can be significant. For a reasonably distant background detail,
the blur disk diameter is


The lens design can be changed even more: in colour ] the lens is modified such that each colour channel has a different lens aperture. For example, the red channel may be {{f/|2.4}}, green may be {{f/|2.4}}, whilst the blue channel may be {{f/|5.6}}. Therefore, the blue channel will have a greater depth of field than the other colours. The image processing identifies blurred regions in the red and green channels and in these regions copies the sharper edge data from the blue channel. The result is an image that combines the best features from the different {{nowrap|f-numbers}}.{{sfn|Kay|Mather|Walton|2011}}
:<math>b \approx \frac {fm_\mathrm s} {N} \,,</math>


At the extreme, a ] captures ] information about a scene, so the focus and depth of field can be altered after the photo is taken.
depending only on focal length.


==Diffraction and DOF==
The blur diameter of foreground details is very large if the details are close to the lens.
] causes images to lose sharpness at high {{nowrap|f-numbers}} (i.e., narrow aperture stop opening sizes), and hence limits the potential depth of field.{{sfn|Gibson|1975| p=64}} (This effect is not considered in the above formula giving approximate {{abbr|DOF|depth of field}} values.) In general photography this is rarely an issue; because large {{nowrap|f-numbers}} typically require long exposure times to acquire acceptable image brightness, ] may cause greater loss of sharpness than the loss from diffraction. However, diffraction is a greater issue in close-up photography, and the overall image sharpness can be degraded as photographers are trying to maximize depth of field with very small apertures.{{sfn|Gibson|1975| p=53}}{{sfn|Lefkowitz|1979| p=84}}


Hansma and Peterson have discussed determining the combined effects of defocus and diffraction using a root-square combination of the individual blur spots.{{sfn|Hansma|1996}}{{sfn|Peterson|1996}} Hansma's approach determines the {{nowrap|f-number}} that will give the maximum possible sharpness; Peterson's approach determines the minimum {{nowrap|f-number}} that will give the desired sharpness in the final image and yields a maximum depth of field for which the desired sharpness can be achieved.{{Efn|Peterson does not give a closed-form expression for the minimum {{nowrap|f-number}}, though such an expression obtains from simple algebraic manipulation of his Equation&nbsp;3.}} In combination, the two methods can be regarded as giving a maximum and minimum {{nowrap|f-number}} for a given situation, with the photographer free to choose any value within the range, as conditions (e.g., potential motion blur) permit. Gibson gives a similar discussion, additionally considering blurring effects of camera lens aberrations, enlarging lens diffraction and aberrations, the negative emulsion, and the printing paper.{{sfn|Gibson|1975|p=64}}{{Efn|The analytical section at the end of ] was originally published as "Magnification and Depth of Detail in Photomacrography" in the ''Journal of the Photographic Society of America'', Vol. 26, No. 6, June 1960.}} Couzin gave a formula essentially the same as Hansma's for optimal {{nowrap|f-number}}, but did not discuss its derivation.{{sfn|Couzin|1982}}
The magnification of the detail also varies with focal length; for a given detail,
the ratio of the blur disk diameter to imaged size of the detail is independent of focal length,
depending only on the detail size and its distance from the subject. This ratio can be useful
when it is important that the background be recognizable (as usually is the case in evidence or
surveillance photography), or unrecognizable (as might be the case for a pictorial photographer
using selective focus to isolate the subject from a distracting background). As a general rule,
an object is recognizable if the blur disk diameter is one-tenth to one-fifth the size of the object
or smaller (], 205),<ref>
Williams gives the criteria for object recognition in terms of the system resolution. When resolution
is limited by defocus blur, as in the context of DOF, the resolution is the blur disk diameter; when
resolution is limited by diffraction, the resolution is the radius of the ], according to the
].
</ref>
and unrecognizable when the blur disk diameter is the object size or greater.


Hopkins,{{sfn|Hopkins|1955}} Stokseth,{{sfn|Stokseth|1969}} and Williams and Becklund{{sfn|Williams|Becklund|1989}} have discussed the combined effects using the ].<ref>"", Jeff Conrad</ref><ref>"", David M. Jacobson, 26 October 1996</ref>
The effect of focal length on background blur is illustrated in van Walree's article on
.


==DOF scales==
===Practical complications===
Many lenses include scales that indicate the {{abbr|DOF|depth of field}} for a given focus distance and {{nowrap|f-number}}; the 35&nbsp;mm lens in the image is typical. That lens includes distance scales in feet and meters; when a marked distance is set opposite the large white index mark, the focus is set to that distance. The {{abbr|DOF|depth of field}} scale below the distance scales includes markings on either side of the index that correspond to {{nowrap|f-numbers}}. When the lens is set to a given {{nowrap|f-number}}, the {{abbr|DOF|depth of field}} extends between the distances that align with the {{nowrap|f-number}} markings.


Photographers can use the lens scales to work backwards from the desired depth of field to find the necessary focus distance and aperture.{{sfn|Ray|1994|p=315}} For the 35&nbsp;mm lens shown, if it were desired for the {{abbr|DOF|depth of field}} to extend from 1&nbsp;m to 2&nbsp;m, focus would be set so that index mark was centered between the marks for those distances, and the aperture would be set to {{f/|11}}.{{Efn|The focus distance to have the {{abbr|DOF|depth of field}} extend between given near and far object distances is the harmonic mean of the ''object conjugates''. Most helicoid-focused lenses are marked with image plane-to-subject distances,{{citation needed|date=September 2019}} so the focus determined from the lens distance scale is not exactly the harmonic mean of the marked near and far distances.}}
The distance scales on most medium- and small-format lenses indicate
distance from the camera’s ]. Most DOF
formulas, including those in this article, use the object distance
<math>s</math> from the lens’s ],
which often is not easy to
locate. Moreover, for many zoom lenses and internal-focusing non-zoom
lenses, the location of the front 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 front
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 front nodal plane can
result in a DOF error greater than the errors from any approximations in
the DOF equations.


On a view camera, the focus and {{nowrap|f-number}} can be obtained by measuring the depth of field and performing simple calculations. Some view cameras include {{abbr|DOF|depth of field}} calculators that indicate focus and {{nowrap|f-number}} without the need for any calculations by the photographer.{{sfn|Tillmanns|1997|p=67-68}}{{sfn|Ray|1994|p=230-231}}
The asymmetrical lens formulas require knowledge of the
], 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 of rear diameter to front
diameter (], 144).
However, for many zoom lenses and internal-focusing non-zoom lenses, the
pupil magnification changes with subject distance, and several measurements
may be required.


<gallery widths="200px" heights="200px">
===Limitations ===
File:DOF scale detail.png|Detail from a lens set to {{f/|11}}. The point half-way between the 1&nbsp;m and 2&nbsp;m marks, the {{abbr|DOF|depth of field}} limits at {{f/|11}}, represents the focus distance of approximately 1.33&nbsp;m (the reciprocal of the mean of the reciprocals of 1 and 2 being 4/3).
File:TessinaDOF.jpg|{{abbr|DOF|depth of field}} scale on Tessina focusing dial
</gallery>


==Hyperfocal distance==
Most DOF formulas, including those discussed in this article, employ
{{Excerpt|Hyperfocal distance}}
several simplifications:


]
#] (] optics is assumed, and technically, the formulas are valid only for rays that are infinitesimally close to the lens axis. However, Gaussian optics usually is more than adequate for determining DOF, and non-paraxial formulas are sufficiently complex that requiring their use would make determination of DOF impractical in most cases.
#Lens ] 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 ], often are almost negligible when the lens is stopped down 2&ndash;3 steps from maximum ]. 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 formulas.
#] is ignored. DOF formulas imply that any arbitrary DOF can be achieved by using a sufficiently large ]. Because of diffraction, however, this isn't really true, as is discussed further in the section ].
#Post-capture manipulation of the image is ignored. Sharpening via techniques such as ] or ] can increase the DOF in the final image, particularly when the original image has a large DOF. Conversely, ] can reduce the DOF.
#For digital capture with color filter array sensors, ] is ignored. Demosaicing alone would normally reduce the DOF, but the demosaicing algorithm used might also include sharpening.


==Near:far distribution==
The lens designer cannot restrict analysis to Gaussian optics and cannot
The {{abbr|DOF|depth of field}} beyond the subject is always greater than the {{abbr|DOF|depth of field}} in front of the subject. When the subject is at the hyperfocal distance or beyond, the far {{abbr|DOF|depth of field}} is infinite, so the ratio is 1:∞; as the subject distance decreases, near:far {{abbr|DOF|depth of field}} ratio increases, approaching unity at high magnification. For large apertures at typical portrait distances, the ratio is still close to 1:1.
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 formulas, these
formulas 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 and diffraction == ==DOF formulae==
This section covers some additional formula for evaluating depth of field; however they are all subject to significant simplifying assumptions: for example, they assume the ] of ]. They are suitable for practical photography, lens designers would use significantly more complex ones.


===Focus and f-number from DOF limits===
If the camera position and image framing (i.e., angle of view) have been
For given near and far {{abbr|DOF|depth of field}} limits {{math|''D''{{sub|N}}}} and {{math|''D''{{sub|F}}}}, the required ] is smallest when focus is set to
chosen, the only means of controlling DOF is the lens aperture. Most DOF formulas imply that any arbitrary DOF can be achieved by using a sufficiently large ]. Because of diffraction, however, this isn't really true. Once a lens is stopped down to where most aberrations are well corrected, stopping down further will decrease sharpness in the plane of focus. At the DOF limits, however, further stopping down decreases the size of the ] blur spot, and the overall sharpness may still increase. Eventually, the defocus blur spot becomes negligibly small, and further stopping down serves only to decrease sharpness even at DOF limits (], 64).


<math display="block">s = \frac{2 D_{\mathrm N} D_{\mathrm F}}{D_{\mathrm N} + D_{\mathrm F}},</math>
There is thus a tradeoff between sharpness in the POF and sharpness at the DOF limits. But the sharpness in the POF is always greater than that at the DOF limits; if the blur at the DOF limits is imperceptible, the blur in the POF is imperceptible as well.


the ] of the near and far distances. In practice, this is equivalent to the ] for shallow depths of field.<ref>{{Cite web |last=Conrad |first=Jeff |title=Depth of Field in Depth |url=https://www.largeformatphotography.info/articles/DoFinDepth.pdf |access-date=10 February 2023 |website=Large Format Photography Info}}</ref> Sometimes, view camera users refer to the difference {{math|''v''{{sub|N}} &minus; ''v''{{sub|F}}}} as the ''focus spread''.{{sfn|Hansma|1996| p=55}}
For general photography, diffraction at DOF limits typically becomes significant only at fairly large <var>f</var>-numbers; because large <var>f</var>-numbers typically require long exposure times, ] may cause greater loss of sharpness than the loss from diffraction. The size of the diffraction blur spot depends on the effective <var>f</var>-number <math>N \left ( 1 + m \right )</math>, however, so diffraction is a greater issue in close-up photography, and the tradeoff between DOF and overall sharpness can become quite noticeable (], 53; ], 84).

=== Optimal <var>f</var>-number ===

As a lens is stopped down, the defocus blur at the DOF limits decreases but diffraction blur increases. The presence of these two opposing factors implies a point at which the combined blur spot is minimized (], 64); at that point, the <var>f</var>-number is optimal for image sharpness.
If the final image is viewed under normal conditions (e.g., an 8″×10″ image viewed at 10″), it may suffice to determine the <var>f</var>-number using criteria for minimum required sharpness, and there may be no practical benefit from further reducing the size of the blur spot. But this may not be true if the final image is viewed under more demanding conditions, e.g., a very large final image viewed at normal distance, or a portion of an image enlarged to normal size (]). Hansma also suggests that the final-image size may not be known when a photograph is taken, and obtaining the maximum practicable sharpness allows the decision to make a large final image to be made at a later time.

=== Determining combined defocus and diffraction ===

] and ]
have discussed determining the combined effects of defocus and diffraction
using a root-square combination of the individual blur spots. Hansma's approach determines
the <var>f</var>-number that will give the maximum possible sharpness; Peterson's approach
determines the minimum <var>f</var>-number that will give the desired sharpness in the
final image, and yields a maximum focus spread for which the desired sharpness can be achieved.<ref>
Peterson does not give a closed-form expression for the minimum <var>f</var>-number, though such an expression obtains from simple algebraic manipulation of his Equation&nbsp;3.
</ref>
In combination, the two methods can be regarded as giving a maximum and minimum
<var>f</var>-number for a given situation, with the photographer free to choose any value within the range, as conditions (e.g., potential motion blur) permit.
], 64) gives a similar discussion,
additionally considering blurring effects of camera lens aberrations, enlarging lens
diffraction and aberrations, the negative emulsion, and the printing
paper.<ref>
The analytical section at the end of ] was originally published as “Magnification and Depth of Detail in Photomacrography” in the ''Journal of the Photographic Society of America'', Vol. 26, No. 6, June 1960.
</ref>

],
], and
]
have discussed the combined effects using the ].
Conrad's (]), and Jacobson's discuss the use of Hopkins's method specifically in regard to DOF.

== Photolithography ==
In ] ] applications, depth of field is extremely important as ] layout features must be printed with high accuracy at extremely small size. The difficulty is that the ] surface is not perfectly flat, but may vary by several ]s. 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, semiconductor manufacturers may use ]ing 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 ] (i.e., ]).

==Digital techniques for extending DOF==
{|align="right"
|] is very limited.]]
|]
|}
===Focus stacking===
{{Main|Focus stacking}}
] is a ] 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 Syncroscopy AutoMontage, PhotoAcute Studio, ] and ].

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

===Wavefront coding===
{{Main|Wavefront coding}}
] is a method that convolves rays in such a way that it provides an image where fields are in focus simultaneously with all planes out of focus by a constant amount.

===Plenoptic cameras===
{{Main|Plenoptic camera}}
A ] uses a microlens array to capture ] information about a scene.

== Derivation of the DOF formulas ==
]

===DOF limits===
A symmetrical lens is illustrated at right. The subject, at distance
<math>s</math>, is in focus at image distance <math>v</math>. Point objects
at distances <math>D_\mathrm F</math> and <math>D_\mathrm N</math> would be
in focus at image distances <math>v_\mathrm F</math> and <math>v_\mathrm
N</math>, respectively; at image distance <math>v</math>, they are imaged
as blur spots. The depth of field is controlled by the aperture stop
diameter <math>d</math>; when the blur spot diameter is equal to the
acceptable ] <math>c</math>, the near and far limits
of DOF are at <math>D_\mathrm N</math> and <math>D_\mathrm F</math>. From
similar triangles,

:<math>\frac {v_\mathrm N - v} {v_\mathrm N} = \frac c d</math>

and

:<math>\frac {v- v_\mathrm F} {v_\mathrm F} = \frac c d\,.</math>

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

:<math>N = \frac f d\,;</math>

substituting into the previous equations and rearranging gives

:<math>v_\mathrm N = \frac {fv} {f - Nc}</math>

and

:<math>v_\mathrm F = \frac {fv} {f + Nc}\,.</math>

The image distance <math>v</math> is related to an object distance
<math>s</math> by the ] equation

:<math>\frac 1 s + \frac 1 v = \frac 1 f\,;</math>

applying this to <math>v_\mathrm N</math> and <math>v_\mathrm F</math> gives

:<math>\frac 1 D_\mathrm N + \frac 1 v_\mathrm N = \frac 1 f\,</math>

and

:<math>\frac 1 D_\mathrm F + \frac 1 v_\mathrm F = \frac 1 f\,;</math>

solving for <math>v</math>, <math>v_\mathrm N</math>, and <math>v_\mathrm F</math> in these three equations, substituting into the two previous equations, and rearranging gives the near and far limits of DOF:

:<math>D_{\mathrm N} = \frac {s f^2} {f^2 + N c ( s - f ) }</math>

and

:<math>D_{\mathrm F} = \frac {s f^2} {f^2 - N c ( s - f ) }\,.</math>

===Hyperfocal distance===
Setting the far limit of DOF <math>D_{\mathrm F}</math> to infinity and
solving for the focus distance <math>s</math> gives

:<math>s = H = \frac {f^2} {N c} + f,</math>

where <math>H</math> is the ]. Setting the subject
distance to the hyperfocal distance and solving for the near limit of DOF
gives

:<math>D_{\mathrm N} = \frac {f^2 / ( N c ) + f} {2} = \frac {H}{2}\,.</math>

For any practical value of <math>H</math>, the focal length is negligible
in comparison, so that

:<math>H \approx \frac {f^2} {N c}\,.</math>

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

:<math>D_{\mathrm N} = \frac {H s}{H + ( s - f )}</math>

and

:<math>D_{\mathrm F} = \frac {H s}{H - ( s - f )}\,.</math>

Combining, the depth of field <math>D_{\mathrm F} - D_{\mathrm N}</math> is

:<math>
\mathrm {DOF} = \frac {2 H s (s - f )}
{H^2 - ( s - f )^2} \mbox{ for } s < H \,.
</math>

===Moderate-to-large distances===

When the subject distance is large in comparison with the lens ],

:<math>D_{\mathrm N} \approx \frac {H s} {H + s}</math>

and

:<math>D_{\mathrm F} \approx \frac {H s} {H - s} \mbox{ for } s < H\,,</math>

so that

:<math>
\mathrm {DOF} \approx \frac {2 H s^2}
{H^2 - s^2} \mbox{ for } s < H \,.
</math>

For <math>s \ge H</math>, 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 <math>s</math> approaches the lens focal length,
the focal length no longer is negligible, and the approximate formulas
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

:<math>s = \frac {m + 1} {m} f</math>

and

:<math>s - f = \frac {f} {m}</math>

into the formula for DOF and rearranging gives

:<math>
\mathrm {DOF} = \frac
{2 f ( m + 1 ) / m }
{ ( f m ) / ( N c ) - ( N c ) / ( f m ) }\,,
</math>

after ], 163). At the ],
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 <math>s \ll H</math>, the second term becomes
small in comparison with the first, and

:<math>\mathrm {DOF} \approx 2 N c \, \frac {m + 1} {m^2} \,,</math>

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 ] 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

:<math>\frac {N c m} {f}</math>

gives

:<math>\mathrm {DOF} = \frac
{2 N c \left ( m + 1 \right )}
{m^2 - \left ( \frac {N c} {f} \right )^2} \,.
</math>

Decreasing the focal length <math>f</math> 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

:<math>s - D_{\mathrm N} = \frac {Ncs(s - f)} {f^2 + Nc(s - f)}\,,</math>

and the DOF beyond the subject is

:<math>D_{\mathrm F} - s = \frac {Ncs(s - f)} {f^2 - Nc(s - f)}\,.</math>

The near:far DOF ratio is

:<math>\frac {s - D_{\mathrm N}} {D_{\mathrm F} - s}
= \frac {f^2 - Nc(s - f)} {f^2 + Nc(s - f)}\,.</math>

This ratio is always less than unity; at moderate-to-large subject distances, <math>f \ll s</math>, and

:<math>\frac {s - D_{\mathrm N}} {D_{\mathrm F} - s}
\approx \frac {f^2 - Ncs} {f^2 + Ncs} = \frac {H - s} {H + s}\,.</math>

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 <math>s \approx H/3</math>.

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

:<math>m = \frac f {s - f}\,;</math>

substitution into the “exact” equation for DOF ratio gives

:<math>\frac {s - D_{\mathrm N}} {D_{\mathrm F} - s}
= \frac {m - Nc/f} {m + Nc/f}\,.</math>

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

=== DOF vs. format size ===

When the subject distance is much less than hyperfocal, the total DOF is given to good approximation by

:<math>\mathrm{DOF} \approx 2Nc \, \frac {m + 1} {m^2} \,.</math>

When additionally the magnification is small compared to unity, the value of <math>m</math> in the numerator can be neglected, and the formula further simplifies to

:<math>\mathrm{DOF} \approx \frac {2Nc} {m^2} \,.</math>

The DOF ratio of two different formats depends on what is assumed. One approach is to assume that essentially the same picture is taken with each format and enlarged to produce the same size final image, so the subject distance remains the same, the focal length is adjusted to maintain the same angle of view, and to a first approximation, magnification is in direct proportion to some characteristic dimension of each format. If both pictures are enlarged to give the same size final images with the same sharpness criteria, the circle of confusion is also in direct proportion to the format size. Thus if <math>l</math> is the characteristic dimension of the format,

:<math>\frac {m_2} {m_1} = \frac {c_2} {c_1} = \frac {l_2} {l_1}.</math>

With the same ''f''-number, the DOF ratio is then

:<math> \frac {\mathrm{DOF}_2} {\mathrm{DOF}_1} \approx \frac {c_2} {c_1} \left ( \frac {m_1} {m_2} \right )^2 = \frac {l_2} {l_1} \left ( \frac {l_1} {l_2} \right )^2 = \frac {l_1} {l_2} \,,</math>

so the DOF ratio is in inverse proportion to the format size. This ratio is approximate, and breaks down in the macro range of the larger format (the value of <math>m</math> in the numerator is no longer negligible) or as distance approaches the hyperfocal distance for the smaller format (the DOF of the smaller format approaches infinity).

If the formats have approximately the same aspect ratios, the characteristic dimensions can be the format diagonals; if the aspect ratios differ considerably (e.g., 4×5 vs. 6×17), the dimensions must be chosen more carefully, and the DOF comparison may not even be meaningful.

If the same lens focal length is used in both formats, magnifications can be maintained in the ratio of the format sizes by adjusting subject distances; the DOF ratio is the same as that given above, but the images differ because of the different perspectives and angles of view.

If the same DOF is required for each format, an analysis similar to that above shows that the required ''f''-number is in direct proportion to the format size.

Another approach is to use the same focal length with both formats at the same subject distance, so the magnification is the same, and with the same ''f''-number,

:<math> \frac {\mathrm{DOF}_2} {\mathrm{DOF}_1} \approx \frac {c_2} {c_1} = \frac {l_2} {l_1} \,,</math>

so the DOF ratio is in ''direct'' proportion to the format size. The perspective is the same for both formats, but because of the different angles of view, the pictures are not the same.

Cropping an image and enlarging to the same size final image as an uncropped image taken under the same conditions is equivalent to using a smaller format; the cropped image requires greater enlargement and consequently has a smaller circle of confusion. The cropped image has less DOF than the uncropped image.


<!-- Keep space to separate subtopics -->
The aperture diameter is normally given in terms of the ''f''-number because all lenses set to the same ''f''-number give approximately the same image ] (], 130), simplifying exposure settings. In deriving the basic DOF equations, the substitution of <math>f / N</math> for the absolute aperture diameter <math>d</math> can be omitted, giving the DOF in terms of the absolute aperture diameter:

:<math>\mathrm{DOF} = \frac {2S} { ( dm ) / c - c / ( dm) } \,,</math>

after ], 163). When the subject distance <math>S</math> is small in comparison with the hyperfocal distance, the second term in the denominator can be neglected, leading to

:<math>\mathrm{DOF} \approx \frac {2Sc} { dm } \,.</math>

With the same subject distance and angle of view for both formats, <math>S_2 = S_1</math>, and

:<math> \frac {\mathrm{DOF}_2} {\mathrm{DOF}_1} \approx \frac {c_2} {c_1} \frac {d_1} {d_2} \frac {m_1} {m_2}
= \frac {l_2} {l_1} \frac {d_1} {d_2} \frac {l_1} {l_2} = \frac {d_1} {d_2} \,,</math>

so the DOFs are in inverse proportion to the absolute aperture diameters. When the diameters are the same, the two formats have the same DOF. ] made this same observation, saying “At this point it will be sufficient to note that all these formulae involve quantities relating exclusively to the entrance-pupil and its position with respect to the object-point, whereas the focal length of the transforming system does not enter into them.” Lyon’s describes an approach very similar to that of ].

===Focus and <var>f</var>-number from DOF limits===

The equations for
the DOF limits can be combined to eliminate <math>Nc</math> and solve for
the subject distance. For given near and far DOF limits
<math>D_{\mathrm N}</math> and <math>D_{\mathrm F}</math>, the
subject distance is

:<math>s = \frac {2 D_{\mathrm N} D_{\mathrm F} }
{D_{\mathrm N} + D_{\mathrm F} } \,,
</math>

the ] of the near and far distances. The equations for DOF limits also can be combined to eliminate
<math>s</math> and solve for the required <var>f</var>-number, giving

:<math>N = \frac {f^2} {c}
\frac {D_{\mathrm F} - D_{\mathrm N} }
{D_{\mathrm F} ( D_{\mathrm N} - f ) + D_{\mathrm N} ( D_{\mathrm F} - f ) } \,.
</math>

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

:<math>N \approx \frac {f^2} {c}
\frac {D_{\mathrm F} - D_{\mathrm N} } {2 D_{\mathrm N} D_{\mathrm F} } \,.
</math>

When the far limit of DOF is at infinity, the equations for <math>s</math> and <math>N</math> give indeterminate results. But if all terms in the numerator and denominator on the right-hand side of the equation for <math>s</math> are divided by <math>D_\mathrm{F}</math>, it is seen that when <math>D_\mathrm{F}</math> is at infinity,

:<math>s = 2 D_\mathrm N \,.</math>

Similarly, if all terms in the numerator and denominator on the right-hand side of the equation for <math>N</math> are divided by <math>D_\mathrm{F}</math>, it is seen that when <math>D_\mathrm{F}</math> is at infinity,

:<math>N = \frac {f^2} c \frac 1 { 2 D_\mathrm N - f }
\approx \frac {f^2} c \frac 1 { 2 D_\mathrm N }\,.</math>

<!--
keep the extra space to separate the image-side discussion
from the object-side discussion
-->
Most discussions of DOF concentrate on the object side of the lens,
but the formulas are simpler and the measurements usually easier to make on the
image side. If the basic image-side equations

:<math>\frac {v_\mathrm N - v} {v_\mathrm N} = \frac {Nc} f</math>

and

:<math>\frac {v- v_\mathrm F} {v_\mathrm F} = \frac {Nc} f</math>

are combined and solved for the image distance <math>v</math>, the result is

:<math>v = \frac {2 v_{\mathrm N} v_{\mathrm F} }
{v_{\mathrm N} + v_{\mathrm F} } \,,
</math>

the harmonic mean of the near and far image distances. The basic image-side equations can also be combined and solved for <math>N</math>, giving

:<math>N = \frac {f} {c}
\frac { v_{\mathrm N} - v_{\mathrm F} }
{v_{\mathrm N} + v_{\mathrm F} }
\,.</math>

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. The harmonic mean is always less than the arithmentic mean, but when the difference between the near and far image distances is reasonably small, the two means are close to equal, and focus can be set with sufficient accuracy using

:<math>v \approx \frac { v_{\mathrm N} + v_{\mathrm F} } {2}
= v_{\mathrm F} + \frac { v_{\mathrm N} - v_{\mathrm F} } {2} \,.
</math>

This formula requires only the ''difference''
<math>v_{\mathrm N} \, - \, v_{\mathrm F}</math> between the near and far image distances.
View camera users often refer to this difference as the ''focus spread'';
it usually is measured on the bed or focusing rail.
Focus is simply set to halfway between the near and far image distances.

Substituting <math>v_\mathrm N + v_\mathrm F = 2v\,\!</math> into the equation for <math>N</math> and rearranging gives

:<math>N \approx \frac f v \frac { v_{\mathrm N} - v_{\mathrm F} } { 2 c } \,.</math>

One variant of the thin-lens equation is <math>v = \left ( m + 1 \right ) f</math>, where <math>m</math> is the magnification; substituting this into the equation for <math>N</math> gives

:<math>N \approx \frac {1} { 1 + m } \frac { v_{\mathrm N} - v_{\mathrm F} } { 2 c } \,.
</math>

At moderate-to-large subject distances, <math>m</math> is small compared to unity, and the
<var>f</var>-number can often be determined with sufficient accuracy using

:<math>N \approx \frac { v_{\mathrm N} - v_{\mathrm F} } { 2 c }\,.</math>

For close-up photography, the magnification cannot be ignored, and the <var>f</var>-number should be determined using the first approximate formula.

As with the approximate formula for <math>v</math>, the approximate formulas for
<math>N</math> require only the focus spread
<math>v_{\mathrm N} \, - \, v_{\mathrm F}</math> rather than the absolute image distances.

When the far limit of DOF is at infinity, <math>v_\mathrm F = f\,\!</math>.

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 approximate equations above.

]


===Foreground and background blur=== ===Foreground and background blur===
If a subject is at distance {{mvar|s}} and the foreground or background is at distance {{mvar|D}}, let the distance between the subject and the foreground or background be indicated by
If the equation for the far limit of DOF is solved for <math>c</math>, and the far distance
replaced by an arbitrary distance <math>D</math>, the blur disk diameter
<math>b</math> at that distance is


:<math>b = \frac {fm_\mathrm s} {N} \frac { D - s } { D }\,.</math> <math display="block">x_{\mathrm d} = |D - s|.</math>


The blur disk diameter {{mvar|b}} of a detail at distance {{math|''x''{{sub|d}}}} from the subject can be expressed as a function of the subject magnification {{math|''m''{{sub|s}}}}, focal length {{mvar|f}}, ] {{mvar|N}}, or alternatively the ] {{mvar|d}}, according to
When the background is at the far limit of DOF, the blur disk diameter is equal to the circle
of confusion <math>c</math>, and the blur is just imperceptible. The diameter of the background
blur disk increases with the distance to the background. A similar relationship holds for the
foreground; the general expression for a defocused object at distance <math>D</math> is


:<math>b = \frac {fm_\mathrm s} {N} \frac { \left| D - s \right | } { D }\,.</math> <math display="block">b = \frac{fm_\mathrm s}{N} \frac{x_\mathrm{d}}{s \pm x_\mathrm{d}} = dm_\mathrm{s} \frac{x_\mathrm{d}}{D}.</math>


For a given scene, the distance between the subject and a foreground or background object is usually The minus sign applies to a foreground object, and the plus sign applies to a background object.
fixed; let that distance be represented by


The blur increases with the distance from the subject; when {{mvar|b}} is less than the circle of confusion, the detail is within the depth of field.
:<math>x_\mathrm d = \left | D - s \right | ;</math>


==See also==
then
{{Div col|colwidth=15em}}
* ]
* ]
* ]
* ]
* ]
* ] (very deep depth of field)
* ]
* ]
* ]
* ]
{{Div col end}}


== Explanatory notes ==
:<math>b = \frac {fm_\mathrm s} {N} \frac { x_\mathrm d } { D }\,.</math>
{{Notelist}}


== References ==
or, in terms of subject distance,
=== Citations ===
{{Reflist}}


=== General and cited references ===
:<math>b = \frac {fm_\mathrm s} {N} \frac { x_\mathrm d } { s \pm x_\mathrm d } ,</math>
{{Refbegin}}

* {{Cite book |last=Adams |first=Ansel |title=The Camera |year=1980 |publisher=New York Graphic Society |isbn=9780821210925 |url=https://archive.org/details/cameraadam00adam |url-access=registration |quote=Adams, Ansel. 1980. ''The Camera''. |language=en }}
with the minus sign used for foreground objects and the plus sign used for background objects.
* {{Cite journal |last=Couzin |first=Dennis |title=Depths of Field |journal=SMPTE Journal |date=November 1982 |pages=1096–1098|doi=10.5594/J00204 }} Available in PDF .
For a relatively distant background object,
* {{Cite book |last=Gibson |first=H. Lou |year=1975 |title=Close-Up Photography and Photomacrography |volume=II: ''Photomacrography'' |edition=2nd combined |series=Kodak Publication No. N-16 |location=Rochester, NY |publisher=Eastman Kodak Company, Professional and Finishing Markets Division |isbn=0-87985-160-0 |oclc=1991448 }}

* {{Cite magazine |last=Hansma |first=Paul K. |date=March–April 1996 |title=View Camera Focusing in Practice |url= |url-access= |magazine=Photo Techniques |volume= |issue= |pages=54–57 }} "Available as GIF images on the "<!-- Not found in the archived version -->.
:<math>b \approx \frac {fm_\mathrm s} N \,.</math>
* {{Cite journal |last=Hopkins |first=H. H. |date=1955 |title=The frequency response of a defocused optical system |journal=Proceedings of the Royal Society A |volume=231 |issue=1184 |pages=91–103|doi=10.1098/rspa.1955.0158 |bibcode=1955RSPSA.231...91H |s2cid=121289809 }}

* {{Cite journal |last1=Kay |first1=Andrew |last2=Mather |first2=Jonathan |last3=Walton |first3=Harry |date=1 December 2011 |title=Extended Depth of Field by Colored Apodization |url=https://opg.optica.org/ol/viewmedia.cfm?uri=ol-36-23-4614&seq=0&html=true |url-access=subscription |journal=Optics Letters |volume=36 |issue=23 |pages=4614–4616 |doi=10.1364/OL.36.004614 |pmid=22139260 |bibcode=2011OptL...36.4614K |issn=0146-9592 }}
In terms of subject magnification, the subject distance is
* {{Cite book |last=Lefkowitz |first=Lester |year=1979 |title=The Manual of Close-Up Photography |location=Garden City, NY |publisher=Amphoto |isbn=0-8174-2456-3 |oclc=4883084 }}

* {{Cite book |last=Merklinger |first=Harold M. |year=1992 |title=The INs and OUTs of FOCUS: An Alternative Way to Estimate Depth-of-Field and Sharpness in the Photographic Image |edition=v. 1.0.3 |location=Bedford, Nova Scotia |publisher=Seaboard Printing Limited |isbn=0-9695025-0-8 |oclc=23651332 }} Version 1.03e available in at http://www.trenholm.org/hmmerk/ .
:<math>s = \frac { m_\mathrm s + 1 } { m_\mathrm s } f ,</math>
* {{Cite book |last=Merklinger |first=Harold M. |year=1993 |title=Focusing the View Camera: A Scientific Way to Focus the View Camera and Estimate Depth of Field |edition=v. 1.0 |location=Bedford, Nova Scotia |publisher=Seaboard Printing Limited |isbn=0-9695025-2-4 |oclc=1072495227 }} Version 1.6.1 available in at http://www.trenholm.org/hmmerk/.

* {{Cite journal |last=Peterson |first=Stephen |title=Image Sharpness and Focusing the View Camera |journal=Photo Techniques |date=March–April 1996 |pages=51–53}} Available as GIF images on the .
so that, for a given <var>f</var>-number and subject magnification,
* {{Cite book |last=Ray |first=Sidney F. |year=1994 |title=Photographic Lenses and Optics |location=Oxford |publisher=Focal Press |isbn=0-240-51387-8 |oclc=31648843 }}

* {{Cite book |last=Ray |first=Sidney F. |year=2000 |chapter=The Geometry of Image Formation |editor-last=Jacobson |editor-first=Ralph E. |editor2-last=Ray |editor2-first=Sidney F. |editor3-last=Atteridge |editor3-first=Geoffrey G. |editor4-last=Axford |editor4-first=Norman R. |title=The Manual of Photography: Photographic and Digital Imaging |edition=9th |location=Oxford |publisher=Focal Press |isbn=0-240-51574-9 |oclc=44267873}}
:<math>b = \frac {fm_\mathrm s} {N} \frac { x_\mathrm d } { \frac { m_\mathrm s + 1} {m_\mathrm s} f \pm x_\mathrm d }
* {{Cite book |last=Ray |first=Sidney F. |year=2002 |title=Applied Photographic Optics |edition=3rd |location=Oxford |publisher=Focal Press |isbn=0-240-51540-4 |oclc=47868399}}
= \frac {fm_\mathrm s ^2} {N} \frac { x_\mathrm d } { \left ( m_\mathrm s + 1 \right ) f \pm m_\mathrm s x_\mathrm d } \,.
* {{Cite book |last1=Salvaggio |first1=Nanette |last2=Stroebel |first2=Leslie |year=2009 |title=Basic Photographic Materials and Processes |url=https://books.google.com/books?id=71uE_OrGw5oC&pg=PA110 |publisher=Taylor & Francis |isbn=978-0-240-80984-7 |pages=110– }}
</math>
* {{Cite book |last=Savazzi |first=Enrico |title=Digital Photography for Science (Hardcover) |url=https://books.google.com/books?id=YabFAQAAQBAJ&pg=PA109 |year=2011 |publisher=Lulu.com |isbn=978-0-557-91133-2 }}{{self-published inline|date=February 2020}}

* {{Cite book |last=Shipman |first=Carl |year=1977 |title=SLR Photographers Handbook |location=Tucson, AZ |publisher=H.P. Books |isbn=0-912656-59-X |oclc=3403925 }}
Differentiating <math>b</math> with respect to <math>f</math> gives
* {{Cite journal |last=Stokseth |first=Per A. |title=Properties of a Defocused Optical System |journal=Journal of the Optical Society of America |volume=59 |issue=10 |date=October 1969 |pages=1314–1321|doi=10.1364/JOSA.59.001314 |bibcode=1969JOSA...59.1314S }}

* {{Cite book |last=Stroebel |first=Leslie |year=1976 |title=View Camera Technique |edition=3rd |location=London |publisher=Focal Press |isbn=0-240-50901-3 |oclc=3856606}}
:<math>\frac {\mathrm d b} {\mathrm d f}
* {{Cite book |last=Tillmanns |first=Urs |year=1997 |title=Creative Large Format: Basics and Applications |edition=2nd |series= |location=Feuerthalen, Switzerland |publisher=Sinar AG |isbn=3-7231-0030-9 |oclc=1193525959}}
= \frac {\pm m_\mathrm s ^3 x_\mathrm d ^2}
* {{Cite book |last=von Rohr |first=Moritz |author-link=Moritz von Rohr |year=1906 |title=Die optischen Instrumente |url=https://babel.hathitrust.org/cgi/pt?id=coo.31924002932287&seq=5 |location=Leipzig, Germany |publisher=B. G. Teubner |oclc=750993595}}
{N \left ^2 }\,.
* {{Cite book |last1=Williams |first1=Charles S. |last2=Becklund |first2=Orville |date=1989 |title=Introduction to the Optical Transfer Function |location=New York |publisher=Wiley |pages=293–300}} Reprinted 2002, Bellingham, WA: SPIE Press, {{ISBN|0-8194-4336-0}}.
</math>
* {{Cite book |last=Williams |first=John B. |year=1990 |title=Image Clarity: High-Resolution Photography |location=Boston |publisher=Focal Press |isbn=0-240-80033-8 |oclc=19514912 }}

{{Refend}}
With the plus sign, the derivative is everywhere positive,
so that for a background object, the blur disk size increases with focal length.
With the minus sign, the derivative is everywhere negative,
so that for a foreground object, the blur disk size decreases with focal length.

The magnification of the defocused object also varies with focal length; the magnification of the
defocused object is

:<math>m_\mathrm d = \frac {v_\mathrm s} {D} = \frac { \left ( m_\mathrm s + 1 \right ) f } { D },</math>

where <math>v_\mathrm s</math> is the image distance of the subject. For a defocused object
with some characteristic dimension <math>y</math>, the imaged size of that object is

:<math>m_\mathrm d y = \frac { \left ( m_\mathrm s + 1 \right ) f y } { D }\,.</math>

The ratio of the blur disk size to the imaged size of that object then is

:<math> \frac b { m_\mathrm d y } = \frac {m_\mathrm s} { m_\mathrm s + 1 } \frac {x_\mathrm d } { Ny },</math>

so for a given defocused object, the ratio of the blur disk diameter to object size
is independent of focal length, and depends only on the object size and its distance from the subject.

===Asymmetrical lenses===

The discussion thus far has assumed a symmetrical lens for which the
entrance and exit ]s coincide with the object and image
], and for which the ] 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<ref> This is discussed in
Jacobson's .
and complete derivations are given in Conrad's
(])
and van Walree's .
</ref>

:<math>\mathrm {DOF_N} = \frac
{N c (1 + m/P)}
{m^2 }
</math>

and

:<math>\mathrm {DOF_F} = \frac
{N c (1 + m/P)}
{m^2 }\,,
</math>

where <math>P</math> is the pupil magnification.

Combining gives the total DOF:

:<math>\mathrm {DOF} = \frac {2 f ( 1/m + 1/P ) }
{ ( f m ) / ( N c ) - ( N c ) / ( f m ) }\,.
</math>

When <math>s \ll H</math>, the second term in the denominator becomes
small in comparison with the first, and

:<math>\mathrm {DOF} \approx \frac {2 N c (1 + m/P)}{m^2}\,.</math>

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

:<math>\mathrm {DOF} \approx \frac {2 N c} {m}
\left ( \frac 1 m + \frac 1 P \right )\,.
</math>

As magnification decreases, the <math>1/P</math> term becomes smaller in
comparison with the <math>1/m</math> term, and eventually the effect of
pupil magnification becomes negligible.

==Notes==

<references />

==See also==
{{Portal|Photography|Large format camera lens.jpg}}
*]
*]
*]
*]
*]
*]
*] (very deep DOF)
*]
*]
*]
*] (camera movements used to achieve selective focus)
*]

==References==

* <cite id="CITEREFAdams1980">Adams, Ansel. 1980. ''The Camera''. The New Ansel Adams Photography Series/Book 1. Boston: New York Graphic Society. ISBN 0-8212-1092-0</cite>
* <cite id="CITEREFCanonInc.2000">Canon Inc. 2000. ''Canon EOS-1v/EOS-1v HS Instructions''. Tokyo: Canon Inc.</cite>
* <cite id="CITEREFGibson1975">Gibson, H. Lou. 1975. ''Close-Up Photography and Photomacrography''. 2nd combined ed. Kodak Publication No. N-16. Rochester, NY: Eastman Kodak Company, Vol&nbsp;II: Photomacrography. ISBN 0-87985-160-0</cite>
* <cite id="CITEREFHansma1996">Hansma, Paul K. 1996. View Camera Focusing in Practice. ''Photo Techniques'', March/April 1996, 54&ndash;57.</cite> Available as GIF images on the .
* <cite id="CITEREFHopkins1955">Hopkins, H.H. 1955. The frequency response of a defocused optical system. ''Proceedings of the Royal Society A'', 231:91–103.</cite>
* <cite id="CITEREFLangford1973">Langford, Michael J. 1973. ''Basic Photography''. 3rd ed. Garden City, NY: Amphoto. ISBN 0-8174-0640-9</cite>
* <cite id="CITEREFLarmore1965">Larmore, Lewis. 1965. ''Introduction to Photographic Principles''. 2nd ed. New York: Dover Publications, Inc.</cite>
* <cite id="CITEREFLefkowitz1979">Lefkowitz, Lester. 1979 ''The Manual of Close-Up Photography''. Garden City, NY: Amphoto. ISBN 0-8174-2456-3</cite>
* <cite id="CITEREFMerklinger1992">Merklinger, Harold M. 1992. ''The INs and OUTs of FOCUS: An Alternative Way to Estimate Depth-of-Field and Sharpness in the Photographic Image''. v. 1.0.3. Bedford, Nova Scotia: Seaboard Printing Limited. ISBN 0-9695025-0-8. Version 1.03e available in ] at http://www.trenholm.org/hmmerk/.</cite>
* <cite id="CITEREFMerklinger1993">———. 1993. ''Focusing the View Camera: A Scientific Way to Focus the View Camera and Estimate Depth of Field''. v. 1.0. Bedford, Nova Scotia: Seaboard Printing Limited. ISBN 0-9695025-2-4. Version 1.6.1 available in ] at http://www.trenholm.org/hmmerk/.</cite>
* <cite id="CITEREFPeterson1996">Peterson, Stephen. 1996. Image Sharpness and Focusing the View Camera. ''Photo Techniques'', March/April 1996, 51–53. Available as GIF images on the .</cite>
* <cite id="CITEREFRay1994">Ray, Sidney F. 1994. ''Photographic Lenses and Optics''. Oxford: Focal Press. ISBN 0-240-51387-8</cite>
* <cite id="CITEREFRay2000">———. 2000. The geometry of image formation. In ''The Manual of Photography: Photographic and Digital Imaging'', 9th ed. Ed. Ralph E. Jacobson, Sidney F. Ray, Geoffrey G. Atteridge, and Norman R. Axford. Oxford: Focal Press. ISBN 0-240-51574-9</cite>
* <cite id="CITEREFRay2002">———. 2002. . 3rd ed. Oxford: Focal Press. ISBN 0-240-51540-4</cite>
* <cite id="CITEREFShipman1977">Shipman, Carl. 1977. ''SLR Photographers Handbook.'' Tucson: H.P. Books. ISBN 0-912656-59-X</cite>
* <cite id="CITEREFStokseth1969">Stokseth, Per A. 1969. Properties of a Defocused Optical System. ''Journal of the Optical Society of America'' 59:10, Oct. 1969, 1314–1321.</cite>
* <cite id="CITEREFStroebel1976">Stroebel, Leslie. 1976. ''View Camera Technique''. 3rd ed. London: Focal Press. ISBN 0-240-50901-3</cite>
* <cite id="CITEREFTillmanns1997">Tillmanns, Urs. 1997. ''Creative Large Format: Basics and Applications''. 2nd ed. Feuerthalen, Switzerland: Sinar AG. ISBN 3-7231-0030-9</cite>
* <cite id="CITEREFvon Rohr1906">]. 1906. ''Die optischen Instrumente''. Leipzig: B. G. Teubner</cite>
* <cite id="CITEREFWilliamsBecklund1989">Williams, Charles S., and Becklund, Orville. 1989. ''Introduction to the Optical Transfer Function''. New York: Wiley. Reprinted 2002, Bellingham, WA: SPIE Press, 293–300. ISBN 0-8194-4336-0</cite>
* <cite id="CITEREFWilliams1990">Williams, John B. 1990. ''Image Clarity: High-Resolution Photography''. Boston: Focal Press. ISBN 0-240-80033-8</cite>


==Further reading== ==Further reading==
* {{Cite book |editor-last=Hummel |editor-first=Rob |year=2001 |title=American Cinematographer Manual |url=https://archive.org/details/americancinemato0000unse_p1a9/mode/2up |url-access=registration |edition=8th |location=Hollywood, Cal. |publisher=The ASC Press |isbn=0-935578-15-3 |oclc=49686312}}

*Hummel, Rob (editor). 2001. ''American Cinematographer Manual.'' 8th ed. Hollywood: ASC Press. ISBN 0-935578-15-3


==External links== ==External links==
{{commons|Depth of field|Depth of field}} {{Commons|2=Depth of field}}
{{Wikibooks|Maple|Depth of field for optical lens}}
* DOFMaster
* *
* * Simple depth of field and hyperfocal distance calculator
* —Interactive depth of field
* Luminous Landscape when <var>f</var>-number and subject image size are maintained
* —Interactive depth of field calculator with background blur simulation feature
* DOFMaster only under certain conditions
* —Demonstration of varying apertures on depth of field
* Bob Atkins’s
* —A quick explainer video for DOF
* Bob Atkins’s
* Jeff Conrad’s (]). Includes derivations of most DoF formulas
* Joe Englander’s (]). Alternative criteria for ]
* David Jacobson’s
* Rik Littlefield’s
* Dick Lyon’s (]). A format-independent look at DOF
* Justin Snodgrass’s .
* Paul van Walree’s .
* Paul van Walree’s . Includes derivation


{{photography subject}} {{Photography subject}}
{{Cinematic techniques}}
{{Authority control}}


{{DEFAULTSORT:Depth Of Field}}
] ]
]
] ]

]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]
]

Latest revision as of 10:22, 3 December 2024

Distance between the nearest and the furthest objects that are in focus in an image For other uses, see Depth of field (disambiguation).
A macro photograph showing the defocused effect of a shallow depth of field on a tilted page of text
This photo was taken with an aperture of f/22, creating a mostly in-focus background.
The same scene as above with an aperture of f/1.8. Notice how much blurrier the background appears in this photo.

The depth of field (DOF) is the distance between the nearest and the farthest objects that are in acceptably sharp focus in an image captured with a camera. See also the closely related depth of focus.

Factors affecting depth of field

Effect of aperture on blur and DOF (Depth of Field). The points in focus (2) project points onto the image plane (5), but points at different distances (1 and 3) project blurred images, or circles of confusion. Decreasing the aperture size (4) reduces the size of the blur spots for points not in the focused plane, so that the blurring is imperceptible, and all points are within the DOF.

For cameras that can only focus on one object distance at a time, depth of field is the distance between the nearest and the farthest objects that are in acceptably sharp focus in the image. "Acceptably sharp focus" is defined using a property called the "circle of confusion".

The depth of field can be determined by focal length, distance to subject (object to be imaged), the acceptable circle of confusion size, and aperture. Limitations of depth of field can sometimes be overcome with various techniques and equipment. The approximate depth of field can be given by:

DOF 2 u 2 N c f 2 {\displaystyle {\text{DOF}}\approx {\frac {2u^{2}Nc}{f^{2}}}}

for a given maximum acceptable circle of confusion c, focal length f, f-number N, and distance to subject u.

As distance or the size of the acceptable circle of confusion increases, the depth of field increases; however, increasing the size of the aperture (i.e., reducing f-number) or increasing the focal length reduces the depth of field. Depth of field changes linearly with f-number and circle of confusion, but changes in proportion to the square of the distance to the subject and inversely in proportion to the square of the focal length. As a result, photos taken at extremely close range (i.e., so small u) have a proportionally much smaller depth of field.

Rearranging the DOF equation shows that it is the ratio between distance and focal length that affects DOF;

DOF 2 N c ( u f ) 2 = 2 N c ( 1 1 M T ) 2 {\displaystyle {\text{DOF}}\approx 2Nc\left({\frac {u}{f}}\right)^{2}=2Nc\left(1-{\frac {1}{M_{T}}}\right)^{2}}

Note that M T = f u f {\textstyle M_{T}=-{\frac {f}{u-f}}} is the transverse magnification which is the ratio of the lateral image size to the lateral subject size.

Image sensor size affects DOF in counterintuitive ways. Because the circle of confusion is directly tied to the sensor size, decreasing the size of the sensor while holding focal length and aperture constant will decrease the depth of field (by the crop factor). The resulting image however will have a different field of view. If the focal length is altered to maintain the field of view, while holding the f-number constant, the change in focal length will counter the decrease of DOF from the smaller sensor and increase the depth of field (also by the crop factor). However, if the focal length is altered to maintain the field of view, while holding the aperture diameter constant, the DOF will remain constant.

Effect of lens aperture

For a given subject framing and camera position, the DOF is controlled by the lens aperture diameter, which is usually specified as the f-number (the ratio of lens focal length to aperture diameter). Reducing the aperture diameter (increasing the f-number) increases the DOF because only the light travelling at shallower angles passes through the aperture so only cones of rays with shallower angles reach the image plane. In other words, the circles of confusion are reduced or increasing the DOF.

For a given size of the subject's image in the focal plane, the same f-number on any focal length lens will give the same depth of field. This is evident from the above DOF equation by noting that the ratio u/f is constant for constant image size. For example, if the focal length is doubled, the subject distance is also doubled to keep the subject image size the same. This observation contrasts with the common notion that "focal length is twice as important to defocus as f/stop", which applies to a constant subject distance, as opposed to constant image size.

Motion pictures make limited use of aperture control; to produce a consistent image quality from shot to shot, cinematographers usually choose a single aperture setting for interiors (e.g., scenes inside a building) and another for exteriors (e.g., scenes in an area outside a building), 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.

Aperture = f/1.4. DOF = 0.8 cmAperture = f/4.0. DOF = 2.2 cmAperture = f/22. DOF = 12.4 cmDepth of field for different values of aperture using 50 mm objective lens and full-frame DSLR camera. Focus point is on the first blocks column.

Effect of circle of confusion

Precise focus is only possible at an exact distance from a lens; at that distance, a point object will produce a small spot image. Otherwise, a point object will produce a larger or blur spot image that is typically and approximately a circle. When this circular spot is sufficiently small, it is visually indistinguishable from a point, and appears to be in focus. The diameter of 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 depends on how the final image will be used. The circle of confusion as 0.25 mm for an image viewed from 25 cm away is generally accepted.

For 35 mm motion pictures, the image area on the film is roughly 22 mm by 16 mm. The limit of tolerable error was traditionally set at 0.05 mm (0.0020 in) diameter, while for 16 mm film, where the size is about half as large, the tolerance is stricter, 0.025 mm (0.00098 in). More modern practice for 35 mm productions set the circle of confusion limit at 0.025 mm (0.00098 in).

Camera movements

See also: View camera

The term "camera movements" refers to swivel (swing and tilt, in modern terminology) and shift adjustments of the lens holder and the film holder. These features have been in use since the 1800s and are still in use today on view cameras, technical cameras, cameras with tilt/shift or perspective control lenses, etc. Swiveling the lens or sensor causes the plane of focus (POF) to swivel, and also causes the field of acceptable focus to swivel with the POF; and depending on the DOF criteria, to also change the shape of the field of acceptable focus. While calculations for DOF of cameras with swivel set to zero have been discussed, formulated, and documented since before the 1940s, documenting calculations for cameras with non-zero swivel seem to have begun in 1990.

More so than in the case of the zero swivel camera, there are various methods to form criteria and set up calculations for DOF when swivel is non-zero. There is a gradual reduction of clarity in objects as they move away from the POF, and at some virtual flat or curved surface the reduced clarity becomes unacceptable. Some photographers do calculations or use tables, some use markings on their equipment, some judge by previewing the image.

When the POF is rotated, the near and far limits of DOF may be thought of as wedge-shaped, with the apex of the wedge nearest the camera; or they may be thought of as parallel to the POF.

Object-field calculation methods

Traditional depth-of-field formulas can be hard to use in practice. As an alternative, the same effective calculation can be done without regard to the focal length and f-number. Moritz von Rohr and later Merklinger observe that the effective absolute aperture diameter can be used for similar formula in certain circumstances.

Moreover, traditional depth-of-field formulas assume equal acceptable circles of confusion for near and far objects. Merklinger 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.

Other authors such as Ansel Adams have taken the opposite position, maintaining that slight unsharpness in foreground objects is usually more disturbing than slight unsharpness in distant parts of a scene.

Overcoming DOF limitations

Some methods and equipment allow altering the apparent DOF, and some even allow the DOF to be determined after the image is made. These are based or supported by computational imaging processes. For example, focus stacking combines multiple images focused on different planes, resulting in an image with a greater (or less, if so desired) apparent depth of field than any of the individual source images. Similarly, in order to reconstruct the 3-dimensional shape of an object, a depth map can be generated from multiple photographs with different depths of field. Xiong and Shafer concluded, in part, "... the improvements on precisions of focus ranging and defocus ranging can lead to efficient shape recovery methods."

Another approach is focus sweep. The focal plane is swept across the entire relevant range during a single exposure. This creates a blurred image, but with a convolution kernel that is nearly independent of object depth, so that the blur is almost entirely removed after computational deconvolution. This has the added benefit of dramatically reducing motion blur.

Light Scanning Photomacrography (LSP) is another technique used to overcome depth of field limitations in macro and micro photography. This method allows for high-magnification imaging with exceptional depth of field. LSP involves scanning a thin light plane across the subject that is mounted on a moving stage perpendicular to the light plane. This ensures the entire subject remains in sharp focus from the nearest to the farthest details, providing comprehensive depth of field in a single image. Initially developed in the 1960s and further refined in the 1980s and 1990s, LSP was particularly valuable in scientific and biomedical photography before digital focus stacking became prevalent.

Other technologies use a combination of lens design and post-processing: Wavefront coding is a method by which controlled aberrations are added to the optical system so that the focus and depth of field can be improved later in the process.

The lens design can be changed even more: in colour apodization the lens is modified such that each colour channel has a different lens aperture. For example, the red channel may be f/2.4, green may be f/2.4, whilst the blue channel may be f/5.6. Therefore, the blue channel will have a greater depth of field than the other colours. The image processing identifies blurred regions in the red and green channels and in these regions copies the sharper edge data from the blue channel. The result is an image that combines the best features from the different f-numbers.

At the extreme, a plenoptic camera captures 4D light field information about a scene, so the focus and depth of field can be altered after the photo is taken.

Diffraction and DOF

Diffraction causes images to lose sharpness at high f-numbers (i.e., narrow aperture stop opening sizes), and hence limits the potential depth of field. (This effect is not considered in the above formula giving approximate DOF values.) In general photography this is rarely an issue; because large f-numbers typically require long exposure times to acquire acceptable image brightness, motion blur may cause greater loss of sharpness than the loss from diffraction. However, diffraction is a greater issue in close-up photography, and the overall image sharpness can be degraded as photographers are trying to maximize depth of field with very small apertures.

Hansma and Peterson have discussed determining the combined effects of defocus and diffraction using a root-square combination of the individual blur spots. Hansma's approach determines the f-number that will give the maximum possible sharpness; Peterson's approach determines the minimum f-number that will give the desired sharpness in the final image and yields a maximum depth of field for which the desired sharpness can be achieved. In combination, the two methods can be regarded as giving a maximum and minimum f-number for a given situation, with the photographer free to choose any value within the range, as conditions (e.g., potential motion blur) permit. Gibson gives a similar discussion, additionally considering blurring effects of camera lens aberrations, enlarging lens diffraction and aberrations, the negative emulsion, and the printing paper. Couzin gave a formula essentially the same as Hansma's for optimal f-number, but did not discuss its derivation.

Hopkins, Stokseth, and Williams and Becklund have discussed the combined effects using the modulation transfer function.

DOF scales

Many lenses include scales that indicate the DOF for a given focus distance and f-number; the 35 mm lens in the image is typical. That lens includes distance scales in feet and meters; when a marked distance is set opposite the large white index mark, the focus is set to that distance. The DOF scale below the distance scales includes markings on either side of the index that correspond to f-numbers. When the lens is set to a given f-number, the DOF extends between the distances that align with the f-number markings.

Photographers can use the lens scales to work backwards from the desired depth of field to find the necessary focus distance and aperture. For the 35 mm lens shown, if it were desired for the DOF to extend from 1 m to 2 m, focus would be set so that index mark was centered between the marks for those distances, and the aperture would be set to f/11.

On a view camera, the focus and f-number can be obtained by measuring the depth of field and performing simple calculations. Some view cameras include DOF calculators that indicate focus and f-number without the need for any calculations by the photographer.

  • Detail from a lens set to f/11. The point half-way between the 1 m and 2 m marks, the DOF limits at f/11, represents the focus distance of approximately 1.33 m (the reciprocal of the mean of the reciprocals of 1 and 2 being 4/3). Detail from a lens set to f/11. The point half-way between the 1 m and 2 m marks, the DOF limits at f/11, represents the focus distance of approximately 1.33 m (the reciprocal of the mean of the reciprocals of 1 and 2 being 4/3).
  • DOF scale on Tessina focusing dial DOF scale on Tessina focusing dial

Hyperfocal distance

This section is an excerpt from Hyperfocal distance.
Minox LX camera with hyperfocal red dot
Nikon 28mm f/2.8 lens with markings for the depth of field. The lens is set at the hyperfocal distance for f/22. The orange mark corresponding to f/22 is at the infinity mark (∞). Focus is acceptable from under 0.7 m to infinity.
Minolta 100–300 mm zoom lens. The depth of field, and thus hyperfocal distance, changes with the focal length as well as the f-stop. This lens is set to the hyperfocal distance for f/32 at a focal length of 100 mm.

In optics and photography, hyperfocal distance is a distance from a lens beyond which all objects can be brought into an "acceptable" focus. As the hyperfocal distance is the focus distance giving the maximum depth of field, it is the most desirable distance to set the focus of a fixed-focus camera. The hyperfocal distance is entirely dependent upon what level of sharpness is considered to be acceptable.

The hyperfocal distance has a property called "consecutive depths of field", where a lens focused at an object whose distance from the lens is at the hyperfocal distance H will hold a depth of field from H/2 to infinity, if the lens is focused to H/2, the depth of field will be from H/3 to H; if the lens is then focused to H/3, the depth of field will be from H/4 to H/2, etc.

Thomas Sutton and George Dawson first wrote about hyperfocal distance (or "focal range") in 1867. Louis Derr in 1906 may have been the first to derive a formula for hyperfocal distance. Rudolf Kingslake wrote in 1951 about the two methods of measuring hyperfocal distance.

Some cameras have their hyperfocal distance marked on the focus dial. For example, on the Minox LX focusing dial there is a red dot between 2 m and infinity; when the lens is set at the red dot, that is, focused at the hyperfocal distance, the depth of field stretches from 2 m to infinity. Some lenses have markings indicating the hyperfocal range for specific f-stops, also called a depth-of-field scale.
Zeiss Ikon Contessa with red marks for hyperfocal distance 20 ft at f/8

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, so the ratio is 1:∞; as the subject distance decreases, near:far DOF ratio increases, approaching unity at high magnification. For large apertures at typical portrait distances, the ratio is still close to 1:1.

DOF formulae

This section covers some additional formula for evaluating depth of field; however they are all subject to significant simplifying assumptions: for example, they assume the paraxial approximation of Gaussian optics. They are suitable for practical photography, lens designers would use significantly more complex ones.

Focus and f-number from DOF limits

For given near and far DOF limits DN and DF, the required f-number is smallest when focus is set to

s = 2 D N D F D N + D F , {\displaystyle s={\frac {2D_{\mathrm {N} }D_{\mathrm {F} }}{D_{\mathrm {N} }+D_{\mathrm {F} }}},}

the harmonic mean of the near and far distances. In practice, this is equivalent to the arithmetic mean for shallow depths of field. Sometimes, view camera users refer to the difference vNvF as the focus spread.

Foreground and background blur

If a subject is at distance s and the foreground or background is at distance D, let the distance between the subject and the foreground or background be indicated by

x d = | D s | . {\displaystyle x_{\mathrm {d} }=|D-s|.}

The blur disk diameter b of a detail at distance xd from the subject can be expressed as a function of the subject magnification ms, focal length f, f-number N, or alternatively the aperture d, according to

b = f m s N x d s ± x d = d m s x d D . {\displaystyle b={\frac {fm_{\mathrm {s} }}{N}}{\frac {x_{\mathrm {d} }}{s\pm x_{\mathrm {d} }}}=dm_{\mathrm {s} }{\frac {x_{\mathrm {d} }}{D}}.}

The minus sign applies to a foreground object, and the plus sign applies to a background object.

The blur increases with the distance from the subject; when b is less than the circle of confusion, the detail is within the depth of field.

See also

Explanatory notes

  1. Strictly, at an exact distance from a plane.
  2. Notwithstanding that the f-number is derived from the focal length.
  3. Englander describes a similar approach in his paper Apparent Depth of Field: Practical Use in Landscape Photography; Conrad discusses this approach, under Different Circles of Confusion for Near and Far Limits of Depth of Field, and The Object Field Method, in Depth of Field in Depth.
  4. Peterson does not give a closed-form expression for the minimum f-number, though such an expression obtains from simple algebraic manipulation of his Equation 3.
  5. The analytical section at the end of Gibson (1975) was originally published as "Magnification and Depth of Detail in Photomacrography" in the Journal of the Photographic Society of America, Vol. 26, No. 6, June 1960.
  6. The focus distance to have the DOF extend between given near and far object distances is the harmonic mean of the object conjugates. Most helicoid-focused lenses are marked with image plane-to-subject distances, so the focus determined from the lens distance scale is not exactly the harmonic mean of the marked near and far distances.

References

Citations

  1. Salvaggio & Stroebel 2009, pp. 110-.
  2. Barbara London; Jim Stone; John Upton (2005). Photography (8th ed.). Pearson. p. 58. ISBN 978-0-13-448202-6.
  3. Elizabeth Allen; Sophie Triantaphillidou (2011). The Manual of Photography. Taylor & Francis. pp. 111–. ISBN 978-0-240-52037-7.
  4. "Depth of field". Stanford Computer Graphics Laboratory.
  5. Hecht, Eugene (2017). "5.2.3 Thin Lenses". Optics (5th ed.). Pearson. p. 172. ISBN 978-1-292-09693-3.
  6. Nasse, H. H. (March 2010). "Depth of Field and Bokeh" (PDF). Zeiss Lenspire (Whitepaper).
  7. "Digital Camera Sensor Sizes: How it Influences Your Photography". Cambridge In Colour.
  8. Malan, Francois (6 April 2018). "Sensor Size, Perspective and Depth of Field". Photography Life.
  9. Vinson, Jason (22 January 2016). "The Smaller the Sensor Size, the Shallower Your Depth of Field". Fstoppers.
  10. "Why Does a Small Aperture Increase Depth of Field?". 18 May 2012.
  11. Reichmann, Michael (13 January 2009). "DOF2". Luminous Landscape.
  12. "Ken Rockwell".
  13. "photoskop: Interactive Photography Lessons". April 25, 2015.
  14. Savazzi 2011, p. 109.
  15. Film and Its Techniques. University of California Press. 1966. p. 56. Retrieved 24 February 2016.
  16. Thomas Ohanian and Natalie Phillips (2013). Digital Filmmaking: The Changing Art and Craft of Making Motion Pictures. CRC Press. p. 96. ISBN 9781136053542. Retrieved 24 February 2016.
  17. Merklinger 1993, pp. 49–56.
  18. Tillmanns 1997, p. 71.
  19. ^ Merklinger 1992.
  20. Adams 1980, p. 51.
  21. Xiong, Yalin, and Steven A. Shafer. "Depth from focusing and defocusing." Computer Vision and Pattern Recognition, 1993. Proceedings CVPR'93., 1993 IEEE Computer Society Conference on. IEEE, 1993.
  22. Bando et al. "Near-Invariant Blur for Depth and 2D Motion via Time-Varying Light Field Analysis." ACM Transactions on Graphics, Vol. 32, No. 2, Article 13, 2013.
  23. Root, N. (January 1991) "A simplified unit for making deep-field (scanning) Macrographs". Journal of Biological Photography, Vol. 59, No. 1, pp. 3-8.
  24. Clarke, T. "Constructing a Scanning Light Photomacrography System." The McCrone Group (accessed July 7, 2024).
  25. Mary, D.; Roche, M.; Theys, C.; Aime, C. (2013). "Introduction to Wavefront Coding for Incoherent Imaging" (PDF). EAS Publications Series. 59: 77–92. Bibcode:2013EAS....59...77R. doi:10.1051/eas/1359005. ISSN 1633-4760. S2CID 120502243. Archived (PDF) from the original on 2022-06-14.
  26. Kay, Mather & Walton 2011.
  27. ^ Gibson 1975, p. 64.
  28. Gibson 1975, p. 53.
  29. Lefkowitz 1979, p. 84.
  30. Hansma 1996.
  31. Peterson 1996.
  32. Couzin 1982.
  33. Hopkins 1955.
  34. Stokseth 1969.
  35. Williams & Becklund 1989.
  36. "Depth of Field in Depth", Jeff Conrad
  37. "Photographic Lenses Tutorial", David M. Jacobson, 26 October 1996
  38. Ray 1994, p. 315.
  39. Tillmanns 1997, p. 67-68.
  40. Ray 1994, p. 230-231.
  41. Kingslake, Rudolf (1951). Lenses in Photography: The Practical Guide to Optics for Photographers. Garden City, NY: Garden City Press.
  42. Sutton, Thomas; Dawson, George (1867). A Dictionary of Photography. London: Sampson Low, Son & Marston.
  43. Minolta (1985). Minolta MD Zoom Lenses owner's manual. p. 9.
  44. Conrad, Jeff. "Depth of Field in Depth" (PDF). Large Format Photography Info. Retrieved 10 February 2023.
  45. Hansma 1996, p. 55.

General and cited references

Further reading

External links

Photography
Equipment
Terminology
Genres
Techniques
Composition
History
Regional
Digital photography
Color photography
Photographic
processing
Lists
Related
Cinematic techniques
Lighting
Sound
Shooting
Field size
Camera placement
Camera angle
Camera movement
Lens effects
Other techniques
Special effects
Practical
  • Aerial rigging (wire-flying)
  • Air bladder effect
  • Animatronics
  • Bullet hit squib
  • Costumed character
  • Creature suit
  • Dead-character costume
  • Kitbashing
  • Miniature effect (hanging)
  • Prosthetic makeup
  • Puppetry
  • Pyrotechnics
  • Rubber mask
  • Matte painting
  • Sugar glass
  • Theatrical blood
  • In-camera
    Visual
    Categories: