This interface provide functionalities of High Dynamic Range Imaging(HDR).
HDR imaging works with images that captured with different exposure settings. We provide two approach here:
- Tone mapping, it firstly estimate the camera response function(CRf) based on the known exposure times, then recover the true irradiance image for the scene, and apply a tone-mapping algorithm to visualize this final image. It's the most popular way of processing an HDR image.
- Exposure fusion, blend a bracketed exposure sequence into a high quality image, without camera response curve calibration. It's much simpler to use and the resulting image quality is comparable to tone-mapping method.
To use this interface, you should create a LHDR object.
Example Code
C++
Code snippets: snippets/HDR.cpp
ILHDRPtr hdrOp = LHDR::Create();
std::vector<double> exposureTimes = { 10000, 15000, 20000 };
if (err != LPVErrorCode::LPVNoError) return;
hdrOp->ToneMapping(imgList, resultImg1, 1, 4, 1);
hdrOp->ExposureFusion(imgList, resultImg2, 1, 1, 1);
LPVErrorCode
This enumeration represents the type of a LPV function error.
Definition: LPVCore.idl:530
C#
Code snippets: snippets/HDR.cs
LHDR hdrOp = new LHDR();
double[] exposureTimes = { 10000, 15000, 20000 };
hdrOp.ToneMapping(imgList, resultImg1, 1, 4, 1);
hdrOp.ExposureFusion(imgList, resultImg2, 1, 1, 1);
COM
ILHDRPtr hdrOp = LHDR::Create();
CComSafeArray<double> exposureTimes;
exposureTimes.Add(10000);
exposureTimes.Add(15000);
exposureTimes.Add(20000);
if (err != LPVErrorCode::LPVNoError) return;
hdrOp->ToneMapping(imgList, resultImg1, 1, 4, 1);
hdrOp->ExposureFusion(imgList, resultImg2, 1, 1, 1);