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

IDSEXP is_Convert(HIDS hCam, UINT nCommand, void* pParam, UINT cbSizeOfParam)

Description

is_Convert() is a general function to convert a raw Bayer image to the desired format. You can set all parameters, which are important for software conversion:

Pixel format

Pixel converter (3×3, 5×5)

Color correction

Gamma

Saturation

Edge enhancement

The target buffer must be allocated with the is_AllocImageMem() function and must have the right size.

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.

Contents of the BUFFER_CONVERSION_PARAMS structure

char*

pSourceBuffer

Pointer to the raw Bayer buffer which was created with the is_AllocImageMem() function.

char*

pDestBuffer

Pointer to the target buffer with the converted data which was created with the is_AllocImageMem() function.

INT

nDestPixelFormat

Color mode of the target image; see is_SetColorMode() for the possible modes

INT

nDestPixelConverter

Conversion mode of the target image; see is_SetColorConverter() for the possible modes

INT

nDestGamma

Sets the gamma correction, see is_Gamma()

INT

nDestEdgeEnhancement

Sets the edge enhancement, see is_EdgeEnhancement()

INT

nDestColorCorrectionMode

Sets the color correction, see is_SetColorCorrection()

INT

nDestSaturationU

Sets the color saturation (saturation U), see is_SetSaturation()

INT

nDestSaturationV

Sets the color saturation (saturation V),see is_SetSaturation()

BYTE

reserved[32]

reserved

Return value

IS_INVALID_BUFFER_SIZE

The image memory has an inappropriate size to store the image in the desired format.

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

Related functions

is_SetColorMode()

is_SetColorConverter()

Example

BUFFER_CONVERSION_PARAMS conversionParams;
 
conversionParams.nDestPixelFormat               = IS_CM_BGRA8_PACKED;
conversionParams.nDestPixelConverter           = IS_CONV_MODE_SOFTWARE_3X3;
conversionParams.nDestColorCorrectionMode       = IS_CCOR_DISABLE;
conversionParams.nDestGamma                     = 100;
conversionParams.nDestSaturationU               = 100;
conversionParams.nDestSaturationV               = 100;
conversionParams.nDestEdgeEnhancement           = 0;
 
conversionParams.pSourceBuffer                 = pSourceBuffer;
conversionParams.pDestBuffer                   = pDestBuffer;
 
INT nRet = is_Convert(m_hCam, IS_CONVERT_CMD_APPLY_PARAMS_AND_CONVERT_BUFFER,
                    (void*)&conversionParams, sizeof(conversionParams));

© 2022 IDS Imaging Development Systems GmbH