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

is_HotPixel

uEye Camera Manual Version 3.80

is_HotPixel

Windows_Logo

Linux_Logo

USB 2.0

GigE

USB 2.0

GigE

Syntax

INT is_HotPixel (HIDS hCam, UINT nCommand, void* pParam, UINT nSizeOfParam)

Description

is_HotPixel() configures the correction of sensor hot pixels. The correction is performed by the software. The hot pixel list is stored in the camera's non-volatile EEPROM. Some sensor models can also correct hot pixels directly in the sensor.

For further information on hot pixel correction, please refer to Basics: Sensor: Hot Pixels.

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 nSizeOfParam input parameter.

Achtung

This correction will not work with subsampling or with binning factors greater than 2.

Hinweis

Note on previous hot pixel functions

The is_HotPixel() function comprises all hot pixel correction functions. The following uEye API commands are therefore obsolete:

is_SetBadPixelCorrection()
is_SetBadPixelCorrectionTable()
is_LoadBadPixelCorrectionTable()
is_SaveBadPixelCorrectionTable()

See also Obsolete Functions.

Input Parameters

hCam

Camera handle

nCommand

 

IS_HOTPIXEL_DISABLE_CORRECTION

Disables hot pixel correction.

Code sample

IS_HOTPIXEL_ENABLE_CAMERA_CORRECTION

Enables hot pixel correction using the hot pixel list(s) stored in the camera EEPROM.

IS_HOTPIXEL_ENABLE_SOFTWARE_USER_CORRECTION

Enables hot pixel correction using the user's hot pixel list stored in the computer.

IS_HOTPIXEL_ENABLE_SENSOR_CORRECTION

Enables sensor's own hot pixel correction function (if available).

IS_HOTPIXEL_DISABLE_SENSOR_CORRECTION

Disables the sensor's own hot pixel correction function.

IS_HOTPIXEL_GET_CORRECTION_MODE

Returns the currently set hot pixel correction mode.

Code sample

IS_HOTPIXEL_GET_SUPPORTED_CORRECTION_MODES

Returns the supported hot pixel correction modes.

IS_HOTPIXEL_GET_SOFTWARE_USER_LIST_EXISTS

Indicates whether the user-defined hot pixel list exists in the computer.

Code sample

IS_HOTPIXEL_GET_SOFTWARE_USER_LIST_NUMBER

Returns the number of hot pixels in the user-defined hot pixel list stored in the computer.

IS_HOTPIXEL_GET_SOFTWARE_USER_LIST

Returns the user-defined hot pixel list stored in the computer.

IS_HOTPIXEL_SET_SOFTWARE_USER_LIST

Sets the user-defined hot pixel list that is stored in the computer.

IS_HOTPIXEL_SAVE_SOFTWARE_USER_LIST

Saves the user-defined hot pixel list to a file in the computer.

Code sample

IS_HOTPIXEL_LOAD_SOFTWARE_USER_LIST

Loads the user-defined hot pixel list from a file.

IS_HOTPIXEL_GET_CAMERA_FACTORY_LIST_EXISTS

Indicates whether the factory-set hot pixel list exists.

IS_HOTPIXEL_GET_CAMERA_FACTORY_LIST_NUMBER

Returns the number of hot pixels in the factory-set hot pixel list.

IS_HOTPIXEL_GET_CAMERA_FACTORY_LIST

Returns the factory-set hot pixel list.

IS_HOTPIXEL_GET_CAMERA_USER_LIST_EXISTS

Indicates whether the user-defined hot pixel list exists in the camera EEPROM.

IS_HOTPIXEL_GET_CAMERA_USER_LIST_NUMBER

Returns the number of hot pixels in the user-defined hot pixel list stored in the camera EEPROM.

IS_HOTPIXEL_GET_CAMERA_USER_LIST

Returns the user-defined hot pixel list stored in the camera EEPROM.

IS_HOTPIXEL_SET_CAMERA_USER_LIST

Sets the user-defined hot pixel list stored in the camera EEPROM.

Code sample

IS_HOTPIXEL_DELETE_CAMERA_USER_LIST

Deletes the user-defined hot pixel list from the camera EEPROM.

IS_HOTPIXEL_GET_CAMERA_USER_LIST_MAX_NUMBER

Returns the maximum number of hot pixels that the user can store in the camera EEPROM.

IS_HOTPIXEL_GET_MERGED_CAMERA_LIST_NUMBER

Returns the number of hot pixels in a merged list that combines the entries from the factory-set hot pixel list with those of the user-defined hot pixels list stored in the camera EEPROM.

IS_HOTPIXEL_GET_MERGED_CAMERA_LIST

Returns the merged list.

Code sample

pParam

Pointer to a function parameter; which function parameter is referred to here depends on nCommand.

nSizeOfParam

Size (in bytes) of the memory area to which pParam refers.

Return Values

IS_SUCCESS

Function executed successfully

IS_NO_SUCCESS

General error message

Code Samples

// Enable / disable correction

INT nRet = is_HotPixel(hCam, IS_HOTPIXEL_DISABLE_CORRECTION, NULL, NULL);

nRet = is_HotPixel(hCam, IS_HOTPIXEL_ENABLE_CAMERA_CORRECTION, NULL, NULL);

nRet = is_HotPixel(hCam, IS_HOTPIXEL_ENABLE_SOFTWARE_USER_CORRECTION, NULL, NULL);

nRet = is_HotPixel(hCam, IS_HOTPIXEL_ENABLE_SENSOR_CORRECTION, NULL, NULL);

nRet = is_HotPixel(hCam, IS_HOTPIXEL_DISABLE_SENSOR_CORRECTION, NULL, NULL);

 

// Read out current mode

INT nMode = 0;

INT nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_CORRECTION_MODE, (void*)&nMode, sizeof(nMode));

 

// Query supported modes

INT nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_SUPPORTED_CORRECTION_MODES, (void*)&nMode, sizeof(nMode));

 

// Query user-defined hot pixel list

INT nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_SOFTWARE_USER_LIST_EXISTS, NULL, NULL);

if (nRet == IS_SUCCESS)

{

  // Query the number of hot pixels in the user-defined list

  INT nNumber = 0;

  nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_SOFTWARE_USER_LIST_NUMBER, (void*)&nNumber, sizeof(nNumber));

  if (nRet == IS_SUCCESS)

  {

      // Allocate sufficient memory. Each hot pixel needs two WORDS

       // memory space.

       // Additional memory space of one WORD per hot pixel is required for numbering.

      WORD *pList = new WORD[1 + 2 * nNumber];

      nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_SOFTWARE_USER_LIST, (void*)pList, (1 + 2 * nNumber) * sizeof(WORD));

 

      // Change a value and save the list.

       // The number of the hot pixel has to be specified in pList[0]

      pList[1] = 100;

      nRet = is_HotPixel(hCam, IS_HOTPIXEL_SET_SOFTWARE_USER_LIST, (void*)pList, (1 + 2 * nNumber) * sizeof(WORD));

 

      // Delete unneeded list

      delete [] pList;

  }

}

 

// Save user-defined list to file

char File[100];

ZeroMemory(File, 100);

strcpy(File, "c:\\test.txt");

 

nRet = is_HotPixel(hCam, IS_HOTPIXEL_LOAD_SOFTWARE_USER_LIST, (void*)File, NULL);

 

nRet = is_HotPixel(hCam, IS_HOTPIXEL_SAVE_SOFTWARE_USER_LIST, (void*)File, NULL);

 

 

// Save user-defined list to the camera EEPROM

INT nNumber = 0;

INT nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_CAMERA_USER_LIST_MAX_NUMBER, (void*)&nNumber , sizeof(nNumber));

if (nRet == IS_SUCCESS)

{

  // Write the maximum number of hot pixels to EEPROM

  WORD *pList = new WORD[1 + 2 * nNumber];

  pList[0] = nNumber;

  for (int i = 0; i < nNumber; i++)

  {

      pList[1 + 2 * i] = x_value;

      pList[2 + 2 * i] = y_value;

  }

 

  nRet = is_HotPixel(hCam, IS_HOTPIXEL_SET_CAMERA_USER_LIST, (void*)pList, (1 + 2 * nNumber) * sizeof(WORD));

 

  delete [] pList;

 

  // Delete user-defined EEPROM list

  nRet = is_HotPixel(hCam, IS_HOTPIXEL_DELETE_CAMERA_USER_LIST, NULL, NULL);

}

 

// Return combined list

INT nNumber = 0;

INT nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_MERGED_CAMERA_LIST_NUMBER, (void*)&nNumber , sizeof(nNumber));

if (nRet == IS_SUCCESS)

{

    // Allocate sufficient memory. Each hot pixel needs two WORDS

    // memory space.

    // Additional memory space of one WORD per hot pixel is required for numbering.

    WORD *pList = new WORD[1 + 2 * nNumber];

  nRet = is_HotPixel(hCam, IS_HOTPIXEL_GET_MERGED_CAMERA_LIST, (void*)pList, (1 + 2 * nNumber) * sizeof(WORD));

 

  // Delete unneeded list

  delete [] pList;

}


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