Constructing HDR Images Using a Camera Response Curve

Quick 'n' Dirty instructions:

Hit 'Ctrl+Alt+A' to open the assembly tool.
Drag your sequence on to the window.
Hit 'Generate Image'.

That's it - the default values should give you close to the best possible HDR image. If your image looks weird or substandard, then read the rest of the tutorial so you can find out how to tweak the dialog parameters...


HDR Shop allows you to create a high-dynamic range image from a sequence of images taken at different shutter speeds. The feature has been improved for the release of HDR Shop v3.0 such that HDR images can be computed from any LDR or HDR image format, including any RAW digital format. The relative scales between images can now be calculated automatically using either pixel values or EXIF data, or the scales can be specified manually for greater control.

Shooting a sequence: The images should be taken without moving the camera, and should ideally be bracketed so that the darkest parts of the scene are clearly visible in the longest exposure and the brightest parts of the image are not "blasted out" to white in the shortest exposure. Note however that HDR Shop v3.0 will compute if the darkest image contains very bright values (as happens when the scene contains direct sunlight) and apply a correction to make these values usable in the final image.
Once the minimum and maximum exposure levels have been determined, choose an exposure interval. The interval depends on many things, in particular how well the camera's response curve is calibrated. See the tutorial on calibrating the camera's response curve for details. If the response curve isn't known, it is recommended that you take the images in the sequence close to each other, for example 1 stop apart. Once the camera's curve has been well calibrated, you can take the sequence further apart, eg. at 3 stops. As a rule of thumb, you should never take the images too close together, so when in doubt take the sequence 1 stop apart. Then, even if the camera curve isn't calibrated well, you will still get decent results. Note that HDR Shop 3.0 uses a new dynamic weighting scheme which means that assembled image quality is good even when using images taken with a non-constant change in exposure, however the best HDR images are still obtained with a constant exposure change, so you should try to plan taking such sequences if possible.

To begin, pull down the Create menu at the top of the screen, and click on Assemble HDR from Image Sequence. This will pop up the "Assemble HDR Image" dialog box.

First, if your images are LDR, you need to specify the response curve of the camera that generated your images. You can skip this if you are confident that your camera has a 'standard' gamma 2.2 response (most modern digital camera images look fine with this value). Note that if your input images are 'RAW' digital or 32-bit, they are automatically classified as containing linear data and a curve does not need to be specified. As mentioned above, the curve can be calculated as described in the previous tutorial. Click on the "Change" button to select that camera response curve. If you know that the camera uses a standard gamma curve, you can enter that directly. Click on the "gamma curve" tab and type in the value of the gamma curve. Many cameras are close to a 2.2 gamma curve or else they are linear, which is equivalent to a gamma value of 1.0. For better results, you can use a response curve that you have calculated. Click on the "Custom Curve" tab and enter the filename of the curve in the text box, or click "Browse" to select the file. If the "Renormalize Curve" checkbox is selected, HDR Shop will automatically rescale the curve so that the maximum value is 1. For assembling an HDR image from a sequence, this check box should always be selected. Once the appropriate curve has been loaded or selected, click "Ok".

Next, you need to load in the image sequence. If you know that the images contain EXIF data and you do not want to use this data to compute the relative scales between images, uncheck the 'Use EXIF' checkbox. If your sequence consists of digital camera RAW images, the default behavior of HDR Shop 3.0 is to use the EXIF data to get the relative scales between images, then load in the uninterpolated RAW data as a single channel image (representative of the raw Bayer image). Assembly is then done on the single channel image, which is then interpolated using an advanced algorithm (see the manual 'Image->Filter->Interpolate Bayer Pattern' menu entry for more information). You can override this behavior by checking the 'Predevelop' box although this slows the process significantly and doesn't necessarily produce any better results. The 'Predevelop' option causes each RAW image to be demosaicked before assembling the sequence into an HDR image. You would use the 'Predevelop' option when EXIF information is incorrectly read by the assembly tool. Drag the images on to the dialog or click the "Load Images" button. The image file names should now appear in the worksheet in the dialog box.


The images in the worksheet should be in order from shortest exposure to longest exposure. HDR Shop will automatically sort the images based on the average brightness of the pixels in each image. This brightness is displayed in the "sort" column. If this order is incorrect for some reason, you can manually enter values into the "sort" column for each image, and HDR Shop will sort the images based on the numbers you enter. If EXIF information is avaliable, the images will be sorted from this.

Next, you can choose either to tell HDR Shop which images were taken at which exposure settings or just let the software calculate these values automatically. For manual entry, these values can be specified per color channel, or for the entire image. For most applications, the relative exposure levels of the different color channels will be the same. In the "Select Channels" area, the "R=G=B" button should be selected. If a single color channel is selected, then the values entered in the worksheet will only apply to the currently selected color channel. For most normal sequences, the automatic setting produces good results.

Most of the time, the images in your sequence will all have been taken at a fixed f-stop inverals. If you want to enter manual fixed scale values, press the appropriate button in the "Use Preset Scale Increments" area. If the images were taken at some other f-stop interval, press the "Other..." button and enter the increment by hand.

When the f-stop increment is selected, you notice that the values in the "Relative Stops" column should all be equal to the f-stop value you selected. The column indicates how many f-stops brighter the current image is from the previous image. The "Absolute Stops" column indicates how many stops brighter the image is from the first image in the sequence. Similarly, the "Relative Scale" column indicates how many times brighter the current image is from the previous image, and the "Absolute Scale" indicates how many times brighter the current image is from the first image in the sequence. The scale values are the base-2 log of the f-stop values, since f-stop is an exponential measurement of exposure level. If the images were taken at a non-uniform spacing, you can also enter in any of these individual values by hand by simply clicking on the appropriate cell in the worksheet and typing the value. Note that this will automatically update the other values in the row.

If you are allowing HDR Shop to automatically calculate the scales, you may need to check the usable pixel range in the images. Sensor pixels saturate at different levels and can sometimes include spurious values at the extremes. Occasionally you can find pixels in areas which you know to be saturated (typically > 0.92) but only showing values of 0.85 or less. In this case, reducing the upper bound to less than 0.85 will exclude values greater than this. For most cameras, the default upper and lower bounds will produce good quality images.

Check whether you want the output image to be half-sized with the 'Half-size' box. Half-size speeds up the processing when using the 'Predevelop' option and when assembling LDR images (the half-size gets done on the images before assembling in these cases). Half-size on RAW images using EXIF data just does a half-size after all other processing and so has no performance benefit.

Auto-rotate option: Many modern cameras have an orientation sensor that flags the image if it was taken in eg 'portrait' mode so it can be rotated in an image viewer for easier viewing. Checking this box (default) forces the HDR assembler to rotate the image to the same orientation as the camera when the image was taken - ie portrait shots appear in a portrait orientation.

When the images have been loaded (and optionally the camera curve selected, and the relative brightnesses specified), press the "Generate Image" button to compile the images into a single HDR image.