What is phase autofocus in a smartphone. What else affects the accuracy of autofocus? How autofocus works

At the dawn of its appearance, autofocus systems really were such a hocus-pocus. Now we can’t imagine life without autofocus, but quite recently everyone used it and didn’t even imagine that automation could clearly catch the subject.

Autofocus was first talked about in the 70s of the last century. Then the German company distinguished itself Leica, which developed the first autofocus lens, and introduced in 1976 the first camera equipped with an autofocus system. She became Leica Correfot, shown as a prototype at the exhibition Photokina-1976.

But the German company was in no hurry to produce autofocus systems and sold the technology to the company Minolta, which, thanks to the effective introduction of autofocus into its DSLRs, by the mid-1980s. quickly broke into the leaders in sales of photographic equipment. In parallel, other corporations were developing autofocus systems ( Canon, Seiko, Polaroid, Pentax etc.) and the technology went to the masses.

We will not go into the technical details of the operation of autofocus systems for the time being. But “on the fingers” we will try to talk about how they function.

To date, there are two main types of autofocus: phase and contrast, as well as their symbiosis, which is called hybrid.

Phase detection autofocus

This type of focusing is used in full in DSLRs. It is based on the principle of the phase difference of the light flux that enters the lens. The difference is determined by special sensors that are placed in close proximity to the camera matrix.

The principle of operation of the phase autofocus system is clearly demonstrated in the picture below. The light flux enters through the opposite edges of the lens to the main mirror, where it is divided into parts: part goes to the viewfinder, and another part goes directly to the additional mirror, which reflects the rays to the focus sensors. If the light rays after passing through the mirror and the focusing lens are focused at one point, then the subject is in focus. If the lens is focused closer or further away from the subject, the distance between the beams will be correspondingly smaller or larger. In this case, the processor is included in the work, which calculates the direction and amount by which the focusing lens must be shifted.

Even with the naked eye, there is a direct dependence of autofocus on the aperture ratio of the lens. Indeed, the more light enters the front lens of the lens, the more it will be repulsed and the better the auto focus sensors will work. In this case, it doesn’t matter how much you close the aperture - it will close to the set value only at the moment the shutter is released, and during the focusing process, the aperture will be opened to the maximum. Those. having an f/1.2-1.4 aperture lens in your arsenal, you can count on higher speed and focusing accuracy. On the other hand, this is offset by the fact that faster lenses have a more complex and massive lens system, which means that it is more difficult for the motor to turn this whole mechanism. In addition, a large aperture means a much smaller depth of field, which phase sensors need to get into. A vivid example of this is one of the slowest (if not the slowest) lens from Canon - EF 85mm f/1.2L II USM.

The following illustration clearly shows the phenomena of back focus and front focus:

  • focus closer - back focus;
  • focus further - front focus.

The phase sensors themselves can be linear(horizontal and vertical) and crusades(incl. double cross). We will dwell on them in more detail in the next materials.

Contrast autofocus

This focusing method is used with might and main in compacts and mirrorless cameras. Do not hesitate to put contrast sensors in DSLRs - they provide focusing in LiveView mode when phase sensors cannot work.

The operation of the contrast autofocus system is based on the principle of comparing the contrast of the image that enters the camera's matrix. The camera's processor analyzes the histogram and shifts the lens to see how much the contrast changes. If the contrast level goes down, the focus point will begin to shift in the opposite direction. If the contrast increases, the focus point will continue to move in this direction until it reaches maximum value contrast. Those. the process continues until the focus point reaches maximum contrast and returns to the point after which its level began to decline. In this case, the subject will be in focus. The big advantage of contrast focusing over phase focusing is that there is no back and front focus with it.

To view, move the mouse cursor to the upper right corner and turn the slider forward / backward (visualization - http://graphics.stanford.edu/courses/cs178/applets/autofocusCD.html)

Hybrid autofocus

Today this species Autofocus systems are becoming more and more popular. And for good reason - it combines the advantages of both systems and eliminates their shortcomings.

It works approximately as follows: phase sensors, which are located directly on the camera's matrix, provide primary focusing. Subsequently, contrast sensors are connected, which correct the difference in image contrast and finally focus the camera on the subject.

Perhaps one of the main advantages of hybrid autofocus systems is the lack of back and front focus. This is due to the fact that focusing occurs directly on the camera's matrix. Another important plus is the compact size of the hybrid autofocus system and the absence of the need to adjust this mechanism. But there is also a fly in the ointment - in terms of speed in tracking mode, hybrid autofocus still falls short of phase focus.

If you want to learn more about the operation of autofocus systems (with formulas and calculations), unsubscribe in the comments. If there is a sufficient number of applicants, we will definitely write a separate article on this topic.

This article provides information about autofocus in digital SLRs, what it is, how to use it, and what to do about problems (and how to identify them).

What is camera autofocus

The autofocus of a camera is a device for automatically aiming the lens at the subject. To denote autofocus, the international abbreviation AF is used, which can be found in the names of autofocus lenses (more on them below) and in the camera settings menu.

How autofocus works

Everything is very simple: depending on the type of focusing, the camera reads in a certain way data about what is visible in the lens. This data is then analyzed and, if necessary, the camera sends commands to the autofocus motor located in the lens. This motor moves the lens unit and focuses with the correction required by the camera. This process repeats until the camera decides that focus has been achieved.

The same “screwdriver” on the Nikon camera mount

Note: Some Nikon cameras have a focus motor that is located in the camera itself. These cameras are commonly called "carcasses with motors", and the mechanism of such focusing is called a "screwdriver" because of the resemblance. The advantages of a “screwdriver” are that the autofocus of the camera will work with old Soviet-era optics, despite the lack of a focusing motor in old lenses. However, keep in mind that old optics require improvements so that the Nikon camera can focus to infinity, which is not necessary on Canon cameras (since the distance between the rear lens of the lens and the Canon sensor is closer to this value on old SLR cameras).

Contrast autofocus

Contrast autofocus is the most simple view autofocus in modern SLR cameras.

This type of autofocus is quite reliable. and is based on the simplest run of the lens block back and forth, and then determining the position when the image on the focus sensor was the most contrast (that is, for most cases, sharp). An example of the algorithm of this autofocus method is shown in the animation.

Of the minuses of this method, one can note its extremely low speed. Same this method works only if the image from the lens goes directly to the camera matrix, that is, the camera mirror is raised (usually this happens when the Live View preview screen is on).

Phase detection autofocus

Phase detection autofocus is a more complex mechanism that requires you to first understand a little about the structure of a SLR camera. Consider the scheme of the camera shown below.


Here the image hits the mirror, from where it is redirected upwards and enters the viewfinder with the help of reflection from the pentaprism (it is not in this diagram above). But the whole point is that the camera mirror is a bit unusual, it is designed so that in a certain area in the center of the mirror, light penetrates through it, where this light is already waiting for another small mirror, which points the center of the image down, directly at the PDAF sensors. If you switch the camera on to Live View mode and raise the mirror in this way, you can see a recess under the place where the mirror was - that is where these sensors are located.


Phase autofocus sensors work as follows: light from different parts of the image enters the beam splitters (see diagram), from where a couple of beams through the lenses enter the sensor. The sensor is a pair of photosensitive sensors. The bottom line is that when the image is in focus (that is, on the separator, the rays from the image converge to one point), on a pair of sensor sensors, these rays fall exactly into the center. The advantage of this method is that you can see in advance in which direction the focus needs to be corrected so that the rays hit the center of the sensor, and moreover, how large the current error is.

From here advantage of phase detection autofocus: high speed.

However, for such autofocus to work accurately, the distance from the lens to the sensor must be exactly the same as from the lens to the beam splitters. Therefore, there is disadvantages: the mechanism requires fine tuning of the focus sensors and / or the reflecting mirror, the angle of inclination of which can greatly affect the operation of this mechanism. Incorrect settings can result in defective shots due to persistent inaccurate focus.

Hybrid autofocus

In modern advanced DSLRs and mirrorless cameras, hybrid autofocus is found, which combines all the advantages of previous focusing methods. In this case, focusing is performed on a matrix, which already in itself has phase detection autofocus sensors at the focus points. Thereby the speed of the phase autofocus and the accuracy of the contrast ratio are achieved, which in this case slightly "brings" the focus to the very exact value after the phase sensors have worked.

At the same time, the camera can analyze the image from the matrix and focus in intelligent modes on the most significant parts of the frame for the plot (for example, on the faces of people in the frame). See the description of the specific camera model that you want to purchase or already have in stock for the availability of such autofocus.

Autofocus problems

The process of correcting lens and/or camera problems when autofocus is not working properly is called alignment. Alignment (from the German justieren "to measure") - the process of alignment structural elements along any axis, in a narrower sense, this is applicable to photography fine tuning lens or camera mechanisms.

Lens alignment

Quite often, the cause of the inaccurate work of the autofocus of a SLR camera is a problem in the lens. To make sure that the problem is in the lens, you should check the autofocus operation with another lens: if the camera focuses accurately with another lens, then the problem is most likely really in the lens and you need to take it to a service center for adjustment.

Camera alignment

Sometimes the source of the problem is the camera itself, or rather, the autofocus phase sensors. As mentioned earlier, this mechanism is prone to breakage at the slightest inaccuracy (the distance from the rear lens of the lens to the phase sensors should match the distance from the rear lens of the lens to the matrix as accurately as possible).

To check the camera, you should again take another lens and check it for accuracy. If the autofocus of the camera is constantly “smearing” with another lens, then you can safely carry the camera for adjustment. Or both lenses, hehe. No, well, if the second lens that you borrowed, for example, from friends, works fine on their camera, then the problem is in your camera.

You should know that in service center can align your camera and lenses to each other, so you can bring your camera with all your optics. Usually, a perfectly aligned reference camera is kept in a good service center, and the same lens, the lenses themselves are aligned on such a camera, and cameras on such a reference lens. Or you can have your camera aligned to your own lens, but this is not very reliable if you are considering expanding your lens fleet.

It should also be remembered that in advanced SLR cameras there is an option to adjust the phase detection autofocus for each of the autofocus lenses. That is, you programmatically give the camera a command that, they say, “with this lens, make adjustments for autofocus closer, and with this one - away.” How to determine the correctness of the amendment that you asked - below.

Determining the nature of autofocus problems: front focus and back focus


To determine the correction in the camera options (and just to diagnose autofocus problems), you should know that incorrect autofocus operation is divided into two types: “undershoot” and “overshoot” of focus (front focus and back focus, respectively). To determine this defect, you can use special autofocus alignment targets, of which there are plenty on the Internet. They should be printed and focused on the center of such a target. Before that, do not forget to completely defocus the camera somewhere far or near, so that it does not have any “indulgence” when trying to focus on the target.

Personally, from my experience, I’ll say that the autofocus of my camera almost equally “did not reach” the focusing target on both lenses, which clearly indicated a problem with front focus with phase detection autofocus sensors. I had to carry it for adjustment.

Keep track of the focus point you are using. Usually this is the central point, however, in the settings it can be changed to any other point / group of points, and then the camera may, for example, try to focus on the left side of the frame, while you have placed the main subject in the center or right.

Look for contrasting objects in the focus area. The fact is that any autofocus will not understand what you want from it if you focus on a perfectly (white / black / any other color) object without any texture and details.

If there are no suitable contrasting objects, aim at an equidistant contrasting object, and then frame the frame (move the camera's gaze to where you originally wanted). This method is very helpful in difficult situations, for example, sometimes it's easier to focus not on the perfect blue sky in the center of the frame, but on the edge of the cloud on the left, and then re-transfer the perfect blue background to the center of the frame. At close distances, use this method carefully, since, for example, the distance from the camera to the face is close standing man very different from the distance from the camera to his feet.

For very dynamic scenes, use AF tracking mode(in Canon it's called servo focus). In this mode, the camera will periodically send signals to the camera to focus, thus increasing your chances of getting a picture in focus on the subject. For example, I actively used this option when macro shooting working bumblebees, which do not stop in one place for more than one second. Although any autofocus is bad for macro photography (more on that below), and I got very few non-rejected frames, but for shooting, say, a cyclist who is riding towards you, this is the very thing!

Intelligent AF Mode chooses the focus points for you. According to my observations, my camera in this mode selects the nearest brightest object and activates the focus points that it covers. This mode is intended for those who absolutely do not want to bathe with autofocus =).

Autofocus is contraindicated for high magnification macro photography, since the depth of field is usually so shallow that the camera cannot "catch" it. Thus, the lens begins to move back and forth in search of focus. You yourself will understand that shooting macro with your hands is more convenient, although not easy. Moreover, for a large macro shot, it is easier to aim not by focusing, but simply by moving the camera closer or further away from the subject.


With SUCH magnification, you can forget about autofocus. About handheld shooting without a flash, by the way, too.

Extending the Autofocus Capabilities of Canon Cameras

In order to expand the capabilities of autofocus (and not only), I advise you to install the Magic Lantern firmware. During installation, you may need to update the firmware of your camera model to latest version by downloading it from the official Canon website. Then follow the instructions to install Magic Lantern.

I must say right away that there are similar firmware for owners of Nikon or other brands of cameras, you can find a list of them.

Magic Lantern provides software scenarios for using autofocus, such as:

  • autofocus trap (focus trap): the camera automatically takes a picture when it enters the field of sharpness of any moving object, such as a bird;
  • focus point patterns: now you can select not only single autofocus points or all at once, but also separate groups (all top, bottom, right, left, etc.);
  • tracking autofocus (follow focus): manual control automatic focus at a constant speed, which can be useful when the video depends on the subject moving towards you / away from you;
  • focus shift (rack focus): the same, but a completely automated process, select the initial focusing distance, the final one - and go!
  • focus stacking: an extremely useful option for macro photography, allows you to take several shots with a shift in focus distance, later you can combine these photos in any popular photo editor into one photo with a huge depth of field and detail for macro photography.

Conclusion

Camera autofocus is not an easy topic, which will not work out well “with one kick”, especially if you have any problems. If you get blurry photos on a DSLR, then I advise you to take the camera to the service before taking it to the service. If the tips given in it helped you to achieve high-definition pictures with manual focusing or focusing on the screen (contrast), and auto focusing through the viewfinder (phase) continues to miss, feel free to take the camera to a service center!

© 2014 website

Autofocus, or auto focus, is the preferred solution for most photographic subjects over manual focus. In skillful hands, autofocus achieves focusing more accurately, and, most importantly, faster than the average photographer. However, autofocus is far from being as simple as it might seem to a novice amateur photographer, and its correct use is very far from the point-and-shoot principle. There are a number of subtleties to learn if you want autofocus to stop taking on a life of its own and start doing what you want from him.

I highly recommend that you re-read the autofocus section of your camera's manual - it's one of the most helpful pages in the entire manual, and the information contained there should not be neglected. At a minimum, you should understand which controls are responsible for switching between different autofocus modes and choosing the focus point you need.

Most cameras have two main autofocus modes: single and tracking.

Single or single-frame autofocus(in Nikon cameras it is called Single Servo AF (S), and in Canon cameras - One-shot AF) is designed for shooting still scenes, such as, for example, most landscapes. When you press the shutter button halfway, the camera focuses on the subject within the pre-selected focus point, after which the focus is locked, allowing you to recompose the shot (without changing the distance to the subject, of course) before releasing the shutter.

It should be understood that in fact the lens does not focus on the object as such, but on a certain distances. Thus, if I let the camera focus on an object located at a distance of 5 meters from me, then all other objects that are 5 meters away from me, i.e. those lying in the focal plane will come out sharp, and as long as the focus is locked and the distance to the object does not change, I am free to rotate the camera to please the composition without fear of losing focus.

This method is good when the distance to the object being photographed is relatively large and measured at least in meters. At close distances, inevitable in macro photography, recomposing the frame, which entails a change in distance of just a couple of centimeters, can result in a noticeable focus shift relative to the object, which will be especially critical with a shallow depth of field.

Follower or continuous autofocus(Nikon - Continuous Servo AF (C), Canon - AI Servo AF) is indispensable when shooting moving objects, such as athletes or animals. As long as the shutter button remains half-pressed, autofocus continues to work continuously, keeping the subject in focus even as the distance between them and you changes. Focus lock naturally does not occur in this case, since the lenses of the objective are in constant motion, tracking the movement of the object.

Obviously, when using tracking autofocus, you cannot arbitrarily change the composition of the frame, because. if the active focusing point leaves the object being shot, then the focus will shift from the object to the background after the point. To lock focus in AF tracking mode, use back button focusing.

The intermediate or automatic mode (AF-A or AI Focus AF), which itself decides whether to use single or continuous autofocus, does not inspire much confidence in me, since it is not always able to distinguish camera movement from subject movement.

Focus points

The number of focus points in modern cameras can reach fifty or even more. The abundance of focus points is, of course, nice, and sometimes useful, but even if your camera has a small number of points by modern standards (nine or eleven), you still have enough of them with your head.

When shooting stationary objects, I use only one single point, most often the central one. One point allows me to focus in the most precise way on the object I need, or even on a separate part of it, and then, after locking the focus, recompose the frame the way I want.

Auto focus point selection is handy when you're in a hurry, but keep in mind that the camera will usually try to focus on the subject closest to it or the area with the most contrast, which isn't always what you want. Autofocus cannot know which of the objects is the most important and requires unconditional sharpness, and which is secondary, and, therefore, may remain out of focus, and therefore do not be lazy to choose the focus point yourself, in case the camera's automation can not cope with this.

I only use auto focus point selection in the following situations:

  • The object is moving very fast, and I simply do not have time to select points - the camera will do it much faster. This is also true when the photographer himself is moving, being, for example, on board a motor boat.
  • A single subject stands out well against a relatively monotonous background, like a bird flying across the sky, and the autofocus has no chance of focusing on anything extraneous.
  • All elements of the scene being shot are at the same large distance from the camera, as, for example, when shooting from a high mountain, and the difference between the distance to individual objects can be neglected.
  • Shooting textures, when the surface being filmed is placed in the focal plane, i.e. strictly perpendicular to the optical axis of the lens.
  • The camera is passed into the hands of a person who has no idea about autofocus.

In all other cases, I use a single focus point.

It should also be remembered that the shape of the focusing points in the camera's viewfinder only approximately indicates the true shape and dimensions of the autofocus sensors.

Focus or Shutter Priority

Focus Priority(focus priority) means that when the shutter button is pressed all the way down, the picture will be taken only if the subject is in focus. Otherwise, the shutter will not work.

If it is enabled trigger priority(release priority), then the picture will be taken whenever you press the button, regardless of whether focus is achieved or not.

Normally, the camera is factory-set to use Focus Priority in Single AF mode and Release Priority in Continuous AF mode, but you are free to change the priorities as you see fit.

Differences between contrast and phase detection autofocus

AT digital cameras The two most common autofocus systems are used: phase detection autofocus and contrast. Let's see how they differ from each other.

Contrast autofocus

Contrast autofocus is used in compact cameras, as well as in SLR cameras in Live View mode.

Contrast autofocus does not need any additional focus sensors and uses the camera's sensor directly to focus. The image coming from the sensor is analyzed by the camera processor for changes in contrast. When it becomes necessary to focus, the processor instructs the focus motor to slightly move the lens in an arbitrary direction. If the image contrast decreases, the direction is reversed. If the contrast has increased, the movement of the lenses continues in the original direction until the contrast begins to decrease again. At this point, autofocus returns the lens one step back, i.e. to the position in which the contrast was maximum, after which focusing is considered complete.

Due to the fact that contrast autofocus does not know how much and in which direction to move the focus point, it is forced to act by touch, focusing solely on the change in contrast, and, as a result, make a lot of unnecessary movements. That is why the main disadvantage contrast autofocus is a slow focusing speed, making it completely unsuitable for shooting moving objects.

Of the advantages of contrast autofocus, it should be noted the simplicity of design, accuracy and the ability to focus almost anywhere in the frame.

Phase detection autofocus

Phase detection autofocus is used in SLR cameras, both film and digital. In addition to the main mirror, which is necessary to direct the image to the viewfinder, the SLR camera is also equipped with a small additional mirror, which reflects part of the light onto the phase detection autofocus module. Each beam of light, passing through a special optical system consisting of a beam-splitting prism and microlenses, is divided into two beams, each of which is then directed directly to the autofocus sensors. In the case of precise focusing, the rays must fall on the sensors at a strictly defined distance from each other. If the distance between the beams is less than the reference, this indicates that the lens is focused closer than necessary (front focus), if the distance is greater, the lens is focused farther (back focus). The amount of shift tells you how far the lens is from perfect focus. Thus, phase autofocus immediately provides the processor with information about whether the subject is in focus, and if not, then where and how much the focusing lenses of the lens need to be shifted. This allows you to focus in one quick movement.

Phase detection autofocus sensors are linear and cross-shaped. Linear sensors, in turn, are divided into horizontal and vertical. Horizontal focus sensors are sensitive to vertical details (such as tree trunks), while vertical sensors are sensitive to horizontal details (such as the horizon line). Cross-shaped focusing sensors are versatile and sensitive to details oriented in any direction. You can find out which autofocus sensors are cross-shaped and which are linear, in the manual for your camera. The most sensitive sensor is always located in the center of the frame.

Focusing speed is the main advantage of phase detection autofocus, making it indispensable when shooting dynamic scenes. The main disadvantages are the complexity and bulkiness of the autofocus system, the need for careful alignment of all its components, lower accuracy compared to contrast autofocus, a limited number of focus points, and the inability to use classic phase detection autofocus in Live View mode.

Hybrid autofocus

Attempts to combine the advantages of phase detection and contrast autofocus have led to the emergence of hybrid systems, which are used in many mirrorless and some SLR cameras.

The essence of hybrid autofocus lies in the fact that phase sensors are integrated directly into the camera's matrix. Phase-detection autofocus provides an initial fast focusing, which is then corrected by analyzing the contrast of the image. At the same time, the entire system is very compact and does not require mechanical adjustment.

What else affects the accuracy of autofocus?

Aperture

Autofocus accuracy is directly dependent on lens aperture. The jumping aperture mechanism used in modern lenses implies that metering and focusing are carried out with a fully open aperture, which is automatically covered to the selected value only immediately at the moment the shutter is released. The larger the maximum aperture of the lens, the more light will reach the autofocus sensors during focusing. Due to the fact that with a larger aperture, the light rays travel farther from the optical axis of the lens, they fall on the sensors at a large angle to each other, which makes it easier to determine the phase difference. The most accurate phase detection autofocus sensors are designed to work at apertures of f/2.8 and above, and any sensors stop working below f/8. In addition, a large aperture provides a shallow depth of field, which again improves focusing accuracy, as deviations from ideal focus become more obvious.

Focal length

The longer the focal length of the lens, the shallower the depth of field. It would seem that this should provide more accurate autofocus with telephoto lenses. Accuracy does improve, but at the same time, due to the vanishingly shallow depth of field, any autofocus miss is much more noticeable when using telephoto lenses, and in fact, getting into focus with a telephoto lens is much more difficult than with a lens that has a short focal length. On practice wide angle lenses much more tolerant of autofocus errors.

Detailing

Autofocus sensors need crisp, high-contrast detail on which to focus. So, if the object has clear contours or a relief texture, autofocus will do its job perfectly, but on flat, monotonous surfaces it will simply have nothing to catch on.

illumination

The brighter the scene is lit, the more accurate the autofocus works. When the light falls, the level of contrast to be assessed also decreases, making focusing very difficult. When the scene brightness is LV 1 (see "Light and exposure numbers"), autofocus works very badly, and at LV -2 and below, it is almost impossible to use autofocus and you have to focus exclusively manually.

Photographer

The main factor that limits the accuracy of autofocus is your ability to use it. No high-sensitivity sensors and ultra-fast focusing motors can replace the skill of a photographer. Without proper skill, even the most advanced autofocus system will constantly miss.

The most important thing about using autofocus is regular practice. A thoughtful approach to the operation of automation will allow you to focus quickly, accurately and not without excessive freethinking on the part of the camera.

Thank you for your attention!

Vasily A.

post scriptum

If the article turned out to be useful and informative for you, you can kindly support the project by contributing to its development. If you did not like the article, but you have thoughts on how to make it better, your criticism will be accepted with no less gratitude.

Do not forget that this article is subject to copyright. Reprinting and quoting are permissible provided there is a valid link to the original source, and the text used must not be distorted or modified in any way.

Publication date: 04.09.2015

Sharpness is one of the most important components of high-quality photography. Being sharp enough, the picture can convey the story in great detail and detail.

Focusing is responsible for the sharpness of a photo. We will talk today about what it is and how modern cameras work with it.

Some theory and history

The lens does not focus on a specific object, but at a certain distance. A lens, like any optical device (for example, a projector, binoculars, microscope, magnifying glass), can only be focused at a certain distance. And only objects at this distance will be sharp in the frame. Some lenses even have a special scale that shows the focusing distance in meters. During focusing, the lens unit moves back and forth in the lens, just like we move an ordinary magnifying glass, looking at small objects: the magnifier will show them sharp only when it is at the right distance from them.

When focusing, we adjust the lens to a certain focusing distance.

Nikon D810 / Nikon 85mm f/1.4D AF Nikkor

An error with this parameter threatens that the main subject of the image will turn out to be blurry.

An interesting consequence from the previous paragraph: if there are several objects in the frame that are located at different distances, then it’s just not possible to focus on all of them. But there is a solution: fit all objects in the depth of field. We wrote about how to work with it in separate lessons. Note that on devices with a very small sensor (such as smartphones or compact cameras), the depth of field will be very large. That is why it is easy to take a frame with such devices, where both the foreground and the background will be sharp. But for the same reason, it is almost impossible to blur the background in the picture with them.

In the past, photographers focused their lenses themselves. Today, the manual focus function has been preserved in almost every camera. And in mirror photography it is always present. The downside to manual focusing is that it takes a long time to focus accurately. And if your subject is also moving, then manual focus turns into a real test of the nerves, coordination and vision of the photographer. Starting from the 80s of the last century, automatic focusing systems began to develop. Then Nikon introduced its first camera, endowed with autofocus - Nikon F3AF.

Since then, cameras equipped with autofocus have supplanted simpler models that lacked it. Today, almost no cameras are produced without auto focus.

We can say that in our days autofocus has become an integral part of a modern camera. Autofocus systems are improving every year, becoming faster, more sensitive and more flexible in operation.

How does autofocus work?

The auto focus system is a complex of sensors and mechanisms. The device needs to evaluate the future frame, understand at what distance it needs to focus, and then also move the lens block in the lens accordingly so that it projects onto the sensor sharp image.

According to the principle of operation, there are two main types of autofocus systems.

Phase focus

Proven type of auto focus. This type of autofocus is essential for SLR cameras. We know that the key element of a SLR camera is, in fact, a mirror. Thanks to him, we can see the image received directly through the lens of the device. But the functions of the mirror do not end there. And by the way, there is more than one mirror in the cell: there is a whole system of mirrors. It is designed in such a way that part of the reflected light is sent to the viewfinder, and part falls on a special module on which the sensors are installed. A modern autofocus module may contain dozens of such sensors. Manufacturers try to arrange the sensors so that they cover the maximum possible area of ​​​​the frame, so that the photographer can focus on any fragment of the future photo.

To the photographer, these small sensors appear as focus points in the viewfinder. I think everyone knows them. The photographer is free to choose the desired point on his own (read “a separate sensor on the focusing module”), or he can entrust this choice to the automation of the camera.

For image analysis, each sensor is equipped with its own miniature matrix 1 pixel wide and several tens of pixels long. At the same time, some sensors are equipped with two such matrices installed in a cross. Cross-type sensors are more sensitive, so they are placed in key places, and ordinary ones are located around them. For example, a cross-type sensor is almost always located in the center of the frame. Photographers know that the center AF point is the most grippy and sensitive.

The autofocus system comes into play when you press the shutter button halfway. Also on some devices there is a special button to activate autofocus. The focus module tells the camera how far the lens must be focused to get a sharp image at the selected point. To do this, a special motor is launched, which moves the lens of the lens, focusing on sharpness.

Now the camera has to focus the lens, and when this happens, you can take a picture.

Advantages of phase type focusing:

  • Work speed. This type of focusing is the fastest to date. Note that the speed of the entire autofocus system will also depend on other factors (for example, on the speed of the focus drive in the lens).
  • High sensitivity. Phase focus sensors can work even in very poor lighting conditions.

Nikon D810 / Nikon AF-S 50mm f/1.4G Nikkor

The weak evening lighting did not prevent me from quickly focusing where I wished.

  • High accuracy and speed tracking autofocus. Thanks to sensitive sensors and advanced electronics, modern devices in tracking focus mode make it possible not to lose focus even on very fast moving objects, following them across the entire field of the frame.

Nikon D810 / Nikon 70-200mm f/4G ED AF-S VR Nikkor

Due to its high speed, phase-detection autofocus is excellent for shooting dynamic scenes, including those involving children and animals.

Cons of phase type focusing:

  • Opportunity to work only through the optical viewfinder. After all, only when the camera mirror is lowered does light enter both the viewfinder and the focus sensors.
  • The second point follows from the first point: the impossibility of using phase autofocus at the time of video recording.
  • Due to the complexity of the whole system, phase type focusing can suffer from back and front focus. In this case, the camera will systematically focus slightly further or slightly in front of the subject. There is only one result: the object itself, on which the camera was focused, will eventually turn out to be a little blurry. The problem of back and front focus is solved by setting up the equipment in the service center. In the case of advanced cameras (starting with the Nikon D7200), you can adjust the focus yourself right in the camera's menu.
  • Incomplete coverage of the frame area by focusing sensors. Surely you have noticed that all focus points are usually located closer to the center of the frame, while there is not a single one at the edge. It's connected with design features the entire phase focusing system. Here general pattern is simple: the more advanced camera you have in your hands, the more focus sensors, as a rule, are installed in it, and the big square the frame is covered with them. However, it is worth saying that some professionals often use a single central focus point in general and almost never use others. After all, the central focus point is the most sensitive, and after focusing on the center of the frame, the picture can always be recomposed.

Contrast focus type

This type of focusing is simpler: it does not need a special separate module and a system of mirrors, because the camera matrix itself acts as the “focus sensor”. The camera electronics analyzes the image received by the matrix and evaluates its contrast at the selected point. If the contrast is not at its maximum, it tries to refocus the lens so that the contrast increases. So automation gradually achieves maximum detail of the picture at the selected point.

Modern SLR cameras use this type of focus when using Live View. In mirrorless cameras, it is the main one.

Advantages of the contrast type of focusing:

  • Simplicity and reliability of a design. To implement this type of focusing, no additional sensors, mirrors, etc. are required. It is thanks to this simple design that mirrorless devices, which use only contrast autofocus, are so compact: they removed the mirror system and the phase focusing module. In addition, since the device focuses not on the readings of a separately located focusing module, but directly on the camera matrix, with contrast focusing, cases of back and front focus are excluded.
  • You can focus across the entire field of the frame, and not just within the existing focus points. Phase autofocus modules often sin in that all of their (albeit numerous) sensors are located exactly in the center of the frame. This does not allow focusing on the edge of the picture - there simply is not a single focus point. Contrast focusing does not know such problems. Here we can choose any place on the plane of the future image for focusing (even from the very edge), because it is possible to use any area of ​​the camera matrix in focusing.

But here it is worth making a reservation: in mirrorless cameras, the contrast autofocus function is implemented in such a way that the choice of focus points is still somewhat limited, they do not cover absolutely the entire frame area.

  • Ability to implement additional focusing functions such as face detection.
  • Ability to use autofocus during video recording. However, while this possibility is not available in all devices equipped with contrast focusing.
  • Theoretically high focusing accuracy. The very principle of contrast focusing allows you to achieve perfect focusing quality. However, there are a number of reservations regarding its accuracy, depending on the implementation of the system in specific devices. We will talk about this in the "cons".

Cons of a contrast type of focus:

  • Slow operating speed. Surely all owners of DSLRs have noticed that the camera focuses more slowly in Live View mode. It's all the fault of the contrast autofocus used in this mode. Let the speed of the phase autofocus increase with each next generation of cameras, so far, according to this criterion, it is inferior to the phase type.
  • Requirements for lighting. The speed of contrast focusing will drop even more if you shoot in low light.
  • The practical implementation of contrast autofocus is not always ideal. We have already said that the practical implementation of contrast autofocus in various photographic equipment does not always reveal its theoretical merits. And here's another feature: some camera models offer the photographer to focus not on a specific point in the image, but on a large frame that moves along the plane of the frame. Many different details can fit inside it, which means focusing errors are also possible: who knows what exactly the camera will want to focus on inside this frame? .. Therefore, inexpensive mirrorless cameras (in which this situation happens) are not very convenient to use with fast optics. First of all, they are designed to work with universal kit lenses that do not have high aperture. Therefore, if you have an inexpensive mirrorless camera, do not rush to complete the kit with a fast portrait optics: it is quite possible that most of your shots will not be quite sharp. On the other hand, if the camera allows you to focus on a very small area of ​​the frame, on the contrary, you can achieve accurate focusing when working with high-aperture optics.

The camera's autofocus system adjusts the lens to focus on the subject and can make the difference between a sharp shot and a missed opportunity. Despite the seeming obviousness of the task of "clearness at the focus point", the hidden work required for focusing, unfortunately, is far from simple. This chapter is designed to improve the quality of your shots by providing you with an understanding of how autofocus works, allowing you to get the most out of it and avoid its drawbacks.


Note: Autofocus (AF) works either using the contrast sensors in the camera ( passive AF), or by sending a signal to highlight or estimate the distance to the object ( active AF). Passive AF can be carried out by methods contrast or phase detector, but both methods rely on contrast to achieve accurate autofocus; therefore, from the point of view of this chapter, they are considered to be qualitatively identical. Unless otherwise noted, this chapter deals with passive autofocus. We will also look at the active AF assist beam method towards the end.

Concept: autofocus sensors

The camera's autofocus sensor(s) are located in various parts image fields of view are the whole system behind achieving sharp focus. Each sensor measures relative focus by changes in contrast in the corresponding area of ​​the image, and the maximum contrast is considered to correspond to the maximum sharpness.

Focus change: Blur semi focus sharpness

400%


Sensor histogram

The basics of image contrast are covered in the chapter on image histograms.
Note: Many compact digital cameras use the image sensor itself as the contrast sensor (using a technique called contrast AF) and are optionally equipped with multiple discrete autofocus sensors (which are more common with phase-detection AF). The diagram above illustrates the contrast AF method; the phase detector method differs from it, but is also based on contrast as an autofocus criterion.

The focusing process in general terms works like this:

  1. The autofocus processor (AFP) slightly changes the focusing distance.
  2. AFP reads the AF sensor and evaluates how and how much the focus has changed.
  3. Using the information from the previous step, AFP adjusts the lens to the new focus distance.
  4. AFP sequentially repeats the previous steps until a satisfactory focus is achieved.

The whole process usually takes a fraction of a second. In difficult cases, the camera may not reach satisfactory focus and will start repeating the above process, which means autofocus failure. This is a terrible case of "focus hunting" where the camera constantly zooms back and forth without achieving focus. However, this does not mean that focusing on the selected subject is impossible. The next section discusses cases and causes of autofocus failure.

Factors Affecting Autofocus

The subject can have a huge impact on autofocus success, often more so than differences between camera models, lenses, or focus settings. The three most important factors that affect autofocus are the amount of light, the contrast of the subject, and the movement of the camera or subject.

An example illustrating the quality of various focus points is shown on the left; hover over the image to see the advantages and disadvantages of each focus point.

Note that all of these factors are interrelated; in other words, autofocus is achievable even on a dimly lit subject, if it has a high contrast, and vice versa. This has important implications for your choice of autofocus point: choosing a focus point that is on a hard edge or texture will help you achieve better autofocus, all other things being equal.

The example on the left compares favorably in that the best autofocus points coincide with the position of the subject. The next example is more problematic because autofocus works better on the background than on the subject. Hover over the image below to highlight areas of good and bad autofocus performance.

In the image on the right, when focusing on fast-moving lights behind the subject, the subject itself may be out of focus if the depth of field is shallow (as is usually the case when shooting in low light conditions such as those shown).

Otherwise, focusing on the external illumination of the subject would probably be the best approach, minus the fact that this illumination quickly changes location and intensity depending on the position of the moving light sources.

If it is not possible to focus the camera on the ambient light, a less contrast (but more static and fairly well lit) focus point can be chosen by the model's legs or leaves on the ground at the same distance as the model.

However, the choice described above is hampered by the fact that it often needs to be made within a fraction of a second. Additional specific AF techniques for still and moving subjects will be discussed in the appropriate sections towards the end of this chapter.

Number and type of autofocus points

The stability and flexibility of autofocus is primarily a result of the number, position, and type of autofocus points that are available on a given camera model. SLR cameras upper class have 45 autofocus points or more, while other cameras may even have just one center point. Two examples of AF sensor locations are shown below:

The examples on the left and right show Canon 1D MkII and Canon 50D/500D cameras, respectively.
For these cameras, autofocus is not possible at apertures smaller than f/8.0 and f/5.6.


Note: The sensor is called "vertical" only because it detects contrast.
along a vertical line. The irony is that such a sensor, as a consequence,
best detects horizontal lines.

For digital SLR cameras, the number and accuracy of AF points may also vary depending on the maximum aperture of the lens used, as shown above. This is an important factor when choosing a lens: even if you don't plan on using the maximum aperture of the lens, it can still help the camera achieve better high precision autofocus. Further, since the center AF sensor is almost always the most accurate, for off-center subjects it is often best to use that sensor first to focus (before recomposing).

Multiple AF sensors can work simultaneously for increased reliability, or individually for increased uniqueness, depending on the camera settings selected. Some cameras also have "Auto DOF", an option for group photos that ensures that all points in a focus cluster fall within an acceptable degree of focus.

AF modes: tracking (AI SERVO) or one-time (ONE SHOT)

The most widely supported camera focus mode is Single, which is best for still images. This mode is prone to focusing errors for fast-moving subjects because it is not designed for movement, and it can also make it difficult for the viewfinder to track moving subjects. Single focusing requires focus to be reached before a picture can be taken.

Many cameras also support an autofocus mode that continuously adjusts the focusing distance for moving subjects. Canon cameras call this mode "AI Servo" and Nikon cameras call it "continuous" focusing. The tracking mode works on the basis of an assumption about the location of the object at the next point in time based on the calculation of the object's speed based on previous focusing data. The camera then focuses to a predicted distance in advance to account for the rate of descent (the delay between pressing the shutter and the start of the exposure). This greatly increases the likelihood of correctly focusing on moving subjects.

Examples of maximum tracking speeds are shown for various Canon cameras below:

Values ​​are for ideal contrast and illumination when using a lens
Canon 300mm f/2.8 IS L.

The graph above can be used to approximate the capabilities of other cameras. Actual tracking speed limits also depend on how uneven the movement of the subject is, the contrast and illumination of the subject, the type of lens, and the number of autofocus sensors used for tracking. Also keep in mind that using focus tracking can significantly reduce your camera's battery life, so only use it when necessary.

AF assist beam

Many cameras are equipped with an AF assist beam, either visible or infrared, which is used in the active autofocus method. This can be very useful in situations where the subject is underlit or lacks contrast for autofocus, although using the assist beam has its drawbacks as autofocus is much slower in this case.

Most compact cameras use a built-in infrared light source for AF operation, while DSLRs often use a built-in or external flash to illuminate the subject. When using the auxiliary flash, it may be difficult to achieve autofocus if the subject moves noticeably between flashes. Therefore, the use of auxiliary illumination is recommended only for stationary objects.

In practice: capturing motion

Autofocus will almost always work best when shooting motion in tracking (AI servo) or continuous mode. Focusing performance can be greatly improved if the lens does not have to search over a large range of focusing distances.

Perhaps the most versatile way to achieve this is pre-focus the camera on the area where you expect a moving object to appear. In the cyclist example, the prefocus can be done on the side of the road, since the cyclist will most likely appear close to it.

Some lenses for SLR cameras have a switch for the minimum focusing distance, setting it to the maximum possible distance (closer than which the subject will in no case be) will also increase efficiency.

Note, however, that in continuous autofocus mode, pictures can be taken even if precise focus has not yet been achieved.

In practice: portraits and other static shots

Still shots are best taken in single focus mode, which ensures that precise focus is obtained before the exposure begins. The usual focus point requirements for contrast and lighting apply here, but it also requires a little movement of the subject.

For portraits, the eye is the best focus point because it is the standard and because it provides good contrast. Although the center autofocus sensor is usually the most sensitive, the most accurate focusing for off-center subjects is achieved using off-center focus points. If you use the center focus point to lock the focus (and then recompose), the focus distance will always be slightly less than the actual distance, and this error increases as the subject gets closer. Accurate focus is especially important for portraits as they usually have a shallow depth of field.

Since the most commonly used autofocus sensors are vertical, it may be appropriate to worry about whether the contrast prevails at the focus point, vertical or horizontal. In low light conditions, sometimes autofocus can only be achieved by rotating the camera 90° for the duration of focusing.

In the example on the left, the steps are predominantly made up of horizontal lines. If you focus on the farthest of the front steps (calculated to obtain a hyperfocal distance), in order to avoid autofocus failure, you can orient the camera to the landscape position for the duration of focusing. After focusing, you can optionally rotate the camera to portrait position.

Note that this chapter deals with How focus, not on what focus. For more information on this subject, see the chapters on depth of field and hyperfocal distance.