Hugin pano/HDR + darktable in scene-referred

Ah, no, sorry, I should’ve clarified.

I exported the raws to TIFF with just the settings recommended by @anon41087856 in the OP: all modules disabled except lens correction.

After re-importing the stitched image from Hugin I re-enabled white balance on one of the raws to get the settings to copy them, and to provide the screenshot.

Did you also set the response to linear in Hugin and cancel any WB adjustment Hugin might try to do? The steps 1 and 2 in my post above describe how to do that. I also got pretty weird results before those steps.

2 Likes

I think I did, but I’ll double-check when I get home.

FWIW, I indeed did that, but the issue remains.

This is another image I have difficulty with:

This is actually a set of bracketed stacks. I exported them from Darktable in linear colour space, with only Lens Correction enabled.

I imported them in Hugin, set the camera response to linear. I let Hugin create control points, geometric optimisation, and photometric optimisation, and cleared the colour corrections that Hugin had set.

After stitching and re-importing into Darktable, I get something like this.

What am I doing wrong?

I am having a problem similar to @Compizfox.

My goal is to stitch a bunch of non-bracketed photos. I followed the advice of anon41087856 and flannelhead but no luck.

Two issues:

  • I could never get the white balance properly. I looked at a source RAW and copied the values from White Balance > D65 to the merged panorama but they look horrible.
  • The left-most images aren’t being exposure merged which causes a visible border.

Welcome to the forum. Here is some advice I have for you. DT is great at preparing images and matching exposure and color to create tiff files for panorama stitching. Note I do not use the color calibration module for many of my images, because it can make a simple job hard. I am usually happy with the plain old white balance module.

Darktable doesn’t offer panorama stitching. However, DT can prepare the tiff files required for stitching in other programs.

  1. Open the first image
  2. Set white balance if the as shot default is not satisfactory. (I personally am reluctant to use the color calibration module for most images)
  3. Apply denoise (profile)
  4. Sharpen using the preset ‘sharpen demosaicing in the diffuse or sharpen module
  5. Apply the basic colorfullness preset found in the color balance RGB module
  6. Use ‘spot exposure mapping’ controls in the exposure module to set the correct exposure.
    a. Click on the eyedropper attached to the exposure slider
    b. Redraw the area selection box so it covers part of the blue sky (for your images)
    c. Expand the spot exposure mapping options and adjust the position of the lightness slider until a desired exposure result is obtained.
  7. Apply auto tune levels in filmic
  8. Because we are doing panorama stitching apply lens correction to reduce distortion
  9. Apply raw chromatic aberrations module and/or chromatic aberrations module to get rid of fringing if required
  10. Export the image as a 16-bit tiff file
  11. Use Ctrl + Shift+ C to bring up dialog for copying parameters adjusted. Select all parameters and this will be saved to your clipboard
  12. Open your second image
  13. Use the short cut Ctrl + V to paste the settings used from the first image. However, you may need to adjust exposure and filmic if the image does not look identical to your first image. See the next steps.
  14. Use ‘spot exposure mapping’ controls in the exposure module to set the correct exposure.
    a. Click on the eyedropper attached to the exposure slider
    b. Move or redraw the area selection box so it covers part of the blue sky similar to your first image
    c. The position of the lightness slider was set using the first image and the spot exposure mapping will match the exposure of the second image to the first image.
  15. Apply auto tune levels in filmic
  16. Export the image as a 16-bit tiff file
  17. Open the subsequent images and repeat the processes.
  18. The export tiff files are now ready for panorama stitching in Microsoft’s Image Composite Editor (ICE) or any other stitching program. If you have a windows computer ICE is a fantastic free stitching program that matches exposure differences if they exist.

The image doesn’t look like you have followed the instructions, the image should look green.

My workflow of

  1. Do the basic editing to the images and export them as 16 but tiffs
  2. Align the images in Hugin and save the project
  3. For all the images disable all modules except input and output color profile, orientation, noise profile and lens profile, and set the output profile to linear
  4. In Hugin change the image attributes as advices by @flannelhead and stich
  5. Import the output into darktable and check that the input profile is correct
  6. Copy the module stack from one of the source images and enable the disabled modules
  7. Crop and fine-tune

Your steps worked (with small additions)!

Steps 1-9 deviate from first post author who recommends limiting modules to a strict minimum. Is this intentional?

For Step 10 are these sane parameters for 16-bit tiff?

  • uncompressed
  • profile: linear Rec2020 RGB
  • intent: image settings

Hmm not sure where Microsoft ICE comes from… this thread refers to Darktable + Hugin.

Attempt 1:

  • Feature Matching: Hugin’s CPFind + Celeste
  • Optimize geometric: Position (y, p, r)
  • Optimize photometric: Low dynamic range
  • Panorama Output: Exposure corrected, LDR

Yuck! There’s a black distortion on the top-left.

  • Photos > select all + right click > Edit Image Variables > Camera Response > Type > set to Linear (I’m not sure if this did anything)
  • Photos > select all + right click > Reset > Reset User-defined > Color > to one (no color correction) (<- My solution!)
  • Feature Matching: Hugin’s CPFind + Celeste
  • Optimize geometric: Everything (<- I wasn’t sure if the problem was in view/barrel)
  • Optimize photometric: Low dynamic range
  • Panorama Output: Exposure corrected, LDR

100% success!

1 Like

Yes this is intentional. I regard these steps as fundamental for the image processing. Others may have a different opinion.

Forgive me for mentioning ICE. The notes I shared with you are modified from a lesson I teach. I teach the students about ICE because it is an excellent free program for Windows users. I would go to it before Hugin, but that is just my opinion. I saw no harm in mentioning ICE as I had already stated " or any other stitching program", which would include Hugin.

The colour calibration module has some great uses, but with your images I would expect more problems than help from that method. I presume your camera already did a nice white balance, so why create extra work.

Good luck.

1 Like

Is there a quick/efficient way of disabling all of the suggested modules across a large set of images, without having to process each image individually?

I manually disabled the suggested modules in my first image in darkroom, then in lighttable I did a selective copy of the history stack, selecting only the 4 modules which were recommended to be enabled, then selected all the other images and did a selective past of the history stack into them. None of these images (other than the first) turned green; on examination all of them had many modules enabled. Clearly then the elective copy/paste process alters the ‘enabled/disabled’ state of ONLY those modules which were selected in the selective copy step. A module which is enabled in an image is not disabled as a result of a selective paste which does not reference that module.

I tried compressing the history stack to the ‘original’ state in darkroom, but multiple modules were still enabled after this action.

How than can I get a set of images to have only the 4 recommended modules enabled without having to edit each image individually?

First off, I suggest you work on one problem at a time. You can very well stitch jpegs exported from darktable, and they have the advantage that they are compact and fast to load. You could even use half-resolution images for test runs.

If you want to use a very limited number of modules, check first how you apply the history stack on copying: “append” or “overwrite”. You’ll want “overwrite” mode…
And if you need to work with an absolute minimal stack for more than a few images, it might be useful to set the default workflow to “none”. That will only activate those modules that are absolutely essential for displaying the image (that will include white balance, iirc).

But using such a very limited stack means you won’t have “displayable” images on export, so you will need to edit the result of the stitching. To keep maximum quality (which is the whole reason to use Aurélien Pierre’s workflow), you’ll need to export in 16-bit Rec2020. That gives huge TIFFs in my experience…

1 Like

Aha! Back to the drawing board! Thanks for your most valuable guidance.

More importantly, perhaps, you did counsel me: “First off, I suggest you work on one problem at a time.”. Point taken: I’ll revert to simply trying with jpegs to the point where I can correctly drive Hugin to develop a stitched panorama.

I did not tested it, but In the Lightsroom, I would create a style with the required set of modules, and then apply that style to the rest of the pictures in “Overwrite” mode.

What about ghosting management with hugin?
I have a set of bracketed images taken in Florence, Italy, over the Arno river.
There are a couple of boat in the rivere which of course result in ghosting in the final, merged image.
Is there a way to manage that in hugin during the hdr-blending process?

You can use exclude/include masks.

Yes but I don’t understand how they works.

I use them like this:

  • If I have moving objects in the overlapping part of the pano, I exclude them in the picture that adds them.
  • If I have a sharp version of a non-moving object in one image and a blurry version in another image (often on the edge, as my lens isn’t that sharp there), I draw an include mask around the sharper version.

If you exclude objects make sure there is at least one image that can still provide this area, otherwise there will be a hole in the resulting pano.

Tutorial

HTH,
Flössie

1 Like

Ok, I will try.
Thank you!
Only thing, in my case I don’t have a pano but just a “plain” 7 shots bracketing of a single composition, but I don’t think that it would modify the approach to ghosting.

I’m clearly doing something wrong here :sweat_smile: