Everyone wants to take beautiful images, whether capturing friends, a delicious plate of food, or the scary spider you found in the yard. In many cases, you don’t have to think much—just snap the photo and continue your journey. However, sometimes physics imposes limits on what is possible. While we will discuss topics such as field limits and circles of confusion, let it be clear that we are not talking about UFOs and crop circles, but rather the optical principles that define sharp images and a possible solution to enhance them.

The Ilford Manual of Photography (3rd Ed, 1945) defines depth of field as the range where an image has permissible unsharpness, determined by the circle of confusion. “Points of light in planes other than that which is sharply focused are reproduced as circles, which are cross-sections of the pencils of light coming to a focus either behind or in front of the sensitive surface.” This is illustrated in Figure 1.

Figure 1. Circle of confusion

An object far away is focused at image plane D. Object E, which is closer to the lens, forms a sharp image behind the image plane at F. At the image plane, point E appears as a circle with diameter GH—this is known as the circle of confusion. The lens equation relates the size of this circle to the object’s distance, the lens’s focal length, and its effective diameter. While a more precise analysis using the hyper-focal distance of the lens system provides accurate limits for the near and far edges of the depth of field, an approximation can be expressed as:

DoFtot = 2 N C U2 f2

where:

  • N is the F-number of the lens (focal length divided by lens diameter),
  • C is the circle of confusion on the image,
  • U is the distance to the focused object, and
  • f is the focal length of the lens.

A key question now arises: What is an acceptable size for the circle of confusion? The maximum sharpness or resolving power of a system is typically expressed as detectable line pairs per millimeter. Without considering diffraction limits or Nyquist’s sampling requirements, the practical limit is determined by the sensor’s pixel size. When the circle of confusion is equal to or smaller than a single pixel, the sharpest possible image is obtained. As the circle of confusion increases in size, light from a single point spreads over multiple pixels, leading to a blurred image.

Now, let’s consider an example where we want to capture a detailed image of a flower. Suppose we use a lens with a 50 mm focal length, a large aperture with a F-number of 2.0, and we allow a circle of confusion of 0.005 mm (5 µm). Using Equation 1, we calculate that at a distance of 15 cm (150 mm), the depth of field is only 0.18 mm—a “very” thin slice of the flower, with most of it appearing blurred.

To improve the situation, we could step back to 50 cm, increasing the depth of field to 2.0 mm, or even further to 1 meter, where the depth of field expands to 8  mm. However, at these distances, the flower no longer fills the sensor frame, as the lens demagnifies the image. Another option is adjusting the lens aperture by increasing the F-number, say, to 20. This adjustment improves the depth of field to 1.8 mm, but comes at a cost: a much smaller aperture collects less light. To compensate, we would need to either increase the ISO, introducing noise, or use a longer exposure, which may lead to motion blur. At this point, the photographer might opt for a telephoto macro lens to capture the subject properly and use a tripod to stabilize the camera.

However, it is not always possible to adjust the magnification or aperture size to achieve the desired sharp image. While optical technology in mobile imaging systems continues to improve, mobile camera sensors are generally much smaller than those in full-frame cameras. Not only do smaller pixels collect less light, but they also demand a smaller circle of confusion for sharp images. While multiple cameras in smartphones enable different focal lengths for various scene types, the compact design of mobile optics limits aperture adjustability and zoom capabilities.

Computational Imaging: Overcoming Optical Limitations

Computational imaging is now being used to overcome the physical limitations of optics. Even high-end, full-frame cameras feature modes for focus stacking, where multiple images are captured at different focus depths. Each image contains a slice of the scene in sharp focus, and these slices can be combined to produce an image with an extended depth of field. VDMacroFocus implements an algorithm for merging such focus stacks.

Figure 2. Example of focus stack images
Figure 3. The result image obtained using a fusion algorithm

The number of images required depends on the scene, the depth of field in each individual shot, and the desired level of extension. While an artistic photographer may prefer selective focus for aesthetic bokeh effects, typically five to ten images are sufficient to cover the subject in focus.

A major challenge in stack-based image fusion is scene motion. While camera motion can be compensated for fairly reliably, movement within the scene—and additional spreading caused by strong defocus—disrupts pixel-to-pixel alignment. Defocused regions can overlap with adjacent structures, creating semi-transparent blends that complicate reconstruction. Addressing these issues requires advanced deblur and deghosting methods. VDMacroFocus has been adopted in off-the-shelf mobile imaging solutions, effectively handling these domain-specific challenges to produce high-quality, all-in-focus images.

Want to learn more?

Filters