Workflow from raw (lens correction)?


Both my raw converter (darktable) and Hugin are capable of lens correction - but doing it in both would be incorrect. My 1st question is the place of lens correction in the workflow.

  • I apply -1EV correction (compared to the Sunny-16 rule) in manual mode in camera to avoid clipping highlights;
  • in the raw developer, I set the same white balance for all images, and correct exposure by the same amount, avoiding clipping (no curves or other processing);
  • I export as 16-bit TIFFs
  • stich the TIFFs in Hugin
  • import the result into darktable for further processing (curves etc.)

Q1: At which step should lens corrections be applied? In the raw developer (I use darktable, that, in turn, uses lensfun), or should I just let Hugin take care of it? If in the raw developer, how will Hugin know it does not need to perform the lens correction?
Q2: Also, even with the steps described above, Hugin will sometimes give me more options to save the results (including fused and merged-fused output). Since all my input has the same exposure, why does that happen?

Note: I use Hugin in a very simplistic manner, using the assistant-based simple interface.


Grüzie, @kofa,

I am not an expert, but wouldn’t stiching in Hugin
be much easier if the images were already lens corrected?
I.e. in the raw developer?

Have fun!
Claes in Lund, Sweden

Thanks. I’ve updated the question - I’m worried about how Hugin will know that the photos have been corrected already; how will it know that it should apply no further lens correction?

I would also apply lens correction in darktable before stitching
my experience is that stitching works better if the photos are already undistorted

Stitching involves some sort of pattern-match with adjacent regions. Thinking about it, un-corrected images present “reversed patterns” with respect to the distortion, which I’d imagine would vex the pattern match.

I use the full mode, so my answers shall reflect that.

A1. It depends on your settings in Hugin. You can choose what you would like to be corrected. If you have already had lens correction applied, then choose the simplest matching criteria. Depending on the circumstance, you may actually benefit from doing the correction twice.

A2. Again, this is up to your settings. Simply choose the type(s) of output you desire. I.e., it allows you to output multiple files and formats at once if you so desire. We are used to going through the save / export dialog for each output, so this multi-export can be confusing at first.