Hyper Focal Distance (HFD) Calculator Excel sheet .. help needed please

Messages
6,671
Name
Wail
Edit My Images
No
I am trying to workout a simple Excel table that allows me to calculate the HFD when out in the field.

I've found this equation ...

H ≈ [f^2] / [Nc]

H = HFD
f = lens's focal length
N = Lens's Aperture (f number)
c = Circle of Confusion


My three quandaries: -

1. Is this equation accurate?

2. How do I obtain "c", for a given lens?

3. Would this equation hold for any camera format (FX & DX)?


Thanks for any input / help.
 
Please Sir! I can answer 3. -- No.

(What I mean is, the HFD isn't the same for both, but you most likely know that...)
 
As far as i'm aware the CofC relates to the film/sensor size not the lens.
 
try this and the links down the left hand side.

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

Thank you, I already have that link and I really don't want to go through all the iterations of various focal lengths and possible distances to work out a table! It would get too daunting. Hence, if I could work out the equation, then plug that into Excel, viola :love:!

But thanks anyway.



Please Sir! I can answer 3. -- No.

(What I mean is, the HFD isn't the same for both, but you most likely know that...)

Great, I thought so; but I wasn't too sure. Now at least I can say I've got one of the queries sorted :)

Thank you.



As far as i'm aware the CofC relates to the film/sensor size not the lens.

Correct :thumbs:

Bob

Thank you, both; but how does that :help: me, please!
 
Thank you, both; but how does that :help: me, please!

If you're only using two sensor sizes the you'll only need two CofC figures. Go to the dofmaster website, select your cameras and it will give you the CofC for them.
 
so if we take c to be a constant (for full frame and do crop later)

you get:
H=[(f^2)/N]*(1/c)
or
c=[(f^2)/N]*(1/H)

if you assume this to be correct, pull a number out of the table and calculate c, then do it for another set of values and calculate c again, do it 3 times and if all the c values are the same the equation works :p

another good shout would be to check homogenuity but this way is quick and dirty and should work
 
Great :thumbs: :thumbs: :thumbs: ... thank you very much.

Can you also, please, pretty please, confirm to me if the equation above is correct.
 
nope, I'm sitting doing coursework, but if all the numbers work out then I'd say it worked well enough

pull a few sets of values set up escel to calculate c and if they are all really really close then its a valid model
 
If you go into that DoFmaster link, when you input the camera type it looks up the format and changes the Circle of Confusion. It's bottom-right of the calculator screen. International standards for Nikon 1.5x crop format it is 0.02mm, Canon 1.6x crop 0.019mm, full frame 0.03mm.

On the other hand, do you really need a calculator for hyperfocal distance? It really only applies to wide angles so if you just jot down a table with maybe 10, 12, 15, 20, 28, and 35mm (crop format) focal lengths, against f/numbers 2.8, 4, 5.6, 8, 11, and f/16 - that's only 36 numbers that easily fit on to a credit card sized note in your bag.

Bear in mind that DoF, in practice, is a very inexact science ;)

Also bear in mind that DoF tables read from the front of the lens whereas lens focusing scales are measured from the sensor - makes a difference at close distances.
 
sod it coursework is boring, I'll grab a pen and paper and have a little play
aye theres programs that do it but the equation helps some people (inc me understand)

think isl its an inverse square relationship that just pops up in my mind how everything varies with everything else
 
so if we take c to be a constant (for full frame and do crop later)

you get:
H=[(f^2)/N]*(1/c)
or
c=[(f^2)/N]*(1/H)

if you assume this to be correct, pull a number out of the table and calculate c, then do it for another set of values and calculate c again, do it 3 times and if all the c values are the same the equation works :p

another good shout would be to check homogenuity but this way is quick and dirty and should work

nope, I'm sitting doing coursework, but if all the numbers work out then I'd say it worked well enough

pull a few sets of values set up escel to calculate c and if they are all really really close then its a valid model

sod it coursework is boring, I'll grab a pen and paper and have a little play
aye theres programs that do it but the equation helps some people (inc me understand)

think isl its an inverse square relationship that just pops up in my mind how everything varies with everything else

:p

Thanks, I'm dumping a few friends for a drink to try and figure this out. I really want to get to understand the "science" behind this principle.

Thank you for taking the time.
 
If you go into that DoFmaster link, when you input the camera type it looks up the format and changes the Circle of Confusion. It's bottom-right of the calculator screen. International standards for Nikon 1.5x crop format it is 0.02mm, Canon 1.6x crop 0.019mm, full frame 0.03mm.

On the other hand, do you really need a calculator for hyperfocal distance? It really only applies to wide angles so if you just jot down a table with maybe 10, 12, 15, 20, 28, and 35mm (crop format) focal lengths, against f/numbers 2.8, 4, 5.6, 8, 11, and f/16 - that's only 36 numbers that easily fit on to a credit card sized note in your bag.

Bear in mind that DoF, in practice, is a very inexact science ;)

Also bear in mind that DoF tables read from the front of the lens whereas lens focusing scales are measured from the sensor - makes a difference at close distances.

Great, and thank you very much.

I am off to work on my Excel table to see if I can get it right :)


There are little programs to download that will do exactly what you want, you don't need excel.

I don't mind having a program that does this, it would be good to counter check my own table (once it's done); but I need to get the equation for two reasons: -

1. I want to understand how it all fits in, and to work it out for my range of lens and shooting styles

2. I will not have Internet access (if the program is anything like the web link above), as I will be in the middle of the desert shooting.

Would you mind posting a link to this program; I hope it's not a web-based like the link above.


Again, thank you all for all your help.
 
I've gottena circle of confusion of 0.0295<c<0.298 for half a dozen focal lengths below 55mm between f2.8 and 16

oh and I cba to open excel so by hand :p
 
sod it coursework is boring, I'll grab a pen and paper and have a little play
aye theres programs that do it but the equation helps some people (inc me understand)

think isl its an inverse square relationship that just pops up in my mind how everything varies with everything else

Funny you should say that ;)

If you check 30mm focal length on full frame, HFD at f/1.4 is 22m, at f/5.6 it is 5.6m, and at f/22 it is 1.4m. Spooky :D
 
:)

This is great; thank you so much .. each and every one of you lot :)

Done it, works great and now .. I'm the master of HFD :p
 
Be careful, DoF isn't black and white (no pun intended). There isn't a point where something suddenly comes into focus. The 'constant' used to calculate DoF is based on a standard set nearly 100 years ago, and it's not actually a constant - it's an estimate.

The principle is okay. You just have to be a bit more careful with your tolerances than the tables/caclulators would have you believe, and balance this with your own opinion of Acceptable Sharpness.
 
Great, and thank you very much.

I am off to work on my Excel table to see if I can get it right :)




I don't mind having a program that does this, it would be good to counter check my own table (once it's done); but I need to get the equation for two reasons: -

1. I want to understand how it all fits in, and to work it out for my range of lens and shooting styles

2. I will not have Internet access (if the program is anything like the web link above), as I will be in the middle of the desert shooting.

Would you mind posting a link to this program; I hope it's not a web-based like the link above.


Again, thank you all for all your help.

It is the same link just click one of the links on the left as I wrote earlier.

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

or this one

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

Not web based.
 
2. How do I obtain "c", for a given lens?

You don't - it has nothing to do with the lens alone. For all intents and purposes, I'd select the CoC no larger than the single photocell area on your sensor.

Thom Hogan just did an interesting article about that here following up some recent threads on DPReview of whether hyperfocal distance is of any practical use. I'd also recommend "The INs and OUTs of Focus" book (freely downloadable) by Harold M. Merklinger. Apart from having a lot of formulas it does have some really interesting thoughts about hyperfocal distance and its usefulness...
 
Keith,

Thank you for that bit of warning :)



Tom,

Now, you have to have one for Palm, another for Windows Mobile, another for the iPhone ... just when I moved and got myself a BlackBerry :annoyed:

Thank you, I should have spent a bit more time looking ... but thanks for taking the time.
 
Keith,

Thank you for that bit of warning :)



Tom,

Now, you have to have one for Palm, another for Windows Mobile, another for the iPhone ... just when I moved and got myself a BlackBerry :annoyed:

Thank you, I should have spent a bit more time looking ... but thanks for taking the time.

The Circle of Confusion just got bigger :lol:

But you can print out the DoF round slide chart and take that into the field............
 
Actually, I just re-read the subject and I see that it's Hyperfocal Distance you're after. This is even harder to measure than Depth of Field.

Depth of Field is the amount of space in front and behind a subject in "acceptably sharp focus". If this value isn't a real constant, it's an estimate. And if it's an estimate, this means that different people/situations will give different answers.

Seeing as hyperfocal distance is based on the extremes of acceptable sharpness, it will be very difficult to calculate reliably for different grades of acceptable sharpness. That is, if you expect sharper pictures, the acceptable depth of field will be shorter and the hyperfocal distance will be further.
 
Alexey,

Just read that article, some very interesting observations by Thom.


Keith,

Thanks, now that sure made my head spin :p
 
Let me explain a bit of what I am trying to achieve from all this .... if I may :shrug:

I shoot landscape a lot, and the "old school of thought" would say "use the largest f number to maximise depth of field :thinking:. That's the exact situation that I am want to avoid.

I've found that most of my lens are pretty sharp, but are sharpest at f/8; and at f/8 most of shots are pretty sharp if I focus at a distance of about 15 meters.

So, what I want to calculate is .. how accurate is this HFD method of shooting really is, and is it suitable for my style etc.

As such, thank you for all the input here and any further information would be appreciated.
 
You don't - it has nothing to do with the lens alone. For all intents and purposes, I'd select the CoC no larger than the single photocell area on your sensor.

Thom Hogan just did an interesting article about that here following up some recent threads on DPReview of whether hyperfocal distance is of any practical use. I'd also recommend "The INs and OUTs of Focus" book (freely downloadable) by Harold M. Merklinger. Apart from having a lot of formulas it does have some really interesting thoughts about hyperfocal distance and its usefulness...

If you do that, you are setting an incredibly (impossibly) high standard that actually contradicts the whole concept of depth of field, which is based on acceptable levels of sharpness, not maximum levels. And it is independent of the sensor. Modern sensors have over 200 pixels per mm which would set a CoC several times higher than accepted standards. (Not that I actually accept them, as perhaps you don't, but that's what we all work to.)

On another issue, a practical point, one thing that I find more helpful than anything else when using hyperfocal distance, is the fact that sharp focus always extends to exactly half the HFD. For example, if HFD is 3m then you'll get sharp focus back to 1.5m.

The way I generally work is to decide what it is in the foreground that I want sharp. It is then relatively easy to visually estimate where double that distance is, and focus on it with the centre AF point. That nails the hyperfocal distance point more accurately than you can get by reading tables and settings against lens scales.

Then I refer to my little HFD card with a range of focal lengths and f/numbers jotted down, and pick the nearest distance. Read off the f/number against that, and then set one f/number higher, just to make sure and cover any errors.
 
Let me explain a bit of what I am trying to achieve from all this .... if I may :shrug:

I shoot landscape a lot, and the "old school of thought" would say "use the largest f number to maximise depth of field :thinking:. That's the exact situation that I am want to avoid.

I've found that most of my lens are pretty sharp, but are sharpest at f/8; and at f/8 most of shots are pretty sharp if I focus at a distance of about 15 meters.

So, what I want to calculate is .. how accurate is this HFD method of shooting really is, and is it suitable for my style etc.

As such, thank you for all the input here and any further information would be appreciated.

My last post crossed with this Wail. Given where you're coming from, maybe HFD is not what you're looking for. It is quite a contentious subject.

If you are wanting to achieve sharpness around the maximum you can get at f/8 at the focused point, then HFD will not give it to you. By definition, sharpness at the extremes of the hyperfocal range will be verging on being visibly blurred. In fact if you look a bit closer than you are supposed to with the 'normal' viewing distance theory (from a distance roughly equal to the diagonal of a print) then things will be visibly blurred.

This is often a problem with distant views in landscape, where often the most important detail is in the far mountain range - the part of the subject that you have just placed at the extreme edge of acceptable sharpness with HFD focusing.
 
I tend to do f8 infinity then back a bit focus for landscapey stuff unless I'm going for something special.

yeah I'm a bad person :p
 
I've found that most of my lens are pretty sharp, but are sharpest at f/8; and at f/8 most of shots are pretty sharp if I focus at a distance of about 15 meters.

So, what I want to calculate is .. how accurate is this HFD method of shooting really is, and is it suitable for my style etc.

I'd suggest you experiment. Use a DoF calculator, like http://www.dofmaster.com/dofjs.html or your own, and work out the hyperfocal distance for your lens at f/8, then take a photo at different apertures and see if it's right.

For example, shoot at 70mm f/8 at a subject at 100ft (for my D300). Make sure there's plenty of detail in the front of the scene and on the horizon, so you can see what is sharp enough for you. Shoot at f/5.6-f/16 too, and compare the results.

Judge the photos zoomed on your LCD, on your monitor, at 100% and in print. You should soon see if the calculator is right, or if you need to make adjustments.
 
And another thing!

Hyperfocal distance is all about maximising depth of field, and the other aspect of that is high f/numbers - more often f/11 and f/16 rather than f/5.8 to f/8. Which puts you right into the area of diffraction. Not good if it's maximum sharpness you're after.

No free lunch is it :D

Agree with Yammer - shoot some pics, print out to your largest normal size and take a peak to see what's what. Theory is all very well, but how it applies to you might well be a bit different.
 
That's okay, Richard. Please PM me with any suggestions ;)
 
My last post crossed with this Wail. Given where you're coming from, maybe HFD is not what you're looking for. It is quite a contentious subject.

If you are wanting to achieve sharpness around the maximum you can get at f/8 at the focused point, then HFD will not give it to you. By definition, sharpness at the extremes of the hyperfocal range will be verging on being visibly blurred.
...
This is often a problem with distant views in landscape, where often the most important detail is in the far mountain range - the part of the subject that you have just placed at the extreme edge of acceptable sharpness with HFD focusing.

Richard is very right here. Quite a few times before I found myself in the same position as you are Wail trying to use f/8 as optimal aperture but it simply does not work that well all the times. From my limited experience, there are two practical ways out of this but both are not ideal.

First, you can use wider lens and get closer - they do have greater DOF. Ultrawides are not suitable to everybody and every subject so this approach is of course quite limited.

Second, you can get a tilt lens and try to extend DOF that way. The native Nikon/Canon TS lenses are really expensive. You can try a cheaper alternatives like buying TS adapter and MF lenses but there the choices of the focal length are more limited. Plus focusing tilt lenses resembles some form of an obscure voodoo practice ;).
 
I'd suggest you experiment. Use a DoF calculator, like http://www.dofmaster.com/dofjs.html or your own, and work out the hyperfocal distance for your lens at f/8, then take a photo at different apertures and see if it's right.

For example, shoot at 70mm f/8 at a subject at 100ft (for my D300). Make sure there's plenty of detail in the front of the scene and on the horizon, so you can see what is sharp enough for you. Shoot at f/5.6-f/16 too, and compare the results.

Judge the photos zoomed on your LCD, on your monitor, at 100% and in print. You should soon see if the calculator is right, or if you need to make adjustments.

And another thing!

Hyperfocal distance is all about maximising depth of field, and the other aspect of that is high f/numbers - more often f/11 and f/16 rather than f/5.8 to f/8. Which puts you right into the area of diffraction. Not good if it's maximum sharpness you're after.

No free lunch is it :D

Agree with Yammer - shoot some pics, print out to your largest normal size and take a peak to see what's what. Theory is all very well, but how it applies to you might well be a bit different.

Thank you, both, for all this :)

Going over f/11 is something I want to try and avoid as much as possible, for the simple issue of diffraction. All though, I've found that this issue isn't so serious of a problem with high-end lens.

I've experimented endlessly, and for my style, I don't particularly like really wide lens for landscape and I've also found that f/8 to be ample good; but of course it does vary every now and then.
 
Back
Top