Best workflow for stacking raw images to be developed in darktable

But bear in mind that I’m not doing a full blown and final edit before stacking. I’m just making the basic adjustments to exposure, contrast and dynamic range before stacking. I still have the option to edit the stacked output without having to go back to my originals. And from what I’ve seen, I get far, far better results doing those initial adjustments with DT in the raw stage as opposed to a TIFF output.

But I am in the very early learning stage and am very open to other approaches

I agree that halos are easy enough to correct in Affinity, except when you have a complex structure that requires a lot of local edits all over the image. Right now I don’t know if dedicated stacking software might reduce the need for those kinds of edits… that’s what trial periods are for.

But I have to admit that its hard to pass up $24 for Affinity when its gets most of the stacking done.

My process (so far, haven’t done a lot of these), for best quality:

  • defringe and CA removal turned on
    you wouldn’t want colour fringes (which change frame-to-frame) to get in the way of alignment or frame blending, and CA in particular would be a huge pain to correct in the final image.

  • no correction to exposure/vignetting/distorsion.
    Hugin can do these itself, and depending on how (in-)accurate the lens profile in Darktable is, it would be left with some residual but not too systematic distorsion/vignetting profiles. If it gets the uncorrected images, it can work out fairly accurate profiles. In some cases, it might even skew them a bit to improve alignment, which is also fine with me. (actually, I think Hugin’s greatest missing feature is the ability to distort pictures to fix alignment issues due to parallax or small movements between frames)

  • no sharpening
    That can generate some spurious detail which may not align so well between pictures, and can really get in the way of focus stacks or HDR calculations

  • white balance: only change if it’s really off otherwise. Hugin can also correct subtle changes to white balance between pictures, e.g. if you accidentally had the camera on auto-WB. You can then adjust global WB after Hugin corrects them to the same WB setting.

  • no other colour corrections like contrast/lightness/saturation …
    Those all run the risk of confusing Hugin’s sensor curve reconstruction. Hugin ties to “explain” all differences in colour between aligned images using exposure, white balance and a reconstructed sensor curve. So I try not to distort the mapping between scene and photo to anything which Hugin can’t easily fit a curve to.

  • absolutely no local adjustments (contrast equalizer, shadows/highlights, haze removal…)
    same reason – especially if exposure changes between pictures, or some frames have contrasty objects in them that others don’t, local changes mean that the same scene brightness gets mapped to different values at different locations in the same picture, and different values again in a different picture – the required exposure correction would no longer be uniform across one picture.

I then export to 16 bit TIFF, in linear REC2020, assemble the panorama/HDR stack etc. in Hugin, save the result as EXR or TIFF, and process further, taking care to specify REC2020 as input image profile when opening it in Darktable.

As others have noted, linear 16 bit TIFFs can be hard to work with in Hugin because the contrast looks weird, and they’re heavy, heavy files. So it makes sense to also export to jpg in a “regular” colour profile, generate a project, align the images etc., and then substitute the pictures, re-run the photometric matching (to update the sensor curve/exposure/white balance corrections), export to a 16 tiff (or EXR, if you have HDR contents), and load that into Darktable, specifying REC2020 as input profile – and then you can apply whatever you like.

2 Likes