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
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
And overall, the image quality on the 35mm photo is lower, as seen below...
|200mm full frame, no cropping
|35mm full frame, no cropping
|35mm cropped to same framing as the 200mm
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.