When creating a panorama for a scene of huge dynamic range, intuitively I always merge exposure brackets to HDR and tone-map them and then stitch the resulting images into a panorama. My intuition here is that the HDR process is much more predictable than the stitching process, so I start with the former. I realize this may be because I know a lot about HDR (worked on HDR S/W for 9 years) and little about stitching software.

Is this the right order to do this and why?

This question came up because in the book Mastering Panorama Photography the author stitches first and then merges the LDR panoramas into a HDR one. He mentions this but does not explain why.

  • 18
    Based on my biases, I'd say the correct order is stitch first, HDR later -- much later. After the sun dies, and the universe goes into heat death would be about the right time... May 1, 2011 at 22:31
  • 3
    @Jerry - The reaction is understandable, I find most HDR images online seriously nauseating. I make my own HDR much more subtle. Even the in-camera ones are rarely tolerable.
    – Itai
    May 2, 2011 at 5:11
  • 3
    In fairness, most of it is a result of what the photographer has chosen to do, so it's probably unfair to blame HDR itself. Even so, I'd say it's a loss more often than not... May 2, 2011 at 5:27
  • 1
    My preference would always be to combine images before stitching for exactly the reason you state!
    – Matt Grum
    May 2, 2011 at 14:31
  • 1
    @Matt - Right. Actually I realize most of my images would not be stitchable at all exposure levels, since they contain either sparse highlight details with everything else black or sparse shadow details with everything else blown-out.
    – Itai
    May 2, 2011 at 14:44

9 Answers 9


Doing HDR first has advantages: the HDR process is working on a smaller image size, and you only have to stitch one set of images.

But the disadvantage of doing the HDR step first is it becomes more difficult to exactly match the tones between sets of images, so when you stitch them together you get more obvious seams. If you are able to control this and don't have this problem, then I could see it being easier to do HDR first. But for most people they will have ended up with slightly different HDR adjustments done and they will have seams to deal with.

Edit: I have recently found that doing the pano stitching step first, sometimes the resulting files have slightly different dimensions, off by a pixel or two, and then the HDR processor complains that the images must be the same dimension.

  • 8
    If you merge the images to a high dynamic range image without tonemapping, using the same tonecurve for each the images will match no problem. You can then stitch and finally tonemap down to a low DR image once you have the whole scene in front of you!
    – Matt Grum
    May 2, 2011 at 9:00
  • I automate the HDR step by writing Python programs to process the images. The same tonemap applies to all, along with any other corrections or crazy effects. Then I stitch. If I'm not happy with the result, modifying and re-running the HDR step is easy.
    – DarenW
    May 12, 2011 at 3:48

In addition to the answers presented already, there's a huge potential disadavantage of stitching first - the stitching programs might decide to stitch each exposure differently leading to misalignment when you do the HDR.

Unless the stitching program lets you repeat the warping with different images this could be the deciding factor in which to do first.

Most panorama assembly programs use a series of primitive image features (corners, line segments, small details) matched between images in order to warp and align adjacent frames. If some of these features are not visible in one of the image sets a different features could be used of alignment, giving different results.

Imagine a sequence in which you have an exposure for the sky for which the land is almost pure black. The program might have great difficulty stitching the sky due to lack of details.

The best approach in my opinion would be to merge to HDR first, then stitch, then tonemap. That way you create the HDR image which should match between frames of the panorama, then assemble the panorama using the maximum available data, then tonemap the HDR panorama back down into a low DR image suitable for displaying on computer screens, with the ability preview your settings on the whole scene. See

  • Even if the stitcher can repeat the exact same warps and alignments, there's still a possibility of the camera jiggling by small amounts like 1/2 a pixel. Depending on the nature of the project, that can be problem.
    – DarenW
    May 12, 2011 at 3:37
  • Not getting the exact same stitching for the different exposures would be my main concern too. Better to do HDR first, then stitch. Mar 1, 2012 at 10:54
  • I doubt they look for lin segments and corners explicitly. I'd be surprised if they dont all work with SIFT features or other variants (e.g. the older version "KLT", or the newer "SURF"). They do tend to land on corners, lines and other detailed textures, but your wording sounds like it is represented as lines and corners explicitly in the program. Feb 6, 2013 at 8:56

I know this is late but I have been doing HDR panoramas that have been successful. Here is my method:

I stitch first using Hugin. If I bracket say -2,0 and +2 stops I will have three sets of exposures to stitch. I first stitch the set that has the most detail because Hugin will be able to make the best set of control points from this set. Let's say the -2 stop set has adjacent frames that are too dark and Hugin can not stitch it properly, and the +2 stop set has two adjacent frames that are washed out and again Hugin can't find control points. Normally these sets would either bomb out of Hugin or the geometry would vary between them. Instead if the 0 stop set has enough detail I will run this set thru Hugin and get a 0 stop stitched panorama. I save the 0 stop PTO config file, which includes all the control points. I then run the -2 stop, and +2 stop sets through Hugin using the 0 stop PTO file.

This has two advantages:

  1. Hugin will use the 0 stop control points for all the panorama sets so the geometry will be identical for all 3 sets right down to the single pixel level
  2. Hugin will not bomb out with the sets that do not have enough detail.

Then it is very easy to HDR the resulting panoramas using Photomatix. Here are 2 examples:

Regards, Steve Pituch


One reason for stitching before HDR could be a situation where you have a scene that is very dark on one end, with light slowly increasing to the other end, which is very bright. First, individual frames of the panorama would not need much dynamic range, but the whole panorama would. Second, by creating HDR from your left-most frame, you would stretch its range through most of the useful values in the 16 bpc space, but the left edge would be the darkest, and the right edge the lightest. The same would happen to the second frame. You would them stitch the darkest part of the second frame with the lightest part of the first frame. To resolve that, you would either have to compress the range of both frames, thus undoing some of the HDR work you did during the HDR step, or let the left end be too dark, or let the right end be overblown.

If you stitched first, you would have several panoramas, one of them completely underexposed on the left, one of them completely overblown on the right, but merging them together you would hopefully end up with a perfect picture.

  • I think this is a very good point - normally HDR is used to get a good range across the vertical axis (e.g. land/sky). It's easy to imagine panoramas where the contrast is in the horizontal also/instead. Pre-stitching HDR would make it tricky to recover this contrast post-stitching. Also applying the same parameters to all images when generating the HDRs pre-stitch may still leave some images appearing unfairly exposed.
    – MattJ
    Jun 2, 2012 at 17:37

Usually I do HDR first then stitching. Sometime the stitching of the different exposure can get different result. But mostly because I work from RAW, if I stitch first I would have to make HDR from jpg which doesn't make as good result as from RAW. But sometime stitching HDR doesn't work so I try stitch first HDR later (but usually it mean the result won't be as good)

  • Can you elaborate on why stitching HDR doesn't work sometimes?
    – mattdm
    Jan 2, 2012 at 13:45
  • 3
    Stitching does not have to result in jpg. I always stitch to tiff. Jan 3, 2012 at 0:21

Stitching first has its obvious advantage. You can tune for your suitable HDR when you get the whole image and only once :)


I'm not sure HDR software (e.g. Photomatix) would accept several images that had been stitched together as they might vary in size and internal dimensions, so I would definitely try it HDR first.

I've done it once: Panorama of Bristol Harbourside

It was 6 shots, 3 for each side of the picture.

I went HDR first (Photomatix Pro), assuming that the panorama software (Autopano) would be more adaptable for sticking things together.

I did no editing before the HDR, so went straight into Photomatix. Those 2 images went straight into Autopano, and the result was an exported TIFF that I did some editing on using Aperture.

It went well, although I did re-do it when I noticed some ghosting that I missed taking out in Photomatix.


I've only done this once, to date. I used Hugin for the combined process of stitching into a panorama and tonemapping from high (more than 8-bit dynamic range) down to 8-bit JPEG.

I loaded the original images into Hugin, had it align them (and made adjustments), then exported directly to the final JPEG. Internally Hugin does the distortions necessary, creates partial panoramas at each exposure level, then merges those into HDR and tonemaps back into 8-bit JPEG. From memory, I used the 'Exposure fused from any arrangement' option, which, as I understand it, doesn't require the original images to overlap in any specific way (i.e. you don't need to capture HDR stacks, just cover dark and light areas appropriately), but will use whatever dynamic range is available for any given region/pixel.

If you want control over the tone mapping (as I imagine most people would; my shot just didn't need it) then Hugin can also produce a 32-bit EXR or TIFF panorama, which you can tonemap with Photomatix or Photoshop as you please.

Hugin actually has quite a few options for increased dynamic range, and I can't say I know what they all do, but to me the most obvious method seems to be letting it make the 32-bit panorama and do your tonemapping afterwards.

Hugin Stitcher HDR options

  • Some detail missing here. Did you merge HDR into RAW? Check your first sentence, it's not making much sense.
    – Itai
    Jan 9, 2014 at 14:36
  • updated, hopefully a better explanation — I only used Hugin, internally it makes panoramas from the available images at each EV and then merges to HDR. Jan 10, 2014 at 0:54

HDR first! Let me run through my workflow. First ascertain breadth and extent of pano. Now determine exposure from the area of main focal point or center of pano. Using that exposure (manual) for your base shoot the HDR exposures for entire pano. Then process using pretty much the same method. Start with the exposures that are most important- save your HDR Settings and use the same settings for each exposure.

Now, stitch them together and you should have no problem. don

  • 1
    But why is it that you think HDR first, then stitch?
    – MikeW
    Feb 5, 2013 at 21:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.