# DoF question



## anthonyd (Oct 14, 2014)

Sorry if this has been answered before, but I wonder if someone could explain to me how to derive the relation between DoF and f number. Let me make the question more specific:
Say that I have determined that using a 50mm lens and f/6.3 I have enough of the picture in focus to do a family shot (let's not debate this, it's just an example). If I move twice as far away from the family and use a 100mm lens (to achieve the same framing of the subject), can I still use f/6.3 or do I need a different setting?

Beyond a simple yes or now, can someone explain the basic optics here (as at least a quasi-math rule of thumb). I would even be happy with a pointer to a detailed analysis.


----------



## Marsu42 (Oct 14, 2014)

anthonyd said:


> Sorry if this has been answered before



The activity in this forum would stall if people would get used to using the search option, so ... 



anthonyd said:


> but I wonder if someone could explain to me how to derive the relation between DoF and f number.



Smart question, because you noticed that the f-number is important, and not the physical aperture (I only learned this recently)



anthonyd said:


> Say that I have determined that using a 50mm lens and f/6.3 I have enough of the picture in focus to do a family shot (let's not debate this, it's just an example). If I move twice as far away from the family and use a 100mm lens (to achieve the same framing of the subject), can I still use f/6.3 or do I need a different setting?



To just find out the result, you can simply use your trusty dof calculator like here: ... http://www.dofmaster.com/dofjs.html ... for your example:

Family @5m with 50mm = standard dof 4.4m (in front 1.37 m (31%) / behind 3.03 m (69%))
Family @10m with 100mm = standard dof 3.91m (in front 1.59 m (41%) / behind 2.32m (59%))

Which proves the rule of thumb that with shorter focal length the dof distribution is 1/3:2/3, with longer lenses it gets nearer to 50/50. And it demonstrates why small f-numbers with long lenses gets tricky, the dof is becoming very thin - for example with my 70-300/f5.6 I often need to step up to get the subject in focus, no matter how bokehlicious it would look If I had a f2.8.



anthonyd said:


> Beyond a simple yes or now, can someone explain the basic optics here (as at least a quasi-math rule of thumb). I would even be happy with a pointer to a detailed analysis.



I'll let the CR heavyweights post the maths behind it, but from a simple users' pov you should read a thread like here why dof is just the subjective(!) "acceptable" sharpness and depends so much on print/view size: http://www.canonrumors.com/forum/index.php?topic=15884.msg293901#msg293901


----------



## jepabst (Oct 14, 2014)

If only depth of field were as easy as only looking at the F-Stop (aperture). For most of us, there are rules of thumb; especially when using a DSLR. However, if the new iphone has an f-stop of 1.8 it doesn't mean you'll have the same depth of field as the 50mm f/1.8 on a DSLR. Depth of field is a combination of sensor size, f-stop, and focal length and distance to subject. These all affect the perceived 'soft background' and DOF. I created a gif to explain the f-stop part of the equation about aperture and depth of field on my website. I don't know if GIFs work here.


----------



## tolusina (Oct 14, 2014)

jepabst said:


> .... I don't know if GIFs work here.......









Nice gif!


----------



## triggermike (Oct 14, 2014)

There are many free apps for smart phones which will help you quickly calculate DoF for lens/f-number/distance combos. I have one called SetMyCamera, but there are many.


----------



## surapon (Oct 14, 2014)

Dear Friend Mr. Anthonyd.
Here is great DOF master/ Calculation that might help you to see and understand.

http://www.dofmaster.com/dofjs.html

Enjoy
Surapon


----------



## keithcooper (Oct 15, 2014)

By all means have a look at all the various DOF calculators, but be sure to check just how much you agree with what they say, by taking real photos and looking at them.

Such tools often give an entirely spurious sense of accuracy - remember that precision is entirely different from accuracy ;-)

Personally I find them a complete waste of time... YMMV ;-)


----------



## anthonyd (Oct 15, 2014)

Thanks everyone, especially for the pointers to the DoF calculator, somehow I didn't think it would be that easy and didn't search for one before asking (not that people here don't love repeating stuff ).

I do understand very well the impact of the sensor (I've shot with a P&S, 60D and 6D) and print size (I have some 16x24 prints on my wall). The reason I'm asking is simple. I want to do a fall family picture and would like to create as much bokeh as possible while keeping the whole family acceptably sharp. This rules out wide open apertures and it also means that the framing is more or less fixed (the whole family has to fit with a little room to breathe). So my only tool is to walk further away and use a longer lens. From the calculator I saw that the DoF decreases with increased focal lengths, but not dramatically.

For reference, here is the base shot that I'm trying to improve.


----------



## polarhannes (Oct 15, 2014)

Hello,

for your use case the Brenizer method might be applicable.


> ...would like to create as much bokeh as possible while keeping the whole family acceptably sharp.



 http://en.m.wikipedia.org/wiki/Brenizer_Method


----------



## chromophore (Oct 15, 2014)

Something to understand about "depth of field" is that this value is informative of what will be within acceptable focus, but is *not* an indicator of the size of the blur circle for objects not in focus.

What I mean by this is that you can shoot two images of the same subject, and both have the same depth of field, but one image can have a much blurrier background than the other. The depth of field tells says nothing about how much blur we can expect for objects not within the DoF.

There are formulas to calculate the circle of confusion ("blur circle") diameter for a given set of imaging parameters (f-number, focal length, subject magnification, and distance away from plane of sharpest focus). But the general rule is that if the same depth of field and subject magnification is desired, the longer focal length (thus greater subject distance) will give more blur of *distant* background objects. The cause is easily understood as a consequence of the narrower angle of view of a longer focal length lens: this narrower angle requires increased subject distance (the camera must be further away from the subject), consequently, this changes the camera-subject-background spatial relationship and alters the perspective of the resulting image. The magnification factor of the background increases, thus the blur circle diameter also increases.

The exact calculations are not important in practice because in general it is easier and faster to empirically ascertain the necessary focal length and f-number to achieve the desired result. In other words, taking test shots is easier and ultimately more accurate than using a mathematical model for which you would need scene data apart from the camera settings. Even DoF calculators are at best approximations of the real-world results, because a production camera lens is a compound optical system with nontrivial thickness, than an ideal lens, and the complexity of an actual lens means that even adjusting for focus may affect its true focal length. For shooting film, where it is not possible to obtain zoomed-in details of live images in the field, such estimates were useful; but now, with digital cameras with live feedback, such calculations are no longer the best we can do.


----------



## anthonyd (Oct 16, 2014)

chromophore said:


> But the general rule is that if the same depth of field and subject magnification is desired, the longer focal length (thus greater subject distance) will give more blur of *distant* background objects.



Thanks chromophore, that's the confirmation I was looking for. I intuitively expected that if instead of using ~60mm (that I used for this shot) I walked further back and used 200mm, I would get a more blurred background, even if I had to close the aperture a bit to keep the family in focus.


----------



## gilespj (Oct 16, 2014)

I did some research in on DOF for one of my causes, people use slightly different calculations but this seams to be the most common. If you use a DOF calculator I would make sure that you use the same one and get to know how it works in reality. I now use a downloaded one on my phone.

f= Focal Length/Diameter of Lens

H=(f2/N c) + f

Dn= (s(H-f)/(H+s-2f)

Df = (s(H-f))/(H-s)

H= Hyper focal distance (mm)
f = Lens focal Length (mm)
s = Focal distance
Dn = Near distance of acceptable sharpness
Df = Far distance of acceptable sharpness
N = Apperture
c = Circle of confusion

Common use circle of confusion are
35mm (6d, 5d, .... 1dx ......) => 0.025-0.035
Canon APS-C (x000d serise, xx0d serise, x0d serise, 7d)=> 0.018
6x6 => 0.053

The Circle of confusion depends on the size of enlargements if you are printing but also in the quality of the glass that you are using.

Hyper focal distance is the closest focus distance that will include infinity thus giving the largest Depth of Focus.

I hope this is of some help or at least interesting to some of you.


----------



## SoullessPolack (Oct 16, 2014)

anthonyd said:


> Thanks everyone, especially for the pointers to the DoF calculator, somehow I didn't think it would be that easy and didn't search for one before asking (not that people here don't love repeating stuff ).
> 
> I do understand very well the impact of the sensor (I've shot with a P&S, 60D and 6D) and print size (I have some 16x24 prints on my wall). The reason I'm asking is simple. I want to do a fall family picture and would like to create as much bokeh as possible while keeping the whole family acceptably sharp. This rules out wide open apertures and it also means that the framing is more or less fixed (the whole family has to fit with a little room to breathe). So my only tool is to walk further away and use a longer lens. From the calculator I saw that the DoF decreases with increased focal lengths, but not dramatically.
> 
> For reference, here is the base shot that I'm trying to improve.



What's wrong with the photo you have attached? You have separation in there, and the family looks pretty sharp. If you decrease your DOF even more, you're going to make it less and less apparent what the background is. The background can add to your picture; give it a sense of place. If you decrease your DOF even more, you're going to destroy any detail whatsoever in the background, and at that point, you might as well be shooting in front of a fabric or canvas background. If anything, I'd almost rather see a little bit more DOF in that image, as right now it almost looks like it was possibly green screened. 

If I were you, I wouldn't waste your time on DOF calculators. I'd spend more time on posing, especially with toddlers/infants. I like the family portrait, but it is slightly ruined, and could be much better, if you could get the baby to not make a funny face and look at the camera. Now, I don't want to say you're unable to do that, but in that case, I'd question why you posted this image over a better one. Also, I'd spend some time balancing out the exposure throughout the image. The background is a tad bright; the grass is a touch too bright, and the water is not the color we all know it looks like in person. Beyond that, again, I wouldn't spend your time looking at DOF calculators, but instead, learning how to properly choose a scene that doesn't require you to decrease your DOF dramatically. Most well done environmental portraits actually have quite a large DOF. Think about it this way: in the studio, you have to do something special to make a family portrait interesting. The standard family pose can be quite boring, especially in front of a solid colored background. When you shoot so your DOF is really small, you're essentially doing something very similar. It may be several colors, but pretty much all detail is lost. It then becomes another boring family photo.

This is all why I recommend smaller apertures: the family remains the main subject, but your eyes are allowed to drift through the photograph and appreciate the beauty behind them as well.

I know my reply is not a direct answer to your question, but I do feel I have given you some very good advice that you can take (or leave) and possibly learn from. What questions do you have for me?


----------



## anthonyd (Oct 16, 2014)

SoullessPolack said:


> What's wrong with the photo you have attached? You have separation in there, and the family looks pretty sharp. If you decrease your DOF even more, you're going to make it less and less apparent what the background is. The background can add to your picture; give it a sense of place. If you decrease your DOF even more, you're going to destroy any detail whatsoever in the background, and at that point, you might as well be shooting in front of a fabric or canvas background. If anything, I'd almost rather see a little bit more DOF in that image, as right now it almost looks like it was possibly green screened.



This is an interesting point. I guess the optimal level of background blur is in the eye of the beholder. I am trying to create an extreme bokeh, as I enjoy the portraits that are created so, like this, or that.
of course I do understand that with a single person you can go as open as f/1.2 which changes the story altogether, but the fact remains that the completely blurred fall leaves are appealing ... to me!



SoullessPolack said:


> If I were you, I wouldn't waste your time on DOF calculators. I'd spend more time on posing, especially with toddlers/infants.



I completely agree, and I ensure you that I spend a lot of time posing this particular family ... as I am part of it . I am not planning to spend any time with the calculators, I just wanted to verify that doubling my distance and my focal length will increase the blur of the background *while keeping the subject in focus and framed the same*. You see, everybody knows that increasing the focal length (but keeping everything else constant) increases the blur, but in my case I have to also (a) increase the distance to the subject (which tends to make the background sharper, as it *decreases* the ratio "distance_to_background / distance_to_subject") and (b) close down my lens. So it was not obvious to me that the complex interplay between focal length, distance ratio, and f number would lead to a dreamier background. Now, should I aim for a dreamier background to begin with? Maybe you are right and I shouldn't. I still want to try it though.



SoullessPolack said:


> I like the family portrait, but it is slightly ruined, and could be much better, if you could get the baby to not make a funny face and look at the camera.



Absolutely. I hate the way the baby looks like she's hanging there and how she doesn't look at the camera (although getting a baby to look anywhere is not a small feat). This was an exploratory shot, trying out the location, it's not "the fall family" shot. Hopefully not anyway, as the weather has a say as well.



SoullessPolack said:


> Now, I don't want to say you're unable to do that, but in that case, I'd question why you posted this image over a better one.



No offense taken whatsoever. I like a good constructive feedback like yours and that's why I post shots even when they are not that great.



SoullessPolack said:


> Also, I'd spend some time balancing out the exposure throughout the image. The background is a tad bright; the grass is a touch too bright,



This is the tradeoff between bokeh and exposure. I'm shooting with a remote flash, so I'm limited to 1/250 speed (because my cheap triggers won't do HSS). f/5.0 was the largest aperture I could set and get reasonable exposure, good DoF and good background blur. I guess you would have closed down a bit to expose the scene better at the price of some bokeh. I could improve it in post, but I hope my "final" shot will be on an overcast day so that I won't have to worry about that.




SoullessPolack said:


> and the water is not the color we all know it looks like in person.



You must have not seen the Tennessee river recently 
I didn't alter the colors in post, so that's exactly what the river looks like. However, if you meant "the color we all expect water to be", then I guess you are right. I could have made it look blue-er in post, but I didn't want to bother. I will give you this though, I rejected this location exactly because of the amount of brown river in the background, so your criticism is spot on.



SoullessPolack said:


> Beyond that, again, I wouldn't spend your time looking at DOF calculators, but instead, learning how to properly choose a scene that doesn't require you to decrease your DOF dramatically. Most well done environmental portraits actually have quite a large DOF. Think about it this way: in the studio, you have to do something special to make a family portrait interesting. The standard family pose can be quite boring, especially in front of a solid colored background. When you shoot so your DOF is really small, you're essentially doing something very similar. It may be several colors, but pretty much all detail is lost. It then becomes another boring family photo.
> 
> This is all why I recommend smaller apertures: the family remains the main subject, but your eyes are allowed to drift through the photograph and appreciate the beauty behind them as well.
> 
> I know my reply is not a direct answer to your question, but I do feel I have given you some very good advice that you can take (or leave) and possibly learn from. What questions do you have for me?



I will keep your advice in mind. I've always liked dreamy backgrounds in people photography, and I'll keep pursuing them -- as we only learn by trying -- but at least now I know that not everybody shares this preference. As for more questions, they will come with my next post, which I will greatly appreciate if you also criticize.


----------



## jdramirez (Oct 29, 2014)

polarhannes said:


> Hello,
> 
> for your use case the Brenizer method might be applicable.
> 
> ...



I think I'm missing the point of the brenizer method... basically stitching photos into a panoramic.... with manual focus, so the image is larger and you can photograph distant backgrounds... which give the appearance of bokeh....

I'm must being missing something. Why would someone use this?


----------



## privatebydesign (Oct 29, 2014)

jdramirez said:


> polarhannes said:
> 
> 
> > Hello,
> ...



It is a reverse of cropping, so you get less dof and wider fov. You can use a 200 f2.8 to give you an effective 50 f0.5. Just do a four frame by three frame stitch with a 200mm @ f2.8 and you have an effective 50mm f0.54 image, kinda cool, especially for big prints.


----------

