64

There are several questions here about the definition of depth of field, about focal length, and about subject distance. And of course there's the basic how does aperture affect my photographs. And plenty of how do I get super-shallow d.o.f questions. There's related questions like this one. But there's no be-all-end-all question asking:

What exactly determines depth of field in a photograph?

Is it just a property of the lens? Can lenses be designed to give more depth of field for the same aperture and focal length? Does it change with camera sensor size? Does it change with print size? How do those last two relate?

54

Ok for a change I'm going to dispense with the formulas, photos of rulers and definitions of "magnification" and go with what you actually experience in practice. The major factors that actually matter to shooting are:

  • Aperture. Wide aperture lenses give you a shallower depth of field. This is probably the least controversial factor! This is important as some lenses have much larger apertures e.g. 18-55 f/3.5-5.6 vs. 50 f/1.8

  • Subject distance. This is a really important consideration. Depth of field gets drastically shallower when you start to get really close. This is important as at macro focussing distances DoF is a major problem. It also means you can get shallow DoF regardless of aperture if you get close enough, and that if you want deep DoF in low light compose to focus further away.

  • Focal length. This does affect depth of field, but only in certain ranges, when maintaining subject size. Wide lenses have very deep depth of field at most subject distances. Once you get past a certain point, DoF changes very little with focal length. This is important again because if you want to increase / decrease DoF you can use focal length to do this whilst still filling the frame with your subject.

  • Sensor size. This affects DoF when you maintain the same subject distance and field of view between sensor sizes. The bigger the sensor the shallower the depth of field. DSLRs have much bigger sensors than compacts, and so for the same FoV and f-ratio they have shallower DoF. This is important because by the same token cropping images increases DoF when maintaining the same final output size, as it's akin to using a smaller sensor.

  • 2
    Can't you sum that all up in two factors: the aperture and the size of the subject on the sensor? – Kristof Claes Mar 10 '11 at 7:29
  • 3
    +1 for throwing out the numbers and making it practical -- I've always wondered how anybody can judge something to be in or out of focus to three decimal places with a straight face. – user2719 Mar 10 '11 at 10:42
  • 6
    @Kristof you can, but I find that winds up confusing people, instead I wanted to concentrate on how four common inputs can be used to manipulate DoF in normal shooting conditions. – Matt Grum Mar 10 '11 at 11:05
  • @Kristof it can be summarized in a single concept: the hiperfocal distance. But it's far more intuitive to use the factors given by Matt – pau.estalella Sep 1 '11 at 9:23
  • 1
    The last point is somewhat incorrect/unclear. Given different sensor sizes, but maintaining the same field of view really means changing focal lengths, which you covered in a previous point. Changing the sensor size for a given or fixed focal length does not change the DOF, as the DOF is a function of the lens parameters (focal length, f/#, and object distance). – daaxix Apr 11 '14 at 5:43
36

This is an excellent question, and one that has different answers depending on context. You mentioned several specific questions each of which might warrant their own answers. I'll try to address them more as a unified whole here.


Q. Is it just a property of the lens?
A. Simply put, no, although if you ignore CoC, one could (given the math) make the argument that it is. Depth of field is a "fuzzy" thing, and depends a lot on viewing context. By that, I mean it depends on how large the final image being viewed is in relation to the native resolution of the sensor; the visual acuity of the viewer; the aperture used when taking the shot; the distance to subject when taking the shot.

Q. Can lenses be designed to give more depth of field for the same aperture and focal length? A. Given the math, I would have to say no. I am not an optical engineer, so take what I say here with the necessary grain of salt. I tend to follow the math, though, which is pretty clear about depth of field.

Q. Does it change with camera sensor size?
A. Ultimately, it depends here. More important than the size of the sensor would be the minimum Circle of Confusion (CoC) of the imaging medium. Curiously, the Circle of Confusion of an imaging medium is not necessarily an intrinsic trait, as the minimum acceptable CoC is often determined by the maximum size you intend to print at. Digital sensors do have a fixed minimum size for CoC, as the size of a single sensel is as small as any single point of light can get (in a Bayer sensor, the size of a quartet of sensels is actually the smallest resolution.)

Q. Does it change with print size?
A. Given the answer to the previous question, possibly. Scaling an image above, or even below, its "native" print size can affect what value you use for the minimum acceptable CoC. Therefor, yes, the size(es) you intend to print at do play a role, however I would say the role is generally minor unless you print at very large sizes.


Mathematically, it is clear why DoF is not simply a function of the lens, and involves either the imaging medium or print size from a CoS perspective. To clearly specify the factors of DoF:

Depth of Field is a function of Focal Length, Effective Aperture, Distance to Subject and Minimum Circle of Confusion. Minimum Circle of Confusion is where things get fuzzy, as that can either be viewed as a function of the imaging medium, or a function of print size.

There are several mathematical formulas that can be used to calculate the depth of field. Sadly, there does not seem to be a single formula that accurately produces a depth of field at any distance to subject. Hyperfocal Distance, or the distance where you effectively get maximum DoF, can be calculated as so:

H = f2 / (N * c)

Where:

H = hyperfocal distance
f = focal length
N = f-number (relative aperture)
c = circle of confusion

The circle of confusion is a quirky value here, so we'll discuss that later. A useful average CoC for digital sensors can be assumed at 0.021mm. This formula gives you the hyperfocal distance, which isn't exactly telling you what your depth of field is, rather it tells you the subject distance you should focus at to get maximum depth of field. To calculate the actual Depth of Field, you need an additional calculation. The formula below will provide DoF for moderate to large subject distances, which more specifically means when the distance to subject is larger than the focal length (i.e. non-macro shots):

Dn = (H * s) / (H + s)
Df = (H * s) / (H - s) { for s < H

DOF = Df - Dn
DOF = (2 * H * s) / (H2 - s2) { for s < H

Where:

Dn = Near limit of DoF
Df = Far limit of DoF
H = Hyperfocal distance (previous formula)
s = Subject distance (distance at which the lens is focused, may not actually be "the subject")

When the subject distance is the hyperfocal distance:

Df = 'infinity' Dn = H / 2

When the subject distance is greater than the hyperfocal distance:

Df = infinite Dn = 'infinity'

The term 'infinity' here is not used in its classical sense, rather it is more of an optical engineering term meaning a focal point beyond the hyperfocal distance. The full formula for calculating DOF directly, without first calculating hyperfocal distance, as as follows (substitute for H):

DOF = 2Ncf2s2 / (f4 - N2c2s2)

If we ignore print size and film, for a given digital sensor with a specific pixel density, DoF is a function of focal length, relative aperture, and subject distance. From that, one could make the argument that DoF is purely a function of the lens, as "subject distance" refers to the distance at which the lens is focused, which would also be a function of the lens.

In the average case, one can assume that CoC is always the minimum achievable with a digital sensor, which these days rolls in at an average of 0.021mm, although a realistic range covering APS-C, APS-H, and Full Frame sensors covers anywhere from 0.015mm - 0.029mm. For most common print sizes, around 13x19" or lower, an acceptable CoC is about 0.05mm, or about twice the average for digital sensors. If you are the type who likes to print at very large sizes, CoC could be a factor (requiring less than 0.01mm), and your apparent DoF in a big enlargement will be smaller than you calculate mathematically.


The above formulas only apply when the distance s appreciably is larger than the focal length of the lens. As such, it breaks down for macro photography. When it comes to macro photography, it is much easier to express DoF in terms of focal length, relative aperture, and subject magnification (i.e. 1.0x):

DOF = 2Nc * (((m/P) + 1)/m2)

Where:

N = f-number (relative aperture)
c = Minimum CoC
m = magnification
P = pupil magnification

The formula is fairly simple, outside of the pupil magnification aspect. A true, properly built macro lens will have largely equivalent entrance and exit pupils (the size of the aperture as viewed through the front of the lens (entrance) and the size of the aperture as viewed from the back of the lens (exit)), although they may not be exactly identical. In such cases, one can assume a value of 1 for P, unless you have reasonable doubt.

Unlike DoF for moderate to large subject distances, with 1:1 (or better) macro photography, you are ALWAYS enlarging for print, even if you print at 2x3". At common print sizes such as 8x10, 13x19, etc., the factor of enlargement can be considerable. One should assume CoC is at the minimum resolvable for your imaging medium, which is still likely not small enough to compensate for apparent DoF shrink due to enlargement.


Complex mathematics aside, DoF can be intuitively visualized with a basic understanding of light, how optics bend light, and what effect the aperture has on light.

How does aperture affect depth of field? It ultimately boils down to the angles of the rays of light that actually reach the image plane. At a wider aperture, all rays, including those from the outer edge of the lens, reach the image plane. The diaphragm does not block any incoming rays of light, so the maximum angle of light that can reach the sensor is high (more oblique). This allows the maximum CoC to be large, and progression from a focused point of light to maximum CoC is rapid:

enter image description here

At a narrower aperture, the diaphragm DOES block some light from the periphery of the light cone, while light from the center is allowed through. The maximum angle of light rays reaching the sensor is low (less oblique). This causes the maximum CoC to be smaller, and progression from a focused point of light to maximum CoC is slower. (In an effort to keep the diagram as simple as possible, the effect of spherical aberration was ignored, so the diagram is not 100% accurate, but should still demonstrate the point):

enter image description here

Aperture changes the rate of CoC growth. Wider apertures increase the rate at which out of focus blur circles grow, therefor DoF is shallower. Narrower apertures reduce the rate at which out of focus blur circles grow, therefor DoF is deeper.


Proofs

As with everything, one should always prove the concept by actually running the math. Here are some intriguing results when running the formulas above with F# code in the F# Interactive command line utility (easy for anyone to download and double check):

(* The basic formula for depth of field *)
let dof (N:float) (f:float) (c:float) (s:float) = (2.0 * N * c * f**2. * s**2.)/(f**4. - N**2. * c**2. * s**2.);;

(* The distance to subject. 20 feet / 12 inches / 2.54 cm per in / 10 mm per cm *)
let distance = 20. / 12. / 2.54 / 10.;;

(* A decent average minimum CoC for modern digital sensors *)
let coc = 0.021;;

(* DoF formula that returns depth in feet rather than millimeters *)
let dof_feet (N:float) (f:float) (c:float) (s:float) =
  let dof_mm = dof N f c s
  let dof_f = dof_mm / 10. / 2.54 / 12.
  dof_f;;

dof_feet 1.4 50. coc distance
> val it : float = 2.882371793
dof_feet 2.8 100. coc distance
> val it : float = 1.435623728

The output of the above program is intriguing, as it indicates that depth of field is indeed directly influenced by focal length as an independent factor from relative aperture, assuming only focal length changes and everything else remains equal. The two DoF's converge at f/1.4 and f/5.6, as demonstrated by the above program:

 dof_feet 1.4 50. coc distance
 > val it : float = 2.882371793
 dof_feet 5.6 100. coc distance
 > val it : float = 2.882371793

Intriguing results, if a little non-intuitive. Another convergence occurs when the distances are adjusted, which provides a more intuitive correlation:

let d1 = 20. * 12. * 2.54 * 10.;;
let d2 = 40. * 12. * 2.54 * 10.;;

dof_feet 2.8 50. coc d1;;
> val it : float = 5.855489431
dof_feed 2.8 100. coc d2;;
> val it : float = 5.764743587
  • Apologies. I was trying to keep the concepts separate so I could keep the diagrams simpler, however they are indeed inexorably linked in real life. My attempts to exclude aperture from the focal length diagram seems to have had the opposite effect, so I've removed them. The real point I was trying to make was simply that DoF is ultimately determined by the divergence in the angle of light between in and out of focus point light sources, or the "rate of change in CoC". The faster the rate of change, the thinner the DoF. – jrista Mar 10 '11 at 4:17
  • @jrista: I certainly agree with that. Although it does add some complexity, it might be worth mentioning why a change in focal length does not affect DoF (as things are usually measured). It took me a while to figure that out. – Jerry Coffin Mar 10 '11 at 4:41
  • I've attempted to add a short/simple explanation of how focal length affects DoF at the end of the answer I posted. I'm not sure if it's really adequate though -- I'd welcome any comments... – Jerry Coffin Mar 10 '11 at 5:03
  • 2
    @jrista: I don't know -- the only thing I can think of is that some people automatically consider "math" and "art" total opposites, so addressing anything artistic via math bothers them. IMO, that's pretty sad though: there's a lot of math behind most art (e.g., music theory is also almost entirely mathematical). and for that matter, I'd say math itself should be considered an art. – Jerry Coffin Mar 10 '11 at 16:55
  • 1
    This is a really gret answer, and I appreciate the math and the diagrams. I switched the "accepted" answer over to the shorter "just the practicals" one so that newer photographers interested in the question see that first. – mattdm Jul 3 '11 at 20:33
11

@Matt Grum's comment is quite good: you do have to be really careful to specify conditions, or you can end up with three people saying things that seem to conflict, but are really just talking about different conditions.

First, to define DoF meaningfully, you need to specify the amount of "blur" you're willing to accept as sufficiently sharp. Depth of field is basically just measuring when something that started as a point in the original will be blurred enough to become larger than whatever size you've picked out.

This typically changes with the size at which you print a picture -- bigger pictures are normally viewed from a greater distance, so more blur is acceptable. Most lens markings, etc., are defined based on a print around 8x10 being viewed at roughly arm's length distance (a couple of feet or so). The math for this works out fairly simple: start with an estimate of visual acuity, which will be measured as an angle. Then you just figure out what size that angle works out to at a specified distance.

Assuming we pick one number for that and stick to it, depth of field only depends on two factors: the aperture and the reproduction ratio. The larger the reproduction ratio (i.e., the larger an item appears on the sensor/film compared to its size in real life) the less depth of field you get. Likewise, the larger the aperture (larger diameter opening -- smaller f/stop number) the less depth of field you get.

All the other factors (sensor size and focal length being the two more obvious) only affect depth of field to the extent that they affect the reproduction ratio or the aperture.

For example, even a really fast (large aperture) lens that has a short focal length makes it fairly difficult to high reproduction ratio. For example, if you take a picture of a person with a 20mm f/2 lens, the lens has to practically touch them before you get a very large reproduction ratio. At the opposite extreme, longer lenses often appear to have less depth of field because they make it relatively easy to achieve a large reproduction ratio.

However, if you really do hold the reproduction ratio constant, the depth of field really is constant. For example, if you have a 20mm lens and a 200 mm lens and take a picture with each at (say) f/4, but take the picture with the 200 mm from 10 times as far away so the subject really is the same size, the two theoretically have the same depth of field. That happens so rarely, however, that it's mostly theoretical.

The same is true with sensor size: in theory, if the reproduction ratio is held constant, the sensor size is completely irrelevant. From a practical viewpoint, however sensor size matters for a very simple reason: regardless of the sensor size, we generally want the same framing. That means that as the sensor size increases, we nearly always use large reproduction ratios. For example, a typical head and shoulders shot of a person might cover a height of, say, 50 cm (I'll use metric, to match how sensor sizes are usually quoted). On an 8x10 view camera, that works out to about a 1:2 reproduction ratio, giving very little depth of field. On a full 35mm size sensor, the reproduction ratio works out to about 1:14, giving a lot more depth of field. On a compact camera with, say, an 6.6x8.8 mm sensor, it works out to about 1:57.

If we used the compact camera at the same 1:2 reproduction ratio as the 8x10, we'd get the same depth of field -- but instead of head and shoulders, we'd be taking a picture of part of one eyeball.

There is one more factor to consider though: with a shorter lens, objects in the background get smaller a lot "faster" than with a longer lens. For example, consider a person with a fence 20 feet behind them. If you take a picture from 5 feet away with a 50 mm lens, the fence is 5 times as far away as the person, so it looks comparatively small. If you use a 200 mm lens instead, you have to back away 20 feet for the person to be the same size -- but now the fence is only twice as far away instead of 5 times as far away, so it looks comparatively large, making the fence (and degree to which it's blurred) much more apparent in a picture.

Edit2: Since I (sort of) persuaded @jrista to remove his diagram relating focal length to depth of field, I should probably try to explain why there's not a relationship between focal length and depth of field -- at least when you look at things the way they're normally measured in photography.

Specifically, a photographic aperture (nowadays) is universally measured as a fraction of the focal length -- it's written like a fraction (f/number) because that's what it is.

For example, it's pretty well known that at f/1.4 you'll get less depth of field than at f/2.8. What may not immediately be so obvious is that (for example) a 50 mm f/1.4 lens and a 100 mm f/2.8 lens have the same effective diameter. It's the wider angle at which light rays enter the 50 mm lens that gives it less depth of field than the 100 mm lens, even though the two have exactly the same physical diameter.

On the other hand, if you change the focal length but maintain the same photographic aperture (f/stop), the depth of field also remains constant because as the focal length increases the diameter increases proportionally so the rays of light are getting focused on the film/sensor from the same angles.

It's probably also worth pointing out that this (I believe, anyway) why catadioptric lenses are noted for their lack of depth of field. In a normal lens, even when you're using a large aperture some of the light still enters through the central part of the lens, so a small percentage of the light is focused as if you were shooting at a smaller aperture. With a catadioptric lens, however, you have a central obstruction, which blocks light from entering toward the center, so all of the light enters from the outer parts of the lens. This means all of the light has to be focused at a relatively shallow angle, so as the image goes out of focus, essentially all of it goes out of focus together (or a much higher percentage anyway) instead of having at least a little that's still in focus.

As an aside, I think it's worth considering what an incredible stroke of brilliance it was to start measuring the diameters of lenses as a fraction of the focal length. In a single stroke of genius it makes two separate (and seemingly unrelated) issues: exposure and depth of field controllable and predictable. Trying to predict (much less control) exposure or depth of field (not to mention both) before that innovation must have been tremendously difficult by comparison...

  • 1
    @jrista: That doesn't surprise me at all. At the same distance, the 100 mm lens will have twice the reproduction ratio, so we expect less DoF. The same f/stop and same reproduction ratio will give the same DoF, so with both at f/2.8, we expect the same DoF when the 100mm is twice as far away. – Jerry Coffin Mar 10 '11 at 5:38
  • 1
    @Jerry: All things being equal, I guess (based on your updated answer) that I would have expected a 50/1.4 and 100/2.8 to have the same DoF for a common CoC and Subject Distance. However, given the math, you not only need to halve the aperture at 100mm, but also double the distance, to achieve the same exact DoF. As such, your earlier explanation about focal length and aperture is...I guess not inaccurate, just lacking specificity. The statement is only true if we assume that another variable, distance, also changes. If CoC and distance are fixed, then your statement is inaccurate. – jrista Mar 10 '11 at 6:08
  • 1
    @Jerry: Aye, the relationship is quadratic, which I do think makes the whole thing a bit counterintuitive. I think it is simpler to discuss DoF when only one factor is changed at a time, rather than two. For an experienced photographer, the relationship becomes second nature, and it only takes a fleeting thought to know that if you wish to maintain DoF when you change lenses, you need to change the distance as well. In a technical discussion about DoF, however, I think it is important to be clear about what factors are changing and how those changes affect the outcome. ATBE! :) – jrista Mar 10 '11 at 6:26
  • 1
    @Jerry: I guess that would be true. That would mean you know the magnification factors of each of your lenses at any focus distance, though. Some lenses have magnification factor scales on them, however they tend to be fairly rough and imprecise. Unless you had a handy cheat sheet, or a camera that calculated magnification for you, I'm not sure how useful it is to use reproduction ratio over focal length and distance from a practical standpoint. Or am I missing something simple about calculating magnification? – jrista Mar 10 '11 at 6:49
  • 1
    @jrista: I don't think it really means you need to know the mag factor of any lens -- you just have to recognize that for a given camera, tighter framing reduces DoF -- and changing lenses will not change that; as long as you move/zoom to maintain the same framing, you'll get the same DoF unless you change the aperture. – Jerry Coffin Mar 10 '11 at 19:14
7

There are only two factors that actually affect DOF - aperture and magnification - yes switching distance, sensor size, focal length, display size, and viewing distance appear to have an effect but they are all just changes in the size of the image (the subject/part-you're-looking at) as seen by the eye that views it - the magnification. Kristof Claes summarized it a few posts earlier.

See the Focal Guide book 'Lenses' as a reference if you don't believe it.

Every amateur magazine (and ezine now) loves to say 'switch to a wide angle lens for more depth of field'... but if you keep the subject the same size in the frame (by moving in closer) then the sharp bits have the same limits. Walking backwards with the lens you've got on will give more DOF too, but maybe you like the shot the way it is already set up?

What you will see are more gradual cut-offs in sharpness so that the background & foreground appear sharper (not sharp as if within the DOF!) hence the lovely out of focus backgrounds with long lenses and the nearly sharp ones with wide angles.

  • Hi Derek! Welcome to Stack Exchange and thanks for the answer. Is this the book you are referring to? – mattdm Jul 3 '11 at 14:23
  • Yes, only aperture and magnification. I learned that from Herbert Keppler many years ago. – Mike Sowsun Aug 25 '16 at 16:28
1

What exactly determines depth of field in a photograph?

  • Is it just a property of the lens?

  • Can lenses be designed to give more depth of field for the same aperture and focal length?

  • Does it change with camera sensor size? Does it change with print size? How do those last two relate?

See also this question: "How do you determine the acceptable Circle of Confusion for a particular photo?".

The following answer was originally published (by me) as an answer about background bokeh but it necessarily explains depth of field, with a bias to explaining fore and background blur.

The original (longer) answer is here: https://photo.stackexchange.com/a/96261/37074 - this is the abridged version. Simply making a one sentence answer with a link causes the answer to be converted to a comment to the above question, with a risk of deletion because it's a comment.

Let's define a few things before we get into a much longer explanation.

  • Depth of field: The distance between the nearest and farthest objects in a scene that appear acceptably sharp in an image. Although a lens can precisely focus at only one distance at a time, 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.

  • Background: The area behind the subject of the image.

  • Foreground: The area in front of the subject of the image.

  • Blur: To cause imperfection of vision, to make indistinct or hazy, to obscure. The antonym of sharpen.

  • Bokeh: The quality of the blurring of the out of focus areas of the image outside of the depth of field when the lens is correctly focused on the subject.

  • Circle of confusion: In idealized ray optics rays are assumed to converge to a point when perfectly focused, the shape of a defocus blur spot from a lens with a circular aperture is a hard-edged circle of light. A more general blur spot has soft edges due to diffraction and aberrations (Stokseth 1969, paywall; Merklinger 1992, accessible), and may be non-circular due to the aperture shape.

    Recognizing that real lenses do not focus all rays perfectly under even the best conditions, the term circle of least confusion is often used for the smallest blur spot a lens can make (Ray 2002, 89), for example by picking a best focus position that makes a good compromise between the varying effective focal lengths of different lens zones due to spherical or other aberrations.

    The term circle of confusion is applied more generally, to the size of the out-of-focus spot to which a lens images an object point. It relates to 1. visual acuity, 2. viewing conditions, and 3. enlargement from the original image to the final image. In photography, the circle of confusion (CoC) is used to mathematically determine the depth of field, the part of an image that is acceptably sharp.

  • Sensor size:

    • Photography: In photography the sensor size is measured based upon the width of film or the active area of a digital sensor. The name 35 mm originates with the total width of the 135 film, the perforated cartridge film which was the primary medium of the format prior to the invention of the full frame DSLR. The term 135 format remains in use. In digital photography, the format has come to be known as full frame. While the actual size of the usable area of photographic 35 mm film is 24w×36h mm the 35 millimeters refers to the dimension 24 mm plus the sprocket holes (used to advance the film).

    • Video: Sensor sizes are expressed in inches notation because at the time of the popularization of digital image sensors they were used to replace video camera tubes. The common 1" circular video camera tubes had a rectangular photo sensitive area about 16 mm diagonal, so a digital sensor with a 16 mm diagonal size was a 1" video tube equivalent. The name of a 1" digital sensor should more accurately be read as "one inch video camera tube equivalent" sensor. Current digital image sensor size descriptors are the video camera tube equivalency size, not the actual size of the sensor. For example, a 1" sensor has a diagonal measurement of 16 mm.

  • Subject: The object that you intend to capture an image of, not necessarily everything that appears in frame, certainly not Photo Bombers, and often not objects appearing in the extreme fore and backgrounds; thus the use of bokeh or DOF to defocus objects which are not the subject.

  • Modulation Transfer Function (MTF) or Spatial Frequency Response (SFR): The relative amplitude response of an imaging system as a function of input spatial frequency. ISO 12233:2017 specifies methods for measuring the resolution and the SFR of electronic still-picture cameras. Line pairs per millimeter (lp/mm) was the most common spatial frequency unit for film, but cycles/pixel (C/P) and line widths/picture height (LW/PH) are more convenient for digital sensors.


Now the we have our definitions out of the way ...

From Wikipedia:

CoC (mm) = viewing distance (cm) / desired final-image resolution (lp/mm) for a 25 cm viewing distance / enlargement / 25

For example, to support a final-image resolution equivalent to 5 lp/mm for a 25 cm viewing distance when the anticipated viewing distance is 50 cm and the anticipated enlargement is 8:

CoC = 50 / 5 / 8 / 25 = 0.05 mm

Since the final-image size is not usually known at the time of taking a photograph, it is common to assume a standard size such as 25 cm width, along with a conventional final-image CoC of 0.2 mm, which is 1/1250 of the image width. Conventions in terms of the diagonal measure are also commonly used. The DoF computed using these conventions will need to be adjusted if the original image is cropped before enlarging to the final image size, or if the size and viewing assumptions are altered.

Using the “Zeiss formula”, the circle of confusion is sometimes calculated as d/1730 where d is the diagonal measure of the original image (the camera format). For full-frame 35 mm format (24 mm × 36 mm, 43 mm diagonal) this comes out to be 0.025 mm. A more widely used CoC is d/1500, or 0.029 mm for full-frame 35 mm format, which corresponds to resolving 5 lines per millimeter on a print of 30 cm diagonal. Values of 0.030 mm and 0.033 mm are also common for full-frame 35 mm format. For practical purposes, d/1730, a final-image CoC of 0.2 mm, and d/1500 give very similar results.

Criteria relating CoC to the lens focal length have also been used. Kodak (1972), 5) recommended 2 minutes of arc (the Snellen criterion of 30 cycles/degree for normal vision) for critical viewing, giving CoC ≈ f /1720, where f is the lens focal length. For a 50 mm lens on full-frame 35 mm format, this gave CoC ≈ 0.0291 mm. This criterion evidently assumed that a final image would be viewed at “perspective-correct” distance (i.e., the angle of view would be the same as that of the original image):

Viewing distance = focal length of taking lens × enlargement

However, images seldom are viewed at the “correct” distance; the viewer usually doesn't know the focal length of the taking lens, and the “correct” distance may be uncomfortably short or long. Consequently, criteria based on lens focal length have generally given way to criteria (such as d/1500) related to the camera format.

This COC value represents the maximum blur spot diameter, measured at the image plane, which looks to be in focus. A spot with a diameter smaller than this COC value will appear as a point of light and, therefore, in focus in the image. Spots with a greater diameter will appear blurry to the observer.

  • Non-symmetry of the DOF:

DOF is not symmetrical. This means that the area of acceptable focus does not have the same linear distance before and after the focal plane. This is because the light from closer objects converges at a greater distance aft of the image plane than the distance that the light from farther objects converges prior to the image plane.

At relatively close distances, the DOF is nearly symmetrical, with about half of the focus area existing before the focus plane and half appearing after. The farther the focal plane moves from the image plane, the larger the shift in symmetry favoring the area beyond the focal plane. Eventually, the lens focuses at the infinity point and the DOF is at its maximum dissymmetry, with the vast majority of the focused area being beyond the plane of focus to infinity. This distance is known as the “hyperfocal distance” and leads us to our next section.

Hyperfocal distance is defined as the distance, when the lens is focused at infinity, where objects from half of this distance to infinity will be in focus for a particular lens. Alternatively, hyperfocal distance may refer to the closest distance that a lens can be focused for a given aperture while objects at a distance (infinity) will remain sharp.

The hyperfocal distance is variable and a function of the aperture, focal length, and aforementioned COC. The smaller you make the lens aperture, the closer to the lens the hyperfocal distance becomes. Hyperfocal distance is used in the calculations used to compute DOF.

From Wikipedia:

This SE website doesn't seem to support Mathjax

There are four factors that determine DOF:

  1. Circle of confusion (COC)
  2. Aperture of the lens
  3. Lens focal length
  4. Focus distance (distance between lens and subject)

DOF = Far Point – Near Point

DOF, Near and Far Point

DOF simply tells the photographer at what distances before and aft of the focus distance that blurriness will occur. It does not specify how blurry or what “quality” those areas will be. The design of the lens, the design of the diaphragm, and your background define the characteristics of the blur—its intensity, texture, and quality.

The shorter the focal length of your lens is, the longer the DOF.

The longer the focal length of your lens is, the shorter the DOF.

If sensor size does not appear anywhere in these formulas, how does it alter the DOF?

There are several sneaky ways that format size sneaks into the DOF math:

Enlargement factor

Focal Length

Subject-to-camera / focal distance

It's because of the crop factor and the resulting focal length along with the necessary aperture for the light gathering ability of the sensor that gives the greatest affect upon your calculations.

A higher resolution sensor and a better quality lens will produce better bokeh but even a cellphone sized sensor and lens can produce reasonably acceptable bokeh.

Using the same focal length lens on an APS-C and full frame camera at the same subject-to-camera distance produces two different image framings and causes the DOF distance and thickness (depth, of the field) to differ.

Switching lenses or changing subject-to-camera in accordance with the crop factor when switching between an APS-C and full frame camera to maintain identical framing results in a similar DOF. Moving your position to maintain identical framing slightly favors the full frame sensor (for a greater DOF), it's only when changing lenses to match the crop factor and maintain framing that the larger sensor gains a narrower DOF (and not by much).

It's the aperture advantage that makes the full frame sensor a better and more expensive choice both for camera and lenses and often for features (FPS not being one of them, nor size and weight).

Going to a medium sized sensor over a tiny sensor further advantages the larger sensor but bokeh likely isn't the best use case to justify 20x+ times price difference.

The greater number of pixels per dot of light certainly will produce smoother bokeh but so would moving closer with a small sensor camera. You can charge proportionality more for use of more expensive equipment if you make money off of your photos or videos, otherwise a bit of footwork or additional lower cost lenses will save you a lot of money over investing in a larger format system.


Bokeh-centric links, with explanations about depth of field:

B&H has a 3 part article on DOF: Depth of Field, Part I: The Basics, Part II: The Math and Part III: The Myths.

Wikipedia section: Foreground and background blur.

Check out this article "Staging Foregrounds" by R.J. Kern on foreground blur, which includes many photos with background and foreground blur.

Most importantly, "bokeh" isn't simply "background blur" but all blur outside the DOF; even in the foreground. It's that small lights at a distance are easier to judge bokeh quality.

Foreground Bokeh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.