IDS peak ICV v1.6.0
Loading...
Searching...
No Matches
DigitalBlackFeature Class Reference

#include <peak_icv/pipeline/features/peak_icv_digital_black_feature.hpp>

Inheritance diagram for DigitalBlackFeature:

Public Member Functions

 DigitalBlackFeature (detail::ToneCurveCorrectionModule &module)
 Creates a DigitalBlackFeature for an existing tone curve correction module.
 
void SetEnabled (bool enabled) override
 Enables or disables the feature.
 
bool IsEnabled () const override
 Gets whether this feature is currently enabled.
 
void ResetToDefault () override
 Resets the digital black value to its default.
 
void SetValue (float digitalBlack)
 Sets the digital black correction value.
 
float GetValue () const
 Gets the current digital black correction value.
 
peak::common::IntervalF GetRange () const
 Retrieves the valid range for the digital black value.
 

Detailed Description

Digital black applies digital black correction to an image.

This feature adjusts the image luminance by first subtracting a digital black and then normalizing the result. This compensates for sensor digital black offsets.

The correction is applied independently to each channel in the image. For RGB images, it is applied to each color channel (R, G, B), and for monochrome images, it is applied to the single intensity channel.

The correction is performed using the following formula:

color_value_out = clamp((color_value_in - black) / (1.0 - black), 0.0, 1.0);

where:

  • color_value_in is the input channel value,
  • black is the digital black to be subtracted (in normalized units),
  • color_value_out is the resulting output value.

All input and output values are in the normalized range [0.0, 1.0].

Defaults
  • black = 0.0
See also
features::GammaFeature, features::GainFeature
Since
ids_peak_icv 1.0

Constructor & Destructor Documentation

◆ DigitalBlackFeature()

Creates a DigitalBlackFeature for an existing tone curve correction module.

Parameters
moduleReference to the underlying detail::ToneCurveCorrectionModule.
Since
ids_peak_icv 1.0

Member Function Documentation

◆ GetRange()

peak::common::IntervalF GetRange ( ) const
inline

Retrieves the valid range for the digital black value.

The returned interval specifies the minimum and maximum values that can be passed to SetValue.

Returns
An IntervalF representing the valid digital black range.
Since
ids_peak_icv 1.0

◆ GetValue()

float GetValue ( ) const
inline

Gets the current digital black correction value.

Returns
The digital black value currently set.
Since
ids_peak_icv 1.0

◆ IsEnabled()

bool IsEnabled ( ) const
inlineoverridevirtual

Gets whether this feature is currently enabled.

Returns
true if enabled; otherwise false.
Since
ids_peak_icv 1.0

Implements IFeature.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

Resets the digital black value to its default.

Note
The enabled state does not change when calling this function.
Since
ids_peak_icv 1.0

Implements IFeature.

◆ SetEnabled()

void SetEnabled ( bool enabled)
inlineoverridevirtual

Enables or disables the feature.

Parameters
enabledSet to true to enable, or false to disable.
Since
ids_peak_icv 1.0

Implements IFeature.

◆ SetValue()

void SetValue ( float digitalBlack)
inline

Sets the digital black correction value.

This value is subtracted from the input image channel values before normalizing it. It typically represents sensor black offset.

Parameters
digitalBlackA floating-point value representing the digital black value in normalized units. Valid values are within the range returned by GetRange.
Exceptions
OutOfRangeExceptionIf digitalBlack is outside the valid range.
Since
ids_peak_icv 1.0