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

is_SetHWGainFactor

uEye Camera Manual Version 3.80

is_SetHWGainFactor

Windows_Logo

Linux_Logo

USB 2.0

GigE

USB 2.0

GigE

Syntax

INT is_SetHWGainFactor (HIDS hCam, INT nMode, INT nFactor)

Description

is_SetHWGainFactor() uses gain factors to control sensor gain channels. These channels can be set independently of each other. The is_SetHardwareGain() does not use factors for setting the gain channels, but standardized values between 0 and 100. The actual gain factor is sensor-dependent and can be found in Camera and Sensor Data chapter.

You can use the is_GetSensorInfo() function to query the available gain controls.
Depending on the time when the gain settings are changed, these changes might only become effective when the next image is captured.

Input Parameters

hCam

Camera handle

nMode


IS_GET_MASTER_GAIN_FACTOR

Returns the master gain factor.

IS_GET_RED_GAIN_FACTOR

Returns the red channel gain factor.

IS_GET_GREEN_GAIN_FACTOR

Returns the green channel gain factor.

IS_GET_BLUE_GAIN_FACTOR

Returns the blue channel gain factor.

IS_SET_MASTER_GAIN_FACTOR

Sets the master gain factor.

IS_SET_RED_GAIN_FACTOR

Sets the red channel gain factor.

IS_SET_GREEN_GAIN_FACTOR

Sets the green channel gain factor.

IS_SET_BLUE_GAIN_FACTOR

Sets the blue channel gain factor.

IS_GET_DEFAULT_MASTER_GAIN_FACTOR

Returns the default master gain factor.

IS_GET_DEFAULT_RED_GAIN_FACTOR

Returns the default red channel gain factor.

IS_GET_DEFAULT_GREEN_GAIN_FACTOR

Returns the default green channel gain factor.

IS_GET_DEFAULT_BLUE_GAIN_FACTOR

Returns the default blue channel gain factor.

IS_INQUIRE_MASTER_GAIN_FACTOR

Converts the index value for the master gain factor.

IS_INQUIRE_RED_GAIN_FACTOR

Converts the index value for the red channel gain factor.

IS_INQUIRE_GREEN_GAIN_FACTOR

Converts the index value for the green channel gain factor.

IS_INQUIRE_BLUE_GAIN_FACTOR

Converts the index value for the blue channel gain factor.

nFactor

Gain value (100 = gain factor 1, i. e. no effect)

 

For converting a gain value from the is_SetHardwareGain() function, you can set the nMode parameter to one of the IS_INQUIRE_x_FACTOR values. In this case, the value range for nFactor is between 0 and 100.
To set the gain using IS_SET_..._GAIN_FACTOR, you must set the nFactor parameter to an integer value in the range from 100 to the maximum value. By calling IS_INQUIRE_x_FACTOR and specifying the value 100 for nFactor, you can query the maximum value. A gain value of 100 means no gain, a gain value of 200 means gain to the double level (factor 2), etc.

Return Values

IS_SUCCESS

Function executed successfully

IS_NO_SUCCESS

General error message

Current setting when used together with
IS_GET_MASTER_GAIN_FACTOR
IS_GET_RED_GAIN_FACTOR
IS_GET_GREEN_GAIN_FACTOR
IS_GET_BLUE_GAIN_FACTOR


Defined setting when used together with
IS_SET_MASTER_GAIN_FACTOR
IS_SET_RED_GAIN_FACTOR
IS_SET_GREEN_GAIN_FACTOR
IS_SET_BLUE_GAIN_FACTOR.


Default setting when used together with
IS_GET_DEFAULT_MASTER_GAIN_FACTOR
IS_GET_DEFAULT_RED_GAIN_FACTOR
IS_GET_DEFAULT_GREEN_GAIN_FACTOR
IS_GET_DEFAULT_BLUE_GAIN_FACTOR.


When used together with
IS_INQUIRE_MASTER_GAIN_FACTOR
IS_INQUIRE_RED_GAIN_FACTOR
IS_INQUIRE_GREEN_GAIN_FACTOR
IS_INQUIRE_BLUE_GAIN_FACTOR.

Converted gain index

Related Functions

is_SetHardwareGain()
is_SetHardwareGamma()
is_SetGainBoost()
is_SetAutoParameter()
is_GetSensorInfo()

Code Sample

//Set master gain factor to 3.57:

INT ret = is_SetHWGainFactor (hCam, IS_SET_MASTER_GAIN_FACTOR, 357);

//ret has the value 363 for the UI-1460-C

 

//Query the maximum gain factor for the red channel:

ret = is_SetHWGainFactor (hCam, IS_INQUIRE_RED_GAIN_FACTOR, 100);

//ret has the value 725 for the UI-1460-C


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