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.
Example of a scene with two different exposures.¶
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 .NET Python 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:
The merger operation creates an HDR image from the LDR input images. An HDR image is an image whose pixel values can exceed the typical displayable range found in monitors, printing machine, etc.
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.
There are three provided merger algorithms:
Debevec(EDebevecMergerParameters.NET Python) andRobertson(ERobertsonMergerParameters.NET Python) require the exposure time for each input image. The first time the method is called, they automatically perform a calibration to compute the camera response. Another calibration is triggered each time the number of images submitted is different or each time the dimension of the submitted image changes.Mertens(EMertensMergerParameters.NET Python) 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.
There are four provided tone-mapper algorithms, each one exposes different parameters:
Linear(ELinearToneMapperParameters.NET Python)Reinhard(EReinhardToneMapperParameters.NET Python)Mantiuk(EMantiukToneMapperParameters.NET Python)Drago(EDragoToneMapperParameters.NET Python)
Hint
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.NET Python uses theMertensmerger (EHDRFusion::GetMertensMergerParameters.NET Python) andLinear(EHDRFusion::GetLinearToneMapperParameters.NET Python) tone-mapper.Use
EHDRFusion::SetToneMapperType.NET Python andEHDRFusion::SetMergerType.NET Python to change these settings.Use the corresponding setters to adjust the parameters (such as
EHDRFusion::SetMertensMergerParameters.NET Python if the current merger isMertens).
Example of HDR fusion.¶
See Also¶
Easy to understand, ready to copy code snippets.