HDR Fusion

When acquiring images using conventional sensors, all details of the scene may not be visible with a single exposure.

This can happen, for example, when some parts of the image are strongly illuminated while others are in the shadows as illustrated below.

To capture different details, you should acquire multiple images using different exposure settings. Then, instead of processing each level of exposure separately, you can use the class EHDRFusion to fuse the different images into a single image that contains all the details exacerbated at each exposure level.

The HDR fusion process

The HDR fusion (High Dynamic Range) function performs 2 operations on the LDR (Low Dynamic Range) input images:

1. The merger function creates a HDR image from the LDR input images. This image is not accessible from the class EHDRFusion.

Select one of the provided merger algorithms:

Debevec and Robertson require the exposure time for each input image. The first time, they automatically perform a calibration to compute the camera response.
Mertens only requires the input images. It can be useful in some scenarios when the exposure times is unknown or when the number of images or the exposure times vary between the fuse operations.
2. The tone-mapper function maps the values of the HDR image pixels into the 0-255 range. This creates a LDR image that you can process by conventional image processing methods.

Select one of the provided tone-mapper algorithms. Each one exposes various parameters and their values depend on your use-case.

Linear
Reinhard
Mantiuk
Drago

Use the HDR sample to determine the algorithm and the parameter values that best suit your set of images.

The default parameters

By default, the class EHDRFusion uses the Mertens merger and Linear tone-mapper.
Use SetToneMapperType and SetMergerType to change these settings.
Use the corresponding setters to adjust the parameters (such as SetMertensMergerParameters if the current merger is Mertens).

Note that changing changing the type of an algorithm or its parameters may trigger a costly calibration of the camera response.

Example of HDR fusion