Please enable JavaScript to view this site.

IDS Software Suite 4.96.1

Navigation: C: Programming > Function descriptions > is_AutoParameter

Configuring the auto white balance

Scroll Previous Top Next More
Windows_Logo
Linux_Logo

USB 2.0

USB 3.x

GigE

USB 2.0

USB 3.x

GigE

Syntax

INT is_AutoParameter(HIDS hCam, UINT nCommand, void* pParam, UINT cbSizeOfParam)

Description

This functions enables/disables the auto white balance. With this function, you can require all supported types for white balance. In addition to the older white balance with the Gray-World algorithm, there is also a color temperature control according to Kelvin. In addition to the function the supported color spaces are queried and set.

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 cbSizeOfParam input parameter.

Input parameters

hCam

Camera handle

pParam

Pointer to a function parameter, whose function depends on nCommand.

cbSizeOfParam

Size (in bytes) of the memory area to which pParam refers.

Example 1

UINT nSupportedTypes = 0;
INT nRet = is_AutoParameter(m_hCam, IS_AWB_CMD_GET_SUPPORTED_TYPES, (void*)&nSupportedTypes,
                          sizeof(nSupportedTypes));
 
if (nRet == IS_SUCCESS)
{
  if ((nSupportedTypes & IS_AWB_COLOR_TEMPERATURE) != 0)
  {
      // AWB type "Color Temperature" is supported
  }
 
  if ((nSupportedTypes & IS_AWB_GREYWORLD) != 0)
  {
      // AWB type "Greyworld" is supported
  }
}

Example 2

UINT nType = 0;
 
// Read current type
INT nRet = is_AutoParameter(m_hCam, IS_AWB_CMD_GET_TYPE, (void*)&nType, sizeof(nType));
 
// Write new type
nType = IS_AWB_GREYWORLD;
nRet = is_AutoParameter(m_hCam, IS_AWB_CMD_SET_TYPE, (void*)&nType, sizeof(nType));

Example 3

// Is AWB enabled?
UINT nEnable;
INT nRet = is_AutoParameter(m_hCam, IS_AWB_CMD_GET_ENABLE, (void*)&nEnable, sizeof(nEnable));
 
// Enable AWB (once)
nEnable = IS_AUTOPARAMETER_ENABLE_RUNONCE;
nRet = is_AutoParameter(m_hCam, IS_AWB_CMD_SET_ENABLE, (void*)&nEnable, sizeof(nEnable));

Example 4

// Choose the auto color mode to get the supported color models for this mode
// See ueye.h for auto color mode defines
INT nSupported = IS_AWB_COLOR_TEMPERATURE;
 
if (IS_SUCCESS == is_AutoParameter(m_hCam, IS_AWB_CMD_GET_SUPPORTED_RGB_COLOR_MODELS,
                                  (void*)&nSupported, sizeof(nSupported)))
{
if ((nSupported & RGB_COLOR_MODEL_SRGB_D50) != 0)
{
  // Color model SRGB D50 is supported. See uEye.h for color model defines
}
}

Example 5

UINT nRGBColorModel = 0;
INT nRet = is_AutoParameter(m_hCam, IS_AWB_CMD_GET_RGB_COLOR_MODEL, (void*)&nRGBColorModel,
                          sizeof(nRGBColorModel)                           );
 
nRGBColorModel = RGB_COLOR_MODEL_CIE_RGB_E;
 
nRet = is_AutoParameter(m_hCam, IS_AWB_CMD_SET_RGB_COLOR_MODEL, (void*)&nRGBColorModel,
                      sizeof(nRGBColorModel));

© 2022 IDS Imaging Development Systems GmbH