Home Page

 


 

Autofocus

 


 

 

 

 

Focusing is the act of moving a lens so that the view through it is brought into sharp focus. In the case of a camera lens, although it is composed of a number of elements this basic premise remains, and the point at which the view becomes sharply focused is known as the focal plane. This is where the film or digital sensor is located that records the image produced by the lens. Please refer to our pages on lenses  Digital Camera Lenses  for more details.

 

When focused at infinity a lenses elements are at their nearest point to the focus plane. As the focused distance decreases the elements are moved further away from this point to continue the provision of a sharply focused image. As a general rule, the shorter the focal length of a lens the less movement is needed to move the lens from it's minimum focus distance to when infinity is reached, and the longer the focal length the greater this range of movement is. 

 

As depth of field is related to focal length - again please refer to  Digital Camera Lenses - in one sense the shorter the focal length involved the less accurate the focusing needs to be to maintain focus, but this is offset by the fact that the shorter the focal length the bigger the angle of view covered, and thus the greater the problem of achieving accurate focus at any given point. It's a real case of swings and roundabouts, with the effects of one aspect being offset by the effects of the other.  Thus with long focal lengths, although the accuracy of focusing needs to be higher because the depth of field is shallower, the greater range of movement over a shorter distance offsets this.

 

Foe example a 18mm lens may have a minimum focus distance of 0.25m and have reached infinity by a distance of 2m. A 200mm lens may have a minimum focus distance of 1.2m and not reach infinity until a distance of 20m, while a 400mm lens usually has a minimum distance of at least 2.5-3m and may not reach infinity until a distance of perhaps 60m or more.

 

In a very general sense focusing manually is not a big problem except when low light levels are involved, which prompted the development of fast aperture lenses to help offset it. This situation began to change with the arrival of zoom lenses. With prime/monofocal length lenses all that is required is to set the focus by moving the focusing ring. With zoom lenses there is also the ability to alter the focal length by zooming. With most zoom lenses the focusing needs re-setting as the focal length changes. As one hand is used to hold the camera there only remains the other with which to alter both zoom and focus, so the operation of manual focus zoom lenses is slow. To overcome this problem many early zooms were made using the 'trombone' design, where one barrel carried out both tasks, being twisted to obtain correct focus and moved back and forth for focal length choice. However although this design worked reasonably well with short focal length and short travel zooms it was still awkward with longer focal lengths. So a means of automatically focusing lenses was developed. Autofocus.

 

Autofocus has been used in photography for quite some time now. It was initially developed in the late 1970's, first came into general use in the mid 1980's and was well established by the 1990's. Most cameras these days use autofocus, with the option of manual focus when there are problems establishing correct focus. In the early days of autofocus this was a common occurrence, but today the technological advances since have meant that it is now a generally fast and reliable operation. But problems do still occur and to understand why this might happen, what can be done about it, and where it might be a result of faulty equipment, it is necessary to understand a little bit about how autofocus works.

 

So this page is about how autofocus works, the different types, the basic problems that can occur, and how to carry out a few simple tests to see if the camera or lens may be at fault if you are having trouble getting correct focus.

 

 


 

 

Basic Autofocus Types

 

Active AF

 

Active autofocus involves measuring the distance to a subject by emitting light or sound waves and measuring the time it takes for them to bounce off a subject and return. Active AF thus works independently to a cameras optical system in measuring the subject distance and adjusts the optical system for correct focus based on pre-determined settings. Polaroid first successfully used ultrasonic sound waves in their 1978 SX-70 SLR whilst the Konica C35 AF was the first compact film camera to use Infrared. 

 

Infrared is the commonly used active AF system found in many cameras, mainly the compact types, because it works reliably whatever the light levels, indeed it can work in total darkness because the infrared spectrum is outside the visible light spectrum. The problem is it's rather crude in operation. It works by sending out an Infrared ray of light and measuring the time it takes for the light to bounce off a subject and return. The longer it takes, the further away the object is, and the further the lens is then set to focus. Unfortunately, wide errors in distance setting can result because of the difficulties of time measurement, as light can travel a long way in a short time. As using lenses with a small aperture, and thus reasonable depth of field, can usually mask these discrepancies infrared has generally been employed in circumstances where complete accuracy was not required, especially with regard to close focusing distances where the biggest errors occur, and these have generally been in relatively simple compact type cameras which use small apertures and don't usually focus to close distance. Another drawback of active AF is that it cannot as a rule focus through windows because sound waves and infrared light are reflected, so signals bounce off and give incorrect readings. Correct for the window surface but not much else. However this does mean that other types of low contrast/high reflection surfaces do not produce focus errors/unable to focus problems.

 

 

Passive AF

 

Because Infrared just wasn't accurate or versatile enough for most camera applications, SLR's etc, where lens settings could alter depending on the lens fitted, a different type of autofocus was developed. Passive AF uses the detection of contrast rather than actual object distance to determine focus and uses the light received through the lens for this, this being measured by a small sensor inside the camera body which then passes the information to a CPU for processing. The processed information is then used to move the lens to the correct position. 

 

The Pentax ME-F of 1981 which used a sensor in the body with a motor in the lens became the first 35mm AF SLR. In 1985 the Minolta 7 was the first SLR to incorporate both the sensor and lens motor in the camera body, this arrangement becoming widespread in it's adoption and known as body integral AF. Although Pentax did not pursue AF using a motor in the lens and also subsequently used body integral AF, Canon did develop this method, the result being the Canon EOS system using in the main 'Ultrasonic' lenses. In a strange twist of fate Pentax are some 26 years later the latest maker to follow Canon in now developing AF lenses using built-in focusing motors, their use now being widespread and replacing body integral AF in many cameras.

 

There are two main forms of Passive AF. Contrast Detection and Phase matching. Both actually used the measurement of contrast to make adjustments but in different ways, one being quicker than the other. Phase matching has generally been used in SLR's and is a form of range finding through comparison. A beam splitter diverts some of the image light hitting the reflex mirror via a small secondary mirror to a sensor where two images are formed and compared and the lens adjusted until the contrast in each matches. This is very quick to achieve.

 

Contrast Detection uses just one image on a sensor and compares contrast intensity. Because the level of difference is greatest when a lens is correctly focused the optical system can be adjusted until the maximum contrast is detected. This method is commonly used in cameras that do not use mirrors and shutters such as digicams and video cameras, from whence it first originated. It is not as quick in use as phase matching.

 

Passive AF can be highly accurate but, like Infrared, has a basic flaw. In this case it is that there has to be a certain amount of contrast, however small, to operate. In other words there must be some light somewhere. As a result most systems begin to struggle when the light falls to low levels and especially when the subjects involved have what are classed as 'plain flat one colour surfaces', i.e. those that are low in contrast.

 

This tends to show which cameras and AF systems are generally better than others. Some are made that can work down to levels that could be described as almost total darkness whilst others struggle in what some would call a very overcast day. It is also the reason why maximum AF lens apertures are never slower (smaller) than F5.6. The AF systems just can't generally work below the light levels this aperture provides over average light conditions, although the minimum aperture is usually stated as F8 this is really under quite bright light levels. As a rule the faster (bigger) the maximum lens aperture the quicker the AF system will work, and down to lower light levels. The original reason for fast aperture lenses was to provide the brightest viewfinder image to assist manual focusing even in poor light levels, and this holds good for AF systems too.

 

 


 

 

Autofocus mode

 

There are a number of different types of autofocus modes that have been developed over the years. We are not referring here to the different versions each particular camera manufacturer has introduced in their own cameras, because at the end of the day they all have the same basic goal in sight, reliable and accurate autofocus. Rather we are concerned here with the different types a user may encounter with the camera they have, because it doesn't matter what someone else may have in another camera, it yours you want to use. Some cameras only have one type of autofocus, others have a choice.

 

 

Single centre point AF

 

Originally there was just one AF type. It was based around one sensor point in the centre of the image. Nowadays this is usually referred to as single point or centre point AF. Under average conditions in good light this worked well when first introduced, but struggled under other conditions. The reason is the same one that prompted makers to fit low pass filters into digital cameras when digital sensors first replaced film, and are now being removed as pixels get smaller, pattern matching frequency. Early sensor points were just horizontal and used quite big pixels so when objects with pattern frequencies that matched that of the AF sensor - vertical- were involved, which was quite often, then suddenly no AF lock, just continuous hunting back and forth, unless you turned the camera through 90°. Generally, single centre point AF now uses two sensor points at 90° to each other with smaller pixels to overcome this, and the common terms used is crosshair or crosshatch sensor. Nowadays this is usually quite fast and reliable in use.

 

 

Wide Area AF 

 

Instead of, or in addition to, centre point crosshair sensors, some cameras use several sensors covering a wider area. Sometimes this is just three in a line horizontally and sometimes five in a cross type pattern, three horizontally and three vertically. The information is drawn from all and used together, the idea being that at least one of the them will find focus. The drawback with this is often the size of the area they cover. Autofocus may be swift and accurate, but you might find the focus point used is not the centre one, so the area in sharp focus is not where you expected or perhaps wanted it to be. The latest cameras with the best AF now use crosshair type sensors at all sensor point locations. 

 

 

Multi-point AF and Selectable AF.

 

Multi-point AF is an enlargement on wide area AF, using more points over an even wider area, or more points within the same wide area. Usually this may involve a mixture of sensor points, crosshair and plain, and more often than not the points can be used in unison, as with wide area AF, or singly, with the user being able to choose which sensor point to use. The idea of being given a choice sounds good, and is, but the problem is it tends to slow down use of the camera. Our Pentax *ist-D offers a choice between multi-point, selectable or centre point AF. After using all three for some time we came to the conclusion that centre point AF was the quickest and most reliable to use for most of the time. Multi-point often chose a point nowhere near that which we wanted and using selectable can really slow you down. Using centre point by half pressing and then re-positioning is just as good and far quicker for off-centre subjects we have found. The only place selectable seems of real use is in a studio or outside where the camera is on a tripod and you don't want to move it's position, then it does come in useful, although manual focusing then seems just as quick. 

 

With both wide area and multi-point systems the premise is that the sensor that can find an AF lock is used. In the majority of cases the sensor with a lock point nearest the camera is used if a choice of lock points exist. This can prove problematic if there are subjects within the AF area at different distances to the camera and all are wanted sharp. If the camera chooses the nearest AF lock point, and the aperture used is fast, then the depth of field is often not enough to keep the most distant subject in sharp focus. Focusing on the furthest subject sometimes can in the same circumstances, because as you will know if you have visited our Lens pages, depth of field increases with focused distance so both near and far subjects are all in sharp focus.

 

 

Manual Focus - range finder - confirmation

 

Many cameras have focus confirmation when using manual focus. Even though the lens AF motor does not work the camera still gives either sound, or visible confirmation in the viewfinder, or both, when correct focus has been set. This is generally with the type of camera that uses phase matching, and turning the focus ring has the effect of matching the two sensor images produced at the focus sensor, just as the camera's AF system would do.

 

 


 

 

 

Camera  viewfinder displays

 

Although each type of camera has it's own way of displaying information there is some measure of commonality amongst them. Here's the view we get through the viewfinder of our DSLR as regards the AF points. There is an area AF grid overlay which shows the area within which they are located. The actual AF points only show in red when they light up with focus confirmation. We have shown all here so the sensor pattern available is seen. Below the actual screen area there is also a point which lights to confirm focus and an AF sensor pattern which illustrates which points are in use. These are lit in green.

 

 

 

Pentax *ist-D viewfinder information for AF

 

 


 

 

AF Drive Modes

 

 

Single Shot AF.

 

In this mode only one shot is taken and the shutter has to be released and pressed again before another is taken. The AF re-focuses each time the shutter button is pressed and then locks. To alter focus the shutter button must be released and re-pressed. 

 

Continuous AF.

 

With this the AF works constantly whilst the shutter button is pressed halfway and re-focuses whenever the system tells the camera the lens is no longer in focus. A shot will be taken whenever the shutter is pressed fully down. By keeping this pressed fully down the camera will continue to take shots in succession whenever the AF system tells it focus is correct. If correct focus is lost the camera will not fire the shutter again until the lens has been refocused correctly, which it will attempt to do whenever correct focus is lost.

 

 


 

 

Autofocus choices

 

 

The type of autofocus a camera might have depends to a large extent on the type of camera it is. A low cost consumer model intended for basic use will probably have no choices at all whilst an expensive professional model may well have more options than will ever find use. As ever, the mid-range cameras generally have a mixture of options and it is the differences between them that exist that separate them one from the other. Some may appear to have the same options on paper that do not exist in reality. For example there are basic DSLR's that have continuous AF mode, but this is only available in certain program or picture modes, sport mode perhaps. Some digicams only offer it at small file sizes - low resolution -  and at full resolution only single shot AF is offered.

 

The best cameras, and not always the most expensive one's, will offer a range of AF modes that are available irrespective of the file size or metering mode used.

 

 


 

 

Focusing Problems

 

There are a wide range of autofocus problems that might sometimes arise. Some are related to the type of camera used, the autofocus type, and occasionally, although rare, equipment error in terms of equipment malfunction due to equipment failure or poor calibration during production. 

 

General Poor Focusing

 

Many instances of suspected poor focusing turn out not to be that at all, but the result of other problems such as dirty sensors, poor quality optics, or examination of images at magnifications that are too high. Indeed digital imaging has led to an expectation as to the quality of images that is beyond that which the technology can provide, and the ability to magnify images far beyond that at which film negatives have been looked at previously has led to a generally held belief that only extremely high count sensor cameras are able to deliver 'sharp' images of the order that was obtained using film. This is not true in reality. When using film, most camera users never looked at their negatives at all, and if they did, only at the quite low magnifications afforded by the use of magnifying loupes, which are usually either 4x or 8x. Even at the 8x magnification this is only the equivalent of viewing a 6mp image at a ratio of about 30%. In most cases had they been able to examine the negatives using the same magnification levels now commonly used with digital images they would have found the same general look of softness that results. Whatever the size in pixels of an image, viewing at magnifications greater than about 60% will always tend to result in images looking unsharp because the pixel density at this ratio is too low.

 

 

Apparent sharpness in digital images is not solely the result of correct focus or the magnification at which the image is viewed at, but also as a result of the software algorithms that are used to process the image file. 'Soft' images, where there is no apparent area of sharpness are often caused by poor processing algorithms, low quality optics, or viewing the image at too high a magnification. It can also be obtained through choice as most cameras have options as to how much 'sharpening' to apply to images as they are processed in camera. Too much applied at this stage can introduce unwanted artefacts and some makers prefer to keep sharpening levels to a minimum to prevent this, allowing users to sharpen images to their taste afterwards in image editing software. This often leads to accusations that the cameras involved produce 'soft' and 'out of focus' images.

 

 

 

Camera Type - Digicam

 

We've indicated where a few problems might occur in the description of the various types of autofocus, but it also depends on the type of camera that is involved. As with all things performance and quality is often based on item cost and this is another area where this is true. As a general type, digicams do not have a level of autofocus that performs as quickly or as  well as that fitted into DSLR's. The parts used are simpler and cheaper in nature so as to keep production costs down, as is to be expected, so something has to give. In general terms not only is it slower to operate, markedly so in many cases, but it is usually less accurate and the light levels it can cope with are less.

 

Often digicams have more trouble locking on to subjects in low light and with low contrast irrespective of whether they have a choice of AF type, which is usually classified as wide or spot. In respect of accuracy quite a few use focusing 'steps' rather than infinite focusing. The focusing distance is broken down into a series of distance steps and the lens will be set at the nearest one that matches that from the AF sensor. It results in a cheaper system which relies on depth of field to overcome discrepancies and is much as the same as that used in Infrared systems. 

 

Because generally digicams give less information with regard to where the AF points are, their optical finders not having any information of any kind at all, whilst their EVF's and LCD screens are not as good as looking through a DSLR viewfinder, the result is AF accuracy which might not be quite as good as you would wish. Where Contrast Detect scores with digicams is at close quarters, especially when using their macro modes, where the AF can usually focus correctly within a reasonable latitude. 

 

 

Camera Type - DSLR

 

DSLR's as a type use infinite focusing - which some call stepless -  which results in high accuracy focusing, particularly with close distance subjects. As a rule the various makers employ similar systems in all the DSLR's they make, although once again the more expensive models generally have more highly refined versions and the widest choices which the cheapest do not. The various systems used vary quite widely, not so much in the basic concept, but in the detailed way each works. Most makers still use what is known as body integral AF, where the electric motor that moves the lens to correct focus is situated in the camera body although many are now moving to the system used by Canon. Connections between the lens and the camera body are both mechanical and electrical. Canon use a different system with motors in each individual lens and the connection between lens and body is purely electrical. Whichever system a DSLR uses it's important to keep connections between lens and body clean and correctly aligned. 

 

Because DSLR lenses are separate from camera bodies and mated by mechanical and electrical connections there is a need to transfer information backwards and forwards between them during focusing and aperture setting and taking the shot. To this end lenses are 'chipped' to enable the lens to 'talk' to the camera. Unfortunately the situation exists that camera makers don't share the information on how their lens chips are programmed and are always changing these specifications as the systems are improved. This means a situation exists that lenses from third party lens makers designed to be used with the cameras a maker manufactures may not work as well as the camera makers own lenses. This communication problem does not occur with all third party lenses, only the odd few, but if it does then the end results can often be that sometimes the lenses are slower to find focus, especially when light levels fall,  won't focus correctly at all apertures or at all distances, and occasionally the case arises that they won't work at all with a new camera that is introduced. 

 

 


 

 

Focusing Tests

 

If you think that you're having focusing problems there are a few simple tests that can be carried out to see if it might be down to user error - you - or some problem with the camera or lens. They are fairly easy to do and can accomplished with just a newspaper or a sheet of A4/A3 paper with printed text on it. Some prefer to make up their own printed target sheet and this can be useful. To ensure the results are consistent and accurate mounting the camera on a tripod is needed to remove the possibility of blurred results due to a low shutter speed and thus camera shake. These tests will show if the lens and camera combination is focusing reasonably well or if there might be a problem somewhere.

 

 

The Flat Paper Test

 

The first test involves just taking shots of the sheet of paper with text on it so it roughly fills the frame using the lens at it's maximum aperture i.e. wide open. The paper should ideally be square on to the camera.  The shots should be taken at a range of focal lengths in both landscape and portrait orientation. i.e. horizontally and vertically. If there is a choice of AF type test all the different combinations to see if there is any noticeable difference between them. It's also handy to take several sets at different distances from the paper. Under these circumstances it might not be possible to get the paper to fill the frame, but under these conditions it's important to ensure the paper fills the AF sensor point area when wide area and multi-point AF is being tested.

 

The easiest focal lengths to test are the mid-range one's, around 40-135mm[equiv]. Wide angle focal lengths, 10-40mm[equiv], are okay as long as close focus (ideally around 20cm) is possible otherwise the paper seems midget size in the frame. Long Telephoto's (200mm[equiv]upwards) can be equally difficult because the minimum focus distance might be quite large, anything from 2 metres up. 

 

Anything printed or drawn on the target sheet should appear clear, sharp and legible in the shots taken. What your testing for here is very basic, to see if the AF correctly focuses and locks onto a flat target. A flat sheet of paper at 90° is used to eliminate the possibility of errors relating from the AF point or points choosing a different focused distance to that of the target. Your not testing the lens here for optical quality, nor are you testing depth of field as such, so if the target is sharp at the centre but not towards the edges that might be down to one of two things. It might be an indication of lens optical quality, or that the paper is not completely square to the camera, especially if the out of focus area is only to one edge.

 

All that's being tested is whether the AF is calibrated reasonably well. There are three general focus positions.

 

Dead on, where the AF focuses exactly to the AF sensor point.

 

Dead on focus

 

 

Front focus, where it focuses in front of this point.

 

Front Focus

 

 

and back focus where it focuses behind it. 

 

Back Focus

 

 

The results

 

Generally speaking most AF systems are calibrated to produce a minimal amount of front focus. This is done to ensure that there is a measure of tolerance in the system and that when focusing on a flat surface correct focus in respect of sharpness at the surface will result.

 

As a rule depth of field, the area in an image that appears sharp, extends either side of the focus point in the ratio 60/40 at close focusing distance, 60% behind and 40% in front. Calibrating the focus slightly in favour of front focus allows a greater latitude for focusing errors than either dead on or back focus because it evens out this ratio. A system calibrated to produce back focus would result in a system that might conceivably produce a DOF ratio of 75/25, 80/20 or worse at the AF point. With a slight focus error an out of focus image would result as the diagrams above show.

 

If a camera consistently produces un-sharp and out of focus shots then this is an indication there might be something wrong with the AF focusing system. That the AF calibration might be incorrectly set. On the other hand it might just be that the target paper is too difficult for it to lock on to. This would of course be an indication of the AF quality. So if there appears to be a problem, use a different sheet and type of paper, and repeat the tests, time and again if necessary, to ensure it's doing it all the time and not just now and then, and whether this happens at all focal lengths and distances or just at certain one's. If you are testing a DSLR try using a different lens. If another lens produces correctly focused shots then the original lens may have a fault.

 

If you have generally good results with this test then there's really no need or point in doing any more, unless for some reason you have had a problem already with focusing, but it hasn't shown up under this test. In that situation another test really needs undertaking to see if the problem can be narrowed down a bit. 

 

 

 


 

 

The Angled Paper test

 

At this stage many photographers would advise the use of the Angled paper test. This is broadly similar to the flat paper test, except the difference is that the paper is angled at between 45-60° to the camera in the vertical plane or horizontal plane, you can try either or both. Some photographers only bother with using this test but we feel it's more open to possible user error if you don't approach it with a degree of care and understanding over the results obtained and you can end up with the impression that you have a focusing problem with a camera or lens when you don't. This test needs to be undertaken with greater care than the flat paper test as depth of field becomes a more important part of the results. With the flat paper test results are fairly easy to see, either the text on the paper is sharp and in focus, or it isn't. The angled paper test is different. Unless the camera won't focus at all then the text will be sharp somewhere. It's where it sharp, and how much of it, the depth of field, that determines the results.

 

 

The problem as we see it, is that the test needs a measure of understanding to interpret the results and doesn't help those using digicams with their generally greater depths of field, because here most of the text will still be sharp and legible even at wide open apertures. Under the circumstances we would suggest the use of a revised version of the basic concept using  a larger scale target with shots taken from a further distance.

 

Again the lens needs to be set at it's maximum aperture and single centre point focus should be used. The focus is centered on the middle of the paper with the text on it being in horizontal rows. The text should be sharp where the AF centre point was focused and falling out of focus above and below this point at roughly the same rate. 

 

If the area of sharpness does not extend both in front of and behind the AF point, but just one or the other, then problems may arise because this indicates that a large amount of either front or back focus exists. This is the depth of field and depends on the maximum aperture of the lens involved in the testing. A minimal amount of front focus is preferable to any amount of back focus.  With DSLR's and a lens with an aperture of F2.0 or wider, depth of field will be minimal. Those using digicams with their smaller sensors should have no problems in this regard. Even with the fastest lenses used, normally F2.0's, depth of field produced is massive by comparison to DSLR's. and compensates for quite an amount of focus error, front focus or back focus.

 

 


 

 

Resolving Focusing errors

 

If AF focus errors do exist, front focus or back focus, and the amount is more than minimal then the possibility exists that correct focus will not be obtained on a subject, especially if a DSLR with a fast lens used wide open is involved. The fault, incorrect AF calibration, may well exist with the camera, or the lens. Testing the camera with other lenses is often the only way for the ordinary user to find out if it is the camera itself or just one particular lens that has a problem.

 

Re-calibration of cameras and lenses can be carried out but this is not always the solution that it would appear. We know of lenses that work fine on one camera, but produce back focus effects on another. Yet other lenses work fine on both cameras. Sometimes you just have to accept that faults exist and do your best to allow for them and find some sort of workaround. 

 

We thought we had a focusing problem with one of our digicams. It seemed fine most of the time but just kept producing incorrectly focused shots for no apparent reason. As the camera used centre point AF we ran several tests and kept getting inconsistent results. By a matter of trial and error we discovered the AF point wasn't in the exact centre of the shot as we thought and where the camera viewfinder markings indicated it was, but slightly above it by about 5-10%. Not enough to make a huge difference with shots taken above a certain distance, but certainly enough to cause problems with closer shots and those involving many objects at close quarters but at different distances from the camera. Once we understood this and could make allowance when necessary the problem was

resolved.

 

 

 



                            copyright © ab.isgar. 2004-2008. All rights reserved.   Disclaimer :- no liability accepted.