Exifsperated!

The release of Lightroom 3 was supposed to banish my barrel distortion blues. At last Adobe had plugged one of Lightroom’s most glaring omissions – the ability to correct for lens distortion – an area where it had been lagging behind competing software such as DxO Optics Pro. The reality has been far less straightforward.

As for why lens correction is important to me, when on my travels I mainly use my Sony Alpha 18-250 “do it all” lens because it is so handy not to have to keep changing lenses, and if used in the right way it produces excellent results.  But it does suffer from very noticeable barrel distortion at wide focal lengths.  Sometimes the effect is attractive, but sometimes not and I often find myself needing to correct for it. As a Lightroom user this has been something of a pain since until recently there was no lens correction feature.  I have had to use separate dedicated tools such as PTLens.  Not that there is anything wrong with PTLens, it works perfectly well; but having to hop between software tools makes for very clunky workflow.

The introduction of lens correction in Lightroom 3 (and in other Adobe tools such as Photoshop/Adobe Camera Raw) should have fixed all this at a stroke, but the half-baked implementation has left me exasperated and no closer to a solution in practice.

Colossi Memnon before distortion correctionColossi Memnon

The Colossi of Memnon, near Luxor: Amenhotep III before (left) and after (right) correction for barrel distortion. The difference is subtle but uncorrected version gives Pharaoh a squat head and oversized right leg. Corrected version is nobler and more kingly. The effect of the distortion is to bloat up a circular area in the centre, squishing the ring shaped area around it, and largely leaving the edges alone. Taken with Sony AF DT 18-250mm F3.5-6.3 at 18mm f8.

Incidentally, I did recently take a long hard look at the DxO raw conversion software but finally gave up on it because I did not like the gritty look it gave my images.  It does though have a wonderful lens correction facility.  It goes beyond that because it tailors the raw conversion process to a wide number of camera body and lens combinations and those tailored settings are easy to find and install.  It is all there on a plate, including profiles for my Sony DSLR and lenses.

Contrast Lightroom 3. There is a limited selection of lens correction profiles supplied with the software and Sony is particularly poorly represented. There is no profile provided for my 18-250. Rather than do the profiling for you, Adobe (modestly funded and resourced as they are) expect photographers to do the profiling themselves using a free downloadable tool.  This is fine if you have the time and skill to do it properly.  But no fear – anyone who uses the home profiling kit can then upload their lens profiles to Adobe so they can be shared with other users. The Sony 18-250 being such a common and popular lens, some kind soul must surely have already profiled it and uploaded the profile to Adobe. Problem solved. No?

No. Not even close.

Firstly, how do you find out which user-generated profiles are available on-line?  Are they all handily listed on a website somewhere? You’d think so, but no.  Apparently they are all on photoshop.com somewhere but not accessible to regular visitors to the site.  So you might expect to be able to get to them via Lightroom itself.  And again you’d be wrong.

The only way to access the user created profiles is through Photoshop CS5/Adobe Camera Raw. Quite why Adobe decided to provide access via Photoshop but not Lightroom is a complete mystery to me, but there it is.

Now I very rarely need to resort to Photoshop, Lightroom having come such a long way, and I do not have a copy, but I downloaded and installed the 30 day trial of CS5 because, as I understood it, if I could find the lens profile I wanted I could save it locally and it would then also work with Lightroom. And indeed, if you open one of your images in Photoshop CS5 and select Lens Correction from the Filter menu, you are presented with a button to search online for the relevant lens profile.  Except in my case the button was greyed out.

The problem, it seems, is with the EXIF data in the raw file produced by my Sony camera. Photoshop “saves you the trouble” of typing (or potentially mistyping) your lens details.  It gets them directly from the EXIF data to determine which lens profile to look for on-line.  Unfortunately there is no option to enter lens details manually. If your lens specification is not present in the EXIF data, the on-line profile search facility will remain resolutely inactive.  And guess what? Sony cameras write lens information to a proprietary section of the raw file, not the normal EXIF lens model tag.  Photoshop only looks in the expected place, finds nothing and refuses to do an on-line search.

At this point I came close to giving up and creating my own profile, despite not having a decent tripod or any lighting gear.  For the profiling to work you are supposed to ensure consistent, homogeneous lighting while taking multiple exp0sures of a test target at different focal lengths and in different areas of the field of view.  But that was still a last resort.

I tried a piece of software called exiftool.  Not surprisingly it allows you to inspect and modify EXIF tags on your photos.  I reckoned I might be able to use it to manually insert the appropriate lens tag. Annoyingly, exiftool is a command line program with a horribly complicated syntax to learn.  There is a GUI program available to make it easier to use, but the latter does not cover all the functionality and in particular does not support writing to the lens tag.  Well it wouldn’t would it? That would be good news, something this sorry tale is decidedly short on.

I had a good go using exiftool and did learn how to use it in command line mode. Essentially it involved commands of the form:

exiftool “-lensmodel=Sony AF DT 18-250mm F3.5-5.6” *.ARW

In practice I did get exiftool to update the lens tag (as verified using the exiftoolGUI program) but had best results with DNG files previously converted from Sony raw (.ARW) files.  It didn’t help though – Photoshop still couldn’t recognise the lens info.

It turns out that I was using the wrong kind of tag.  Apparently I should have been putting the lens model data into the auxiliary XMP area of the file, but before I could figure out how to do that in exiftool I came across another home grown program called alphalensinfo which does exactly the right thing for image files created with Sony DSLRs.

Indeed, with alphalensinfo I was able to create a .DNG which opened up in Photoshop’s Lens Correction filter and correctly displayed the lens model.  And yes, the online search button was finally mouth-wateringly clickable.

So I clicked it … waited with baited breath …. and was informed that no online profiles had been found for my lens.

I shouldn’t have been surprised.  Adobe’s software seems to be so Sony-unfriendly it is hardly a wonder that no Sony user has been bothered to create and upload a profile for that lens.  It could be a while before anyone does.  Looks like I am after all going to have to profile my own damn lens.  But when I do I will at least upload it and also make it available for direct download, to save others the Photoshop exifsperation I had to contend with.

AddThis Social Bookmark Button

Advertisements

3 Comments

Filed under lenses, Photography

3 responses to “Exifsperated!

  1. Frustrated

    Update. OK I think I solved my problem, (though it may not be the same as yours). Somehow when I opened a RAW file from Aperture 3 to edit in CS5, the lens data was getting dropped. Which is why the search online button was greyed out.

    So I opened RAW files from my various lenses directly from Finder into ACR, converted them and opened in CS5, this time the lens was identified. I searched online and found user created lens profiles, selected them, then saved them locally. I closed all the files, and this time when I open a RAW file from Aperture into CS5 to edit, although it still doesn’t recognize my lens, the lens profiles are saved and I can apply them! Whew.

  2. Frustrated

    I’m having a similar problem with my Nikon D300S and lenses — all of which are very popular lenses. In fact for the D300S there is only one lens profiled, and it’s a lens I’d never even consider buying! Since Nikon apparently doesn’t write the EXIF data in a way that CS5 likes (although Aperture has no trouble at all identifying it!), I can’t search for a lens profile. Adobe really dropped the ball on this… why they can’t have an intern crank out lens profiles for two weeks I just don’t understand. At the end of the day, automatic lens correction is not a feature they should be touting for CS5… there’s nothing automatic about it.

  3. I have started to look at using the Adobe Lens Profile Creator. There are plenty of hurdles there too. You need to print out quite a large optical target (bigger than my printer can manage) on thick card and have it flat mounted and supported.

    And the number of exposures you need to properly profile a lens, covering a range of focal lengths, apertures, etc. is really quite prohibitive.

    But I’m not going to be beaten by this.