11 March 2012

Let's get technical - Wadda Focus!

Almost a decade ago, when I got my hands on the new kid on the block - the digital camera, a feature in it that marked a major shift from film-photography was the auto-focus (AF) mechanism. The camera has some  intelligent and sometimes bewildering intelligence in it, one such mark-of-a-genius trait being the AF mechanism. Have you ever wondered how the camera achieves such sharp focus effortlessly, while being equally stubborn at other times? In this post, let's look at how the AF mechanism works, thus moving a step closer to understanding your camera and avoiding embarrassing moments when it refuses to focus on your friends :)  

Types of Auto-Focus (AF) mechanisms
AF mechanisms are broadly classified as either ACTIVE or PASSIVE. In the former mode, the AF mechanism emits waves, infrared or infrasonic (like a submarine's SONAR) and gauges the distance between the lens and the subject. The passive mechanism is named as such because there are no signals sent from the camera to the subject for calculating the distance between the lens and subject; instead the AF software inside the camera analyses the image to achieve optimal contrast obtained at different positions of the focusing ring. Most of the contemporary cameras use the passive mode because of the problems inherent in the active mechanism.

Active Mechanism
There are multiple problems associated with the active mechanism, which are aggravated when you are not in control of the environment. 
  • Infrared interference: if the AF mechanism uses IR rays for calculating the distance, an attempt to focus near a halogen bulb or fire or a candle would throw the AF mechanism off balance.
  • Transparent surfaces: using SONAR for calculating the distance would ruin the focusing attempt, were a glass or windshield to be introduced between the camera and the subject since the sound waves would bounce off the glass instead of reaching the subject.

Passive Mechanism
The passive AF mechanism quickly changes the focus a few times and compares the contrast of the images obtained. Based on which focus setting offers the best contrast, the camera chooses that as the optimal focus. This is based on the fact that a sharply focused image shows higher contrast than a poorly focused image. Well, as true as that maybe, only a genius could have tapped into such an obvious fact and used it as a means of focusing. Hats off to such Einsteins!

So why doesn't my camera focus?
If you understand the meaning of the term "contrast", then it is pretty easy for you to understand why the passive AF mechanism may act stubbornly at times. Contrast is the difference between the light and dark areas/pixels in the image. If the contrast is low, the image does not look rich in color; it looks dusty or dull. As you increase the contrast, the darker areas become darker and bright pixels become brighter. Also, given an illumination setup, the image shows best contrast when sharply focused.

Compare the low and high contrast images below. Note the difference in color levels and hence, the clarity of the image.
High Contrast Low Contrast
So if your camera is letting you down on occasions, check the below list and see if any of these is the reason:
  • The frame is almost uniformly colored: this happens when you try to focus on a clear sky, single-colored and uniformly lit wall or object. Since all the pixels have almost the same values, the camera cannot identify the contrast level in the image and hence cannot perform contrast based AF. In the below image, I tried to focus on a white wall but could not because of the lack of contrast.
White wall
  • Moving subject: this happens if the subject is in motion while you are struggling to focus on it. Since the pixels are moving, the 2 images taken by the AF mechanism for comparing contrast cannot be used for comparison. In this case, you are better off focusing on something that is at the same distance from the lens as the subject is, and then keeping the shutter half-pressed (the focusing happens when the shutter is half pressed), move the camera to get the subject in frame.
  • Low light conditions: less light means more dark areas. The darker the picture, the less the contrast (remember, contrast required dark as well as bright areas) which stresses out the AF mechanism. I was unable to focus in the below image for lack of visible light. As such, the superman logo is out of focus. (though it is bright red, lack of contrast and complete lack of visible light scrambled the AF mechanism).
Low light conditions

If you turn on the AF-assist beam through camera settings, in low-light conditions the camera will emit a bright light through an emitter on the front of the camera body (usually its next to the lens) which is used to illuminate the subject, thus increasing light levels and helping the AF mechanism focus. So enabling this option will help you use the AF in low light conditions. Some cameras allow the option of using the camera flash for AF - this is termed as pre-flash in which the camera emits multiple bursts of the flash to illuminate the subject while focusing.

AF Assist lamp

How does my camera focus?
If you are curious to know which AF mechanism your camera employs, you can try this trick. Go outdoors and point towards the sky and try to focus on it. In case of active AF, the camera will mostly focus but in case of passive AF, given a clear sky (no clouds and no variation in color), the camera will not focus.

Some tips about AF
The focusing mechanism offers two modes for you to choose from - continuous and shoot-only. Should you choose the latter mode, the camera will attempt to focus only when you press the shutter halfway. This is good and recommended for situations where you take time to compose the picture (portraits, studio shoot, landscapes, etc). During sports or high speed photography though, you may want to switch to continuous focus mode so that the camera does not wait for you to half-press the shutter to begin the focusing process, thus introducing a lag between shutter press and image capture. In this mode, the camera keeps attempting to focus the frame, regardless of whether you are tracking the moving subject or simply waving the camera around while waiting for something exciting to happen.

The continuous mode keeps the camera on its toes and hence, consumes more battery and leads to faster wear and tear of the focus motor. So unless specifically required, work with the shoot-only mode.

No comments:

Post a Comment