A question about the "shape" of DOF

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

DQE
Posts: 1653
Joined: Tue Jul 08, 2008 1:33 pm
Location: near Portland, Maine, USA

A question about the "shape" of DOF

Post by DQE »

I've noticed that DOF in macro photos of a plane surface that has a fine texture seems to be very abrupt and sharp-edged. In other words, the region of sharp detail seems to be very sharply and precisely defined.

Is there some way of reasonably accurately describing the shape of the region of "good" DOF that would address the issue of how abruptly DOF ends? Is this region approximately square shaped in profile or something like a Gaussian in shape or what?

In any event, when trying to take macro photos the DOF sure feels as if it's all or nothing and VERY narrow!

(The context of my question is using the MPE-65 lens at say f5.6 at 3-5x and f8-f11 at 1-2x magnification.)
-Phil

"Diffraction never sleeps"

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Re: A question about the "shape" of DOF

Post by rjlittlefield »

DQE wrote:I've noticed that DOF in macro photos of a plane surface that has a fine texture seems to be very abrupt and sharp-edged. In other words, the region of sharp detail seems to be very sharply and precisely defined.

Is there some way of reasonably accurately describing the shape of the region of "good" DOF that would address the issue of how abruptly DOF ends? Is this region approximately square shaped in profile or something like a Gaussian in shape or what?
I'm not sure that what you're looking for actually exists.

One way to think about the problem is in terms of MTF. Suppose you take a picture of a sine-intensity grating. When the blur circle is small in comparison to one cycle of the grating, then the grating is reproduced with high MTF, approaching 1. As the blur circle becomes large with respect to one cycle of the wavelength, say 20%, then the MTF starts to drop noticeably. The MTF continues to drop at roughly a constant rate, reaching a value of 0 when the blur circle is roughly 1.5 cycles (depending on aperture shape). Beyond that point, the MTF actually goes negative -- the sine grating changes phase by 180 degrees -- and after that it oscillates below and above zero in ever-diminishing values.

So, in the case of a sine-grating subject, there is a well-defined edge to the DOF. It's the place where MTF drops to 0, or to such a small value it might as well be zero.

On the other hand, with complex subjects whose Fourier transform contains a wide distribution of periods, the edge is not so well defined. Basically it depends on your subjective decision about how much sharpness you require. As long as all the Fourier components you require are reproduced with MTF much above zero, then you'll say the image is sharp, and when they aren't, you'll say that the image has gone out of focus. The sharpness of the edge of DOF depends on how fast and how hard your personal detector switches from "acceptable" to "OOF".

The following image may illustrate some of these ideas. Notice that the big lines of dots become progressively fuzzier as you move away from center, but still the lines are fairly well resolved until suddenly they disappear (MTF=0), only to reappear a little farther out, but with inverted intensity. Suddenly light gray appears in line with what had been black dots, while darker gray appears in line with what had been the light spaces between dots. On the other hand, it's very clear that even while the large black dots are being well resolved, they still look very fuzzy compared to the renditions near the plane of best focus. That distinction depends on higher frequency components at the edges of the dots that are lost long before the lowest frequency components get diminished very much.

Image

With the subjects I shoot more commonly, the transition from in-focus to out-of-focus involves detail at a lot of different levels, and so I perceive it as happening fairly gradually. See HERE, panel 2, for an illustration using a butterfly wing.

--Rik

DQE
Posts: 1653
Joined: Tue Jul 08, 2008 1:33 pm
Location: near Portland, Maine, USA

Post by DQE »

Rik,

Thanks for the very informative and helpful reply. The test pattern photo you posted is exactly the type of slanted plane scene I was thinking about in my query - I think I saw a roughly similar pattern in some of Lord V's photos recently, as a surface on which a bug was posing.

In reflecting on my interest in understanding the "shape" of the sharp DOF region, and after inspecting your photo closely, I think one would have to put a single number on the complex MTF profile at each position in the scene in order to accomplish what I wished for. Yet it's not been easy to provide a universally meaningful single number on MTF shapes. The "first disappearance frequency" is often used, partly because it's visually assessable without instrumentation, yet one wonders how directly related to perceived or measured image fidelity such a parameter is. There are a host of other "how wide is this function" parameters, of course, from full-width at half-maximum (FWHM), etc, etc. Some parameters have a published foundation in imaging science, such as parameters derived from information content.

It's interesting in the context of single-shot field macro photography that there is also a VERY narrow maximum detail region within your photograph - one can apparently see very fine paper fibers in the VERY narrow central portion of the reasonably sharp region of focus. I think the presence of this very narrow central portion of the fairly sharp DOF region is what has been bothering me as I attempt to improve my field macro photography.

One must position the camera's plane of focus within perhaps 0.1mm at 1-2x if one wishes to photograph with exceptional sharpness a bug's compound eye, not just the 0.3 or so mm that one may use for fairly sharp detail. Sometimes I think I would benefit from having an easy to activate 2-3x optical magnification system in my DSLR viewfinder so that I can see clearly where I'm positioning the very center of the DOF region. This is available in right-angle viewfinder add-on gadgets but not in a straight-viewing viewfinder add-on AFAIK.

Of course, with field macro work the bugs are often moving around and one may only have 1-2 seconds to take a shot. The best photographers on the macro forums are exceptionally talented!
-Phil

"Diffraction never sleeps"

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

One must position the camera's plane of focus within perhaps 0.1mm at 1-2x if one wishes to photograph with exceptional sharpness
I know, I think, where you're coming from.
With expanded Live View and reading glasses I can see pixels ok.
The very best lenses show a black/white transition within a few pixels. To accept a C of C of frame diameter divided by 1500, is to accept blurring of that edge by - a few pixels. Foul :evil: !!
I don't know the shape/corner frequency of the anti-alias filter but it evidently gets in the way too - see around the net, pictures produced with it removed. It isn't a "perfect" filter so it fuzzies things a bit more.

If an effect is so small that it's less than a pixel then sure, we wouldn't see it. But these aren't. My belief is that the fuzz-factors combine in their effects, so to take the C of C out of the equation, would mean using a figure of, say, smaller than a pixel. Perhaps field/5000. Then you get a field of sharpest focus, within which there's no change in sharpness, of about... (ta-daa...?) not 0.3mm but your 0.1mm.

rjlittlefield
Site Admin
Posts: 23561
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Phil,
It's interesting in the context of single-shot field macro photography that there is also a VERY narrow maximum detail region within your photograph - one can apparently see very fine paper fibers in the VERY narrow central portion of the reasonably sharp region of focus.
Yes, paper fibers and toner dots.

Here is another set of images that may be helpful. What I've done here is to shoot an aperture series, MP-E 65 at 3X, from f/2.8 to f/16. Canon T1i camera, 4752 x 3168 pixels on a 22.3 x 14.9 mm sensor.

The subject is a piece of paper with laser printer dots, broadly diffuse illumination from above and behind the subject to catch some glare off the dots. (Canon Speedlite 580 EX II with ETTL metering, through a Kleenex tissue.)

First, let's look at some vertical slices of the full frames.

Image

At this scale, I'd be inclined to choose f/11, maybe f/8, because those look almost as sharp as the wider apertures and have significantly more DOF. At f/11, DOF looks to be almost one full row of dots.

But now let's look closer. These are exactly the same frames, but here shown at actual pixels.

Image

Looking at this scale gives a very different picture. Here it's clear that f/11 is way too fuzzy. Even f/8 is not very good. I have to go clear out to f/4 (f/16 effective) to find an image that is sharp at actual pixels. Once I've done that, my DOF has dropped to a small fraction of one row of dots. By computation, the DOF has dropped by roughly a factor of 11, partly from the wider cone of light (f/4 versus f/11, a factor of 2.75) and partly because I'm now looking closer (25% versus 100%, another factor of 4 reduction in the allowable CoC at sensor).

So what is the right aperture, and then what's the corresponding DOF? Well... "It depends." What do you want to look at? What are your criteria?

If I'm taking the time to set up for stacking, I'm probably going to shoot at f/4 and space my frames close enough together to avoid focus banding. Calculated DOF in this case is something like 0.052 mm.

But if I have to shoot single frame and I'm looking to do a web posting, then I might stop down to f/11, plan for a 4X increase in CoC diameter because of the downsizing, and expect to get 0.57 mm.
One must position the camera's plane of focus within perhaps 0.1mm at 1-2x if one wishes to photograph with exceptional sharpness a bug's compound eye, not just the 0.3 or so mm that one may use for fairly sharp detail. Sometimes I think I would benefit from having an easy to activate 2-3x optical magnification system in my DSLR viewfinder so that I can see clearly where I'm positioning the very center of the DOF region. This is available in right-angle viewfinder add-on gadgets but not in a straight-viewing viewfinder add-on AFAIK.
Yep. And worse, the focus point that you see with the lens wide open for viewing probably is not the focus point that you get when the lens stops down for shooting!

In the 100% crops shown above, compare the focus range at f/2.8 with the focus range at f/5.6 or even f/8. Most of the gain in DOF has occurred behind the f/2.8 focus point, not much in front. This is due to incompletely corrected spherical aberration in the lens -- the periphery of the lens elements focus at a different depth from the center. Composing at f/2.8, you're mostly using the periphery; stop down to f/8 for shooting, and you're mostly using the center. I've seen this behavior in lots of lenses, and as a result I generally use the rule of thumb to focus on the closest thing I care about.
Of course, with field macro work the bugs are often moving around and one may only have 1-2 seconds to take a shot. The best photographers on the macro forums are exceptionally talented!
I'll agree 100% with that! For me, shooting anything that moves is at best frustrating and low probability. I live in awe of people who do it routinely.

--Rik

Edited to add: For calibration, the rows of dots are 0.4 mm apart, so "almost one full row of dots" would be a little less than 0.4 mm DOF, versus the 0.57 coming from my calculation. The calculation is based on CoC = sensor width/1500, scaled by 4X to account for reduction to 25% for posting. So as usual, the calculation is a useful estimate but for critical work a careful measurement would be more reliable.

Post Reply Previous topicNext topic