USB 2.0 USB 3.x GigE |
USB 2.0 USB 3.x GigE |
Syntax
INT is_ColorTemperature (HIDS hCam, UINT nCommand, void *pParam, UINT nSizeOfParam)
Description
Using is_ColorTemperature() you can fix a setting (in kelvins) for the color temperature of an image when you are using a color camera. The function will use the sensor's hardware gain controls for the setting, as far as possible. In addition, you can choose between different color spaces. A specific color temperature will result in slightly differing RGB values, depending on the selected color space.
Additionally you can set or return the color temperature for the UI-1007XS lens correction.
Note that the current LUT values are calculated at the first function call of is_ColorTemperature(). Depending on the system used, the first function call may take a little longer. |
The nCommand input parameter is used to select the function mode. The pParam input parameter depends on the selected function mode. If you select functions for setting or returning a value, pParam contains a pointer to a variable of the UINT type. The size of the memory area to which pParam refers is specified in the nSizeOfParam input parameter.
The color temperature is the temperature to which a black body radiator has to be heated to glow and give off light in the corresponding color. Warm light (reddish) has a lower color temperature than cold light (bluish). The following table lists a few example values:
Light source |
Color temperature |
---|---|
Light bulb (100 W) |
2800 |
Halogen lamp |
3200 |
Fluorescent lamp (cold white) |
4000 |
Morning and evening sunlight |
5000 |
Noon sunlight |
5500-5800 |
Flash strobe |
6000 |
Overcast daylight |
6500-7500 |
Fog |
8000 |
The is_ColorTemperature() function cannot be used simultaneously with the automatic white balance function in is_SetAutoParameter()/is_AutoParameter(). |
Input parameters
hCam |
Camera handle |
pParam |
Pointer to a function parameter, whose function depends on nCommand. |
nSizeOfParam |
Size (in bytes) of the memory area to which pParam refers. |
RGB_COLOR_MODEL_SRGB_D50 |
sRGB (standard RGB) color space with a white point of 5000 kelvins (warm light) |
RGB_COLOR_MODEL_SRGB_D65 |
sRGB (standard RGB) color space with a white point of 6500 kelvins (mid daylight) |
RGB_COLOR_MODEL_CIE_RGB_E |
CIE-RGB color space with standard illumination E |
RGB_COLOR_MODEL_ECI_RGB_D50 |
ECI-RGB color space with a white point of 5000 kelvins (warm light) |
RGB_COLOR_MODEL_ADOBE_RGB_D65 |
Adobe RGB color space with a white point of 6500 kelvins (mid daylight). The Adobe RGB color space is larger than the sRGB color space, but not all devices can render it. |
Return values
IS_INVALID_CAMERA_HANDLE |
Invalid camera handle |
IS_INVALID_PARAMETER |
One of the submitted parameters is outside the valid range or is not supported for this sensor or is not available in this mode. |
IS_NO_SUCCESS |
General error message |
IS_NOT_SUPPORTED |
The camera model used here does not support this function or setting. |
IS_SUCCESS |
Function executed successfully |
Related functions
// set new lens correction
IS_U32 u32LscModel = LSC_MODEL_D50;
is_ColorTemperature(hCam, COLOR_TEMPERATURE_CMD_SET_LENS_SHADING_MODEL, (void*)&u32LscModel, sizeof(u32LscModel));
// get current lens correction
IS_U32 u32LscModel = 0;
is_ColorTemperature(hCam, COLOR_TEMPERATURE_CMD_GET_LENS_SHADING_MODEL, (void*)&u32LscModel, sizeof(u32LscModel));
if (u32LscModel == LSC_MODEL_TL84){
...
}
// get supported lens correction
IS_U32 u32LscModel = 0;
is_ColorTemperature(hCam, COLOR_TEMPERATURE_CMD_GET_LENS_SHADING_MODEL_SUPPORTED, (void*)&u32LscModel, sizeof(u32LscModel));
if ((u32LscModel & LSC_MODEL_TL84) == LSC_MODEL_TL84){
// LSC_MODEL_TL84 supported....
...
}