An in-depth look at an autofocus system
Autofocus systems are an integral part of modern-day cameras, enabling precise focus adjustment for clear and sharp images.
Autofocus systems are integral part of modern-day cameras, enabling precise focus adjustment for clear and sharp images. In this post, we will delve into the key concepts autofocus systems, from foundational optics principles to advanced technologies like liquid lenses.
What is the concept of point source in optics?
In optics, we treat every object as a collection of point sources of light. Ideally, a perfect optical system would render a point source as a single point on the image plane. However, due to factors such as aberrations, diffractions, and imperfections in the optical system, point sources often spread out. This spreading degrades contrast in the resulting image, directly impacting autofocus performance.
Figure 1: In focus point source
When contrast is degraded, sharpness diminishes. This degradation is particularly significant in autofocus systems, where achieving maximum contrast corresponds to achieving sharp focus.
Figure 2: in-focus and out-focus images
In the above figure, B represents when image is in focus. Whereas A and C is how image appears when out-of-focus. X and Y are graphical representation of in-focus and out-of-focus respectively.
In A, the point of convergence is before the screen/sensor. In C, the point of convergence is after the screen/sensor. Hence the images appear to be blurred/smudged.
What is Modulation Transfer Function Metric (MTF)?
The Modulation Transfer Function (MTF) quantifies the imaging performance of an optical system by analysing its ability to resolve detail and maintain contrast.
MTF of a System = MTF of Lens × MTF of Camera
Figure 3: MTF Graph. Source
Figure 3 given above represents the MTF graph, where x-axis is spatial frequency and y-axis represents contrast. We can observe as spatial frequency increases the contrast of the image decreases.
Figure 4: Nyquist sampling
Both the lens and sensor contribute to the overall MTF. The above diagram shows how sensor resolution contributes to MTF performance. But we are going to explore how focusing ability of the lens contributes to MTF.
Well-focused system yields a higher MTF, whereas suboptimal focusing diminishes it. This makes MTF a critical metric for evaluating and optimising autofocus systems.
Understanding the Circle of Confusion
The Circle of Confusion (CoC) is a measure of how a point source appears in an image when it is out of perfect focus. When a point source is within the CoC, it is perceived as focused. Conversely, if it lies outside the CoC, it appears blurry.
This principle is vital for understanding the boundaries of acceptable sharpness in an image. It defines the region where autofocus adjustments can maintain image clarity.
Figure 5: Circle of confusion. Source
Autofocus systems
The operation of autofocus systems can be divided into two main phases: detection and rectification. Detection involves determining whether an image is in focus. This is achieved by analysing the image or using external sensors to measure depth or contrast.
Rectification, the second phase, adjusts the lens to achieve the desired focus. Once the detection system identifies whether the image is sharp or blurred, rectification systems fine-tune the lens position to optimise focus. This is typically achieved through motorised mechanisms such as voice coil motors (VCM) or stepper motors.
Understanding detection in autofocus systems
Autofocus detection systems fall into two categories:
- Active auto-focus detection systems
- Passive auto-focus detection systems
Figure 6: Autofocus system
Active auto-focus detection systems: Active autofocus systems rely on depth perception to adjust the lens. Depth is measured using additional hardware such as infrared or ultrasonic sensors. Based on the measured depth, the system adjusts lens distance and refraction to achieve focus. While these systems are effective, they require extra hardware, increasing system complexity and cost.
Figure 7: Depth perception
Passive auto-focus detection systems: Passive autofocus systems do not measure depth. Instead, they analyse image data to adjust focus based on contrast or phase differences. Let us look into contrast-based auto-focus detection systems and phase-based detection system in detail.
-
Contrast-based passive auto-focus detection system
Contrast-based autofocus evaluates the contrast within an image by moving the lens back and forth. It seeks the point of maximum contrast, which corresponds to the sharpest focus. Refer to Figure 2 to understand how contrast plays a role in auto-focus.
Advantages:
- High precision focus
- No need for specific calibration across lenses
Disadvantages:
- Time-consuming due to its trial-and-error approach
- Struggles with moving objects
- Phase-based detection
Figure 8: Contrast versus resolution
-
Phase difference based passive auto-focus detection system
Phase detection compares the phase of light waves entering the lens. By measuring the phase difference, the system calculates the adjustments needed to achieve focus.
Figure 9: Phase detector found inside the sensor marked as L and R
In the system (sometimes this system is found inside the sensor, as shown Figure 9) we can integrate a phase detector, which can detect the phase at any given instance. The camera compares the phase differences between the two light paths. If the two phases are aligned, the subject is in focus. If the phases are misaligned, the camera calculates the adjustment required to bring the image into focus.
Advantages:
- Faster focus acquisition compared to contrast-based systems
- Effective for moving subjects
Disadvantages:
- Less accurate due to potential noise
- Requires additional sensors, increasing hardware complexity and cost
- Hybrid autofocus systems
Hybrid autofocus detection systems
Hybrid systems combine contrast-based and phase-based autofocus to leverage their respective strengths. Initially, phase detection provides rapid focus acquisition. Subsequently, contrast detection fine-tunes the focus for precision.
Understanding the rectification part of autofocus systems
Once detection identifies whether an image is out of focus, rectification adjusts the lens to correct it. This is typically achieved by altering the focal length using motors such as stepper motors, VCM (Voice Coil Motors), micro motors. Among these, VCM motors are the most commonly used, as they balance speed and precision effectively.
Why are liquid lenses used?
Liquid lens technology offers an alternative to mechanical focus adjustment by dynamically altering the refractive index of the lens.
Figure 10: Liquid lens technology. Source
How liquid lens technology works:
- A liquid droplet is placed between two transparent layers
- When voltage is applied, it changes the shape of the droplet (electrowetting effect), adjusting the lens’ focal length
Advantages of liquid lenses:
- Compact and durable, with no mechanical parts
- Rapid focus adjustment
- Wide range of focal lengths within a small form factor
- Liquid lenses enable quick and noiseless autofocus, making them a promising innovation for modern imaging systems
Autofocus systems are integral to achieving sharp and clear images, balancing complex optical principles with advanced technologies. By combining robust detection methods and efficient rectification techniques, today’s autofocus systems continue to evolve, offering ever greater precision and speed.