IDS peak ICV v1.3.0
Loading...
Searching...
No Matches
HDR Class Reference

Public Member Functions

None __init__ (self, *Any args, **Any kwargs)
 Constructs an HDR processing object.
 
None __del__ (self)
 Destroys the HDR object and releases backend resources.
 
HDRAlgorithm algorithm (self)
 Returns the HDR algorithm used by this object.
 
None estimate_response_curve (self, ImageArray images)
 Estimates the Camera Response Curve (CRC) from a set of input images.
 
Image process (self, ImageArray images)
 Generates an HDR image from the specified input images.
 

Protected Attributes

 _handle = peak_icv_hdr_handle()
 

Detailed Description

Performs High Dynamic Range (HDR) image reconstruction.

This class provides functionality to generate a High Dynamic Range (HDR) image from a set of input images captured with different exposure settings. The input images are expected to depict the same scene while varying exactly one parameter: either the exposure time OR the gain.

Internally, the HDR reconstruction is performed using the Debevec algorithm. A key part of this process is determining the Camera Response Curve (CRC), which maps digital pixel values to relative radiance. The algorithm is fixed at construction time.

Typical usage

Note
All input images must have the same resolution, the same pixel format and being captured from an identical viewpoint of the same scene without any change in camera position or scene content. Any mismatch may lead to invalid HDR reconstruction results.

Limitations

  • All input images must be compatible (same resolution, pixel format, and scene)
  • At least two input images must be provided
  • Only the Debevec HDR algorithm is currently supported
Since
ids_peak_icv 1.2

Definition at line 50 of file hdr.py.

Constructor & Destructor Documentation

◆ __init__()

None __init__ ( self,
*Any args,
**Any kwargs )

Constructs an HDR processing object.

Creates and initializes an HDR object using the default HDR reconstruction algorithm (Debevec).

Since
ids_peak_icv 1.2

Definition at line 87 of file hdr.py.

◆ __del__()

None __del__ ( self)

Destroys the HDR object and releases backend resources.

Since
ids_peak_icv 1.2

Definition at line 103 of file hdr.py.

Member Function Documentation

◆ algorithm()

HDRAlgorithm algorithm ( self)

Returns the HDR algorithm used by this object.

The algorithm is defined at construction time and determines how the input images are combined during HDR reconstruction.

Returns
The HDR algorithm identifier.
Since
ids_peak_icv 1.2

Definition at line 114 of file hdr.py.

◆ estimate_response_curve()

None estimate_response_curve ( self,
ImageArray images )

Estimates the Camera Response Curve (CRC) from a set of input images.

This method calculates the response characteristics of the camera sensor. The CRC defines the relationship between scene radiance and the measured pixel values.

All input images must meet the following conditions:

  • Represent the same scene.
  • Be compatible in size and pixel format.
  • Contain valid metadata for either exposure time or gain, and the values for the chosen parameter must vary across the given images (e.g., ids_peak_common.datatype.MetadataKey.DeviceExposureTime or ids_peak_common.datatype.MetadataKey.DeviceGain).

Performing this estimation step explicitly can significantly reduce the processing time of subsequent calls to process(), as the curve does not need to be re-calculated.

If this method is not called, the response curve is estimated automatically during the first call to process().

Supported pixel formats
  • Mono8
  • RGB8

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

Parameters
imagesImages of the same scene with different exposure time or gain metadata. Must not be empty.
Since
ids_peak_icv 1.3

Definition at line 134 of file hdr.py.

◆ process()

Image process ( self,
ImageArray images )

Generates an HDR image from the specified input images.

Processes the provided images and combines them into a single HDR image.

All input images must meet the following conditions:

  • Represent the same scene.
  • Be compatible in size and pixel format.
  • Contain valid metadata for either exposure time or gain, and the values for the chosen parameter must vary across the given images (e.g., ids_peak_common.datatype.MetadataKey.DeviceExposureTime or ids_peak_common.datatype.MetadataKey.DeviceGain).

If the camera response curve has not been explicitly estimated using estimate_response_curve(), an internal estimation step is performed automatically when it is first called. This may increase the overall processing time for the first call.

Supported pixel formats
  • Mono8
  • RGB8

See the Pixel and Pixel Format Specifications for a detailed description of the pixel formats.

Parameters
imagesImages of the same scene with different exposure time or gain metadata. Must not be empty.
Returns
The resulting HDR image with pixel format Mono32fIDS resp. RGB32fIDS.
Since
ids_peak_icv 1.2

Definition at line 184 of file hdr.py.

Field Documentation

◆ _handle

_handle = peak_icv_hdr_handle()
protected

Definition at line 97 of file hdr.py.