Depth of field - hopefully explained...

Messages
9,438
Name
Andy
Edit My Images
Yes
As some will know ;) I have a more than healthy interest in the maths behind all of this photo malarkey. After yet another discussion on depth of field and lens equivalence another forum I thought it time to write down in one place my understanding.

I set out to do this without any formulas, just to describe what is actually going on. It's here:

http://photo.andysheen.co.uk/technical/depth-of-field-and-what-affects-it-explained/

If anyone has any comments or suggestions for what needs doing to it - good or bad - I'd be more than happy to receive them.

Thanks :)
 
Where's the math?
I set out to do it without maths so that people weren't turned off by it. I can add it in if you want ;)
 
You'll know that me and you hardly see eye to eye on this :D and it'll be no surprise that I really can't agree that DoF isn't captured in the image when you take it. That seems like madness to me for the following reasons...

DoF is a property of an image we perceive as a result of light passing through a hole and landing on a surface. As well as being a perception it's a physical thing, a part of the image. Take a wide aperture shot with a film camera and look at the film negative and tell me that DoF isn't a part of the captured image. Of course it is. DoF is an inherent part of the image captured and all we can do is hide it or reveal it through our choice of image size and viewing distance.

Let me explain. You can alter your perception of the DoF in a number of ways. You can print the image very small or view it from far away so that any lack of DoF is effectively undetectable and anything that is out of DoF is effectively in or simply not visible. Alternatively you can print the image very large or view it very closely so that the amount in the DoF is reduced or so hard to recognise that it's effectively not any more.

Take this shot chosen at random as an example.

_1090570_zps536cc5c9.jpg


Here we can see that the DoF is limited, so much so that the fact that it's limited would be visible on a 35mm negative. There's really no way to get the background in the DoF unless the image is printed or viewed so that it's so small that, for example the out of focus yellow stalks in the background appear to be in the DoF, but to make the greenery in the background appear to be in the DoF we'd have to print it so small or view it from so far away that DoF as a concept in the image would effectively be meaningless.

We can see that large parts of the image are in the DoF at this image size but if we blow the image up or view it very close our perception of what is in the DoF will change and we'll come to think that a lot less than we originally thought is in the DoF.

As you say, DoF is about perception. It's to do with how close or far away we are when we view an image and how big the image... or parts of the image... are but it's also about the hardware we choose, the settings we select, the camera to subject distance and the size, relative distance and spacial relationships of the various things in the image. These things are set when we press the shutter button and are a part of the image that we can only hide or make more obvious through our choice of image size and viewing distance. These things are a part of the image that we will struggle to change unless we take things to extremes.

So, IMVHO if something is way out of the DoF it's next to impossible to put it in unless we reduce the image size or view it from so far away that DoF becomes meaningless and if something is in the DoF the only way we can push it out is to print the image so large or view it so closely that it again becomes meaningless. To phrase it another way IMVHO DoF is a part of the image parameters that are set when we press the shutter button and all we can do after that is alter our perception by the way that we hide or reveal it to different extents.

You may think I'm playing with words here but I think it's worthwhile making a distinction between what we have and what we can really change. DoF IMVHO is something that is decided by the hardware and scene and becomes what we have. We're stuck with it. Later how big / small / near / far you print / view makes it more or less obvious but you can't change what you get when you press the shutter and therefore you should know what you want to achieve before pressing that shutter button. That should include thinking about the hardware, settings and scene and the image size and viewing distance and thinking that DoF is something that doesn't exist until you print and you can change it later might lead to trouble as the only way of hiding a lack of it could be by printing your image so small or viewing it from so far away that it bares little relation to the image and viewing circumstance originally intended.

I don't know if you should bother with math. You can get into format sizes and DoF tables and there's a danger of presenting it as carved in stone gospel when really it isn't and there's nothing to stop anyone deciding that their own circle of confusion and values in their own DoF tables should be different to what you or some other bloke on tinternet says :D

These days we have different hardware formats, lenses and settings and we should be selecting hardware and setting and composition to get the results that we want but choose the wrong hardware, settings and composition and you're stuck with what's captured and that could impose restrictions on the final result you intended.
 
I'm not sure that I follow your reasoning about printing large or small and viewing fom near or far, Alan.

To have something which we can quantify then we have to have a standard to work from. Moons ago, someone decreed that the CoC was valid when the image was viewed from a distance equal to the diagonal measurement of the image.....this effectively removes output magnification from the equation and you're left with something more tangible. If you're going to change the image viewing rules (distance) then you also need to change the CoC and I suspect you'll end up with the same answer.

Bob
 
I think we agree 90% Alan... just I am more scientific about my definition of depth of field which is the bit of the image you see as in focus.

If you print two images from the same capture and print one image 50% bigger than the other and view both from the same distance, the larger image will have less that you perceive as critically in focus. That is it. That is the definition of depth of field (the bit that is critically in focus). End of.

Talking about stuff that is way out of focus however big you print (except at the extremes) is moot. The point (!) is that every point that is not on the plane of focus will project a bigger or smaller circle of confusion on the sensor. The size of it is perfectly predictable if you know a few measurements. Whether you can see that as a circle or whether it appears as a point depends only on how you print and view it.

What I am saying is that whilst 99% of an image is out of focus when you capture it, there is no way to predict whether you will see it as in focus or out of focus at capture time. The DoF equations work by making some assumptions about how you print and view. If you break these, what you perceive as in focus will change. It therefore isn't set in stone what will be "in focus" when you capture the image.
 
Depth of field is simply based on the universally accepted standard that if you view a print 10in wide, from a distance equal to the diagonal, ie about 12in, then the smallest detail the human eye can differentiate is 0.2mm in diameter.

That is the single 'fact' - the primary circle of confusion size - that drives all the calculations. It's all about magnification, the size of all the contributing factors, and the formulae simply works everything back from that 0.2mm to give us a set of usable references - lens aperture, focal length, shooting distance and sensor size - to work with.

Depth of field does not exist as a measurable concept unless all those contributing factors are defined, and they all sit under the umbrella assumption of 0.2mm on a 10in print.

Conveniently, if you view a larger image but maintain a distance equal to the diagonal, DoF stays the same. But equally, if you pixel peep and view close up, all the DoF calcs go out of the window. Also, if you crop an image and enlarge a smaller section, that is effectively a change of sensor format and that skews the figures too.

Here's a conundrum. DoF and f/number are related to the physical diameter of the circular aperture. But from the side of the frame, the aperture becomes an egg-shaped elipse with a shorter and a longer diameter. So, away from the centre, DoF is different in vertical and horizontal planes. Discuss! Or on second thoughts, please don't!
 
Not into all the technical jargon but in Photoshop elements10/11 you can make a reasonable job of blurring background and restoring the subject to give a DOF look.

Realspeed
 
f1.8 is thin DOF... f22 is fat DOF
anything else you want to know?

:)
 
f1.8 is thin DOF... f22 is fat DOF
anything else you want to know?

:)

Yes, f/5.6-8 is kinda medium DoF :D

But it does make a good point. The DoF calcs look very precise, often with distances measured down to a couple of decimal places, but mostly you'll really struggle to see the difference between half-stops of aperture, and even whole stops often don't look that different.
 
f1.8 is thin DOF... f22 is fat DOF
anything else you want to know?

:)
Based on this, Tony, I can foresee the day that portrait lenses have their Distance scale replaced by BMI figures.

Bob
 
I'm not sure that I follow your reasoning about printing large or small and viewing fom near or far, Alan.

Then try it. Print out an image with things in / out of DoF and view it from near or far and at different image sizes. Even without doing that it should be perfectly obvious to you that image size and / or viewing distance can alter your perception of DoF.

Here's another example for you...

_1010540p1_zpsdf81830f.jpg


A nice relaxing scene taken with a wide angle lens and with front to back DoF. Well actually, no it isn't. It only looks like that because it's a small image. View it at anything like a reasonable size and you'll see that the point of focus is quite near to the camera and the DoF is very thin with most of the image being like an impressionist painting viewed through beer glasses :D

"Moons ago, someone decreed that the CoC was valid when the image was viewed from a distance equal to the diagonal measurement of the image.....this effectively removes output magnification from the equation and you're left with something more tangible. If you're going to change the image viewing rules (distance) then you also need to change the CoC and I suspect you'll end up with the same answer."

Yes you can balance the image size and viewing distance to get the same effect but image size and distance matter and affect how you perceive things. Print my picture out at postage stamp size or view it from across the room and it'll look like front to back DoF unless you get your magnifying glass out or move closer. Print it at A3 and the lack of DoF will be obvious unless you restore the balance to get the same answer and view it from across the road.

This is exactly why I think that relying on numbers is so dangerous. The CoC/DoF tables are decided and constructed by people based on assumptions about eye sight and their own opinion of what the image looks like when printed at specific sizes and viewed from specific distances. Deviate from the small print on the DoF table web site or disagree with what someone else thinks and it all goes out of the window. This is why I think it's important to view CoC/DoF tables as just a guide and not the word of God carved in stone. There is nothing to stop you deciding what CofC you want or view as being valid or what distance the image is viewed from.

All of which takes me a little far from my initial point that the hardware, settings and scene when the button is pressed impose a set of things on us, including DoF, which we from then on can highlight or hide to an extent but to believe that DoF doesn't exist until we produce a print just doesn't sit well with me personally. I think it's a bit like saying that the cat in the box is dead or is alive. It is what it is and only our perception changes as we do things differently.
 
I think we agree 90% Alan... just I am more scientific about my definition of depth of field which is the bit of the image you see as in focus.

Yes. But as my background is extremely technical and my qualifications include the word "science" I learned to only make exact statement when they are. There are so many assumptions and caveats and so much small print that you need to include if you try to be exact on this subject that IMVHO it's much better to be up front and say that any figures given are for guidance only :D
 
The DoF calcs look very precise, often with distances measured down to a couple of decimal places, but mostly you'll really struggle to see the difference between half-stops of aperture, and even whole stops often don't look that different.

Yes, the numbers are ridiculously precise and this should ring alarm bells.
 
Why are people trying to reinvent the wheel?

Depth of Field has been explained in perfectly understandable terms since the days of Ansel Adams and the other pioneers.
 
Why are people trying to reinvent the wheel?

Depth of Field has been explained in perfectly understandable terms since the days of Ansel Adams and the other pioneers.
Because my wheel is more aesthetically pleasing... :D

That and we keep having the same discussions as people understand how all this works so I wanted to try a different approach which looked at what was going on rather than delving into maths from sentence #1...
 
Alan,

Do you not see the conundrum I face when I read back your posts:

You'll know that me and you hardly see eye to eye on this :D and it'll be no surprise that I really can't agree that DoF isn't captured in the image when you take it. That seems like madness to me for the following reasons...

DoF is a property of an image we perceive as a result of light passing through a hole and landing on a surface. As well as being a perception it's a physical thing, a part of the image. Take a wide aperture shot with a film camera and look at the film negative and tell me that DoF isn't a part of the captured image. Of course it is. DoF is an inherent part of the image captured and all we can do is hide it or reveal it through our choice of image size and viewing distance.

And...

Then try it. Print out an image with things in / out of DoF and view it from near or far and at different image sizes. Even without doing that it should be perfectly obvious to you that image size and / or viewing distance can alter your perception of DoF.

Yes. But as my background is extremely technical and my qualifications include the word "science" I learned to only make exact statement when they are.

A light has come on in my head - we agree, just that the terminology in use is slightly wrong. You are using DoF correctly in one place, but incorrectly in another. In striving to be precise in everything we discuss, let me summarise my understanding.

What gets captured on the sensor are circles of confusion. This is NOT depth of field, but a blurring depending how far the point is away from the plane of focus. When you print & view the photo, the millions of circles of confusion get magnified and printed on a piece of paper. If the size of those circles of confusion once printed are below a threshold, you will see those points as in focus, if above that size, they appear to be blurred. This threshold is known as the circle of confusion diameter limit and it is this value that is used in the depth of field calculations. It is these thresholds (one for points in front of the plane of focus, and the other for those behind) which determine the perceived depth of field.

So, if you use the words "circles of confusion" instead of "depth of field" when you are talking about the image capture process (or looking at a negative), not only would you be technically correct, but I can sleep a little more soundly at night :D:geek:

Not flogging a dead horse here - I'd had too much wine with dinner to be fully coherent Sunday night :eek:
 
Last edited:
Nerd is shorter ;)
 
I set out to do it without maths so that people weren't turned off by it. I can add it in if you want ;)

Nah, I'm crap at maths. I only had a peep to confuse myself, then wondered where the number crunching was :D

DOF, for me, is by eye, trial and error ... not worrying about it tbh.

I honestly don't get why people get hung up on it. I wonder are they into photography or the technicalities of the gear? Because we don't see DOF ... not in reality. It's all trickery. Producing these lovely shallow DOF images that the eye never actually sees in any scene. It either looks good, or not. I don't cross maths with art ;)
 
Last edited:
I honestly don't get why people get hung up on it. I wonder are they into photography or the technicalities of the gear?
I'm actually interested in the science behind it all. I like to understand how and why things work as if I understand them, I can normally use them more effectively. Not all of us are artists and I struggle to "see" the picture before I take it, but if I want to do something in post, I'm generally able to as I understand how the software operates. Whether I'm any good at it is another matter ;)

Personally, I don't understand why people are so dismissive of the details of how it all works - knowledge can be beautiful too you know...
 
Hey, it's nothing against you, or your interest in the techincs of it all, not whatsoever. My post was a very general opinion, and my own personal view. Nothing more ;)

I am the opposite, I don't care for hyper focal this or that, or math or science. I guess I am the more arty type. used to sketch a lot, [did toons too!] and it was all about how the image looked to the viewer, not how it got there, or how I calculated distances from backdrop to subject etc ...

I've no issue with people wanting to know more detail on that front, it's just not for me. I popped in just to have a peek, wouldn't have even posted only I seen no math :P

Different strokes ..
 
Hey, it's nothing against you, or your interest in the techincs of it all, not whatsoever. My post was a very general opinion, and my own personal view. Nothing more ;)

I am the opposite, I don't care for hyper focal this or that, or math or science. I guess I am the more arty type. used to sketch a lot, [did toons too!] and it was all about how the image looked to the viewer, not how it got there, or how I calculated distances from backdrop to subject etc ...

I've no issue with people wanting to know more detail on that front, it's just not for me. I popped in just to have a peek, wouldn't have even posted only I seen no math :P

Different strokes ..

Then you're missing a trick. In a previous life, as a magazine editor, I got to spend time with quite a few of the best photographers and I found them all to be technically very strong. They then tend to put a lot of that knowledge to one side and concentrate on what works for them and their style, but the knowledge is there.

David Bailey is a good example, if only because he's been a round a while. He is endlessly fascinated with new kit and what it can do, and is just as happy behind a large format film camera fiddling with Scheimpflug as he is with a compact or anything inbetween.

But if you don't know how stuff works, you're limiting creative options. Photography is a unique blend of art and science.
 
Maybe so, I prefer to remain artistic rather than technical though. I'll leave that to the continually building masses. I'm not in it for the money. I'm in it to produce pleasing images. People like what I do, that's enough for me ;) I get shallow DOF, I get deep DOF, when I want. I don't need to know why the camera is doing it, I have a fair idea, I'm not completely ignorant to it. Youput me in a space, in a certain light, and I guarantee I'll get a usable shot in one. It may not be perfect, that's where the trial and error bit comes in. But I know my gear enough to know in or around where I need to start. I've watched a million tutorials, I've read a million magazines and books, and soaked it all up. It somehow gets in there and stays. But I don't 'need' to know exactly 'why?'


I just don't need the intense detail specifics of it. I shoot daily, I don't up a lot of what I actually shoot, but I shoot a lot. I love to learn, this just isn't particularly what I need to know right now. I read stuff like the posts above,and it seems to me, even those interested in it don't really understand it. Or there would be no argument, they'd all just know how it goes.

More shooting less worrying I say.
 
Last edited:
But I don't 'need' to know exactly 'why?'
To follow up on Richards post, more knowledge gives you more ability to understand and take better decisions, which may ultimately lead you to better pictures.

I read stuff like the posts above,and it seems to me, even those interested in it don't really understand it. Or there would be no argument, they'd all just know how it goes.
If everyone interested in a subject understood it completely from day #1, learning would be instantaneous and there wouldn't be a need to spend the first 11-16 of our years in schools/colleges/universities (or longer if you want to do a doctorate).

On this particular subject, I feel I now am able to explain how and why depth of field (and circles of confusion) appears and what affects it. Whether my explanations are understandable is another matter though and feedback on that was part of the reason I posted it the article in the first place! I can also reference back to a couple of places and show how it all works at the mathematical level (the final cog fell into place when I had a need to explain lens focal length/aperture equivalence) should I need to.

If people ask about the subject in the future, I will try and help them understand. If I do help someones understanding, I will probably get just as much pleasure from that as taking a series of excellent pictures. As you say, horses for courses....
 
...... ....You put me in a space, in a certain light, and I guarantee I'll get a usable shot in one. It may not be perfect, that's where the trial and error bit comes in....
....More shooting less worrying I say.
That's very much the approach for many people in the age of digital cameras. Maybe go back a decade or three and use this methodology with expensive colour film when you've had the motorwind running off 3 fps and you won't see the results until you've printed them.....trust me, you learn all you can to get it right first time.

Bob
 
Last edited:
Alan,

Do you not see the conundrum I face when I read back your posts:

It's because we look at the issue differently.

You see it as DoF not existing until you see it.

I see DoF as a thing and part of the image that I can then perceive differently depending upon how I present and view the image.

Put another way for clarity... with a shallow DoF shot like the one I posted earlier the shallow DoF and what is both in and out is an integral part of the image set when the shutter button was pressed and our perception of what is in or out of the DoF can only really change significantly by going to ridiculous extremes that would in effect render the image meaningless.

What is true for this shot will also be true for other shots with less extreme DoF but to a less obvious degree.

The relative relationship between relative sharp and relative not, defined and not, DoF and not, will always be the same as they're set when we take the picture. All that can change after that is image size and viewing distance and how hidden or revealed the properties of the image are because of how we view it.

And no, I'm not confusing CoC and DoF. The reason I've mentioned both in the same post is in relation to on line tables and info which only work if you agree with the assumptions and strict criteria in the small print. These things are, IMVHO, just guides and we're all free to make other assumptions, produce other tables and write our own small print should we choose to do so.

As I said, the danger in this is that on line info relating to specific image and print sizes viewed at specific distances is presented as carved in stone fact (to how many decimal places?) when it's far from it. If anything, all the data should be redone based on computer screen sizes and viewing distances as that's how many images are viewed these days :D
 
Last edited:
PS. And of course this is worth talking about, it's a forum :D and respect and more power to you for putting in the time and effort to produce the write up :D:clap:
 
And no, I'm not confusing CoC and DoF.
I still think you are. Circle of confusion is the blur circle that is made by any point in the frame on the image sensor. It changes depending on focal length, aperture and distance of the point from the plane of focus. Every point in the image has one, and it is different for each and every point. You are calling this "DoF that is set when we take the picture" when in fact it is the circle of confusion produced by the points in the scene which is captured.

Circle of confusion diameter limit is the measure which is used in the depth of field equations and says what is the edge of human visibility when the circle of confusion is imaged on the sensor. It is a single number that is set based on sensor size, picture size and viewing distance. Change any of these and the circle of confusion diameter limit changes. It is this variable that allows you to change your assumptions and for the maths to still hold. If you want to double or halve the distance you are viewing the picture from for example, this value doubles or halves accordingly.

Depth of field is a near-far distance measurement which is calculated based on the in-focus subject distance, lens length, lens aperture and circle of confusion diameter limit so cannot be calculated based on the lens parameters alone.

Try this for an example. Saying "DoF is captured in the sensor" is a bit like asking what the top speed of my car is and me answering 6000rpm. It's not the answer but is clearly an element in the calculation which will also include gearing ratio and tyre diameter.
 
Valiant work Andy. 100% right of course, the physics says so. Best of luck with pushing water uphill, though. The physics of that is against you.
 
Last edited:
I know all that :D

Engine RPM is useless by itself as a means of determining speed as there's then gearing and a whole list of things that matter just as with DoF there is aperture and camera to subject distance etc. If I asked you to guess the DoF in a 50mm image you'd struggle but you'd make a good guess if I said 50mm f2 with focus on a subject 12 feet away.

I see the image as being set when we press the shutter button. That's what we're then stuck with IMVHO. We can however mask things like missing focus, subject or camera movement or shallow DoF or any number of things by how we present and view the image. For example, in another thread I was talking about shooting in venues with an f4 lens and getting acceptable results because people only expected small prints. Printed at A3 and viewed closely few would have been happy. That's not because altering the print size alters the image, it doesn't, but printing small hides the faults.

Thinking this way helps me as IMVHO it's worth keeping in mind what you want a shot to look like when it's produced and viewed as you intend. For example, my choice of gear and settings will be influenced by my intended final image size.

My way works for me and I'm sure that your way works for you. :D
 
Valiant work Andy. 100% right of course, the physics says so. Best of luck with pushing water uphill, though. The physics of that is against you.

I know what you are saying and I can see why you say it. But. IMVHO the relationships within the image will remain the same no matter what size or distance you choose, all that changes is how obvious or hidden things are and how you perceive them.

And as we're going in circles, that's my last in this thread, but I've no doubt it'll all be said again some day soon
 
I know all that :D
So use the terms correctly!! ;) :D

But then this

I see the image as being set when we press the shutter button.

and this:

For example, in another thread I was talking about shooting in venues with an f4 lens and getting acceptable results because people only expected small prints. Printed at A3 and viewed closely few would have been happy. That's not because altering the print size alters the image, it doesn't, but printing small hides the faults.

Are completely contradictory, yet you don't seem to be able to see it. Something cannot be at one point in time fixed, and at another point in time not be fixed. We are not talking quantum mechanics here you know :suspect: :D

There are 3 distinct processes going on here. Image capture, image enlargement and image viewing. Depth of field is only meaningful when you view. You effectively say that as you are happy to be able to describe something as hidden (i.e. sharp enough to be considered within the depth of field) if you print at a different size. This is exactly what DoF is - deciding whether something is in focus when you view the image.

My way works for me and I'm sure that your way works for you. :D
It really isn't a way of thinking, but one of terminology. We actually both understand what is going on, but describe it differently - I'm OK with that, but when you have some standard terminology, which mean very precise things, you cannot misuse them otherwise people get very confused (or you end up having discussions like this ;)).

You said you were a man of science and wanted to be precise... I'm just asking you to do just that and use the correct terminology....... ;) :D
 
I know what you are saying and I can see why you say it. But. IMVHO the relationships within the image will remain the same no matter what size or distance you choose, all that changes is how obvious or hidden things are and how you perceive them.
That's called depth of field that is..... ;)
 
I know I said I'd said my last but it's still raining :D

Are completely contradictory, yet you don't seem to be able to see it. Something cannot be at one point in time fixed, and at another point in time not be fixed. We are not talking quantum mechanics here you know :suspect: :D

It's not contradictory at all. The image we capture on the film / sensor is what we have, at least as a starting point. It's there and that's it but we can work with what we have to alter perception. Assuming we're not printing an image the size of the film negative what we'll then be doing is enlarging the image and seeing the faults more obviously or indeed what we can do is take a magnifying glass to the negative... or not.

When I took images of bands and antics in dingy dance halls I produced what were then "standard" prints which were relatively small and looked lovely but if I'd printed them larger the image and all of its attributes which were already there but not normally noticeable would have been more visible. There's no contradiction in that. In these digital days my mind hasn't changed. I believe that everything in a smaller image is present in a larger image (assuming perfect hardware and eye sight) and that everything that I see when I'm up close is still there when I'm far away and that the things and their relationships within the image stay the same... and all that changes is how I perceive the image. That's why to me saying that DoF doesn't exist before an image is produced doesn't work for me. What works for me is that it's there as in all of the elements and relationships are there and I can then only hide or reveal it to some extent. That's why makes sense to me to decide that on line data is for guidance only and to choose hardware and settings and if I decide to do so a different CoC or different DoF numbers to suit the final product and viewing circumstance I have in mind.

"We actually both understand what is going on, but describe it differently..." As you said, we're 99%.

I wouldn't claim to be an optical engineer as my field was computing and wider electronics and we had different discussions involving electrons and holes and current and voltage and other stuff. Physics and mathematics was apart of what I did but if you think that there's agreement, sweetness and light in either you're mistaken. There isn't, not always anyway :D
 
Alan, what you're describing in not depth of field.

Depth of field is the measurement of the zone of acceptable sharpness, by the parameters laid down decades ago and universally agreed, and it only exists in that form when you output and view a finished image.
 
Back
Top