Depth of Field and F-Stop Test

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

Moderators: rjlittlefield, ChrisR, Chris S., Pau

Bill D
Posts: 118
Joined: Mon Nov 27, 2006 4:51 pm
Location: Raleigh, NC
Contact:

Depth of Field and F-Stop Test

Post by Bill D »

In the gallery section we were discusing f-stops and their relation to DOF. I shot a series of test shots. The file size is larger than I should post here, so, please take the time to visit this link:

http://photologicdesign.com/forum/fstoptest.png

I set this test using a three dimensional carved figure. The camera is pointed down at a 40 degree angle. The tip of his nose is the point of focus. His hips are the point farthest from the film plain. After I resized, I sharpened once. This is the only post processing done to these photos. I took a custom white balance reading. I shot these with my Rebel XT and Canon 100mm 2.8 macro lens. These were shot in Av mode. ISO 100.

As I stopped the aperature down my DOF seems to become greater, consistantly thru f32. This result differs with results of others on this forum. So, what's going on here? I must be doing something different? I strive to take very sharp images. This information would be helpfull. What am I missing?
Bill

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

Post by rjlittlefield »

Bill,

Thanks for posting the images.

I'm presuming that these are full-frame images, reduced about 10:1 to produce the versions that you've posted out as a montage where each frame is only 283 pixels wide .

You're right -- at that resolution all of the images have the same maximum sharpness, and the f/32 image has the greatest DOF at that sharpness.

However, the maximum sharpness of these images is only 142 line pairs per frame width (pixels/2) -- a number that would correspond to less than 0.6 line pairs per mm in a standard 10" print.

You need to look at much finer detail to see the falloff in sharpness at small apertures.

Find an area of your subject that is well focused and shows detail at the level of individual pixels. Take small crops from that area and make up a montage like the one you did for the full frames. I'll bet you get results pretty much like mine.

--Rik

Bill D
Posts: 118
Joined: Mon Nov 27, 2006 4:51 pm
Location: Raleigh, NC
Contact:

Post by Bill D »

I took a 100% crops out of the lower right corner of the original pictures. This first link has been resized and sharpened once so you can view all of the images together. The second link is the FULL SIZE crops! NO post processing was done to the second link. The lefthand side of each image is closest to the film plain. The righthand side wraps away from the film plain.

FILE SIZE WARNING! The first link is large. The second link is very, very large:

http://photologicdesign.com/forum/resizedtest.png

http://photologicdesign.com/forum/fullsizetest.png
Bill

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

Post by rjlittlefield »

Bill,
rjlittlefield wrote:Find an area of your subject that is well focused and shows detail at the level of individual pixels.
The area that you've chosen to crop appears to be the lower right portion of the sculpture. This area is significantly behind the plane of focus and is grossly blurred in the wider aperture images.

Try it again, searching your full-sized images to find fine detail that is in the plane of best focus even at the wider apertures. I can't tell from here exactly where that would be -- perhaps the smaller head at image center, or maybe the hair at upper left center of the larger face?

BTW, here's a quick and objective test for whether an image "shows detail at the level of individual pixels".

Using Photoshop, extract a part of the image that's some even number of pixels in width & height. Paste that into a new image. Make a duplicate. Resize the duplicate to 50% with resampling, so that you have an image with half the original pixels in width and height. Then resize it again at 200%. This restores the image size in pixels, but has thrown away pixel-level detail. Layer the shrunk/expanded image over the original and click back and forth to see if there is significant difference. If you want something more quantitative, you can set the upper layer mode to "Difference" and look at the histogram.

Using the f/32 image that you most recently posted, there is essentially no difference between the shrunk/expanded image and the original. Clicking shows no visible difference. The histogram shows 99% of pixel value differences are within 5 (out of a possible 256), and only 14% of the differences are greater than 1.

In contrast, an image that really does have pixel level detail -- a crop from the "10X NA 0.25 Objective" panel in image 3 at http://www.photomacrography.net/forum/v ... .php?t=424, shows obvious differences in appearance when clicked, and 15% of the pixel value differences are 13 or more.

Thanks for sticking with this. I know it takes a long time to run these tests and report out the results.

--Rik

Bill D
Posts: 118
Joined: Mon Nov 27, 2006 4:51 pm
Location: Raleigh, NC
Contact:

Post by Bill D »

Rik- In your most previous post... I understood the words PhotoShop, pixel and histogram.... the rest, I have no idea what you are talking about! Now you lost me. I will put together a set of crops that you described later on this afternoon, when I have more time. I suspect, we have been talking about two different things here? My f32 example shows me that I'm getting usable picture detail accross the whole object I've photographed. When printed out at 8 by 10 size, the whole image is tack-sharp. I think what you are saying is, if you look at each pixel, they won't be sharp? If so, then unless I print out my image out at 200% +, I can't really see the soft pixels? I'm not trying to put words in your mouth. I just don't understand what you are refering to. Like I said, I will crop an "in focus" section of my test and try to get it up here soon.
Bill

DaveW
Posts: 1702
Joined: Fri Aug 04, 2006 4:29 am
Location: Nottingham, UK

Post by DaveW »

If I remember correctly apparent depth of field depends on the circle of confusion chosen. The more you enlarge an image on printing, whilst viewing it from the same distance, the less apparent depth of field you have. This is because the original circle of confusion used is magnified until it no longer appears as a dot, but as a small fuzzy patch, which means images composed of these fuzzy patches appear fuzzy themselves. See:-

http://tangentsoft.net/fcalc/help/CoC.htm

http://en.wikipedia.org/wiki/Circle_of_confusion

As an example, an advertising hoarding derived from a photograph looks sharp from across the road, but go up to the distance you would normally view your 10 x 8 print from and it is distinctly unsharp.

The circle of confusion size on the film/sensor can therefore be chosen for your final magnification in the print, plus as well as what your computer monitor or projection screen will resolve. Sharpness greater than these limiting factors is lost, but as Rik points out is still originally there.

The problem with macro photography is that whilst it would be very nice to use small apertures to gain depth of field, diffraction spoils the image past a certain stage. This link will tell you more about diffraction than you wish to know!

http://www.answers.com/topic/diffraction

DaveW

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

Post by rjlittlefield »

Bill,

Sorry, I'll slow down a bit. It's always hard to know what level of explanation will work best. If I overshoot the other direction, please, bear with me.

Consider a 10-inch wide print. That's 254 mm. The traditional photographic standard for a sharp print is 6 line pairs per mm (lppm). In digital, a line pair requires absolute minimum two pixels: one light, one dark. (More is better, but let's go with two.) So, the 6 lppm standard requires at least 12 pixels per mm, or 254*12 = 3048 pixels across the 10" print. It also requires that the optics are sharp enough to make one pixel light, the next one dark, the next one light, and so on.

So... If an image is 3000 pixels wide (rounding off 3048), and it shows light/dark/light/dark at the level of adjacent pixels, then I know that image can be printed 10" wide and meet the traditional standard of 6 lppm.

But... If the same image can be reduced to only 1500 pixels wide (3000/2) without losing detail, then I know that image cannot be printed to show 6 lppm. Why? Because 1500 pixels in 10 inches is only 6 pixels per mm, so light/dark/light/dark even in adjacent pixels only produces 3 lppm.

The test that I applied to your image was to determine whether it contained detail of the form light/dark/light/dark in adjacent pixels. The answer was "No, it doesn't. In fact, an image with only half as many pixels on each axis contains just as much detail."

Your very first post mentioned Canon and XT. I'm presuming that means a Digital Rebel XT, model 350D, so I'm going to assume that your full images are 3456 pixels wide.

The test I ran, on that little chunk of f/32 image you posted out, showed that it did not contain any more detail than an image 1728 pixels wide would (1728 = 3456/2). Why? Because I could shrink the chunk by 2X, expand it back out, and get an image that was indistinguishable from the original.

So... If you're telling me that the little chunk of f/32 image prints as tack-sharp at 10" wide, then you're also telling me that "tack-sharp" means no more than 1728 pixels in 10". That gives 6.8 pixels per mm, 3.4 line pairs per mm, absolute best case. The implication is that you're considering 3.4 lppm to be tack-sharp, at least for this type of work. (Aside: I see that DaveW has posted about "circle of confusion". Using 3.4 lppm instead of 6 lppm means that you're accepting a larger circle of confusion.)

There's nothing wrong with accepting 3.4 lppm at 10" wide (1728 pixels-equivalent) and calling it sharp. In fact if you're really intending for an image to be reproduced at 5" wide, or (heaven forbid) at 800 pixels wide on an Internet forum, then 1728 pixels-equivalent is actually overkill -- more detail than you'll ever see!

Issues like the above may go a long way toward explaining why you've been so happy with f/32. That's because the size limit on the aperture varies directly with the resolution requirement. If you're happy with less resolution than the recommendations assume, then you can use correspondingly smaller apertures (bigger f/numbers).

Another part of the explanation may have to do with the size of subjects you're shooting. The optimum aperture gets wider with smaller subjects.

Example 1. The DOF article that I linked earlier uses a 22.7mm field width (1:1 lens magnification onto a 22.7mm sensor). Using Ted Clarke's formulas, the optimum aperture for 6 lppm in a 10" print would be around f/10 (Menl=254/22.7=11.2, Mtot=254/22.7=11.2, 220/(Mtot+Menl)=9.8 ). That's consistent with the pictures in the article.

Example 2. The pictures that you posted out appear to be about 45mm full frame. (Thanks for the scale bar!) Suppose we run that subject size through Ted Clarke's formulas, along with a reduced resolution requirement of 4.5 lppm (the closest one he lists). Then the numbers work out to be Menl=254/45=5.6, 330/(Mtot+Menl)=19.6, so the predicted optimum aperture would be around f/20. Lowering the resolution requirement to 3.4 lppm would allow an even smaller optimum aperture, around f/26, and it's not far from there to f/32.

To add to the confusion, it matters how the closeup focusing is accomplished. If you achieve 1:1 by extending the lens away from the camera, then the effective aperture is only half as big as it would be at infinity focus. Ted Clarke's formulas assume this case. On the other hand, if you achieve 1:1 mainly by adding closeup lenses, then the effective aperture is almost as big as it would be at infinity focus. This changes the optimum setting. The lens used in my DOF article achieves 1:1 primarily by extension, so its optimum aperture setting is around f/10 as predicted by Clarke's formulas. But if I had gotten that 1:1 by putting 7 diopters of closeup lenses in front of a 143mm camera lens, then the optimum aperture setting would be f/20, or quite possibly even smaller if needed to work around lens aberrations.

I know, this stuff makes one's head hurt. I'm sorry. :(

Maybe these three rules make a good summary:
  • Larger subjects allow smaller apertures.
  • Lower resolution allows smaller apertures.
  • Testing is more reliable than computing.
It's quite possible that f/32 will turn out to be an optimal setting for your camera and your size subjects, your resolution requirements, and your lens setup.

I'm predicting that wider apertures will be sharper in the plane of best focus, but that sharpness may be more than you need, and if it is, then opening up would be a pointless loss of DOF. It could even turn out that f/32 is the sharpest image in every sense, particularly if you're working with closeup lenses that add aberration.

I'll be interested to see what your aperture series looks like, for the sharpest in-focus detail.

--Rik

Bill D
Posts: 118
Joined: Mon Nov 27, 2006 4:51 pm
Location: Raleigh, NC
Contact:

Post by Bill D »

I've been out all afternoon, just got back. Now, without some of the technical terms, I've never heard of "circle of confusion", I do understand what you and Dave mean. But, if you remember, from that first thread on the other forum, I am happy with f32 UNTIL I add extension tubes to increase my magnification. Yes, my background is rooted in film cameras. This Canon 100mm f2.8 macro is my first Digital macro lens! When I have time to experiment with extension tubes more, I figured I would get into focus stacking. But, for now, at the magnifications I normally shoot at, F32 serves me well. I will do that series of crops from another part of the images posted above, because I'm curious now. In regards to the original post by Carl. I still think he should work on his basic macro technique, and experiment with smaller f-stops.(maybe f32 or 22 will work better for him, maybe not?) Once he refines his macro skills, then he should apply advanced post processing to his files. That's My Story and I'm Stickin' to It! LOL
Bill

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

Post by rjlittlefield »

Bill D wrote:In regards to the original post by Carl. I still think he should work on his basic macro technique, and experiment with smaller f-stops.(maybe f32 or 22 will work better for him, maybe not?) Once he refines his macro skills, then he should apply advanced post processing to his files. That's My Story and I'm Stickin' to It! LOL
I agree, that's good advice. It seems like he's off to a good start now, in any case.
Canon 100mm f2.8 macro
Ah yes, another wrinkle. If I recall and interpret correctly, this lens behaves sort of halfway between pure extension and pure closeup lenses. In this post, Tom Webster writes that "At 1:1 the Canon lens only loses 1 f stop for exposure". A purely extended lens would lose 2 f/stops, pure addition of closeup lenses would lose none. Ted Clarke's formulas assume pure extension. So, to interpret his formulas with your lens, you'd need to set the aperture one f/stop smaller than the formula value. Then test it, 'cuz theory and practice don't always behave the same.

--Rik

DaveW
Posts: 1702
Joined: Fri Aug 04, 2006 4:29 am
Location: Nottingham, UK

Post by DaveW »

Bill

There is a better link on diffraction etc here for digital cameras plus a calculator:-

http://www.cambridgeincolour.com/tutori ... graphy.htm

DaveW

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

Post by rjlittlefield »

This is an excellent article.

One caution -- be careful when playing with the interactive demo titled "VISUAL EXAMPLE: APERTURE VS PIXEL SIZE".

It has an unusual user interface that is easy to misuse and/or misinterpret. The table controls the graphic using what I might call a "blind and sticky mouse-over" concept.

If you mouse-over the cell labeled f/8.0, the graphic changes to represent f/8.0. When you move the mouse outside that cell, the graphic stays representing f/8.0, but there's no indication of what f/stop it is representing.

Likewise if you mouse-over the cell labeled "CANON EOS 20D / 350D", the graphic changes to represent that sensor. When you move outside that cell, the graphic stays representing that sensor, but there's no indication of what sensor it is representing.

So...

To see the combination of f/32 and 350D, you have to mouse-over f/32, then carefully navigate to mouse-over 350D, without accidentally going over any other cells in between. When you're done, there'll be nothing in the graphic or the table to indicate what combination you're looking at.

Also be aware that this graphic works in terms of effective aperture, essentially assuming that the lens is focused at infinity. At 1:1, a lens that focuses by extension has an effective f/number that is twice what the dial says.

--Rik

Bill D
Posts: 118
Joined: Mon Nov 27, 2006 4:51 pm
Location: Raleigh, NC
Contact:

Post by Bill D »

Thanks Dave & Rik. I actually understood the basic concept of that last link that Dave provided. I do know what an Airy disk is! I atleast understand, on basic level, phase distortion. I have to say, I'm probably never going to learn these principles in great depth! But, I do see how light waves going in and out of phase will cause the pixels to go in and out of focus as the size of the aperature, the waves are passing through, changes diameter. Over-simplified, I know, but give me that! Now my brain hurts... I just wanted to take pretty pictures. Can I just pretend that pixels and RGB are Silver Halide Crystals and Dye Layers? LOL
Bill

DaveW
Posts: 1702
Joined: Fri Aug 04, 2006 4:29 am
Location: Nottingham, UK

Post by DaveW »

They have made the CPU's in digital cameras do everything else, why can't they just make them tell you in the viewfinder which is the optimum aperture at any extension, or when diffraction is unacceptable! :?

I am quite willing to scarifice some of the functions they already do that I do not want for that! :lol:

Tell me if I am incorrect (in simple language Rik, I left school at 15 just about able to add up without a calculator!) but I always considered diffraction (an edge effect) to happen more at smaller apertures because if you take a large aperture the circumference of the diaphragm edge is less in proportion to the volume of the clear hole in the centre than it is at small apertures. Or put crudely large holes have less edge to clear centre volume and small holes have a lot of edge to clear centre volume, so edge effects are magnified with smaller holes? However this does not explain why it happens more at smaller effective apertures that at their actual physical size.

Now my brain hurts! :?

DaveW

Bill D
Posts: 118
Joined: Mon Nov 27, 2006 4:51 pm
Location: Raleigh, NC
Contact:

Post by Bill D »

OK, here's the series of crops from the most in focus area of my images. Rik, it DOES confirm all of your predictions! At f8, f11, all of the pixels are sharp, even at f22, pixels are quite acceptable. At f32, pixels loose sharpness. But, here's the rub, as a visual artist, I prefer the final image shot at f32. It is a more pleasing image to me. When I am out back in my garden taking a picture of a ladybug on my pansies, with a couple of extension tubes under my lens, this information will help. This was fun test. I have learned alot.

LARGE FILE WARNING! This image illustrates all of the concepts brought forth in this thread. It is worth a viewing:

http://photologicdesign.com/forum/finalcrop.png

The lens I am using is a f2.8 to f32. Can I conclude, if I had a lens that went from, say, f.2 to f128, there would be two or three aperatures, evenly spaced, where the pixels are sharp?
Bill

Carl_Constantine
Posts: 304
Joined: Tue Aug 01, 2006 8:02 am
Location: Victoria, British Columbia, Canada
Contact:

Post by Carl_Constantine »

Bill D wrote:OK, here's the series of crops from the most in focus area of my images. Rik, it DOES confirm all of your predictions! At f8, f11, all of the pixels are sharp, even at f22, pixels are quite acceptable. At f32, pixels loose sharpness.
Yep, that pretty much sums it up from what I've seen on this forum and elsewhere. Good Job Bill. Thanks for all your hard work on this topic.
Carl B. Constantine

Post Reply Previous topicNext topic