Home > C: Programming > Function Descriptions > History back  Previous chapter  Next chapter  Print  

is_SetAutoParameter

uEye Camera Manual Version 3.80

is_SetAutoParameter

Windows_Logo

Linux_Logo

USB 2.0

GigE

USB 2.0

GigE

Syntax

INT is_SetAutoParameter (HIDS hCam,
INT param,
double* pval1, double* pval2)

Description

Using is_SetAutoParameter(), you can control the automatic gain, exposure shutter, frame rate and white balance control values. For HDR camera models UI-112x / UI-512x, you can use the IS_SET_ENABLE_AUTO_GAIN parameter to enable automatic white level adjustment (see also UI-112x / UI-512x Application Notes)

For further information on automatic control, please refer to the Automatic Image Control chapter.

Hinweis

Control is only active as long as the camera is capturing images.
A manual change of the exposure time and gain settings disables the auto functions.
When the auto exposure shutter function is enabled, you cannot modify the pixel clock frequency.
The auto frame rate function is only available when the auto shutter control is on. Auto frame rate and auto gain control cannot be used simultaneously.
The auto gain function can only be used for cameras with master gain control. Auto white balance is only available for cameras with hardware RGB gain control.
The sensor's internal auto features are only supported by the sensors of the following camera models.
Please also read the notes on using these sensors.
oUI-112x / UI-512x (HDR sensor)
oUI-1008XS (uEye XS)
The following functions are currently only supported by the USB uEye XS:
Sensor's internal white balance, photometry, auto contrast correction, backlight compensation, and anti flicker mode (see Automatic Image Control).

Hinweis

Notes on models with HDR sensor

In the UI-112x / UI-512x models with HDR sensor, some auto features have a different functionality or are not available:

The HDR sensor has no gain. The AUTO_GAIN / AUTO_SENSOR_GAIN parameters control the white level adjustment (see UI-112x / UI-512x Application Notes chapter).
The AUTO_SHUTTER / AUTO_SENSOR_SHUTTER, AUTO_FRAMERATE / AUTO_SENSOR_FRAMERATE and AUTO_SENSOR_WHITEBALANCE parameters are not available for this sensor.

Achtung

Notes on the sensor's internal control functionality

Automatic control by the sensor and the software is not possible simultaneously. To use the sensor's internal control functionality, disable software control, and vice versa.

Achtung

Notes on the USB uEye XS

The auto contrast correction and backlight compensation functions cannot be used simultaneously.
When the anti flicker function is active, the auto exposure shutter settings must not be changed.

Achtung

Note on automatic controls when using very high frame rates

Using very high frame rates can cause that too many control commands are sent to the camera. When using frame rates higher than 100 fps you should increase the value for IS_SET_AUTO_SKIPFRAMES. Thus, less image will be used for the automatic controls which takes load off the camera.

Input Parameters

hCam

Camera handle

param

Configure auto function

hmtoggle_plus1 Enabling Auto functions and querying the status

IS_SET_ENABLE_AUTO_GAIN

Enables/disables the auto gain control function or, in case of HDR sensors, the white level adjustment. Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_ENABLE_AUTO_GAIN

Returns the current auto gain setting or white level adjustment. Control parameters

pval1

returns the current setting

IS_SET_ENABLE_AUTO_SENSOR_GAIN

Enables/disables the internal auto gain control function or, in case of HDR sensors, the white level adjustment of the sensor *). Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_ENABLE_AUTO_SENSOR_GAIN

Returns the current auto gain setting or white level adjustment of the sensor *). Control parameters

pval1

returns the current setting

IS_SET_ENABLE_AUTO_SHUTTER

Enables/disables the auto exposure shutter function. Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_ENABLE_AUTO_SHUTTER

Returns the current auto exposure shutter setting. Control parameters

pval1

returns the current setting

IS_SET_ENABLE_AUTO_SENSOR_SHUTTER

Enables/disables the sensor's internal auto exposure shutter function *). Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_ENABLE_AUTO_SENSOR_SHUTTER

Returns the sensor's current auto exposure shutter setting *). Control parameters

pval1

returns the current setting

IS_SET_ENABLE_AUTO_WHITEBALANCE

Enables/disables the auto white balance function. Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_ENABLE_AUTO_WHITEBALANCE

Returns the current auto white balance setting. Control parameters

pval1

returns the current setting

IS_SET_ENABLE_AUTO_SENSOR_WHITEBALANCE

Enables/disables the sensor's internal auto white balance function *). Control parameters

pval1

white balance mode (see is_GetAutoInfo()):

WB_MODE_DISABLE

WB_MODE_AUTO

WB_MODE_ALL_PULLIN

WB_MODE_INCANDESCENT_LAMP

WB_MODE_FLUORESCENT_DL

WB_MODE_OUTDOOR_CLEAR_SKY

WB_MODE_OUTDOOR_CLOUDY

IS_GET_ENABLE_AUTO_SENSOR_WHITEBALANCE

Returns the sensor's current auto white balance setting *).

Control parameters

pval1

returns the current setting

IS_SET_ENABLE_AUTO_FRAMERATE

Enables/disables the auto frame rate function. Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_ENABLE_AUTO_FRAMERATE

Returns the current auto frame rate setting. Control parameters

pval1

returns the current setting

IS_SET_ENABLE_AUTO_SENSOR_FRAMERATE

Enables/disables the sensor's internal auto frame rate function *). Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_ENABLE_AUTO_SENSOR_FRAMERATE

Returns the sensor's current auto frame rate setting *). Control parameters

pval1

returns the current setting

hmtoggle_plus1 Adjusting Auto Gain Control/Auto Exposure Shutter

IS_SET_AUTO_REFERENCE

Sets the setpoint for auto gain control/auto exposure shutter. Control parameters

pval1

defines the setpoint (average brightness of the image); the following rule applies independently of the image bit depth:

0 = black
128 = 50% gray (default)
255 = white

Note on the sensor's internal control functionality

When using the sensor's internal control functionality, you can only used values in a range between [44...235]. The increment in this range is 4. Smaller values are automatically set to 44, larger values to 235.

IS_GET_AUTO_REFERENCE

Returns the setpoint for auto gain control/auto exposure shutter. Control parameters

pval1

returns the current setting

IS_SET_AUTO_GAIN_MAX

Sets the upper limit for auto gain control. Control parameters

pval1

valid value for gain (0...100)

IS_GET_AUTO_GAIN_MAX

Returns the upper limit for auto gain control. Control parameters

pval1

returns the current setting

IS_SET_AUTO_SHUTTER_MAX

Sets the upper limit for auto exposure shutter. Control parameters

pval1

valid exposure value (0 sets the value continuously to max. exposure)

IS_GET_AUTO_SHUTTER_MAX

Returns the upper limit for auto exposure shutter. Control parameters

pval1

returns the current setting

IS_SET_AUTO_BRIGHTNESS_ONCE

Enables/disables the automatic disable for automatic brightness control (gain and exposure time) **). Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_AUTO_BRIGHTNESS_ONCE

Returns the automatic disable status **). Control parameters

pval1

returns the current setting

Speed and Hysteresis

IS_SET_AUTO_SPEED

Sets the speed value for the auto function. Control parameters

pval1

defines the control speed (0...100)

IS_GET_AUTO_SPEED

Returns the speed value for the auto function. Control parameters

pval1

returns the current setting

IS_SET_AUTO_SKIPFRAMES

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

pval1

defines the number of frames to be skipped during automatic control (default: 4)

IS_GET_AUTO_SKIPFRAMES

Returns the number of frames to be skipped during automatic control. Control parameters

pval1

returns the current setting

IS_GET_AUTO_SKIPFRAMES_RANGE

Returns the permissible range for the number of frames to be skipped. Control parameters

pval1

returns the minimum permitted value

pval2

returns the maximum permitted value

IS_SET_AUTO_HYSTERESIS

Sets the hysteresis value for auto exposure shutter and auto gain control. Control parameters

pval1

defines the hysteresis value (default: 2)

IS_GET_AUTO_HYSTERESIS

Returns the hysteresis value for auto exposure shutter and auto gain control. Control parameters

pval1

returns the current setting

IS_GET_AUTO_HYSTERESIS_RANGE

Returns the permissible range for the hysteresis value. Control parameters

pval1

returns the minimum permitted value

pval2

returns the maximum permitted value

Auto Contrast Correction (with face detection) / Backlight Compensation / Anti Flicker (USB uEye XS only)

IS_SET_SENS_AUTO_CONTRAST_CORRECTION

Sets the value for auto contrast correction. Control parameters

pval1

EV value

IS_GET_SENS_AUTO_CONTRAST_CORRECTION

Returns the value for auto contrast correction. Control parameters

pval1

returns the current setting

IS_GET_SENS_AUTO_CONTRAST_CORRECTION_RANGE

Returns the permissible range for auto contrast correction. Control parameters

pval1

returns the minimum permitted value

pval2

returns the maximum permitted value

IS_GET_SENS_AUTO_CONTRAST_CORRECTION_INC

Returns the increment for auto contrast correction. Control parameters

pval1

returns the increment

IS_GET_SENS_AUTO_CONTRAST_CORRECTION_DEF

Returns the default value for auto contrast correction. Control parameters

pval1

returns the default

IS_SET_SENS_AUTO_CONTRAST_FDT_AOI_ENABLE

Enables the use of face detection as field of view for automatic brightness control. If face detection is disabled, this setting will not become effective until face detection is enabled. The auto exposure shutter and auto gain control functions have to be enabled. Control parameters

pval1

= 1 enables, 0 disables the function

IS_GET_SENS_AUTO_CONTRAST_FDT_AOI_ENABLE

Returns the status of using face detection as field of view for automatic brightness control. Control parameters

pval1

returns the current setting

IS_SET_SENS_AUTO_BACKLIGHT_COMP

Enables backlight compensation for automatic brightness control. Control parameters

pval1

= 1 enables, 0 disables the function

IS_GET_SENS_AUTO_BACKLIGHT_COMP

Returns the backlight compensation status. Control parameters

pval1

returns the current setting

IS_SET_ANTI_FLICKER_MODE

Sets the anti flicker mode. Control parameters

pval1

Anti flicker mode (see is_GetAutoInfo()):

ANTIFLCK_MODE_OFF

ANTIFLCK_MODE_SENS_AUTO

ANTIFLCK_MODE_SENS_50_FIXED

ANTIFLCK_MODE_SENS_60_FIXED

IS_GET_ANTI_FLICKER_MODE

Returns the anti flicker mode. Control parameters

pval1

returns the current mode.

IS_GET_ANTI_FLICKER_MODE_DEF

Returns the default anti flicker mode. Control parameters

pval1

returns the default

hmtoggle_plus1 Photometric settings for Auto Gain Control/Auto Exposure Shutter

IS_SET_SENS_AUTO_SHUTTER_PHOTOM

Sets the photometry mode for auto exposure shutter. Control parameters

pval1

defines which fields of view are used for auto exposure shutter (see is_GetAutoInfo()):

AS_PM_NONE

AS_PM_SENS_CENTER_WEIGHTED

AS_PM_SENS_CENTER_SPOT

AS_PM_SENS_PORTRAIT

AS_PM_SENS_LANDSCAPE

IS_GET_SENS_AUTO_SHUTTER_PHOTOM

Returns the photometry mode for auto exposure shutter. Control parameters

pval1

returns the current setting

IS_GET_SENS_AUTO_SHUTTER_PHOTOM_DEF

Returns the default photometry mode for auto exposure shutter. Control parameters

pval1

returns the default

IS_SET_SENS_AUTO_GAIN_PHOTOM

Sets the photometry mode for auto gain control. Control parameters

pval1

defines which fields of view are used for auto gain control (see is_GetAutoInfo()):

AG_PM_NONE

AG_PM_SENS_CENTER_WEIGHTED

AG_PM_SENS_CENTER_SPOT

AG_PM_SENS_PORTRAIT

AG_PM_SENS_LANDSCAPE

IS_GET_SENS_AUTO_GAIN_PHOTOM

Returns the photometry mode for auto gain control. Control parameters

pval1

returns the current setting

IS_GET_SENS_AUTO_GAIN_PHOTOM_DEF

Returns the default photometry mode for auto gain control. Control parameters

pval1

returns the default

hmtoggle_plus1 Adjusting Auto White Balance

IS_SET_AUTO_WB_OFFSET

Sets the offset values for the red and blue channels. Control parameters

pval1

defines the red level offset (-50...50)

pval2

defines the blue level offset (-50...50)

IS_GET_AUTO_WB_OFFSET

Returns the offset values for the red and blue channels. Control parameters

pval1

returns the red level offset (-50...50)

pval2

returns the blue level offset (-50...50)

IS_SET_AUTO_WB_GAIN_RANGE

Sets the color gain limits for auto white balance. Control parameters

pval1

sets the lowest gain value

pval2

sets the highest gain value

IS_GET_AUTO_WB_GAIN_RANGE

Returns the color gain limits for auto white balance. Control parameters

pval1

returns the minimum permitted gain value

pval2

returns the maximum permitted gain value

IS_SET_AUTO_WB_ONCE

Sets automatic disabling of auto white balance **). Control parameters

pval1

= 1 enables control, 0 disables control

IS_GET_AUTO_WB_ONCE

Returns the automatic disable status **).

Control parameters

pval1

returns the current setting

Speed and Hysteresis

IS_SET_AUTO_WB_SPEED

Sets the speed for auto white balance. Control parameters

pval1

defines the control speed (0...100)

IS_GET_AUTO_WB_SPEED

Returns the speed for auto white balance. Control parameters

pval1

returns the current setting

IS_SET_AUTO_WB_HYSTERESIS

Sets the hysteresis value for auto white balance. Control parameters

pval1

defines the hysteresis value (default: 2)

IS_GET_AUTO_WB_HYSTERESIS

Returns the hysteresis value for auto white balance. Control parameters

pval1

returns the current setting

IS_GET_AUTO_WB_HYSTERESIS_RANGE

Returns the permissible range for the hysteresis value. Control parameters

pval1

returns the minimum permitted value

pval2

returns the maximum permitted value

IS_SET_AUTO_WB_SKIPFRAMES

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

pval1

defines the number (default: 4)

IS_GET_AUTO_WB_SKIPFRAMES

Returns the number of frames to be skipped during automatic control. Control parameters

pval1

returns the current setting

IS_GET_AUTO_WB_SKIPFRAMES_RANGE

Returns the permissible range for the number of frames to be skipped. Control parameters

pval1

returns the minimum permitted value

pval2

returns the maximum permitted value

hmtoggle_plus1 Default values for Auto Gain Control/Auto Exposure Shutter

NULL is passed for the pval1, pval2 parameters.

IS_DEFAULT_AUTO_BRIGHT_REFERENCE

Default setpoint for auto gain control and auto exposure shutter.

IS_MIN_AUTO_BRIGHT_REFERENCE

Minimum setpoint for auto gain control and auto exposure shutter.

IS_MAX_AUTO_BRIGHT_REFERENCE

Maximum setpoint for auto gain control and auto exposure shutter.

IS_DEFAULT_AUTO_SPEED

Default value for auto speed.

IS_MAX_AUTO_SPEED

Maximum value for auto speed

hmtoggle_plus1 Default values for Auto White Balance

NULL is passed for the pval1, pval2 parameters.

IS_DEFAULT_WB_OFFSET

Default value for auto white balance offset.

IS_MIN_WB_OFFSET

Minimum value for auto white balance offset.

IS_MAX_WB_OFFSET

Maximum value for auto white balance offset.

IS_DEFAULT_AUTO_WB_SPEED

Default value for auto white balance speed.

IS_MIN_AUTO_WB_SPEED

Minimum value for auto white balance speed.

IS_MAX_AUTO_WB_SPEED

Maximum value for auto white balance speed.

pval1

Control parameter, can have a variable value depending on the corresponding auto function

pval2

Control parameter, can have a variable value depending on the corresponding auto function

*) Not all sensors support this feature (see information box)

**) Not with use of sensor's internal control functionality

Return Values

IS_SUCCESS

Function executed successfully

IS_NO_SUCCESS

General error message

IS_NOT_SUPPORTED

This function is not supported by the current camera

Related Functions

is_GetAutoInfo()
is_SetHardwareGain()
is_SetHWGainFactor()
is_SetExposureTime()
is_SetFrameRate()
is_SetAOI()

Code Samples


//Enable auto gain control:

double dEnable = 1;

int ret = is_SetAutoParameter (hCam, IS_SET_ENABLE_AUTO_GAIN, &dEnable, 0);

 

//Set brightness setpoint to 128:

double nominal = 128;

int ret = is_SetAutoParameter (hCam, IS_SET_AUTO_REFERENCE, &nominal, 0);

 

//Return shutter control limit:

double maxShutter;

int ret = is_SetAutoParameter (hCam, IS_GET_AUTO_SHUTTER_MAX, &maxShutter, 0);


Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!


© 2010 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com