![]() |
IDS peak comfortC v1.14.0
|
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... | |
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.
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.
| 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. |
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.
| 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. |
| 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.
| [in] | hCam | The camera handle. |
| [out] | algorithm | Pointer to a variable which will receive the current algorithm. |
algorithm is an invalid pointer. hCam is an invalid camera handle. | 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.
| [in] | hCam | The camera handle. |
| [in] | algorithm | The algorithm to set. |
algorithm is not a valid enum value of peak_chromatic_adaption_algorithm. hCam is an invalid camera handle. | 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.
| [in] | hCam | The camera handle. |
| [out] | colorSpace | Pointer to a variable which will receive the current color space. |
colorSpace is an invalid pointer. hCam is an invalid camera handle. | 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.
| [in] | hCam | The camera handle. |
| [in] | colorSpace | The color space to set. |
colorSpace is not a valid enum value of peak_chromatic_adaption_color_space. hCam is an invalid camera handle. | peak_status peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_Get | ( | peak_camera_handle | hCam, |
| uint32_t * | colorTemperature ) |
Get the current color temperature.
| [in] | hCam | The camera handle. |
| [out] | colorTemperature | Pointer to a variable which will receive the current color temperature in Kelvin. |
colorTemperature is an invalid pointer. hCam is an invalid camera handle. | 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.
| [in] | hCam | The camera handle. |
| [out] | minColorTemperature | The minimum color temperature value. |
| [out] | maxColorTemperature | The maximum color temperature value. |
| [out] | incColorTemperature | The color temperature value increment. |
minColorTemperature, maxColorTemperature, and incColorTemperature is an invalid pointer. hCam is an invalid camera handle. | 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.
| [in] | hCam | The camera handle. |
| [in] | colorTemperature | The color temperature in Kelvin to set. |
colorTemperature value is out of range. Check the range of valid values via peak_IPL_ColorCorrection_ChromaticAdaption_ColorTemperature_GetRange. hCam is an invalid camera handle. | peak_status peak_IPL_ColorCorrection_ChromaticAdaption_Enable | ( | peak_camera_handle | hCam, |
| peak_bool | enable ) |
Enable/Disable the host chromatic adaption.
| [in] | hCam | The camera handle. |
| [in] | enable | The desired enabled status. PEAK_TRUE for enabled, PEAK_FALSE for disabled. |
hCam is an invalid camera handle. | 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.
| [in] | hCam | The camera handle. |