Do sharper lenses have more, or less, DOF?

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

I’ve heard photographers say that sharper lenses — and cameras, for that matter — have less depth of field (DOF) than lesser ones. Is that true?

Like so many things, it all depends on the details of the question.

Let’s say you focus a lens at infinity, and measure the sharpness there as MTF50 measured in cycles per picture height (cy/ph). Call that MTF50Inf. Then you pick an acceptable MTF50 as a certain percentage (call that the tolerance ratio) of MTF50Inf, say 80%, call that MTF50Tol, and ask what distance you should focus to have the MTF50 for an object at infinity to equal MTF50Tol. That would give you a new kind of hyperfocal distance, similar in concept to the old, reliable, circle-of-confusion (CoC) based hyperfocal distance, but one that takes into consideration diffraction and lens aberrations.

With our simulated Otus and Nikkor lenses, what would these hyperfocal distances look like? Here’s a set at a tolerance ration of 80%:

hfd p8

You can see that the hyperfocal distance using MTF50 ratios decreases as you stop down the lens, just like CoC hyperfocal distance. You can see that, from f/8 through f/16, it doesn’t make any difference which lens you use; that’s because in that range of apertures, in-focus sharpness is limited by diffraction, not lens aberrations.

You can also see that, at the wider apertures where aberrations play a bigger role than diffraction, that, yes indeedy, the sharper Otus does have less DOF, as indicated by the longer hyperfocal distances.

At a tolerance ration of 60%:

hfd p6

40%:

hfd p4

And finally, 20%, which is getting downright fuzzy:

hfd p2

At 20% tolerance ratio, the quality of the lens doesn’t make much difference a any f-stop, but at 40% and up it does.

Now let’s say that the boundaries of our acceptable DOF are determined by an absolute MTF50, say 1400 cy/ph.

Then we get:

hfd1400

By that measure, the Otus has more DOF than the Nikon, which doesn’t even get to the bar at any distance at three f-stops. BTW, neither lens gets there at f/11 and f/16, because of diffraction.

If we lower the bar to 1200 cy/ph:

hfd 1200

Yup, the sharper lens has more DOF by that measure.

At 1000 cy/ph:

hfd 1000

And finally at 800 cy/ph, where we finally get all f-stops represented:

hfd 800

 

 

Object field, infinity-focused behavior with two lenses

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

If you’re coming late to this party, here’s some background on object field methods.

It is a tenet of the object-field (OF) approach to depth of field (DOF) management that resolution is constant in the object field when the lens is focused at infinity. Proponents of OF methods recognize that diffraction will keep this relationship for holding at great distances, but offer little quantitative guidance as to how to deal with it as it breaks down.

In the past, I posted an examination of the object field behavior of an infinity-focused lens, but my lens model was not very accurate wider than f/8. Now I have a new, more accurate way of simulating the combination of diffraction and defocusing (thanks, Alan) and two new lens models, one for the Zeiss Otus 85/1.4, and one for the Nikon 85/1.4 G.

First, let’s repeat a couple of image-plane images from yesterday’s post, but with legends that make it easier to tell which curve is which. I’ve scaled the focal lengths of both lenses to 55mm.

otus img

Nikon img

In the object field:

otus obj

Nikon obj

You can see that the predicted object field behavior occurs, but only at short distances.

If we call 800 or 1000 cycles per picture height the edge of photographic sharpness, then the transition region from blurred to sharp takes place with the subject between 10 to 100 meters. So let’s take a closer look at just that region.

First, both fields for the Otus.

Image Plane

Image Plane

Object Field

Object Field

The object-field lines are pretty flat for (going from bottom to top of the object fied graph) f/1.4, f/2, f/2.8, and f/4. But if we look at the image=plane plot, we can see that, at those f-stops, we have sharpness that are pretty soft up to 50 or 60 meters. The f/11 and f/16 object-field lines are never flat, and the f/5.6 and f/8 lines start falling when the sharpness gets to the photographic region.

With the Nikon lens:

Image Plane

Image Plane

 

Object Field

Object Field

The same kind of situation obtains, but the conformity to the OF dictum is even worse if you care about photographic sharpness.

It looks to me that the object field rule of constant resolution is only adhered to in regions of noticeable softness. That doesn’t mean that the rule is not useful, just that it should be applied to managing degrees of critically-visible blur.

You can get another cut at what’s going on by looking at the two lenses’ results on the same chart one f-stop at a time.

otusnikon14

At near distances, the sharpness is identical, because it is dominated by focus. At further distances, there is more falloff in sharpness with the Nikon.

otus nikon 2

Same thing, only more so at f/2; that is close to the Otus’s best performance.

otus nikon 28

Same.

Otus Nikon 4

Now diffraction is becoming more important, and it affects both lenses equally, so the difference is diminishing.

otus nikon 56

Diffraction is more important.

otus nikon 8

At f/8 and narrower apertures, it’s all about diffraction.

Modeling the Nikon 85/1.4 G

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

Yesterday, I modeled a really great lens, the Zeiss Otus 85/1.4 ZF.2, and ran a set of depth of field curves.

Today, I’ll do the same for a lesser lens, the Nikon 85/1.4 G. Not that the Nikon is a bad lens, it’s just not stellar.

It has a ton more longitudinal chromatic aberration (LoCA) than the Zeiss, and I modeled it this way:

nikon loca 1p4-8

Confusingly, the blue curve is the red raw channel. Sorry about that.

Here’s what you get when you look at f/1.4 through f/18 in shole stops, with the lens focused at 10 meters.

nikon aberr 2

In the object field:

nikon aberr 2 obj

Next up: how excellent and merely good lenses perform under some DOF management strategies.

 

Modeling the Otus 85/1.4

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

One of the things that I’ve been meaning to get to is better modeling of the on-axis performance of a really good lens. I’ve taken as my exemplar the Zeiss Otus 85mm f/1.4 ZF.2. My old model was pretty good from f/8 on down, but was too optimistic at wider apertures.

Now that I’ve got a pretty good defocusing/diffraction algorithm, it seemed like a good time to work on the rest of the lens. First, I added longitudinal chromatic aberration. That is not material for the Otus 85, but is for other lenses, so I modeled it while I was working on the code. After getting advice from Jack Hogan, I picked principle wavelengths of 597, 531, and 469 nanometers for the red, green, and blue planes respectively. After a little tweaking, here’s what I got wide open:

otus loca 1p4 1

Compare those to the curves here. Note the distance scale runs the other way on those curves.

Then, with a big, big assist from Alan Robinson, I modeled the aberration blur as a function of aperture, and ran a set of curves:

otus loca 1p4-8 1

It’s easier to see if we plot the combined MTF50s for each f-stop rather than each color plane. I used Jack Hogan’s formula for combining the color planes:

combined MTF50 = (Red MTF50 + 2 * Green MTF50 + Blue MTF50) / 4

otus aberr 2

And, for what it’s worth, in the object field:

otus aberr 2 obj

The model could be tweaked further, but that’s better than it has to be for the DOF management studies.

 

A more accurate defocusing algorithm

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

When I first started my investigations into depth of field management, I was driven by two very separate things that ganged up to point me in that direction.

The first was the work I did measuring longitudinal chromatic aberration (LoCA) and focus shift. My approach to that work was to mount the camera—and in some cases the razor blade target—on a motorized rail controlled by a computer. A byproduct of tests using that set up was a very accurate look at the way that sharpness, measured in terms of MTF50, varied with subject distance. At apertures close to the optimum for the lens involved if the margins of acceptable depth of field were anywhere near what the lens was capable of, the depth of field was pathetically low. I had been used to derating the marked DOF ticks on lenses by three stops, but my measurements indicated that even this wasn’t enough for critical work. That provided motivation for me to do some further study.

While I was thinking about that, I got involved in a discussion about object-field DOF management methods in the a7x forum on DPR. I had some concerns about how some of the tenets of that approach fared under conditions where there were appreciable contributions to loss of sharpness from lens aberration, diffraction, and sampling with apertures larger than the infinitesimally small points assumed by sampling theory.

It seemed that a way to get at both those things was to do simulation studies. I happened to have a camera simulator that modeled read and shot noise, diffraction, a crude lens aberration model, a Bayer CFA, and arbitrary (assumed square) fill factors. It didn’t handle defocusing, so I modified it to do so, simply adding another convolution with a pillbox kernel to model the defocusing. Alan, Severain, AiryDiscus and others have demonstrated that that’s not an accurate way to model defocusing, but let’s set that aside for the moment. The model produced spatial frequency response (SFR) curves using the slanted edge method, and I reported on MTF50 primarily.

That model ran very slowly, taking a few hours to produce each set of results. Jack Hogan produced a model that was simpler than mine, leaving out the CFA, using a monochromatic source, and making more assumptions about various kinds of blur, but the results were close enough for what I was trying to get at. Jack’s model had one huge advantage over mine: instead of running in a few hours, it never took more than a second.

Jack’s code used a different lens model than mine. His simulated lens was better than a real Zeiss Opus 85/1.4 at the wider apertures. Mine was worse. Both produced roughly similar results from f/8 to f/22.

I switched to Jack’s model – he generously supplied me his Matlab code, which I modified and extended – and produced a set of results for both image-plane and object-field MTF50.

One of the things that came out of all this modeling is that, at MTF50’s that photographers consider sharp or close to that, lens aberrations and fill factor played an important role in determining sharpness; it wasn’t all diffraction and defocusing. That made me concerned that the inaccuracies in the way defocusing was modeled in both Jack’s and my simulations was making the results of questionable value. I don’t know if making the model more accurate will change the general nature of the results or not, and that makes me question how much further I should go with the present two models. I’d hate to do a lot of work and then have to do it over.

I didn’t feel confident extending either model to include a better defocusing algorithm, as I have hardly any background in optics. I do own a copy of the classic Fourier Optics, but unfortunately, having it on my bookshelf has not increased my skills. Alan Robinson volunteered to extend Jack’s algorithm to improve its accuracy under moderate defocusing.

Here’s Alan’s algorithm for MTF = x:

alan mtfx

Where lambda is the wavelength of the light, delta Z the defocusing distance, and Fn the f-stop.

For MTF50, this simplifies to:

alan mtf50

I implemented this in Matlab (Alan even provided the critical code), and made a constant change in the above at Alan’s suggestion. The 2.06 in the first term of the denominator became 1.9414. I also changed the constant in the equivilant last term of Jack’s denominator to 2.2.

Let’s compare the results, first with no aberration and a zero fill factor (point sampling). The captions all say that the lens was focused at 100 meters. That is a lie; 10 meters is the right number.

Jack’s algorithm:

jack no aberration ff0

Alan’s:

alan no aberration ff0

Note that the peak MTF50s are well above the Nyquist frequency for the 42MP camera that is modeled.

Changing the fill factor to 100% gives us a more realistic case.

Jack’s:

jack no aberration

Alan’s:

alan no aberration

And finally, adding our 1.4 micrometer (not pixel, like it says in the captions)  lens aberration, which is optimistic at apertures wider than f/8 or so.

Jack’s:

jack w aberration

Alan’s:

alan w aberration

Alan’s curves are somewhat broader for wide apertures. The difference is not large.

Whew! I don’t have to go back and rework the last two weeks’ worth of posts.

Diffraction, aberrations, & fill-factor in the object field

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

Yesterday, we looked at object field MTF50 behavior with the lens focused at infinity, and found that with our simulated top drawer 55mm lens, a simulated Sony a7RII, the middle-distance curves were not flat, as object-field theory says they should be. The gross reason is not a mystery: lens aberrations, diffraction,  and fill-factor considerations all conspire to provide other sources of blur than just geometrical optics.

But which one is the most important?

I ran a series of curves at f/4 at pixel pitches varying from 3 micrometers (um) to 8.5 um, with each pitch being 1.414 times the previous one.

First in the image plane:

3-9p 55mm infinity focus

And then in the object field:

 

3-9p 55mm infinity focus obj

The blue line is for the 3um pitch. You can see that decreasing the pitch makes a big difference.

Zooming in:

3-9p 55mm infinity focus mag obj

OK, now let’s back out the lens aberrations:

3-9p 55mm infinity focus no aberr mag obj1

That helps. The 3 um line is now pretty flat until 40 or 50 meters.

Now I’m going to take out diffusion. You can’t do this in real life, but you can with a sim.

3-9p 55mm infinity focus no diff no aberr mag obj1

Diffraction doesn’t make all that big a difference; that’s because we’re at f/4, and because we took it out last. Diffraction is a slightly larger effect than the lens aberration measure that we’re using.

{The material below was added later.]

I’ve been asked to show what the above vurves would look like at f/8, Here goes, first in the image plane:

3-9p 55mm infinity focus f8

And now in the object plane with sources of blur successively removed:

3-9p 55mm infinity focus obj f8

3-9p 55mm infinity focus no aberr mag obj f8

3-9p 55mm infinity focus no diff no aberr mag obj f8

 

Object field DOF methods and MTF50

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

A few days ago, I gave a brief introduction to object field techniques for controlling DOF, then went on to other image plane oriented things. In this post, I’m going to circle back to the object field. If you haven’t yet read it, I recommend that you take a look at this short explanation.

This approach has its adherents and its detractors. When I first encountered it a couple of weeks ago (Thanks to Jerry Fusselman), I found it counterintuitive in places, but I now think that it has merit for some people in some situations, and I don’t find an inherent conflict between object field and image plane approaches; I think they are two ways of looking at the same thing.

I think an analogy with exposure is apt. There are many ways to get to an exposure setting. Some are wrong, but there’s not just one that’s right. Some people argue passionately for the way that works for them, thinking that it should work for everybody. But one size doesn’t fill all photographers, and one size doesn’t fit all situations. So it behooves photographers to have many ways for dealing with exposure, be open to learning new ones, and not be too quick to call the ones that they don’t use garbage. Replace exposure with DOF, and it’s pretty much the same thing.

That doesn’t mean that we have to uncritically accept every claim about exposure, and it doesn’t mean that we have to do that with DOF.

There was a claim about object field methods that I touched on a few days ago that I’d like to get into to here. Here’s how Merkingler put it:

When a lens is focused at infinity, the disk-of-confusion will be of constant diameter, regardless of the distance to the object.

The disk of confusion is what Merklinger calls the projection into the object field of the image-plane circle of confusion (CoC). The implication is that, with the lens focused at infinity, resolution in the object field is constant regardless of depth. That would be true for a lens with no diffraction (which, to be fair, Merklinger talks about), no aberrations, on a camera with no Bayer CFA and sensors that only are sensitive at an infinitesimal point in the middle of each pixel. But in real life, the situation referred to above only applies to a range of distances.

How large a range of distances?

Let’s take a look.

With our simulated top quality 55 mm lens focused to infinity and mounted on a simulated Sony a7RII, we get image plane MTF50s versus object distance curves like these:

HFD 55 infinity

Let’s blow this up to the distances between 1 and 10 meters:

HFD 55 infinity 2-10m

Now let’s look at that in the object field:

HFD 55 infinity 2-10m obj

You can see that, although the curves for the narrower f-stops are flat as predicted, the one for f/4 is falling rapidly by the time we get to the right side of the graph. And look at the image plane MTF50s we’re getting there: only a little over 500 cy/ph for f/4. The relationship is breaking down well before the image plane resolution approaches what most of us would call sharp.

If we look at the object distances between 10 and 100 meters, first in the image plane:

HFD 55 infinity 10-100m

You can see that it is in this region where we begin to get photographic sharpness.

Now in the object plane:

HFD 55 infinity 10-100m pbj

Only f/22 and f/16 are remotely flat.

Now let’s look at image plane and object field curves when we focus the lens to 10 meters.

Image plane first:

HFD 55 10m

And now the object field:

HFD 55 10m obj

You can see that the object field resolution is biased towards the distances nearer to what was focused on, to the point where the f/16 and f/22 curves peak substantially nearer than the focus point. I had to think about that before it made sense.

After two weeks of thinking about object field methods, I still can’t figure out a the best way to use the above set of curves in my photography. I’m still working on it, though. One thing that’s clear: im object-field terms, the defocusing/blurring behavior of a lens is much more complicated than in the image plane. Consider the huge nearside-of-focus-distance sharpness variations from f/22 to f/11, ofr example.

 

 

 

Obtaining absolute MTF50 hyperfocal distances

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

When I made this post, I said that the story of exactly how the curves were generated was to complicated to be included. I will now fill in that gap.

The road to the combined absolute MTF50 diffraction/defocusing/aberrations/sensor sampling hyperfocal distance curve (HFD) starts out, as the relative HFD case, with these curves for our very good 55 mm lens focused at infinity:

HFD 55 infinity

The first thing I did was tell the computer to find, for each f-stop and many absolute MTF50 values between 400 and 2000 cycles/picture height (cy/ph), the object distances (the horizontal axis) on the curves where they crossed the desired MTF50 value. I then plotted the values thus found as the vertical axis against the target MTF50 values on the horizontal axis.

MTF hfd absolute

If you look at both sets of curves, you can see how this works. Let’s take 2000 cy.ph as a target. Looking at the top set of curves, we can see that we can only get that at f/4, and that the HFD is maybe 200 meters. Looking at the bottom set of curves, we can see that if we move upwards from the point on the horizontal axis marked 2000, we encounter only one curve, the f/4 one, and we meet it at about 150 meters on the vertical axis.

So there’s only one way to get to 2000 cy/ph, and that’s f/4, and we take whatever HFD we get.

Moving all the way to the left side of the graph, we can start at 400 cy/ph and go upward. It turns out that we can cross all the plotted lines in that case, meaning that all the plotted f-stops can deliver 400 cy/ph. But only the first line we cross, the f/22 line, can deliver that resolution at the least HFD, so that’s the HFD and aperture we should choose if we’re satisfied with 400 cy/ph and want the deepest possible DOF.

It’s interesting to see what the resolution looks like as a function of object distance if we focus the lens at the HFDs that correspond to one MTF50 value. Here’s a set of curves for 1000 cy/ph:

55mmHFDMTF1000

You can see that each of the f-stops has the same MTF50 at infinity and half the focused distance, but the peak sharpness is a function of the f-stop chosen. The reason there’s no peak to the lowest curve is that it corresponds to f/22, which can’t reach 1000 cy/ph at any focus setting, and thus is focused at infinity.

It’s clear that this approach throws away maximum sharpness, squandering it on a part of the picture not chosen by the photographer, in exchange for integrated control of minimum acceptable sharpness. TANSTAAFL.

If we’re looking for 1400 cy/ph, here’s what things look like:

55mmHFDMTF1400

Now both f/16 and f/22 have dropped out of the race.

At 1600 cy/ph:

55mmHFDMTF1600

f/11 through f/22 are not contenders.

 

Manipulating MTF50 hyperfocal distances

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

For the past few posts, I’ve been developing the concept of a hyperfocal distance based on the allowable degradation of image resolution as measured by MTF50. There are two convenient properties of hyperfocal distance as calculated using the conventional circle of confusion (CoC) methods.

  • If you focus the lens at infinity, the allowable near limit of sharpness occurs at the hyperfocal distance.
  • If you focus the lens at the hyperfocal distance, the allowable near limit of sharpness occurs at half the hyperfocal distance.

Wouldn’t it be nice if both those things applied to the new MTF50-based hyperfocal distance? It turns out they do, perhaps not exactly, but darned close.

If we focus our top-notch 55 mm lens at almost infinity, here’s what we get:

HFD 55 infinity

Now, let’s say that we want the hyperfocal distance (HFD) for 90% of the resolution available at infinity when the lens is focused there. If, for each aperture, we drop down on the right side of the graphs to 90% of the MTF50 value where the line hits the end of the graph, and trace that value back to the left on the graph until we encounter the line for that aperture, we get the hyperfocal distance for that sharpness tolerance and aperture.

If we run a set of curves with the lens focused to those hyperfocal distances, we get this:

55mmHFDMTFratio p9

The peaks are at the hyperfocal distances for each stop (no surprise there; that’s where we focused the lens). The amount of sharpness reduction at infinity in each case is the reduction we saw when we graphically found the HFDs. You’re going to have to trust me on this last one, since the distance scale is compressed, but the place where the sharpness nearer than the HFD falls to the value at infinity is half of the HFD.

Here are two more graphs for lower tolerance ratios:

55mmHFDMTFratio p8

55mmHFDMTFratio p6

The same thing happens. I’m not sure exactly why this is true, but it’s very convenient. [Edit:  The surprise to me was that relationship survives even after all the additional sources of blurring other than defocus.  Thinking about it now, it makes sense, since the model for all those is that they are insensitive to defocusing, and thus affect the near and the far points equally.]

Calculating hyperfocal distances using absolute MTF50 values

This is a continuation of a report on new ways to look at depth of field. The series starts here:

A new way to look at depth of field

In the preceding post, I discussed a new way of calculating hyperfocal distances in which the criterion was degradation in resolution for objects at infinity relative to the  MTF50 values that would have been obtained if the lens had been focused at infinity at any given f-stop.

Now I’ve going to go for absolute sharpness, not dialing back expectations as you stop down and diffraction lowers the bar.

It’s all in this chart, computed for a modeled excellent 55 mm lens on a Sony a7RII. I can present it and explain it, but I can’t reduce the hoops I jumped through to make it quickly, and it would be a really nerdy, dense paragraph, so I’ll skip it for now:

MTF hfd absolute

The horizontal axis is the absolute resolution, measured by MTF50, in cycles per picture height. The vertical axis is the hyperfocal distance in meters. If you focus at this distance, objects at infinity will have resolutions that are shown by the various lines, which are one whole f-stop apart.

The way to use this chart is as follows. Decide on how what MTF50 you can tolerate at infinity. Find that place on the horizontal axis. Run your finger upwards, stopping at the first line you encounter. Note the color of the line, and set your f-stop appropriately. Note the distance along the vertical axis corresponding to where you first encountered the line. Set your lens to that distance.

Avoid the apertures and distances that are on the soaring end of the hockey stick curves.

All of the above assumes that you’re trying to get an image that has acceptable (as defined by you) sharpness at infinity and that same sharpness as close to the camera as possible. It is not a substitute for thinking and planning, and can probably be abused as much as the present hyperfocal distances are. But it does provide an integrated way to think about diffraction and defocus blur when planning a photograph, something that I think has been lacking up ’til now.

There’s a fly  in the ointment, though. I generated tha above curves for on simulated lens on one camera. How do we get to similar curves for your particular lens on your particular camera? That’s going to take some thought.

 

 

Photography meets digital computer technology. Photography wins — most of the time.

Entries RSS
Comments RSS