ImageEn, unit ievision

TIEVisionExposureMerger.run

TIEVisionExposureMerger.run

Declaration

function run(performAlignment: bool32 = false; contrastWeight: single = 1.0; saturationWeight: single = 1.0; gamma: single = 1.0): TIEVisionImage; safecall;

Description

Perform exposure fusion and return a new image representing the tone-mapped HDR content.
Dest The bitmap that will be assigned the resulting image (must be created before calling)
performAlignment If True the algorithm tries to align the images
contrastWeight Contrast measure weight (Must be > 0.0. Typical range is 0.1 - 9.9)
saturationWeight Saturation measure weight (Must be > 0.0. Typical range is 0.1 - 9.9)
gamma Gamma correction (1.0 = linear map. Typical range is 0.1 - 3.0)



Note:
The source bitmaps must be of pixel format ie24RGB
A shortcut method for this is available: MergeExposures

Demos

Demo  Demos\IEVision\ExposureFusion\ExposureFusion.dpr
Demo  Demos\ImageEditing\EveryMethod\EveryMethod.dpr

Example

var
  merger: TIEVisionExposureMerger;
  img: TIEBitmap;
begin
  merger := IEVisionLib().createExposureMerger();

  // add images with different exposures
  img := TIEBitmap.Create;
  img.Read('image1.jpg');
  merger.addImage(img.GetIEVisionImage());
  img.Read('image2.jpg');
  merger.addImage(img.GetIEVisionImage());
  img.Read('image3.jpg');
  merger.addImage(img.GetIEVisionImage());
  img.Free();

  // merge and show result
  ImageEnView1.IEBitmap.AssignIEVisionImage( merger.run() );
end;