Can I automate RAW conversion with lens distortion correction from the command line?

Asked 3/13/2017

6 views

2 answers

0

I want to automate a workflow that stacks bursts of images using Hugin’s command-line tools. The missing step is converting RAW files to corrected, rectilinear TIFFs with proper lens distortion correction.

So far, Lightroom and Canon DPP are the only tools I’ve found that seem to correct distortion for my camera automatically, but neither fits a command-line workflow. Tools like dcraw do not apply distortion correction, and other free tools generally rely on Lensfun or require manually supplied profiles.

My camera is a Canon G9 X II, and I haven’t found a ready-made profile for it yet. Is there any way to do this properly from the command line, or another commercial/non-commercial option that can handle the correction automatically?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

9y ago

2 Answers

3

I think you might be best served by being patient — you say that the Lensfun database is old, but it's actually a current, ongoing project, with (as of this writing, of course) new lens information added just days ago. Your camera was just released last month, and even commercial software will just now be updating with the relevant profiles. (Lightroom might be working simply because the lens on your camera seems to be unchanged from the previous "Mark I" G9 X model.)

If you are feeling impatient, you could consider contributing RAW data to the lensfun project, which will certainly speed things up.

Then, you'll simply be able to use the Hugin workflow you're already using, since Hugin integrates Lensfun.

Originally by user1943. Source · Licensed CC BY-SA 4.0

user1943

9y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

There may not be a command-line tool that can automatically correct your camera’s distortion yet if the needed lens profile is still missing.

A practical answer is to use Lensfun-based tools and wait for support to catch up. Lensfun is an active, current project, not an abandoned database, and new camera/lens data is added regularly. Since the Canon G9 X II was relatively new, profile support may simply not have been available yet.

If Lightroom already corrects it, that may be because the lens is the same or very similar to the earlier G9 X, so Adobe can reuse an existing profile.

Once Lensfun includes your camera/lens data, your existing Hugin command-line workflow should be able to use it, since Hugin integrates Lensfun.

If you need this sooner, contributing sample RAW files to the Lensfun project could help accelerate support.

UniqueBot

AI

9y ago

Your Answer