A big part of quality photography is getting the focus right. Missing the focus even slightly can turn a potentially great photo into a bad one.
Despite their size constraints, smartphone cameras have gotten better and better with time. One aspect of this progress that doesn’t get talked about much is the auto-focus system.
How do smartphone cameras adjust their focus?
In terms of how the focus mechanism works, phone cameras have movable lenses that can adjust the focus by varying the distance between the lenses and the image sensor.
This mechanical system is coupled with auto-focus (AF) software that helps the camera automatically detect where to focus in the scene. You can also tell the camera where to focus by tapping the area of interest on the screen.
The focus information gathered by the software is relayed to the focus motors, which then adjusts the lenses.
For the more experienced in mobile photography, particularly shooting in manual mode, the focus can also be adjusted manually using a slider in the camera app. More on this later.
For now, let’s look at exactly how a mobile camera knows where to focus all on its own.
Auto-Focus
Auto-focus (AF) is a feature that allows digital cameras and smartphones to automatically sharpen the image and focus on a specific spot or subject with little to no input from the user.
For example, on some mobile camera apps, you can tap on the face of the person you want to take a picture of and the camera will adjust the focus so that the subject’s face is clear. Other camera apps can automatically detect the face and adjust the focus automatically when the shutter is pressed.
How does it work?
In mobile photography, there are five different ways in which smartphone cameras can auto-focus. These methods are divided into three categories: active, passive, and hybrid autofocus.
Passive auto-focus
As the name suggests, passive auto-focus is a non-intrusive way of calculating and adjusting the camera’s focus without the need for additional specialised hardware. It does so by relying on light and the contrast in the scene to ascertain focus.
Passive auto-focus comes in a few forms, as shown below. For you to better understand the concept of how they work, you need to be familiar with the pixels on a mobile camera sensor and how they make up a digital image.
Contrast-detection auto-focus (CDAF)
This is the oldest and most popular method of auto-focus found on smartphone cameras. And just like the name says so very obviously, CDAF relies on using the contrast between the light and dark areas in a scene to bring the picture into focus.
A digital image is made up of pixels that correspond to photosites on the camera’s image sensor. If the image is in focus, the pixels will be clear and well-defined. In other words, an image that is in sharp focus will have high contrast pixels.
If a digital photo is out of focus, then it will appear blurry. This is because the pixels on the image are not in sharp focus, therefore they have low pixel contrast.
Contrast-detection autofocus uses this information to figure out the correct point of focus. This light-dependent method achieves focus by means of trial and error.
The camera doesn’t know when it has reached its maximum contrast, so it moves the focus motor back and forth, even past the focal point, in search of the highest contrast between the pixels.
Low pixel contrast means the photo is out of focus. To get the focus right, CDAF moves the focus motors to a position where the pixels are in sharp contrast.
The idea behind CDAF is that as the level of contrast between pixels increases, the more in focus an image becomes. As it does this, it compares contrast samples until it goes back to the point where the contrast between pixels was at the highest.
You can actually see this in action when you take pictures on a phone camera that uses contrast-detection auto-focus. The image changes in blurriness on the camera app user interface until it’s fully in focus before finally taking a picture.
The downside of contrast-detection autofocus
CDAF does a decent job at passively focusing an image without the need for any additional hardware.
However, because it physically has to move the lens in search for the best position where everything is in sharp contrast, CDAF is the slowest of all the auto-focus systems.
It’s dependence on light and high contrast means that it’s not ideal for shooting in low-light conditions which naturally have little contrast.
Contrast-detection autofocus works best for static images. If there are movements and action in the scene, the contrast information will change. CDAF can’t tell the direction in which the subject it is focusing on is moving, so it ends up looking for somewhere else to focus.
Phase-detection autofocus (PDAF)
Phase-detection auto-focus is a faster form of auto-focus than CDAF that goes by a few different names. Apple devices, for example, refer to this technology as ‘Focus Pixels’.
This method of focusing relies more on software and algorithm than mechanically adjusting the lens position.
With PDAF, a small amount (roughly 10 percent or less) of the pixels on a sensor are set aside and embedded with a phase detection photodiode (a device on the image sensor that converts light into electric current).
These special pixels are made specifically for focusing and are scattered across the sensor.
Some of these pixels with phase-detection photodiodes receive light from the right side of the lens while others do so from the opposite side. This is similar to how we receive light separately through our left and right eye to create one image in our brains.
Using data from all the phase-detecting pixels spread across the sensor, the PDAF algorithm determines if the image is in focus. If the data of the light waves gathered from the photodiodes all match up, then the light profile is in phase and therefore the picture is in focus.
If the light waves are not in phase, the image will not be in focus. So, the light information captured by the photodiodes is used to determine the correct position of the lens in order to produce a sharp image.
After everything is calculated, the focus motor then moves the lens to the right position for a crisp image.
This may sound like a lot but it all happens in a fraction of a second. This makes the PDAF system much faster than contrast-detection autofocus. It is this speed that makes it ideal even for moving action.
Unfortunately, similar to CDAF, phase-detection autofocus relies on the light coming in through the lens. If the scene is too dark, then it may take longer for PDAF to analyse the scene and focus the image correctly.
How PDAF works on a typical smartphone camera sensor compared to dual-pixel auto-focus. Source: samsung.com
Dual-pixel auto-focus
Introduced to smartphone cameras first by Samsung on the Galaxy S7, dual-pixel auto-focus takes what PDAF does and goes further with it.
We’re talking lightning-fast auto-focus that is impressive even by dedicated camera standards from where this technology originates.
Instead of only having a phase detecting photodiode embedded on a few pixels that don’t capture images, DPAF has two photodiodes on every single pixel on the sensor.
This means that each and every pixel serves two purposes: to capture the image and to provide focus data.
Advantages and disadvantages of passive auto-focus
Passive Auto-Focus | |
---|---|
Advantages | Disadvantages |
Cheap | Does not work well in low light |
Requires no additional hardware | The focus is not always accurate |
Distance does not matter | |
Can focus past through glass |
Active auto-focus
Unlike passive auto-focus, which relies on incoming light to work out the correct focus, active auto-focus relies on a dedicated internal device that calculates the distance between the camera and the subject.
The most common form of active auto-focus found in smartphone cameras is laser auto-focus.
Laser auto-focus
Laser auto-focus is probably the most simple and straightforward system of auto-focus to understand. Popular some years ago with smartphone makers such as LG, laser auto-focus is an active AF system that uses infrared to determine focus.
Where other auto-focus methods rely on incoming light to calculate and determine focus, laser auto-focus shoots out an invisible infrared laser beam that scans the scene.
This is not any different to how a time-of-flight (ToF) camera works on smartphones to create a depth map.
Not to worry, though. The laser is very weak, in order to avoid any potential damage to anyone’s eyes.
When the laser fired from the phone hits an object, it is reflected back to the sensor. The camera then calculates the distance the light had to travel and uses that information to move the camera’s focus lens into a position where the picture will be at its sharpest focus.
Because the speed at which the laser travels is constant, distance can be determined by calculating the time it takes for the laser to reach the object and then bounce back to the sensor.
LG has previously claimed that its entire laser AF process only takes about 0.276 seconds to get an image into focus. This makes laser auto-focus marginally faster than phase-detection auto-focus. Not only that, but it also works well in low-light conditions, too!
The downside is that laser auto-focus is rather expensive and requires extra hardware in the form of an infrared transmitter and receiver. I guess maybe this could be part of the reason why it was never so popular. The laser also doesn’t travel too far and can get confused by reflections.
Advantages and disadvantages of active auto-focus
Active auto-focus | |
---|---|
Advantages | Disadvantages |
Works well at night and in low light | Reflective surfaces can confuse infrared light |
Super fast | Expensive |
Unmatched accuracy | Requires additional equipment |
Limited by distance |
Hybrid AF
Hybrid auto-focus is a system that some smartphone makers have adopted in order to overcome certain issues that a specific AF method may have. This is because hybrid auto-focus is a combination of two or more AF technologies.
Sony, for example, has been known to make smartphone cameras that combine both PDAF and CDAF systems, whereas Google previously used both PDAF and laser AF on the Google Pixel.
Such pairings that take advantage of each system’s strengths can result in a much faster and more accurate AF performance.
Hybrid AF can either be categorised as passive auto-focus, active auto-focus or a combination of both depending on the systems used.
Auto-Focus Modes
There are two modes of auto-focus that exist on smartphones: AF-S and AF-C. These auto-focus modes aim to assist you in keeping your focus locked on your subject.
The type of shot you’re taking and whether the subject is moving or not will determine the best auto-focus mode for the shot.
AF-S (Auto-focus Single)
This mode of auto-focus is mostly ideal for situations where the subject of your shot is not moving at all. The reason for this is because when AF-S focuses on your subject, it locks the focus in that position. If your subject moves, the focus will be out and you’ll have to adjust it again.
So, if you’re taking a photo of a landscape or a portrait of a person, this would be the best auto-focus mode to use.
AF-C (Continuous auto-focus)
As the name suggests, this mode of auto-focus provides continuous focus, no matter the subject movement. Once the camera is focused on a subject, it will track the subject and keep it in focus.
This allows you to move the camera a bit and re-frame your shot without worrying about having to adjust focus again. AF-C is not possible with CDAF but easily achieved with other methods of focusing automatically such as PDAF.
To be able to choose the auto-focus method you want to use, in most cases, you need to be in the manual mode of your camera app.
Manual Focus (MF)
Manual focus leaves the controls entirely in your hands. You can access this feature by going to the Manual Mode (or ‘professional’ mode) of your camera app. A slider will appear on the screen that allows you to shift focus as you please.
If the camera app you use doesn’t have this feature, you can find it in many third-party apps that allow you to manually control your camera.
Manual focus slider on a Huawei smartphone camera app
How manual focus works on smartphone cameras is technically pretty similar to how it works on bigger camera lenses where you turn a ring on the lens barrel to move the glass pieces inside around to focus.
The only difference is that instead of a physical focus ring, smartphone cameras combine hardware and software technology to adjust the focus. The user interface of the camera app allows you to move the focus motor by simply adjusting a slider.
Should you use manual focus or auto-focus?
To be honest, you don’t really need to use manual focus all the time. Most of the time auto-focus works just fine. It’s quick and can be pretty accurate in most cases.
However, manual focus can come in handy in low-light situations where light-dependent passive auto-focus may not work so well. But even then, you need to have adequate lighting for you to be able to see how sharp your focus is.
Also, for artistic purposes or macro photography, it’s good to know that the option of setting your own focus manually is available.
Manual focus vs auto-focus
Manual focus | Auto-focus |
---|---|
Allows you full control | Controlled mostly by the camera itself |
Provides creative freedom | You can select where you want the camera to focus |
Can take a while to adjust | It can be fast |
Challenging to adjust in low lighting | Very accurate in the right conditions |
Unless your smartphone camera has laser auto-focus, whether you use manual focus or auto-focus, it can be a bit of a challenge to get the focus right either way. And that’s why lighting is so important when taking photos in low light conditions with your phone.
When there’s enough lighting, the camera can pick up the contrast in the scene much easier when using passive auto-focus. It also becomes easier for you to see whether or not your shot is in focus.
Whether you use available lighting, continuous lighting (such as the Manfrotto Lumimuse8 LED Light), or even external flash for smartphone cameras (e.g., the Profoto C1 wireless smartphone camera flash), there’s no doubt that having great lighting will improve the quality of your photos.
Did you know?
You can do more with your smartphone photos than just fill up your phone’s storage and share them online. You can print them at home for your family and friends, turn them into works of art for your wall, or even sell them online for extra cash!
If you’d like to do more with your photos but don’t think they’re good enough, don’t worry. I have put together a simple introductory guide that will help you take beautiful mobile photos that could be good enough for you to print and display in your home or share with family.
If you want to learn about how to improve your smartphone photography, download the 5 Ways To Improve Your Smartphone Photography ebook by clicking on the banner above or by clicking here. There’s a lot to learn in its 22 pages of content and it’s ABSOLUTELY FREE!!!
Otherwise, for some quick tips on how to capture great photos with your phone, check out these 15 Tips on How To Take Amazing Photos With Your Phone.