Showing posts with label depth of field. Show all posts
Showing posts with label depth of field. Show all posts

Tuesday, May 29, 2012

Is it in Focus?

I recently wrote about lenses and perspective. In there I mentioned following up with a post about depth of field. I assume that most of my readers are familiar with the term. If you need a refresher, I suggest starting with this Tutorial from Cambridge in Colour.

The main control we have over depth of field is the aperture of our lenses. Wide open (lower number f/stops) we get less depth of field. As we stop down (larger f/numbers) the depth of field increases. But stopping down the lens can have negative effects, too. Small apertures lead to an effect called diffraction that lowers the image quality. Think of what happens when you put your finger over the end of a faucet. The smooth flow of the wide open faucet turns into a wild spray. So, you can stop down too far and get a lot of depth of field, but with an overall loss of image quality. What aperture you start to suffer diffraction at will vary with sensor size and specifications. Too much math to go into here, so I suggest you take a visit to Cambridge In Colours excellent tutorial on diffraction. While there, read all the other tutorials. This guy is good!

I just wanted to cover some of the questions that might come up when looking at the images in my most recent post about focal length and compression. Consider these two images

24mm at 48"
85mm at 48"
They were both taken at f/5.0, but the top one, taken with a 24mm lens shows the grid patter in the background more in focus than the lower image taken with the 85mm lens. Well, of course. We've all been told over and over that you get more depth of field with a shorter lens. But is that really true?

It is partly true. In this case it is true because the images were taken from the same camera position and the one taken with the 24mm lens was cropped in from this original 

24mm not cropped
So, we do see more depth of field, but at a considerable loss in resolution. The image taken with the 85mm lens is 3744x5616 pixels, while the crop from the 24mm lens is only 995x1492 pixels. That's fine for a 3x5 print or for use online. But not for much more. If you need to print an 8x12 or larger the lack of pixels is going to be a much bigger issue than the extra depth of field you gained by using a shorter lens--unless that non-cropped version of the photo is really what you wanted.

What if you decided to move in closer with the 24mm lens to get the subject to be about the same size in the frame? Then you do get your full 3744x5616 pixel image. But it is a very different image. The look of the subject is totally different as seen here...


And the depth of field has shrunk back to where it was with the 85mm! What's with that? The shorter lens is supposed to give more depth of field, isn't it? Yes, when used at the same camera to subject distance. But when you move in to get the same framing you counter that.

The fact of the matter is that focal length alone is not a contributing factor in calculating depth of field. You need to combine focal length with the camera to subject distance. So, it is more like magnification in the original image is the contributing factor. If the main subject is the same size on the sensor with a long or a short lens the DOF will be approximately the same.

Let's look at these images, which were all taken at f/22...

35mm full frame
200mm full frame
35mm cropped
For these the camera was moved to try to maintain about the same size head in both frames (same magnification). Here we see that the images taken with the 35mm lens and the 200mm lens exhibit similar depth of field. The yellow text on the black disc in the background is blurred about the same. The overall effect of the 200mm vs the 35mm appears that the subject stands out more in the 200mm version. But that is more about the limited field of view behind the subject. The blurriness is about the same in each, but there is a lot less background to be noticed in the photo taken with the 200mm lens. In the photo taken with the 24mm lens there is a lot going on in the background, and despite being equally out of focus there is more context available for our brain to tell us what is back there (fence, table, my wife Kim, etc.).

And overall, the image quality on the 35mm photo is lower, as seen below...

200mm full frame, no cropping
35mm full frame, no cropping
Both of these images were taken at f/22. As noted in the last post, the perspective is the same (camera and subject weren't moved, I just changed lenses). But if we enlarge the center section of the 35mm shot we get this...

35mm cropped to same framing as the 200mm
Here we can see the 35mm image has more depth of field (the text on the black disc is not as out of focus), but suffers a lack of contrast and overall loss of edge detail that I am chalking up to diffraction. Here is another comparison. This time both images are taken with the same lens in the same position, but one is at f/16 and the other at f/2.8. While the f/16 version has greater depth of field, the f/2.8 version appears more crisp and contrasty. I admit I added to the challenge here by working in less than ideal conditions with strong backlight. But this is a situation we often find ourselves in.

f/16
f/2.8

Anyway, I just want you to stop and think about the generalizations we hear every day as we learn about photography. Telephoto compression, stopping down for better images, focal length and depth of field, etc., etc. All of them have an element of truth to them. But they are often only half the story.

I end this as I started, by suggesting you visit the Depth of Field and other tutorials at Cambridge In Colour where they go into great technical details.

And after that please go out and do your own experiments. Then share what you learn in the comments here.

Thanks!







Thursday, January 5, 2012

More On Aperture and DOF

This is a follow up to my recent post about the effect of aperture on the look of a portrait.

There, I mentioned that changing focal length would not affect the depth of field if the camera was moved to maintain the size of the subject in the frame. I didn't have any images prepared then to demonstrate this at the time. I got a chance to create those images last night and present them here. Click on each image to load a larger version that will be easier to study.

 Above we see three photos that were taken with 135mm, 85mm, and 35mm lenses all set to f/2.8. The camera was moved closer with the 85 and even closer with the 35 to make the mannequin head be about the same size in each. If you look closely you will see that the depth of field is about the same in each. The perspective is different in each because the camera was moved (not because of the lens change).

Many photographers go for a lens in the 85 to 105mm (full 35mm frame) range for portraits because they put you at a distance from your subject that gives a nice drawing to the face with pleasing relationship between the features on the face and head (nose, mouth, eyes, ears). If working with a smaller sensor camera look for lenses with similar angles of view for that format (such as 50-65mm on cameras with a 1.5 or 1.6x multiplier).


In the second set of photos everything is the same as the first set, except that the aperture was set to f/22. Again, you can see that the depth of field remains the same, even though various focal length lenses were used (135, 85, and 35).

You may also be surprised to see that the face looks the thinnest in the image taken with the wide angle lens. This is what happens when you move in close. With any lens the objects closest to the camera appear larger than objects further away. When in so close with a short lens the nose is relatively closer to the lens than the cheeks, eyes, and ears. So they fall away and look smaller. When you move back with the longer lens the nose, eyes, and ears are all relatively closer to each other than to the lens, so the face flattens out and they all appear at a similar size. This is due to the camera to subject distance, not the lens, even though this is often erroneously called "telephoto compression." See the fourth set below for more about that.


In this third set of photos the camera remained stationary. The top image was taken with an 85mm, the middle is 135mm, and the bottom is 35mm. Here we can see that the size of the mannequin head is very different between the images and the depth of field changes drastically between because of the difference in magnification from each lens (all set to f/2.8)


In this final group we again have images taken with the 135mm, 85mm, and 35mm lenses, this time all set to f/5.6. As in the third set, the camera remained stationary and the lenses were changed.

In these last two sets of images you should be able to see that the perspective remained the same even though the lenses were changed. The relationship between the head and the background is the same in each. If you cropped in on the 3rd image in this set the perspective would match the 1st image in this set. But the depth of field is different. Remember that when the camera to subject distance is set and the lens is changed the perspective of the area of the image that is common to each image is the same. The camera to lens distance determines the perspective. The focal length determines what fits into that frame.


One of my favorite Ansel Adams quotes is "good photography is about knowing where to stand." I think that many people misunderstand this quote. They might associate it with Jim Richardson's quote "if you want to be a better photographer, stand in front of more interesting stuff."  But what I believe Ansel meant was that you need to find the location to set up the camera that gives you the perspective (relationship between items in the scene) that you want, and then you select a lens focal length that fills the frame the way you want. Too often people pick the lens first.

I really don't like the mantra of "zoom with your feet." Zooming implies making the scene smaller or larger while maintaining the perspective by changing focal length without moving. If you move your feet the perspective changes. So you CANNOT zoom with your feet. I'm not saying it is a bad exercise to select one prime lens and learn how to use it by moving around. If you want to make good and interesting photos, do find your location by moving your feet, but then select the appropriate lens to fill the frame of your camera. Maybe the frame should be "move your butt!" And a zoom lens is the perfect lens for this, as you can frame exactly as you want. Zoom lenses got a bad reputation in the 1970s when the quality wasn't nearly as good as prime lenses. Zoom lens design has come a long way since then and today's zooms come very close to the quality of prime lenses. That said, I often use prime lenses instead of my zooms, but this is primarily because of the weight of a good zoom. The primes are easier on my shoulder, elbow and wrist.

One more thing. Something that I learned during the exercise of preparing this article is that it really is difficult to manually focus a wide angle lens. I've always heard that short lenses were more difficult to focus, but it reallyshowed here. The following set of images were taken with the same camera/lens (35mm at f/2.0) combination. A was manually focused through the viewfinder. B was manually focused using Live View at 10x, and C was autofocused. Maybe autofocus isn't such a bad idea....



Thursday, July 30, 2009

New online DOF calculator from Canon

Canon Europe has produced an online depth-of-field calculator that allows you to input your camera, aperture, focal length and focus distance and get an almost instant calculation for your required near and far limits of focus, total depth-of-field and hyperfocal distance.

They also offer a very good article about DOF. An excerpt on focal length:

"
You will usually choose the focal length to suit the subject rather than to suit the depth-of-field. However, the accepted rule is that you get more depth-of-field with wideangle lenses than with telephoto lenses. In fact, this rule is misleading. What actually happens is that a wideangle lens magnifies the subject less than a telephoto lens, which means that more of the image appears sharper."

Update: Yes, the Canon DOF calculator works on an iPhone.

Thursday, February 14, 2008

Quiz Answers or Focal length, Perspective, and Depth of Field.

Answers to the quiz from the previous blog entry...

All three images were taken at the same aperture (F/11)

Examples A and C were taken with the 24mm lens
Example B was taken with the 100mm lens

What I hope to have shown here are:

  • At the same magnification (subect size is the same), focal length has no bearing on depth of field. Same DOF with a short lens or a long lens. Aperture and magnification are the factors that affect Depth of Field.
  • Perspective is determined by camera to subject distance. A long lens doesn't compress a scene. A shorter lens doesn't expand a scene.
You set up your camera-to-subject distance to give you the perspective you want and then you select the lens (focal length) that fills your frame at that working distance.

If you want to be two inches from your subject you are forced to use a short lens (a long lens can't focus that close and its field of view is too narrow) and you get that wide open/expansive perspective. But that perspective is not because of the lens. Think of it this way... A short lens ALLOWS you to get that expansive perspective feel because you can work close to your subject. But it doesn't create that perspective.

  • Using a shorter focal length lens does give greater depth of field **IF** you don't move in closer to make the subject larger. The part after the IF is often missed/dropped/forgotten when people talk about ways to increase depth of field. Remember... Magnification and Aperture, not focal length.
Note that the image quality in Example C is lower than in A and B. It is kind of grainy and the star on Wonder Woman's forehead is not quite as crisp. That is because I enlarged a very small section of the full frame to match the angle of view of the longer lens. Here is the full frame image that Example C was cropped from (Examples A and B were already shown as full-frame).



Going back to the Quiz examples, A was taken with a 24mm lens and B was taken with a 100mm lens. That accounts for the different angles of view. The 24mm lens takes in a wider angle of view and you see more of the background. What changed between the two images (besides the lens used) is the distance between the camera and the Pez dispensers. I moved the camera closer for the 24mm image to try to get the Wonder Woman dispenser about the same size (same magnification) in both images. By moving in closer with the 24mm lens the perspective changes because the relative distance between the items in the scene is increased. The 100mm image looks more compressed because it was taken from further away (not because of the longer focal length lens).

Both were taken at f/11. The magnification of the main subject in both images is about the same. At the same aperture the depth of field is about the same, despite the difference in focal length (24mm vs 100mm).

We are always told that a shorter focal length lens gives more depth of field. But the above examples seem to show the same depth of field for two very different focal length lenses. Does a shorter focal length lens give more depth of field? Yes. When the magnification changes.

That brings us to Example C. This image is also taken with the same 24mm lens at the same f/11 aperture. But now the depth of field looks greater. Why?

In this example the camera was moved back to the same position as it was in for the 100mm image and a small part of the image was cropped to the same field of view as the 1oomm image. Now the depth of field is greater (the subject was not magnified as much in camera). Also note that the perspective is the same as the 100mm image (because the camera to subject distance is the same).

So now the depth of field is greater, but quality suffers due to having to enlarge the image. With the relatively grain-free quality of low-ISO digital the quality loss is not as detrimental to the image as I would have imagined. In film, such a severe crop might not work out so well.

Bottom line... yes, you will get more depth of field with a shorter focal length lens if you are magnifying the subject less. So, if the camera and subject are the same distance with a 100mm lens and a 24mm lens the 24mm lens will have greater depth of field. But the subject will be much smaller with a lot of periphery in the image. If you moved in closer with the 24mm lens to get the same subject size and to eliminate the periphery you will then get the same depth of field.

Wednesday, February 13, 2008

Pop Quiz Time!

I have three example images here (A, B, and C). Two lenses were used (a 24mm and a 100mm). Can you tell which lens was used for each? Can you tell if the aperture is the same in all three or different?

Example A:


Example B:


Example C:


Post your answers in the comments section. Once we have a couple of comments I'll post a description of the images and background information.

Thanks!

Wednesday, May 23, 2007

Depth of Field

Wow, this is a tough subject. So many people get so confused by this subject.

While researching to try to write up my own thoughts on it I ran across a site by Paul va Walree that already had all the answers. You can find it here.

Paul brings in things other sites overlook, such as print size or projected size and viewing distance (see the Visual Acuit section). He demonstrates how depth of field (DOF) does not normally vary with focal length (see the Background Blur section). I say normally because the construction of some lenses (symetrical, retro focus, telephoto, etc.) can have a little effect. Many folks are surprised to learn that some longer focal length macro lenses sometimes offer more depth of field than a shorter focal length lens. He also talks about why DOF scales on lenses are inadequate (see the Hyperfocal distance section).

For more on DOF scales and DOF tables I suggest reading some things from Harold M. Merklinger. Start with his Depth of Field Revisited article. Then you can follow it up by reading Merklinger's book The Ins and Outs of Focus (available as a PDF file).

Going back to Paul van Walree, he has a few other articles online that are going to save me from doing a lot of writing. I highly recommend these to all serious photographers interested in the technical side of things:

http://www.vanwalree.com/optics.html
http://www.vanwalree.com/optics/misconceptions.html
http://www.vanwalree.com/optics/filterflare.html

If you want to go even deeper into diagrams and math you can check out Norman Korens article on Depth of Field. A couple of summaries from that site:

"DOF is much more closely related to magnification and f-stop; DOF expressed in distance is nearly independent of focal length."

"Those who use depth of field scales, tables, and formulas (e. g. for hyperfocal settings), restrict themselves – most probably without knowing why – to the image quality potential of an average pre-World-War-II emulsion."
(above is actually a quote from Carl Zeiss Camera Lens News at http://www.zeiss.de/C12567A8003B8B6F/EmbedTitelIntern/CLN01e/$File/CLN1.pdf (PDF File))

I hope the above referenced web sites help bring things into focus!