photo:focus
Table of Contents
digital cameras and focus
- see also:
- on the web:
Introduction:
- OK, so you have just bought yourself a nice new digital camera with super duper auto focus, so you can skip this step, right? WRONG!
- Autofocus cameras have made getting well-focused photos much more reliable and indeed, often more precise than the human eye can consistently achieve in many situations, BUT there are many situations where the AF will be fooled or just fail to achieve a focus lock such as:
- lack of subject contrast:
- most AF mechanisms rely on detecting contrast in the subject, often only vertical and thus need vertical lines to be present.
- unfortunately, faces tend to be low contrast subjects and most AF cameras will preferentially focus on anything else in the picture but not the face - a major dilemma as for portraits, one usually needs the eyes to be the most sharply focused part of the image.
- low light:
- the lower the light level, the longer it takes for most AF mechanisms to focus & thus the longer the image must be kept still in the viewfinder before a lock is obtained. Moving the camera or having a subject who moves will often result in failure of focus lock.
- many cameras or external flashes have a low light AF illuminator to assist but these usually only work for up to 2m or so, and if the AF Illuminator is infrared, it will not work well with mirrorless cameras as their AF sensors sit behind the sensor's IR blocking filter
- moving subject:
- a moving subject is difficult for most AF mechanisms, although high-end cameras often have a “predictive motion” AF mode (eg. Canon's AI Servo mode) that helps with this.
- examples of history of capturing birds in flight with a 400mm lens at f/2.8:
- manual focus - perhaps 1 in focus in 1,000 frames
- Canon A2 35mm film with AF - perhaps 1 in focus in 10 frames
- Canon EOS 1N 35mm film with 5 across AF sensors - faster initial AF acquisition, start AF on central AF point
- Canon EOS 3 35mm film - 1st 45 point AF camera - better AF on erratic flight but seemingly poorer on central birds
- Canon EOS 1D digital - 45 point AF cameras - 10-30% razor sharp images
- success depends partly on:
- ability to keep central AF sensor on the bird's eye in flight
- keeping subject framed properly
- ability to pan to match the subject's speed
- ability to pan smoothly
- adequate light and contrast on the subject part being focused
- bright object in the image such as a reflecting surface, bright light or backlighting:
- these will fool the AF mechanism nearly all the time, the camera usually targets the brightest object to focus on.
- subject not in the centre of the image:
- many cameras will focus on what is in the centre of the image, but this is not what is needed usually.
- newer cameras have a number of AF points which the camera will try to guess which is the most relevant - but it is only a machine and can't always guess what you are thinking.
- poor focus not only loses detail and gives a blurry image but reduces contrast making it flat looking & poorly tolerates enlargement.
- understand depth of field so that you can better judge what to focus on and what aperture setting you need to achieve what you want.
- it is much easier to blur a photo in PS than it is to increase its sharpness and detail - aim for as sharp as possible in the key subject region.
How to focus when your AF system is having trouble such as in low light:
- 1st thing to try is ensure your AF point is on a contrasty subject (eg. eyes and not skin) and hold the camera still while it tries to lock AF.
- ALL current AF systems will fail to lock when subject lacks contrast and your lens aperture is too small (eg. f/5.6) for the light conditions to allow AF to be achieved.
- Obviously pro dSLRs have more sophisticated AF sensors that are less likely to fail to lock and wider aperture lenses (eg. f/2.0-2.8) allow more light to hit the AF sensors.
- Just accept this and be prepared to work around it.
- there are two main methods I use:
- use AF lock:
- turn of continuous AF and set the AF trigger to a button on the rear of the camera INSTEAD of the shutter button
- most dSLRs allow this via the menu system
- this then allows you to aim the centre AF point at a bright contrasty subject at the same distance as your subject then LOCK AF (you will need to keep camera still while it is gaining lock).
- using a lens with a wide aperture makes gaining AF lock more likely.
- then when you take your photos, your camera will not try to AF each time.
- NB. most modern lenses require you to re-focus if you change the zoom setting so make sure you have the lens at the desired zoom setting before locking AF.
- use manual focus:
- most modern dSLRs have limited help in the viewfinder for doing accurate MF, but some signal MF confirmation if you have the shutter button half-pressed or AF lock button pressed while you manually focus and focus is achieved - however, if this was possible, then you should be able to use the AF lock method above unless of course you are using a MF lens.
- as a last resort, use the live preview live magnification feature of your dSLR - you did buy a dSLR with this feature didn't you?
- set camera to MF
- go to Live Preview mode
- move the central marker to your desired subject then go into live magnification mode
- adjust MF until it looks sharp
- if you are finding that camera is moving to much, use a lower magnification (eg. 7x not 10x) or activate your image stabiliser momentarily (Olympus dSLRs with IS built in allows this).
Quality of focus or the apparent sharpness of the subject on the image:
- this depends upon:
- f/ratio & depth of focus of the optical system (see below)
- accuracy of the focus
- quality and resolution of the optical system
- changes with f/ratio
- limitations due to physical constraints of diffraction at small apertures
- optical aberrations such as chromatic aberration will increase the size of the Airy disk
- resolution, sharpness & contrast of film or sensor
- relative subject movement during exposure
- quality of seeing - variations of light refraction due to atmospheric changes during the exposure
- eg. ever tried photographing a plane landing on a hot airport tarmac?
- this comes into increasing importance the greater the subject distance is (ie. the more atmosphere one must go through), the greater the magnification used and when there are extreme adverse seeing conditions.
Auto-focus methods for digital cameras:
contrast detect AF (CDAF)
- this is the method used by most cameras in Live View mode (which is the only option for most mirrorless camera systems)
- a small section of the image (the selected AF area) is analysed by the camera to ascertain the level of contrast in the histogram for the region. An iterative process involves telling the lens to move in a direction and if contrast lessens tels the lens to move the opposite direction until contrast is maximised.
advantages
- AF is generally accurate once achieved as does not require calibration as the image is read from the image taking sensor (EXCEPT for certain cameras such as Olympus E330 and the hybrid Sony dSLRs)
- AF accuracy does not change with temperature
- is fastest for stationery subjects with high contrast (particularly grid patterns which can cause issues with phase detect AF systems)
- can potentially work with all aperture lenses as long as there is enough light and contrast
- does not require an array of secondary sensors and the engineering, cost and size that phase detect AF requires.
- software improvements can be applied via camera and lens firmware upgrades which improve the AF algorithms
- AF speed can be improved with faster lens AF motors and with faster electronics such as in the latest Micro Four Thirds system which have CDAF faster than phase detect AF for stationary subjects and future models can expect performance to continue to improve.
- allows AF modes such as face detect AF, eye detect AF, smile detect timing
- can generally use almost any area of the image to AF not just a few designated AF points
- can be used during movies
disadvantages
- iterative process is currently too slow to achieve AF for fast moving subjects and cannot predict subject focus distance as yet.
- old cameras may preferentially AF on a higher contrast background region - particularly the older cameras such as the Olympus C8080
phase detect AF
- patented by Honeywell in 1970 and 1st used by Minolta in film SLRs in early 1980's and became the reason why Canon EOS SLRs became so popular in the 1990's for sports photography.
- requires a physical phase detect sensor for each AF point which consists of a beam splitter, micro-lenses and sensor which essentially detects the physical separation of the 2 images from the beam splitter.
- the distance between the 2 images tells the camera WHICH DIRECTION and HOW FAR the lens focus elements should move
- the lens computer chip receives instruction from the camera and moves the lens focus elements and then the camera beeps when focus is achieved.
advantages
- fast AF even for fast moving subjects
- allows predictive motion AF
- software improvements can be applied via camera and lens firmware upgrades which improve the AF algorithms
disadvantages
- requires physical space for sensors, the more sensors, the more expensive to make
- sensors require calibration for the main image-taking sensor and this calibration may change with lens, camera, and temperature
- many of the newer dSLRs allow you to determine the correct micro AF adjustment for each lens and set this in the camera database.
- even with microadjustment, AF accuracy tends not to be very consistent except on the latest pro models in 2012.
- camera needs to know the characteristics of the attached lens for AF to be optimised and thus third party lenses may have AF issues
- significant shot-to-shot variation in AF accuracy and thus image resolution is common - see lensrental.com
- each sensor is optimised for a certain subject orientation and requires lens aperture wide enough for that given sensor
- the basic sensors require aperture of at least f/8 and thus using teleconverters may prevent AF altogether
- the better sensors have sensitivity for perpendicular subject orientation (“cross-type”) but this functionality usually requires a lens with aperture f/2.8 or wider.
- AF can be very slow for very wide aperture lenses such as f/1.2 or for certain subjects such as grid patterns
- if AF fails, the lens starts the very annoying “hunting” behaviour
- cannot be used in movie mode or Live View mode
phase detect AF sensors:
- Canon EOS SLRs:
- TTL-SIR (through-the-lens Secondary Image Registration)
- Canon is generally regarded as being the leader in AF technology and this is the main reason it's film cameras became more popular than Nikon ever since the early 1990's, and remains so in the digital SLR world.
older notes
- Here is an explanation of digital auto focus: http://www.howstuffworks.com/autofocus3.htm and here is how you can learn more and test your camera at the same time to see if it suffers from back focus or front focus.
Manual focus:
- traditional 35mm film SLR cameras such as the Olympus OM series had to rely on manual focus and thus much effort was put into the design to ensure manual focus was as fast & accurate as possible:
- bright optical viewfinder which displayed exactly what you were imaging through the lens
- options to use a variety of dedicated focusing screens to optimise for various types of lenses such as:
- the standard matte screen with central microprism and split image focusing devices for most situations
- an extra bright clear screen for specialised purposes such as telescopes & microscopes
- a manual focus ring on the lens that provided smooth focusing while indicating the precise distance at which the lens has been focused.
- a depth of field indicator on the lens to indicate the approximate range in which the subject will appear to be acceptably sharp
- a depth of field preview button on the lens that allows one to see how sharp everything will be at the selected lens aperture
- an infra-red adjustment marker to allow for the different focus of infra-red light
- enter the AF consumer digital camera world & almost all of these aids have disappeared making manual focus difficult & inaccurate:
- the optical viewfinders tend to be small and without manual focus aids, although some are true optical TTL viewfinders (eg. Olympus E20 or the true digital SLR cameras)
- the more expensive prosumer cameras with electronic viewfinders (EVF), whilst giving a TTL image, tend to be low resolution and again with poor manual focus aids apart from a digitally magnified central area which can be temporarily activated but still very difficult to use accurately.
- the LCD screen is also difficult for the same reasons as the EVF
- absence of manual focus ring on the lens, being replaced by a scrolling device on the camera back
- worse still, most of the new AF zoom lenses have change in focus when you zoom in or out & thus one must set focus AFTER selecting your zoom position.
- even worse, some cameras (eg. the 8080) will not manually focus at infinity at wide angle to mid-zoom focal lengths by scrolling the focus as the manufacturer compromises the lens design and assumes DOF will be sufficient in these situations (but unfortunately is not at wide apertures)
- see below how to use Moire patterns to help MF on these cameras.
- the Olympus E330 was the first dSLR camera to offer an excellent manual focus mechanism by using a 10x magnified live preview on an LCD screen in its B mode which makes it perhaps the best camera for macrophotography work or for photography using manual focus lenses.
- personally, I would NOT buy an expensive prosumer camera again that did not have good, easy, accurate through-the-lens manual focus to over-ride those situations where AF fails, so I bought the Olympus E330, Olympus E510 & Canon 1D Mark III - all with digital camera live preview for accurate manual focus. Most cameras since these now have magnified live view manual focus functionality.
Moire pattern and manual focusing a digital camera:
- this has to do with engineering sampling theory and a phenomonen called aliasing, but you see it every day.
- Here are a few practical examples:
- when you look through a “sheer” curtain and a window screen (or even two window screens);
- when you see a pattern such as a sport coat pattern “jumping” and flashing on your TV screen;
- when you see the spokes of a wheel seeming to turn backwards on the TV or movie screen.
- In each case, the frequency of the sampling medium (the window screen mesh, video lines, and the temporal sampling rate of the video or cinema cameras) “beats” against the frequency of the object being “imaged” (the wheel, sport-coat material, window sheer) to create false (or aliased) frequencies (the curvy patterns in the window sheer; the strange, changing patterns on the sport coat, and the backwards moving spokes).
- you can use this aliasing or moiré pattern phenomenon to your advantage when trying to manually focus with your 8080. Imagine a scene with lots of detail like the pistils and stamen of a flower. Even if you can't see the details of the scene on the coarsely pixelated LCD, you can see weird criss-crossing patterns on it. These patterns are the frequency of the monitor's pixels beating against the frequencies that make up the picture scene. What I am suggesting is that, even if you are unable to discern the details of the scene, you can use the strength of the criss-crossing (moiré) patterns as indicators of the accuracy of the focus. The fact is that when you can see the strongest moiré pattern, the image is in best focus. (thanks to Michelle from http://www.silverwinggraphics.com).
- using a focus target:
- ShayTech Industries has been busy toiling to find a good way to determine focus when manually focusing. The problem is that the LCD just does not have enough detail to zero in on the focus. After studying some rather odd anomalies in the LCD a reliable focus method was developed. Using a focus target with ruled lines at various widths causes the LCD to display crazy rainbow colors when the camera is focused on the target. When the camera is at optimal focus, the colors are at there most vivid. This has made manually focusing much more reliable and pleasant a task. If you want to try it yourself, you can use this focus target:
- http://www.shaystephens.com/graphics/FocusTarget.png or http://www.silverwinggraphics.com/focustarget.htm
- “There are a number of cool aspects to this pattern, amongst them being that it is rotationally independent so you can evaluate both horizontal and vertical resolution simultaneously. Another feature of the pattern is that the spatial frequency of the spokes (given by the the inverse distance between them) increases with distance towards the center. So at a glance one can get an idea of a system's resolving power (even your eyeball's, as you will see when you print the pattern out).
- Just print it out on an 8×10.
- Whether or not it's a focusing aid, a practice object, or a test pattern, I learned a bunch about the “personality” of my C-8080 in just minutes of playing around taking pictures of the printed spoke pattern. I'm suggesting that you download the eps version of the pattern from the link on the page above and print it out. Then play around taking pictures of it in the various focusing modes your camera offers. Try focusing at the hub and on the vertical, diagonal, and horizontal spokes. Try the different macro modes, especially comparing automatic and manual focusing. Try it in different lighting conditions, with and without flash. In a few minutes you get a good handle on the “character” of your camera's focusing ability and resolving power. You will see the moiré patterns mentioned by Shay and me and learn how you can use them to your advantage. You will be able to see whether your camera “nailed” the focus or not when you take a picture, so you will be able to study the charactistics of the different focusing modes and what part of a scene is the best to focus on (vertical lines?). You will be able to practice using focus and exposure lock effectively (e.g., focus on the spokes, lock, and then take a picture of the hub, and vice-versa). As you do this, pay particular attention to the range of distances required by your different focusing modes. You won't ever focus a super macro from a foot away.
- While you are at this little exercise, which will hopefully relieve some of the mystery and frustration you may have experienced with your camera's focusing system, don't be alarmed about the funny “dancing rainbow” patterns you will see looking directly at the hub of the printed spoke pattern (with your naked eye). This is your psychovisual system (eye-brain combination) that is playing little tricks on you. High frequency patterns fool your eye into seeing colors and even apparent motion that aren't really there.
- When you are in macro mode and properly (manually) focused you should look for another interesting phenomonen. The spokes, as you focus at the hub, will appear to “break” and rotate to an intermediate position as they approach the center of the hub. This is another aliasing phenomenon.
- The point of my focusing tip is to make any high-frequency object, whether real or aliased, in best focus. Don't insist on or expect to visually resolving the finer features you are shooting looking at an LCD screen.”
Critical focus zone / depth of focus
- NB. this is a different concept to depth of field.
- the critical focus zone is the maximum amount of error in lens to film distance for good focus
- in other words, it is the allowable movement of the sensor or lens that allows the diameter of the cones of converging & diverging light to still be less than a given diameter (such as the diameter of the Airy disk).
- it is ONLY dependent on the focal ratio (and pixel size if this is bigger than the Airy disk), and NOT focal length as one would expect
- depth of focus = 2 x circle of confusion x f ratio
- see Circle of Confusion (CoC):
- the problem is that historic CoC are for film resolution, for digital astrophotography, the equation is changed by replacing CoC with the linear diameter of the Airy disk produced by the optical system (although in practice it should be modified by the quality of seeing as measured in arc-secs)
- the equation for the linear diameter of the 1st interspace of the Airy disk is:
- d = 2.44 x lamda x f ratio
- where lambda = wavelength of light
- if one uses lambda = 650nm, then d in microns equals:
- 2.2 for f/1.4; 3.2 for f/2; 4.4 for f/2.8; 6.3 for f/4; 8.9 for f/5.6; 12.7 for f/8; 17.4 for f/11;
- the following formula is an approximation by Ron Wodaski by substituting the Airy disk formula using lambda of 450nm:
- critical focus zone in microns = 2.2 x (f ratio)2
- using this, we get:
- f/ratio f/1.4 f/2.0 f/2.8 f/4 f/5.6 CFZ in microns at light = 450nm assuming CoC = Airy disk diameter 4.3 8.8 17 35 69 depth of focus in microns assuming CoC of 20 microns 56 80 112 160 224
- in practice, the real value is somewhere between these as the size of the Airy disk if enlarged by longer wavelengths, optical aberrations, subject movement and effects of poor seeing.
- if your pixel size is greater than the Airy disc then pixel size should probably be used instead.
- furthermore, Nyquist theorem shows that you need a pixel size less than half the Airy disk to image it adequately.
- it is thus obvious from this that at wide apertures we need to be precise with focusing, and in some manual focus systems, the mechanism may not allow such precision with ease, hence astrophotographers often purchase electrically driven fine focus mechanisms to assist with critical focus.
spherical aberration and focus shift on aperture change
- best lens focus position may change as aperture changes due to effects of speherical aberration
- lenses with significant focus shift should ideally be focussed at the aperture that will be used when taking the photo, although apertures smaller than f/4 makes this more difficult due to increasing depth of field making it harder to dertermine precise focus.
photo/focus.txt · Last modified: 2019/07/21 11:49 by gary1