# Hyperfocal length

Discussion in 'Digital Photography' started by flosseR, Jan 9, 2010.

1. ### flosseR macrumors 6502a

Joined:
Jan 1, 2009
Location:
the cold dark north
#1
Ok, so I am loving night shots. I have been trailing a lot (car trails, star trails etc.)

I always focus manually for these ocasions but the problem is that something (fore or after) is always out of focus. Even with apertures of 16+. I know there is an online calculator for hyperfocal but is there like a quick calculation? say, full frame body, 17mm lens f11 will be 2.5m or something like that.?

Any help on this is highly appreciated.

2. ### Westside guy macrumors 601

Joined:
Oct 15, 2003
Location:
The soggy side of the Pacific NW
#2
Given the apertures you mention, you may very well be seeing the effects of diffraction - not necessarily a focus problem. What sort of sensor are you using (e.g. resolution + DX/FX)? A high-res sensor - say a full-frame 24mp sensor, or a 12mp DX sensor, will start to show diffraction somewhere between f/11 and f/13.

Anyway, hyperfocal distance can be approximated as f*f/(N*c), where f is the focal length, N is the aperture number (so for f/11 you use 11 not 1/11), and c is the circle of confusion size. For a full-frame sensor values of c are in the ballpark of 0.025mm to 0.03mm, depending on who you ask (Thom Hogan or Wikipedia, respectively).

So in your example, using c=.03 you'll get 0.876m.

3. ### flosseR thread starter macrumors 6502a

Joined:
Jan 1, 2009
Location:
the cold dark north
#3
wow.. great answer.. thanks..

I am using a 5dmk2 so FX. So from now on I should use F10, to be safe

Ok that would make it 1.156metres for 17mm @ f10 and using a c of confusion of 0.025
..unless i made a mistake

wow.. this is great

4. ### Westside guy macrumors 601

Joined:
Oct 15, 2003
Location:
The soggy side of the Pacific NW
#4
Yeah, one nice thing about that 0.025 value - dividing by that is the same as multiplying by 40. If you think of it that way, it may be easier to do the math in your head "on the fly".

5. ### toxic macrumors 68000

Joined:
Nov 9, 2008
#5
diffraction is not an issue on 35mm until past f/16. it is less of an issue for very high-MP sensors such as on the 5DII since it can "burn through" the diffraction somewhat.

if you aren't getting enough DoF at f/22, you need to start looking at tilt lenses.

6. ### panoz7 macrumors 6502a

Joined:
Nov 21, 2005
Location:
Raleigh, NC
#6
Care to explain this? My understanding was that diffraction limits the smallest point that a lens can resolve. If that point ends up being larger than a pixel on the sensor diffraction limits the resolution. Since more megapixels on a given sensor size means smaller pixels diffraction begins to be a problem earlier, making it more of a problem than on a lower resolution sensor of the same size. Is my understanding flawed? What does "burn through mean?"

7. ### Westside guy macrumors 601

Joined:
Oct 15, 2003
Location:
The soggy side of the Pacific NW
#7
Diffraction on digital cameras is absolutely tied to sensor pixel size. There's a great tutorial on Cambridge in Colour, including a nice (but possibly confusing) graphical tool that lets you see exactly what's going on. The list of cameras is old, unfortunately, but if you know that the 12mp Nikon D700 is comparable to the Nikon D70 or the original Canon 5D (in terms of sensor pixel size), and the 24mp Nikon D3x and Canon 5D Mark II are somewhat comparable to the Nikon D2x, you can figure it out.

Diffraction as it related to 35mm film was a completely different beastie.

8. ### Phrasikleia macrumors 601

Joined:
Feb 24, 2008
Location:
Over there------->
#8
A rough-and-ready way to estimate your hyperfocal distance is to focus about one third of the way into your scene. Works pretty well.

9. ### panoz7 macrumors 6502a

Joined:
Nov 21, 2005
Location:
Raleigh, NC
#9
OK, good. That's actually the site I was on when I first learned about diffraction. Just wanted to make sure it didn't have incorrect information.

The same site has an article on hyperfocal distance with a table generator that might be useful to the OP: http://www.cambridgeincolour.com/tutorials/hyperfocal-distance.htm

10. ### toxic macrumors 68000

Joined:
Nov 9, 2008
#10
The diffraction cutoff frequency

11. ### panoz7 macrumors 6502a

Joined:
Nov 21, 2005
Location:
Raleigh, NC
#11
That was an interesting read, but I still think it supports the idea that you'd want to stop down more on say a 5d mk ii than on a 5d. What it does say is that if diffraction is your only criteria you'd be misguided buying a 5d over a 5d mkii just because it has larger pixels. Admittedly I just woke up, so I'm still a bit out of it, and if I missed something, I apologize. But here's my conclusion anyway:

Instead of thinking about absolute resolution I'd think about it terms of lost resolution compared to that absolute, something you're probably interested in if you upgraded from a 5d to a 5d mk ii.

Let's imagine a 5d and a 5d mkii taking the same picture at f/16. At f/16 the 5d is just beginning to be diffraction limited and you're probably going to get most of the resolution the sensor can render. The 5d mk ii, having smaller pixels, has already begun to feel the effects of diffraction. Based on that article it hasn't lost all of its resolution, but it has lost some.

Maybe the mk ii is down to 16 MP from 21.1 (I made the 16 number up to demonstrate the idea; I have no idea what the real number is other than it being less that 21.1). That's still more than the 5d's original 12, so as the article suggests, at the same aperture the smaller photo-sites are at worst equal to the larger ones, but never worse.

But, there is some resolution lost over the maximum 21.1 you'd have if the camera wasn't being diffraction limited. While that lost resolution gives you no incentive to change over to a 5d since the absolute resolution is still higher it does give the 5d mk ii more incentive to stop down than the 5d shooter in order to maximize resolution.

My conclusion is that while the OP can shoot at f/16 and know that he's getting a higher resolution image than if he were shooting on a 5d, there's still a reason for him to want to user a larger aperture if that option is available.

Perhaps the real world loss of resolution isn't that significant. I'd imagine that the lens quality and shooting technique would probably limit resolution before diffraction (especially at f/16, which may have been your original point), so this conversation probably doesn't matter. I'm also curious about the article's claim that a proper algorithm can be applied post shoot to remove diffraction. I don't understand how that would work, but it sounds interesting.

12. ### Doylem macrumors 68040

Joined:
Dec 30, 2006
Location:
Wherever I hang my hat...
#12
Yup, this is way I do it too. Sometimes we make photography a lot more complicated than it really needs to be...

13. ### sonor macrumors 6502

Joined:
Jan 15, 2008
Location:
London, UK
#13
This is the oft-quoted rule of thumb, but I think it's much too rough and ready to be much help. It only comes close in a very limited set of circumstances.

From the website mentioned above...

"I encourage you to ignore such advice since this distance is rarely optimal; the position actually varies with subject distance, aperture and focal length. The fraction of the depth of field which is in front of the focal plane approaches 1/2 for the closest focus distances, and decreases all the way to zero by the time the focus distance reaches the hyperfocal distance. The "1/3 rule of thumb" is correct at just one distance in between these two, but nowhere else."

http://www.cambridgeincolour.com/tutorials/hyperfocal-distance.htm

14. ### toxic macrumors 68000

Joined:
Nov 9, 2008
#14
this is true for any situation.

what the article states is that a high-density sensor will either resolve more detail than a lower density sensor, or the same amount. it will never resolve less. you get 100% of the resolution advantage from the high-density sensor at all apertures below the diffraction-limited aperture (DLA). once you get to the DLA or go past it, the resolution benefit is no longer 100%, it is either 0% or between 0 and 100%. again, it is never below zero, so the high-density sensor will always perform better or the same as a low-density sensor (of the same size) at the same aperture.

applying it to this thread, a 5DII, at 21MP, will do better at f/16 than nearly all other DSLRs available. if f/16 is acceptable on a 5D, which it is, then f/16 can only be better on the 5DII.

lens resolution will not affect diffraction

there is a significant loss of resolution - you can see it for yourself. the only question is if the loss is significant enough for you to avoid very small apertures.

diffraction can be "removed" since we know the behavior of light and can mathematically model it.

15. ### Westside guy macrumors 601

Joined:
Oct 15, 2003
Location:
The soggy side of the Pacific NW
#15
I think rules of thumb can be useful, but I agree - at least given the circumstances under which a person is usually focusing hyperfocally. If you're shooting with a wide-angle lens at small apertures, your hyperfocal focus point is only going to be a meter or two in front of your camera. Focussing instead at "1/3 away" is giving up a fair bit of that.

Especially since the math isn't all that hard. I know f*f/(N*c) looks complicated, but break it down and round if you want. The way I usually do it is divide up the problem this way: f * (f/N) * (1/c). So if you're, for example, using a 20mm focal length at f/11, you can simplify this with "seat of the pants" math.

f = 20
f/N rounds to about 2
1/c = 40 (for my full frame sensor - with DX I used 50-60 for this)

So with seat of the pants math, 20 * 2 * 40= 1600mm, or 1.6 meters. I usually round up to play it safe, so I'd use 2 meters as my hyperfocal distance.

If we took the time to do the math more accurately, we'd have gotten 1.45 meters rather than 1.6 meters - close enough for jazz, as the saying goes.

16. ### Phrasikleia macrumors 601

Joined:
Feb 24, 2008
Location:
Over there------->
#16
This all makes my head hurt, but thanks.