IDS peak ICV v1.5.0
Loading...
Searching...
No Matches
DigitalBlackFeature Class Reference
Inheritance diagram for DigitalBlackFeature:

Public Member Functions

None __init__ (self, ToneCurveCorrectionModule module)
 Creates a digital black feature for an existing tone curve correction module.
 
bool enabled (self)
 Gets whether this feature is currently enabled.
 
None enabled (self, bool enabled)
 Enables or disables the feature.
 
None reset_to_default (self)
 Resets the black level to its default value (0.0).
 
float value (self)
 Gets the current black level value.
 
None value (self, float digital_black)
 Sets the black level value.
 
Interval range (self)
 Retrieves the valid range for the black level value.
 

Data Fields

float value = 0.0
 

Protected Attributes

 _module = module
 

Detailed Description

Digital black applies digital black correction to an image.

Supported pixel formats
  • Mono8
  • Mono10
  • Mono12
  • Mono16
  • BayerBG8
  • BayerBG10
  • BayerBG12
  • BayerGB8
  • BayerGB10
  • BayerGB12
  • BayerRG8
  • BayerRG10
  • BayerRG12
  • BayerGR8
  • BayerGR10
  • BayerGR12
  • RGB8
  • RGBa8
  • BGR8
  • BGRa8
  • RGB10
  • RGBa10
  • BGR10
  • BGRa10
  • RGB12
  • RGBa12
  • BGR12
  • BGRa12

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

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].

The default value for digital black is 0.0.

Since
ids_peak_icv 1.0

Constructor & Destructor Documentation

◆ __init__()

None __init__ ( self,
ToneCurveCorrectionModule module )

Creates a digital black feature for an existing tone curve correction module.

Parameters
moduleReference to the underlying module
Since
ids_peak_icv 1.0

Member Function Documentation

◆ enabled() [1/2]

bool enabled ( self)

Gets whether this feature is currently enabled.

Returns
True if enabled; otherwise False.
Since
ids_peak_icv 1.0

Reimplemented from IFeature.

◆ enabled() [2/2]

None enabled ( self,
bool enabled )

Enables or disables the feature.

Parameters
enabledTrue to enable, False to disable.
Since
ids_peak_icv 1.0

Reimplemented from IFeature.

◆ range()

Interval range ( self)

Retrieves the valid range for the black level value.

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

Returns
An Interval representing the valid black level range.
Since
ids_peak_icv 1.0

◆ reset_to_default()

None reset_to_default ( self)

Resets the black level to its default value (0.0).

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

Reimplemented from IFeature.

◆ value() [1/2]

float value ( self)

Gets the current black level value.

Returns
The black level value currently set.
Since
ids_peak_icv 1.0

◆ value() [2/2]

None value ( self,
float digital_black )

Sets the black level value.

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

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

Field Documentation

◆ _module

_module = module
protected

◆ value

float value = 0.0