Category Archives: Software

A Test: Correcting Perspective in Post-Processing

Earlier today I saw a post in which the author stated that correcting for perspective in post-processing would lead to serious problems:

There is quite a bit of loss in image definition if you do a significant amount of correction for converging verticals in an image editor. You can get far better results with a view camera or a tilt/shift lens. If you only photograph for the web, then maybe the image editor approach is ok, but for reasonably large prints?

While that point of view is widely held and often repeated, in my experience a blanket statement like this is not totally correct – it may come down to the definition of “significant.” I find that in many cases the degradation of the image is so small as to be insignificant or even invisible at 100% magnification, and it is most often completely invisible even in fairly good size prints. (This is not to suggest that those making severe corrections, in architectural photography for example, would not be better served by using a tilt/shift DSLR lens or a MF or LF system.)

Rather than just accepting statements like this, I like to test them. In the past I’ve tested and written about the option of correcting for lens distortions in post- processing: A Test: Correcting Lens Distortion in Post Processing. Here I want to extend this concept to using post-processing techniques for the correction of perspective distortion and for leveling the image.

The photograph I’ll use was shot handheld using a full-frame Canon 5D with the EF 35mm f/2 lens, one of my favorites for street photography. First a small version of the final photograph:


Borch’s Iron Works and Machine Shop – old metal shop building in the downtown area of San Jose, California. © Copyright G Dan Mitchell – all rights reserved.

Next is the same image with the same post-processing, except that the corrections to horizontal alignment and perspective have been left out:


Borch’s Iron Works and Machine Shop – old metal shop building in the downtown area of San Jose, California. Uncorrected version. © Copyright G Dan Mitchell – all rights reserved.

Yup, that’s what happens when you shoot street and shoot handheld. ;-)

In this example we can clearly see several problems that need fixing. First, the image is not level – it tilts down to the right. Second, the vertical lines begin to converge toward the top of the image. Third, since the camera’s sensor was not perfectly parallel to the building wall, the right side of the building recedes and gets smaller as the horizontal lines become closer together toward the right edge.

In my view, the uncorrected version of this photograph is not usable. On the other hand, I’m not likely to start doing street photography with a tripod and a tilt shift lens any time soon! Correction in post seems to be a reasonable option. (And, to cut to the chase, the corrected version seen above really does make a nice print.)

The next image includes two versions of roughly the same section of the photograph at 100% magnification. The crops come from the lower left area of the full image and include the conduit on the wall in the area in full sun. I could have used a section from all the way in the corner, but given the low contrast in that area the difference between the samples would be even harder to see – so I’ll stick with the section where the conduit provides a more visible contrast and frame of reference. Depending on your monitor, this resolution is equivalent to looking at a small section from a print that would be perhaps 50″ or 60″ wide. (Hint: that would be a very big print for a DSLR original – significantly larger than almost anyone ever produces! Made many 60″ x 40″ prints recently?)


100% magnification from lower left area of ‘Borch’s Iron Works and Machine Shop’ – two versions. © Copyright G Dan Mitchell – all rights reserved.

I believe that if you know what to look for and you  inspect this 100% crop very closely you can detect a small difference in the “sharpness” of the two photographs – but it is quite subtle even when viewed at 100%. In practical terms, however, this tiny effect that is just barely visible under close inspection at 100% in side-by-side comparisons on the screen is entirely insignificant in a print. Even with a very close inspection it would be quite invisible in a print of, say, 18″ x 24″ and probably even larger. Bottom line: Both would produce very sharp prints at very large sizes and essentially no one would comment that one is sharper than the other… though quite a few might notice that the corrected image looks a whole lot less distorted in the spatial sense.

Note: Article text edited/updated for clarity on 4/27/13.

This reinforces my belief that any degradation to the image quality that occurs when lens distortion, perspective, and/or horizontal level are corrected carefully during the post-processing stage can be very minimal and in the majority of situations will be invisible in prints.


G Dan Mitchell is a California photographer and visual opportunist. His book, “California’s Fall Color: A Photographer’s Guide to Autumn in the Sierra” is available from Heyday Books and Amazon.

Blog | About | Flickr | FacebookEmail

Links to Articles, Sales and Licensing, my Sierra Nevada Fall Color book, Contact Information.


All media © Copyright G Dan Mitchell and others as indicated. Any use requires advance permission from G Dan Mitchell.



FocalWare Moonrise Calculator for the iPhone

Andy Frazer links to a description of some software that is almost enough to make me buy an iPod Touch. (Not an iPhone – the monthly fee is too high for the way I use a phone. :-) FocalWare Moonrise Calculator for the iPhone.

Product Recommendation: PhotoRescue

A few weeks ago I returned from a three-day pack trip in Yosemite with several hundred photographs on an 8GB compact flash card. As soon as I got home (yes, five minutes after midnight…) I popped the card into my firewire card reader and watched Adobe Bridge launch and present me with the screen for importing the files to my computer. I hit the appropriate buttons…

… and watched the program freeze.

Stuff happens. I relaunched and tried again – only to find that the card data had been corrupted. Not only did the Finder report that there was now a single mysterious 4GB file and not photos on the card, but inserting the card caused most applications I tried to run to freeze almost immediately.

A quick search led me to the PhotoRescue web site, from which I downloaded their “expert” version of PhotoRescue 2.1. I quickly installed the application and put the program to work analyzing the damaged card. It found hundreds of RAW files from my Canon 5D and all but two appeared to be OK.

PhotoRescue provides a rather unique method of online distribution. You dowload the program for free, apparently usually in the throes of panic over a bad memory card, and you run it. It does the card analysis and file location and shows you thumbnails of all the files that it can recover. (In my case this included not only this week’s photos, but others that remained on the card from previous use.) If the program finds salvageable files you can decide to purchase the full program (US$29) to copy them from the card to your computer, which is just what I did. I can’t think of a more fair approach to selling this software.

Before long I had transferred all of the RAW files from the recent shoot to my hard drive, made a backup of the files, and used ACR to open (and rename) the files. At this point I did discover damage to a couple of the recovered files, but the vast majority (all but two or three) had been fully salvaged and were ready for use.

Here is one shot that I would have lost without PhotoRescue.

436

Boulder, Lower Young Lake. Yosemite National Park, California. September 10, 2007. © Copyright G Dan Mitchell.

(Update 10/9/07: I later figured out that this problem was not caused by the card or the camera. It was the result of leaving an old firewire device plugged into a firewire hub that I had attached to a new computer – an incompatibility between the new computer and the old device led to the corruption.)

A Test: Correcting Lens Distortion in Post-Processing

Earlier this weekend I read a forum thread about the Canon EF 50mm f/1.4 lens, of which I have a copy. The thread lamented the barrel distortion of this lens (which I don’t really find to be that big of an issue) and continued with posts suggesting alternatives including software correction in the post-processing phase. One response to this proposal was that software correction would degrade the  image and would therefore be unacceptable.

That theory seemed sound and I have believed this to be true in the past, but I decided to test this idea for myself. Using an old photograph taken with this lens, I cropped a small section from one of the far corners – the worst part of the frame and, according to some, subject to a lot of softness and distortion on full-frame bodies like my Canon 5D. To make things a bit more challenging I used a photograph that included a bunch of dried california grasses – full of very fine details and high contrast.

I converted the original RAW file using ACR (Adobe Camera RAW) with no sharpening. In Photoshop I cropped to a section of reasonable size for web presentation, using that section from one of the corners of the image. Then I made a duplicate of the cropped section of the image.

In one of the two versions of the crop I used the LensfixCI plugin to correct for the slight barrel distortion of the EF 50mm f/1.4 lens. This $29 plugin* includes a database of many lenses, and also keeps a smaller databases of your lenses. It uses EXIF data to identify the lens (and focal length with zooms) used to take the photo and automatically applies optimum distortion corrections from its database. It takes me about 10 seconds to select the plugin and apply its changes.

* (I have left the reference to this plugin that I used when I did the test several years ago, even though I no longer use it. Today I simply use the built-in correction in Lightroom or ACR, where I apply lens- based corrections by default in virtually all cases.)

Next I used my normal sharpening methods on both images, inspecting the results and making adjustments as I applied them. In the end, as would typically be the case, I used slightly different sharpening settings for the two images – but that reflects the normal way of operating. Finally, I took the two images and placed them side by side in the single high quality jpg file that follows.

Barrel Distortion Correction
Barrel Distortion Correction

(NOTE: The version shown above on this page may have been downsized for formatting purposes, which limits the amount of detail that is visible. Click the image to view it at its original size, or follow this direct link to the original image.)

I have a darned hard time seeing any difference in sharpness, contrast, or color that might have been introduced by the correction process. If a difference is visible a) it is almost impossible to say which version is better, and b) the difference is almost certainly completely insignificant in an actual print. (Keep in mind that these are 100% crops of the worst part of the frame in the far corner – and that the area shown here would be a very tiny section of a full print that would be something like five feet/60″ wide.)

After doing this test, I’m not really concerned at all about any negative effects of using this method of correcting lens distortions, and today I simply allow ACR or Lightroom to automatically correct for such lens characteristics by default. And whatever the tiny negative effect on sharpness we might imagine to produce, it is far outweighed by the ability to straighten lines and so forth when necessary.

(Anyone care to guess which half contains the “corrected” version of the crop? Feel free to post a comment and an explanation of what you (think you) see… ;-)

(This 2007 post was slightly updated on 1/5/2013)


G Dan Mitchell is a California photographer and visual opportunist. His book, “California’s Fall Color: A Photographer’s Guide to Autumn in the Sierra” is available from Heyday Books and Amazon.

Blog | About | Flickr | FacebookEmail

Links to Articles, Sales and Licensing, my Sierra Nevada Fall Color book, Contact Information.


All media © Copyright G Dan Mitchell and others as indicated. Any use requires advance permission from G Dan Mitchell.