
We want our lenses to be razor sharp, with no distortions or other flaws. Unfortunately, there isn’t anything like a perfect lens. Every lens has to be a compromise between maximum resolution and contrast, minimum distortion, flare, size, weight and, yes, cost.
When we evaluate a lens there are many factors we need to consider: resolution and contrast, vignetting, chromatic aberration, radial distortion, astigmatism, coma, field curvature, bokeh and flare. In the days of film there was nothing we could do about any of those flaws.
In the digital age we have full control over almost any shortcomings — except for the resolution: if the lens doesn’t resolve fine detail, no amount of Photoshop magic can get it back.
In this article we will look at those lens flaws that can be fixed with little effort, even automatically.
Chromatic Aberration
We all have seen them, those colour fringes along high-contrast edges, especially in the border regions of our photographs. Chromatic aberration is caused by the lens not focusing all colours to the same point.
This problem is relatively easy to control in the design of prime lenses, especially longer ones, but commonly shows up in wide-angle zoom lenses. Fortunately, it is fairly easy to correct in post-processing, simply by scaling the fringed colour channel.
Chromatic aberration can be fixed during RAW conversion. Image 1 shows the Lens Correction tab in the Adobe Camera Raw (ACR) module: the top two sliders are used for eliminating chromatic aberrations. The example shown is a small crop from the extreme corner of an image taken with a (quite expensive) wide-angle zoom lens. The colour of the fringe will help you decide which slider to use.
This lens problem is also addressed in Photoshop’s Lens Correction Filter (Image 8). You will find the same two sliders under the Chromatic Aberration heading. This filter made its first appearance in Photoshop CS2, so if you are still on CS or earlier, you will be out of luck.
Back to the Lens Correction tab in Camera Raw — underneath the chromatic aberration sliders you can find the Defringe control. You might have noticed strange colour fringing around specular highlights, mainly purple, red or magenta coloured pixels. This is not really a lens problem but is caused partially from photo overflow from the neighbouring totally saturated photosites, and is also due to miscalculations during demosaicing.
The menu has three options: Off, Highlight Edges and All Edges. Off will be the default setting; however, when fringing occurs you might try the Highlight Edges option. The All Edges option is more aggressive and can cause some overall desaturation.
Lens Distortions
This problem mainly affects strong wide-angle lenses, and in particular zoom lenses. Wide and ultra-wide-angle (<20mm on full-frame) lenses give you a very distinctive perspective. The sides and corners appear to be stretched out. These lenses are supposed to stretch round things, like people’s heads, out towards the edges of the frame. That’s the whole point of a 17mm lens and that’s why we love them. But straight lines should stay straight. You will find that there is no problem with diagonal lines going through the centre. However, straight lines parallel to the frame edges (which should also remain straight) are often bent. These are the lens distortions we are talking about here.
Distortions are more severe on a full-frame body. Lenses designed for a 36x24mm sensor will have less of a problem on a crop camera because the outer parts of the frame are cut off. This applies to chromatic aberration, lens distortion and vignetting.
If you waste your time shooting brick walls straight on, you should avoid wide-angle zooms. Images 6 and 7 show such an example before and after correction.
The lens was a Canon 24-105mm f/4 L IS — a very sharp lens at all settings, but it won’t get an award for being distortion-free. At 24mm it has loads of barrel distortion. All wide-angle zoom lenses have barrel distortion at the wide end, which usually turns into a pincushion distortion at the longer end.
You won’t notice anything wrong in normal landscape shots, but if there are straight lines near the edges, or for critical architectural work, you need to be careful. There are many websites specialising in lens tests; for example, www.photozone.de will tell you that our 24-105mm lens has a 4.3 per cent barrel distortion at 24mm, goes through a minimum at around 40mm and reaches a 1.5 per cent pincushion distortion at 105mm.
It would not be practical to use this lens only at the 40mm setting just to avoid distortions. Fortunately, it is not too difficult to fix those lens faults. We need to go to Photoshop’s Lens Correction filter (Filter > Distort > Lens Correction). This filter was introduced with CS2 and if you have an older version of Photoshop, you can try the Spherize filter (Filter > Distort > Spherize). Or, better, you might want to use a third-party programme such as DxO Optics, which will be described later on.
Image 8 shows the Lens Correction filter, which opens in its own window. By the way, the organ is in the Auckland Town Hall and is the biggest in New Zealand. It has just been restored and extended.
Let’s start with the controls to the top left. The tool on the top is the Remove Distortion tool. You can click anywhere in the image and remove any distortions by lining straight lines up with the grid.
Underneath is the Straighten tool, which works like its cousin in Adobe Camera Raw and is ideal for a slightly sloppy horizon line. The Move Grid tool allows you to align the grid to any lines in the image. The Hand and Zoom tools work as expected, but coming from Photoshop you might prefer the simple keyboard shortcuts: Cntr+spacebar for zooming in, Alt+spacebar for zooming out and simply press the spacebar if you need the Hand tool.
At the bottom there are two check boxes for the preview and to toggle the grid. You can also change the size of the grid and even the colour.
Now to the main controls on the right. The top slider is the most important, and lets you get rid of barrel and pincushion distortions. Ken Rockwell has a website (www.kenrockwell.com) where he describes some of the most common lenses and gives you figures for various zoom settings. All you need do is type those figures in the box and then you can save and retrieve those custom settings for each of your lenses. A good lens shouldn’t require a correction of more than +/-5. You can also go to the extreme and try to ‘defish’ a shot taken with a fisheye lens.
If you want to be really precise, you must take into account that the amount of distortion varies with the zoom setting as well as the focus distance for every lens. Photoshop’s filter will only correct for simple (first order) distortion. Some lenses, especially the ultra-wide-angle zooms, have more complex distortions: a combination of barrel and pincushion distortion. Some people call this ‘moustache’ distortion (Image 5). To fully correct for those you will have to look at other software. Prime lenses also have distortions, but normally less than zoom lenses and they are easier to correct.
If your work requires an absolutely distortion-free lens, you need to look at macro lenses.
Perspective or Keystone Corrections
These are not lens distortions, but the controls are part of the Lens Correction filter and it makes sense to discuss them here.
You might recall images taken of buildings at close distance, especially with wide-angle lenses: if the camera was not held horizontally but pointed upwards, the buildings tended to lean backwards. Horizontal walls are not parallel anymore. This is not a lens fault, simply the way perspective works. To get the walls parallel you would need to hold the camera horizontally. This gives you a lot of foreground, which needs to be cropped out later. Or you can use an expensive shift-lens.
The third option is the easiest: simply make the corrections with the two sliders under the ‘Transform’ heading. That’s what I had to do to get the whole Town Hall organ in the shot from that particular angle with a 24mm lens. Compare the two images of the organ, before and after (Images 9 and 10).
It is difficult to describe the way these two perspective correction sliders work. Just take a shot of a building and see how easy it is to fix the perspective.
Don’t despair if you haven’t got this new Photoshop filter: go to Edit > Transform and choose between Skew, Distort and Perspective. Make sure that you work on an image layer, not the background layer.
All these distortion and perspective corrections will squeeze and stretch the pixels and the image won’t be rectangular anymore. You will need to crop it afterwards or, if you are desperate to retain the edges, have a look at the last drop-down menu. The default is ‘transparency’ but you can also choose ‘Edge Extension’ or ‘Background Colour’.
Talking of squeezing and stretching pixels, keep in mind that all these lens and perspective corrections can soften and slightly blur your image.
Vignetting
Every photographer is familiar with light falloff at the corners, especially with full-frame sensors. If you combine a crop camera with a full-frame lens then you won’t have any problems. Also, stopping down the lens will reduce any vignetting.
Going back to the Lens Corrections tab in Adobe Camera Raw (Image 1), you will find two sliders to correct light falloff and the midpoint. The same two sliders can be found in the Lens Correction filter (Image 8). If you have neither of those controls, you can still fix the problem with a Curve correction in combination with a layer mask.
Keep in mind that any correction in software will lighten those pixels in the corners, and if you shoot at high ISO settings, this will enhance image noise in the corners.
Third-party and Automatic Lens Corrections
If every lens has a particular profile in terms of chromatic aberration, lens distortions and vignetting, why can’t these corrections be applied automatically? The future has arrived. Many of the latest cameras do correct for chromatic aberration and vignetting (Canon calls it ‘peripheral illumination correction’) automatically in their JPEGs. If you shoot in RAW you need to use the camera manufacturer’s RAW converter to get these benefits. It is only a matter of time before third-party converters will come on board as well.
Pentax has gone a step further and also included a barrel/pincushion correction for its latest cameras and lenses. This is the ideal way to go: lens designers can concentrate on optimising resolution and contrast and don’t need to worry about chromatic aberration, distortions and corner light falloff.
Although not a lens problem, some cameras offer autofocus micro-adjustment for their lenses. This allows for fine-tuning of the AF system to eliminate front or back focusing with specific lenses.
No report on lens corrections would be complete without at least mentioning the excellent DxO Optics program. Every camera/lens combination has been analysed meticulously and your images will be corrected automatically if you have the right module, taking into account the aperture, focal length and focus distance. The program reads all the necessary information from the metadata attached to the image files and is the ultimate in lens correction. At 124 euros (around NZ$255) for the standard version (double that for the full bells and whistles DxO Optics Pro Elite), it is not cheap, but there is a two-week free trial (www.dxo.com).
Words: Hans Weichselbaum















Ola, what’s up amigos?
I will be glad to get any assistance at the beginning.
Thanks and good luck everyone!