Please enable JavaScript to view this site.

IDS Software Suite - obsolete functions 4.97

Windows_Logo
Linux_Logo

USB 2.0

GigE

USB 2.0

GigE

Syntax

INT is_SetConvertParam (HIDS hCam, BOOL ColorCorrection, INT BayerConversionMode, INT ColorMode, INT Gamma, double* WhiteBalanceMultipliers)

Description

hint_info

This function is obsolete and should not be used anymore. We recommend to use the is_Convert() function instead.

Using is_SetConvertParam(), you can set the parameters for converting a raw Bayer image to a color image. To convert the image, use the is_ConvertImage() function.

Input parameters

hCam

Camera handle

ColorCorrection

Enables/disables color correction.

BayerConversionMode

Sets the Bayer conversion mode.

IS_SET_BAYER_CV_BETTER

Normal quality

IS_SET_BAYER_CV_BEST

Best quality (higher CPU load)

ColorMode

Sets the color mode for the output image.

For a list of all available color formats and the associated input parameters, see in the appendix of the uEye manual.

Gamma

Gamma value multiplied by 100. Range: [1…1000]

WhiteBalanceMultipliers

Pointer to an array containing the red, green and blue gain values

Return values

IS_INVALID_COLOR_FORMAT

Invalid color format

IS_INVALID_CAMERA_HANDLE

Invalid camera handle

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_SUCCESS

Function executed successfully

Related functions

is_ConvertImage()

is_SetColorMode()

is_SetColorConverter()

Example

Conversion of a raw Bayer image to RGB24. The memory is allocated automatically.

INT nRet;
char * pcSource;
INT nIDSource;
INT nX,nY,nBits,nPitch;
 
// Create raw Bayer test image
is_AllocImageMem (hCam, 256, 256, 8, &pcSource, &nIDSource);
is_InquireImageMem (hCam, pcSource, nIDSource, &nX ,&nY, &nBits, &nPitch);
for (int j = 0; j<nY; j++)
{
  for (int i = 0; i<nX; i++)
  {
      pcSource[i + j * nPitch] = i;
  }
}
 
// Define conversion parameters (example)
INT Gamma = 120;
double rgbGains[3];
rgbGains[0] = 1.0 ; // Red channel gain
rgbGains[1] = 3.0 ; // Green channel gain
rgbGains[2] = 1.0 ; // Blue channel gain
 
char* pcDest; // Pointer to the newly allocated image memory
INT nIDDest; // ID of the newly allocated image memory
 
 
// Set conversion parameters
nRet = is_SetConvertParam(hCam, TRUE, IS_SET_BAYER_CV_BETTER, IS_CM_RGB8_PACKED, Gamma, rgbGains);
 
// Convert image
if (nRet == IS_SUCCESS)
{
  pcDest = NULL;
  is_ConvertImage(hCam, pcSource, nIDSource, &pcDest, &nIDDest, 0);
}
 
// Release allocated image memory
is_FreeImageMem (hCam, pcSource, nIDSource);
is_FreeImageMem (hCam, pcDest, nIDDest);