IDS peak ICV v1.4.0
Loading...
Searching...
No Matches
ChromaticAdaptionFeature Class Reference
Inheritance diagram for ChromaticAdaptionFeature:

Public Member Functions

None __init__ (self, ColorMatrixTransformationModule module)
 Creates a ChromaticAdaptionFeature for an existing color matrix transformation module.
 
bool enabled (self)
 Indicates whether chromatic adaptation is enabled.
 
None enabled (self, bool value)
 Enables or disables chromatic adaptation.
 
None reset_to_default (self)
 Resets the chromatic adaption configuration to the default values.
 
ColorSpace target_color_space (self)
 Retrieves the current target color space.
 
None target_color_space (self, ColorSpace value)
 Sets the target color space.
 
ChromaticAdaptionAlgorithm algorithm (self)
 Retrieves the current chromatic adaption algorithm.
 
None algorithm (self, ChromaticAdaptionAlgorithm value)
 Sets the algorithm used for chromatic adaption.
 
int color_temperature (self)
 Retrieves the current color temperature.
 
None color_temperature (self, int value)
 Sets the color temperature of the light source.
 
bool has_color_temperature (self)
 Checks whether a color temperature has been set.
 
Range color_temperature_range (self)
 Returns the allowed temperature range for the current combination of color space and algorithm.
 

Protected Attributes

 _module = module
 

Detailed Description

Adjusts to changes in lighting conditions to maintain consistent color perception despite variations in light sources.

In industrial imaging, white balance can fail due to the lack of a neutral reference in the image, such as when the scene contains no gray or white areas, or when the colors are unevenly distributed (as in images dominated by a single color). In these cases, traditional white balance algorithms, like the gray world method, may fail to produce accurate color corrections.

Chromatic adaptation provides an alternative solution by adjusting the image’s colors based on the known or estimated correlated color temperature of the light source.

Note
If chromatic adaption is used in combination with white balance, the result is indefinite.

Default Configuration:

  • Chromatic adaption algorithm = Bradford
  • Color space = SRGB_D65
  • Color temperature = undefined (chromatic adaption won't be applied)
Since
ids_peak_icv 1.3

Constructor & Destructor Documentation

◆ __init__()

None __init__ ( self,
ColorMatrixTransformationModule module )

Creates a ChromaticAdaptionFeature for an existing color matrix transformation module.

Parameters
moduleReference to the underlying ColorMatrixTransformationModule.
Since
ids_peak_icv 1.3

Member Function Documentation

◆ algorithm() [1/2]

ChromaticAdaptionAlgorithm algorithm ( self)

Retrieves the current chromatic adaption algorithm.

Returns
The currently set chromatic adaption algorithm.
Since
ids_peak_icv 1.3

◆ algorithm() [2/2]

None algorithm ( self,
ChromaticAdaptionAlgorithm value )

Sets the algorithm used for chromatic adaption.

The algorithms use a CAT (chromatic adaptation transform) matrix.

Parameters
valueThe chromatic adaption algorithm to set.
Since
ids_peak_icv 1.3

◆ color_temperature() [1/2]

int color_temperature ( self)

Retrieves the current color temperature.

Returns
The current color temperature in Kelvin.
Exceptions
NotPossibleExceptionIf the color temperature has not been set (it has no default value).
Since
ids_peak_icv 1.3

◆ color_temperature() [2/2]

None color_temperature ( self,
int value )

Sets the color temperature of the light source.

If no color temperature is explicitly set the chromatic adaption won't be applied.

Parameters
valueThe color temperature in Kelvin to set. Must be within the allowed range.
Since
ids_peak_icv 1.3

◆ color_temperature_range()

Range color_temperature_range ( self)

Returns the allowed temperature range for the current combination of color space and algorithm.

Returns
A Range representing the allowed temperature range in Kelvin.
Since
ids_peak_icv 1.3

◆ enabled() [1/2]

bool enabled ( self)

Indicates whether chromatic adaptation is enabled.

Returns
True if enabled; otherwise, False.
Since
ids_peak_icv 1.3

Reimplemented from IFeature.

◆ enabled() [2/2]

None enabled ( self,
bool value )

Enables or disables chromatic adaptation.

Parameters
valueSet to True to enable the feature, or False to disable it.
Since
ids_peak_icv 1.3

Reimplemented from IFeature.

◆ has_color_temperature()

bool has_color_temperature ( self)

Checks whether a color temperature has been set.

Returns
True if a color temperature is set, False otherwise.
Since
ids_peak_icv 1.3

◆ reset_to_default()

None reset_to_default ( self)

Resets the chromatic adaption configuration to the default values.

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

Reimplemented from IFeature.

◆ target_color_space() [1/2]

ColorSpace target_color_space ( self)

Retrieves the current target color space.

Returns
The currently set color space.
Since
ids_peak_icv 1.3

◆ target_color_space() [2/2]

None target_color_space ( self,
ColorSpace value )

Sets the target color space.

A color space is a specific implementation of a color model, mapping colors to a defined range of values (e.g., standard primaries, white point, and gamma).

Parameters
valueThe color space to set.
Since
ids_peak_icv 1.3

Field Documentation

◆ _module

_module = module
protected