is_Blacklevel

uEye Camera Manual Version 4.92


is_Blacklevel

Windows_Logo
Linux_Logo

USB 2.0

USB 3.0

GigE

USB 2.0

USB 3.0

GigE

Syntax

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

Description

is_Blacklevel() controls the black level correction of the camera which might improve the image quality under certain circumstances. By default, the sensor adjusts the black level value for each pixel automatically. If the environment is very bright, it can be necessary to adjust the black level manually.

UI-112x/UI-512x: On models with HDR sensor the is_Blacklevel() function controls the black level when a contrast adjustment is performed.

Fig. 211: Black level correction - Auto

Fig. 211: Black level correction - Auto

Fig. 212: Black level correction - Auto + offset

Fig. 212: Black level correction - Auto + offset

Fig. 213: Black level correction with offset only

Fig. 213: Black level correction with offset only

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.

Return values

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

Example 1

INT nBlacklevelCaps;

 

nRet = is_Blacklevel(hCam, IS_BLACKLEVEL_CMD_GET_CAPS,

                  (void*)&nBlacklevelCaps, sizeof(nBlacklevelCaps));

if (nRet == IS_SUCCESS) {

 

// The user can changed the state of the auto blacklevel

BOOL bSetAutoBlacklevel = (nBlacklevelCaps & IS_BLACKLEVEL_CAP_SET_AUTO_BLACKLEVEL) != 0;

 

// The user can change the offset

BOOL bSetBlacklevelOffset = (nBlacklevelCaps & IS_BLACKLEVEL_CAP_SET_OFFSET) != 0;

}

Example 2

INT nMode = IS_AUTO_BLACKLEVEL_OFF;

 

// Get default blacklevel mode

INT nRet = is_Blacklevel(hCam, IS_BLACKLEVEL_CMD_GET_MODE_DEFAULT, (void*)&nMode, sizeof(nMode));

 

// Get current blacklevel mode

nRet = is_Blacklevel(hCam, IS_BLACKLEVEL_CMD_GET_MODE, (void*)&nMode, sizeof(nMode));

 

// Set new mode (enable auto blacklevel)

nMode = IS_AUTO_BLACKLEVEL_ON;

nRet = is_Blacklevel(hCam, IS_BLACKLEVEL_CMD_SET_MODE, (void*)&nMode , sizeof(nMode ));

Example 3

INT nOffset = 0;

 

// Get default blacklevel offset

INT nRet = is_Blacklevel(hCam, IS_BLACKLEVEL_CMD_GET_OFFSET_DEFAULT,

                        (void*)&nOffset, sizeof(nOffset));

 

// Get offset range

IS_RANGE_S32 nRange;

nRet = is_Blacklevel(hCam, IS_BLACKLEVEL_CMD_GET_OFFSET_RANGE, (void*)&nRange, sizeof(nRange));

INT nOffsetMin = nRange.s32Min;

INT nOffsetMax = nRange.s32Max;

INT nOffsetInc = nRange.s32Inc;

 

// Get current blacklevel offset

nRet = is_Blacklevel(hCam, IS_BLACKLEVEL_CMD_GET_OFFSET, (void*)&nOffset, sizeof(nOffset));

 

// Set new offset

nOffset = 100;

nRet = is_Blacklevel(hCam, IS_BLACKLEVEL_CMD_SET_OFFSET, (void*)&nOffset, sizeof(nOffset));

Suggestion for improvement? Send us your short Feedback on this chapter. Thank you very much!
For technical questions please contact your local distributor or use the support form on our website.


© 2019 IDS Imaging Development Systems GmbH
https://en.ids-imaging.com