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

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

Inheritance diagram for ChromaticAdaptionFeature:

Public Member Functions

 ChromaticAdaptionFeature (detail::ColorMatrixTransformationModule &module)
 Creates a ChromaticAdaptionFeature for an existing color matrix transformation 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 chromatic adaption configuration to the default values.
 
void SetTargetColorSpace (ColorSpace colorSpace)
 Sets the target color space.
 
ColorSpace GetTargetColorSpace () const
 Retrieves the current target color space.
 
void SetAlgorithm (ChromaticAdaptionAlgorithm algorithm)
 Sets the algorithm used for chromatic adaption.
 
ChromaticAdaptionAlgorithm GetAlgorithm () const
 Retrieves the current chromatic adaption algorithm.
 
void SetColorTemperature (uint32_t kelvin)
 Sets the color temperature of the light source. If no color temperature is explicitly set the chromatic adaption won't be applied.
 
uint32_t GetColorTemperature () const
 Retrieves the current color temperature.
 
bool HasColorTemperature () const
 Checks whether a color temperature has been set.
 
peak::common::RangeU GetColorTemperatureRange () const
 Returns the allowed temperature range for the current combination of color space and algorithm.
 

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.

Defaults
  • chromatic adaption algorithm = Bradford
  • color space = SRGB_D65
  • color temperature = undefined (chromatic adaption won't be applied)
See also
ColorSpace, ChromaticAdaptionAlgorithm, features::ColorCorrectionFeature
Since
ids_peak_icv 1.3

Definition at line 51 of file peak_icv_chromatic_adaption_feature.hpp.

Constructor & Destructor Documentation

◆ ChromaticAdaptionFeature()

Creates a ChromaticAdaptionFeature for an existing color matrix transformation module.

Parameters
moduleReference to the underlying detail::ColorMatrixTransformationModule.
Since
ids_peak_icv 1.3

Definition at line 166 of file peak_icv_chromatic_adaption_feature.hpp.

Member Function Documentation

◆ GetAlgorithm()

ChromaticAdaptionAlgorithm GetAlgorithm ( ) const
inline

Retrieves the current chromatic adaption algorithm.

Returns
The currently set chromatic adaption algorithm.
Since
ids_peak_icv 1.3

Definition at line 200 of file peak_icv_chromatic_adaption_feature.hpp.

◆ GetColorTemperature()

uint32_t GetColorTemperature ( ) const
inline

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

Definition at line 210 of file peak_icv_chromatic_adaption_feature.hpp.

◆ GetColorTemperatureRange()

peak::common::RangeU GetColorTemperatureRange ( ) const
inline

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

Returns
The allowed temperature range in Kelvin.
Since
ids_peak_icv 1.3

Definition at line 220 of file peak_icv_chromatic_adaption_feature.hpp.

◆ GetTargetColorSpace()

ColorSpace GetTargetColorSpace ( ) const
inline

Retrieves the current target color space.

Returns
The currently set color space.
Since
ids_peak_icv 1.3

Definition at line 190 of file peak_icv_chromatic_adaption_feature.hpp.

◆ HasColorTemperature()

bool HasColorTemperature ( ) const
inline

Checks whether a color temperature has been set.

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

Definition at line 215 of file peak_icv_chromatic_adaption_feature.hpp.

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

Definition at line 175 of file peak_icv_chromatic_adaption_feature.hpp.

◆ ResetToDefault()

void ResetToDefault ( )
inlineoverridevirtual

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

Implements IFeature.

Definition at line 180 of file peak_icv_chromatic_adaption_feature.hpp.

◆ SetAlgorithm()

void SetAlgorithm ( ChromaticAdaptionAlgorithm algorithm)
inline

Sets the algorithm used for chromatic adaption.

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

Parameters
algorithmThe chromatic adaption algorithm to set.
Since
ids_peak_icv 1.3

Definition at line 195 of file peak_icv_chromatic_adaption_feature.hpp.

◆ SetColorTemperature()

void SetColorTemperature ( uint32_t kelvin)
inline

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

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

Definition at line 205 of file peak_icv_chromatic_adaption_feature.hpp.

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

Definition at line 170 of file peak_icv_chromatic_adaption_feature.hpp.

◆ SetTargetColorSpace()

void SetTargetColorSpace ( ColorSpace colorSpace)
inline

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
colorSpaceThe color space to set.
Since
ids_peak_icv 1.3

Definition at line 185 of file peak_icv_chromatic_adaption_feature.hpp.