Depth of Field and Focus Stacking
Every photographer knows about “Depth of Field”. It’s the range, in front of the camera, where the resulting image will look sharp.
The depth of field depends on the aperture of the camera lens – the smaller the aperture, the wider the depth of field. Up to a limit, when diffraction makes the photo unsharp again.
Distance from the camera is the other big factor – the further away, the wider the depth of field.
Unfortunately, smaller the distance, the narrower the depth of field!
Full frame camera, 50m lens at f/16: At a distance of 5m, the depth of field is 98m, but if the distance is down to 0.5m, the depth of field is just 0.09m, that’s 9cm. At 0.2m it’s just 1cm.
Using the same camera with f/5.6, the values are very different: At 5m – 3.8m, at 50cm – 3cm, at 20cm- a few millimetres.
What if I need an image that’s pin-sharp, from the nearest to the furthest point of my object, but can’t have it, straight from the camera?
Modern software comes to the rescue. If I take a range of photos, focusing at different distances, the software can pick the “sharp bits”, and combine them to one, single, sharp photo.
This slide projector has been photographed at f/5.6, so the depth of field is small. Below you see all the photos taken. You can select a single one by clicking on one of the yellow thumbnails:
The results are not always perfect. Careful inspection is required, and quite a bit of editing can be needed to put things right:
- Moving objects, like clouds, can appear sharp in more than one photo;
- The software can get it wrong when detecting sharp areas.
Focus stacking is essential for creating professional interactive panoramas with close distances; typical examples are panoramas of the inside of an aircraft or boat.
Even the panorama of a large room can benefit significantly from focus stacking: In the Hall of Lincoln College Oxford, a gigapixel panorama, the table, the plates, the glasses, and the cutlery are close to the camera. With focus stacking you can zoom in on them, and they are just nice and sharp. Without focus stacking there would be a blurred area.
It's time consuming to create multiple photos of every segment of a panorama, often combined with exposure bracketing, which multiplies the number of photos required. It's more time consuming to process all the photos - with focus stacking, HDR, and other techniques, but the result will be a bespoke panorama that's very different from cheap automated processes.