IDS peak comfortC v1.14.1
Loading...
Searching...
No Matches
Chromatic Adaption

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

Enumerations

enum  peak_chromatic_adaption_algorithm { PEAK_CHROMATIC_ADAPTION_ALGORITHM_INVALID , PEAK_CHROMATIC_ADAPTION_ALGORITHM_LEGACY , PEAK_CHROMATIC_ADAPTION_ALGORITHM_BRADFORD }
 Enumeration that defines the available chromatic adaption algorithms. More...
enum  peak_chromatic_adaption_color_space {
  PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_INVALID , PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_SRGB_D50 , PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_SRGB_D65 , PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_CIE_RGB_E ,
  PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_ECI_RGB_D50 , PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_ADOBE_RGB_D65
}
 Enumeration that defines the available color spaces. More...

Functions

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorSpace_Get (peak_camera_handle hCam, peak_chromatic_adaption_color_space *colorSpace)
 Get the target color space.
peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorSpace_Set (peak_camera_handle hCam, peak_chromatic_adaption_color_space colorSpace)
 Set the target color space.
peak_status peak_IPL_ColorCorrection_ChromaticAdaption_Algorithm_Get (peak_camera_handle hCam, peak_chromatic_adaption_algorithm *algorithm)
 Get the current algorithm used for chromatic adaption.
peak_status peak_IPL_ColorCorrection_ChromaticAdaption_Algorithm_Set (peak_camera_handle hCam, peak_chromatic_adaption_algorithm algorithm)
 Set the algorithm used for chromatic adaption.
peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_Get (peak_camera_handle hCam, uint32_t *colorTemperature)
 Get the current color temperature.
peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_Set (peak_camera_handle hCam, uint32_t colorTemperature)
 Set the used color temperature used for chromatic adaption.
peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_GetRange (peak_camera_handle hCam, uint32_t *minColorTemperature, uint32_t *maxColorTemperature, uint32_t *incColorTemperature)
 Returns the allowed temperature range for the current combination of color space and algorithm.
peak_status peak_IPL_ColorCorrection_ChromaticAdaption_Enable (peak_camera_handle hCam, peak_bool enable)
 Enable/Disable the host chromatic adaption.
peak_bool peak_IPL_ColorCorrection_ChromaticAdaption_IsEnabled (peak_camera_handle hCam)
 Get the enabled status of the chromatic adaption.

Detailed Description

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

Refer to the IDS peak IPL documentation for additional information on Chromatic Adaptation.

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

Enumeration Type Documentation

◆ peak_chromatic_adaption_algorithm

Enumeration that defines the available chromatic adaption algorithms.

The algorithms use a CAT (chromatic adaptation transform) matrix for chromatic adaption. There are various available CATs describing the transformation.

Since
1.14
Enumerator
PEAK_CHROMATIC_ADAPTION_ALGORITHM_INVALID 

Invalid chromatic adaption algorithm.

Use this value for the initialization of variables of type peak_chromatic_adaption_algorithm.

PEAK_CHROMATIC_ADAPTION_ALGORITHM_LEGACY 

The legacy algorithm

PEAK_CHROMATIC_ADAPTION_ALGORITHM_BRADFORD 

The Bradford CAT matrix algorithm. This is the default.

◆ peak_chromatic_adaption_color_space

Enumeration that defines the available color spaces.

A color space is a specific implementation of a color model, mapping colors to a defined range of values. For example, sRGB is a standardized color space based on the RGB color model, but it also defines color primaries, the white point, and gamma to ensure consistent color representation across various platforms and devices.

Since
1.14
Enumerator
PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_INVALID 

Invalid color space.

Use this value for the initialization of variables of type peak_chromatic_adaption_color_space.

PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_SRGB_D50 

sRGB (standard RGB): standard illuminant D50 (5000 K), gamma 2.2.

PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_SRGB_D65 

sRGB (standard RGB): standard illuminant D65 (6500 K), gamma 2.2.

PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_CIE_RGB_E 

CIE-RGB: standard illuminant E (equal energy distribution), gamma 2.2.

PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_ECI_RGB_D50 

ECI-RGB: standard illuminant D50 (5000 K), gamma 1.8.

PEAK_CHROMATIC_ADAPTION_COLOR_SPACE_ADOBE_RGB_D65 

Adobe RGB: standard illuminant D65 (6500 K), gamma 2.2.

Function Documentation

◆ peak_IPL_ColorCorrection_ChromaticAdaption_Algorithm_Get()

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_Algorithm_Get ( peak_camera_handle hCam,
peak_chromatic_adaption_algorithm * algorithm )

Get the current algorithm used for chromatic adaption.

The implemented algorithms are listed in the enum peak_chromatic_adaption_algorithm.

Parameters
[in]hCamThe camera handle.
[out]algorithmPointer to a variable which will receive the current algorithm.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER algorithm is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.14

◆ peak_IPL_ColorCorrection_ChromaticAdaption_Algorithm_Set()

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_Algorithm_Set ( peak_camera_handle hCam,
peak_chromatic_adaption_algorithm algorithm )

Set the algorithm used for chromatic adaption.

The available color spaces are listed in the enum peak_chromatic_adaption_algorithm.

Parameters
[in]hCamThe camera handle.
[in]algorithmThe algorithm to set.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER algorithm is not a valid enum value of peak_chromatic_adaption_algorithm.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.14

◆ peak_IPL_ColorCorrection_ChromaticAdaption_ColorSpace_Get()

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorSpace_Get ( peak_camera_handle hCam,
peak_chromatic_adaption_color_space * colorSpace )

Get the target color space.

There are many available color spaces. The implemented color spaces are listed in the enum peak_chromatic_adaption_color_space.

Parameters
[in]hCamThe camera handle.
[out]colorSpacePointer to a variable which will receive the current color space.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER colorSpace is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.14

◆ peak_IPL_ColorCorrection_ChromaticAdaption_ColorSpace_Set()

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorSpace_Set ( peak_camera_handle hCam,
peak_chromatic_adaption_color_space colorSpace )

Set the target color space.

The available color spaces are listed in the enum peak_chromatic_adaption_color_space.

Parameters
[in]hCamThe camera handle.
[in]colorSpaceThe color space to set.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER colorSpace is not a valid enum value of peak_chromatic_adaption_color_space.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.14

◆ peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_Get()

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_Get ( peak_camera_handle hCam,
uint32_t * colorTemperature )

Get the current color temperature.

Parameters
[in]hCamThe camera handle.
[out]colorTemperaturePointer to a variable which will receive the current color temperature in Kelvin.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER colorTemperature is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.14

◆ peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_GetRange()

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_GetRange ( peak_camera_handle hCam,
uint32_t * minColorTemperature,
uint32_t * maxColorTemperature,
uint32_t * incColorTemperature )

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

Parameters
[in]hCamThe camera handle.
[out]minColorTemperatureThe minimum color temperature value.
[out]maxColorTemperatureThe maximum color temperature value.
[out]incColorTemperatureThe color temperature value increment.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_PARAMETER At least one of minColorTemperature, maxColorTemperature, and incColorTemperature is an invalid pointer.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.14

◆ peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_Set()

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_Set ( peak_camera_handle hCam,
uint32_t colorTemperature )

Set the used color temperature used for chromatic adaption.

The usable range depends on the current combination of target color space and algorithm. If one of them is changed the range should be rechecked with peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_GetRange.

Parameters
[in]hCamThe camera handle.
[in]colorTemperatureThe color temperature in Kelvin to set.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_OUT_OF_RANGE colorTemperature value is out of range. Check the range of valid values via peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_GetRange.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.14

◆ peak_IPL_ColorCorrection_ChromaticAdaption_Enable()

peak_status peak_IPL_ColorCorrection_ChromaticAdaption_Enable ( peak_camera_handle hCam,
peak_bool enable )

Enable/Disable the host chromatic adaption.

Parameters
[in]hCamThe camera handle.
[in]enableThe desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled.
Returns
PEAK_STATUS_SUCCESS Operation was successful; no error occurred.
PEAK_STATUS_INVALID_HANDLE hCam is an invalid camera handle.
PEAK_STATUS_NOT_INITIALIZED The library is not initialized.
PEAK_STATUS_ERROR An unexpected internal error occurred.
Since
1.14

◆ peak_IPL_ColorCorrection_ChromaticAdaption_IsEnabled()

peak_bool peak_IPL_ColorCorrection_ChromaticAdaption_IsEnabled ( peak_camera_handle hCam)

Get the enabled status of the chromatic adaption.

This function implements the Enabled Status Query principle.

Parameters
[in]hCamThe camera handle.
Returns
PEAK_TRUE The chromatic adaption is currently enabled.
PEAK_FALSE The chromatic adaption is currently disabled or the query failed.
Since
1.14