Please enable JavaScript to view this site.

IDS Software Suite 4.96.1

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

With this function, you set the automatic controls for auto exposure shutter, auto gain, and black level. You can select between mean and peak mode for the auto control.

In mean mode, the average brightness and color rendering of the image is adjusted to the preset desired value. In peak mode, a reference ratio of pixels is specified in the image according to the selected mode to be controlled (e. g. at highest granularity of 0.01 … 20.00 %). If you want to use the mean mode, use the is_SetAutoParameter() function. For using the peak mode, use the is_AutoParameter() function.

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.

Content of the AES_CONFIGURATION structure

INT

nMode

Modes of the auto control:

IS_AES_MODE_PEAK: Peak mode

CHAR

pConfiguration[1]

See AES_PEAK_CONFIGURATION

Content of the AES_PEAK_CONFIGURATION structure

IS_RECT

rectUserAOI

Specifies the AOI to be used for analysis. If no AOI should be used, all values must be set to 0.

For details on the AOI grids of the individual camera models, please see Camera and sensor data.

UINT

nFrameSkip

Sets the number of frames to be skipped during automatic image control.

UINT

nHysteresis

Sets the hysteresis value. The hysteresis value must always be smaller than the target value of the auto control by 1 increment of the set granularity. An incorrect value is automatically adjusted.

UINT

nReference

Sets the brightness reference value for auto control.

UINT

nChannel

Sets the channels to be used for analysis:

IS_AES_CHANNEL_MONO

IS_AES_CHANNEL_RED

IS_AES_CHANNEL_GREEN

IS_AES_CHANNEL_BLUE

This parameter has no effect on monochrome color formats.

DOUBLE

f64Maximum

Sets the maximum exposure value for the control (0 = no limit)

DOUBLE

f64Minimum

Sets the minimum exposure value for the control (0 = no limit)

UINT

nMode

Sets the mode which is used for analysis:

IS_AES_CHANNEL_MODE_SELECTED_CHANNELS: controls to the target value of the color channel set by nChannel

IS_AES_CHANNEL_MODE_LEADING_CHANNEL: controls to the target value of the dominant color channel. The nChannel parameter is not taken into account in this mode.

IS_AES_PEAK_MODE_ACCUMULATED_CHANNELS: controls to target value of the sum for all color channels in saturation. The nChannel parameter is not taken into account in this mode.

UINT

nGranularity

Sets the granularity which is used for analysis:

IS_AES_GRANULARITY_PER_100 (in percent, that is, with increment 1)

IS_AES_GRANULARITY_PER_1000 (in per-thousand, that is, with increment 0.1)

IS_AES_GRANULARITY_PER_10000 (in 1/10 per-thousand, that is, with increment 0.01)

The granularity has an effect on the following values:

nHysteresis

nReference

rangeHysteresis (in the AES_PEAK_CONFIGURATION_RANGE structure)

rangeReference (in the AES_PEAK_CONFIGURATION_RANGE structure)

After the granularity has been set, the values for nHysteresis and nReference must be reset. If necessary, the value range should be retrieved newly (see AES_PEAK_CONFIGURATION_RANGE structure).

Examples for granularity, reference value, and hysteresis

Reference and hysteresis values should be specified with a accuracy in the percentage range:

nGranularity = IS_AES_GRANULARITY_PER_100

nHysteresis = 1 (1 %)

nReference = 10 (10 %)

Reference and hysteresis values should be specified with a accuracy in the per-thousand range:

nGranularity = IS_AES_GRANULARITY_PER_1000

nHysteresis = 15 (1.5 %)

nReference = 105 (10.5 %)

Reference and hysteresis values should be specified with a accuracy of 1/10 in the per-thousand range:

nGranularity = IS_AES_GRANULARITY_PER_10000

nHysteresis = 158 (1.58 %)

nReference = 1054 (10.54 %)

Content of the AES_PEAK_CONFIGURATION_RANGE structure

IS_RANGE_S32

rangeFrameSkip

Range for the number of frames to be skipped

IS_RANGE_S32

rangeHysteresis

Range of hysteresis value

IS_RANGE_S32

rangeReference

Range of brightness reference value

Example 1

/* Receive configuration */
UINT nSizeOfParam = sizeof(AES_CONFIGURATION) - sizeof(CHAR) + sizeof(AES_PEAK_CONFIGURATION);
CHAR *pBuffer = new char[nSizeOfParam];
memset(pBuffer, 0, nSizeOfParam);
 
AES_CONFIGURATION *pAesConfiguration = (AES_CONFIGURATION*)pBuffer;
pAesConfiguration->nMode = IS_AES_MODE_PEAK;
 
AES_PEAK_CONFIGURATION *pPeakConfiguration = (AES_PEAK_CONFIGURATION*)pAesConfiguration->pConfiguration;
 
INT nRet = 0;
nRet = is_AutoParameter(hCam, IS_AES_CMD_GET_CONFIGURATION, pAesConfiguration , nSizeOfParam);
 
/* set configuration */
nRet = is_AutoParameter(hCam, IS_AES_CMD_SET_CONFIGURATION, pAesConfiguration , nSizeOfParam);

Example 2

/* Enable */
INT nEnable = IS_AUTOPARAMETER_ENABLE;
is_AutoParameter(hCam, IS_AES_CMD_SET_ENABLE, &nEnable, sizeof(nEnable));
 
/* Disable*/
INT nEnable = IS_AUTOPARAMETER_DISABLE;
is_AutoParameter(hCam, IS_AES_CMD_SET_ENABLE, &nEnable, sizeof(nEnable));
 
/* Run Once*/
INT nEnable = IS_AUTOPARAMETER_ENABLE_RUNONCE;
is_AutoParameter(hCam, IS_AES_CMD_SET_ENABLE, &nEnable, sizeof(nEnable));
 
/* Get enable*/
INT nEnable;
is_AutoParameter(hCam, IS_AES_CMD_GET_ENABLE, &nEnable, sizeof(nEnable));

Example 3

/* Receive configuration */
UINT nSizeOfParam = sizeof(AES_CONFIGURATION) - sizeof(CHAR) + sizeof(AES_PEAK_CONFIGURATION);
CHAR *pBuffer = new char[nSizeOfParam];
memset(pBuffer, 0, nSizeOfParam);
 
AES_CONFIGURATION *pAesConfiguration = (AES_CONFIGURATION*)pBuffer;
pAesConfiguration->nMode = IS_AES_MODE_PEAK;
AES_PEAK_CONFIGURATION *pPeakConfiguration = (AES_PEAK_CONFIGURATION*)pAesConfiguration->pConfiguration;
 
INT nRet = 0;
nRet = is_AutoParameter(hCam, IS_AES_CMD_GET_CONFIGURATION_DEFAULT, pAesConfiguration, nSizeOfParam);

Example 4

/* Receive range */
UINT nSizeOfParam = sizeof(AES_CONFIGURATION) - sizeof(CHAR) + sizeof(AES_PEAK_CONFIGURATION_RANGE);
CHAR *pBuffer = new char[nSizeOfParam];
memset(pBuffer, 0, nSizeOfParam);
 
AES_CONFIGURATION *pAesConfiguration = (AES_CONFIGURATION*)pBuffer;
pAesConfiguration->nMode = IS_AES_MODE_PEAK;
AES_PEAK_CONFIGURATION_RANGE *pPeakConfigRange = (AES_PEAK_CONFIGURATION_RANGE*)pAesConfiguration->pConfiguration;
 
INT nRet = 0;
nRet = is_AutoParameter(hCam, IS_AES_CMD_GET_CONFIGURATION_RANGE, pAesConfiguration, nSizeOfParam);

Example 5

INT nSupported = 0;
INT nRet = 0;
nRet = is_AutoParameter(hCam, IS_AES_CMD_GET_SUPPORTED_TYPES, &nSupported, sizeof(nSupported));
 
if (nSupported & IS_AES_MODE_PEAK)
{

}

© 2022 IDS Imaging Development Systems GmbH