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

is_HotPixel

uEye Camera Manual Version 4.00

is_HotPixel

Windows_Logo

Linux_Logo

USB 2.0

USB 3.0

GigE

USB 2.0

USB 3.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: 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

IS_HOTPIXEL_DISABLE_CORRECTION

Disables hot pixel correction (Example 1)

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. This requires the user's hot pixel list to be set (IS_HOTPIXEL_SET_SOFTWARE_USER_LIST)

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 (Example 2)

IS_HOTPIXEL_GET_SUPPORTED_CORRECTION_MODES

Returns the supported hot pixel correction modes.The return value is a bitmask with the following constants (combined by OR):

IS_HOTPIXEL_ENABLE_CAMERA_CORRECTION: Hot pixel correction is possible via the hot pixel list in the camera EEPROM.

IS_HOTPIXEL_ENABLE_SOFTWARE_USER_CORRECTION: Hot pixel correction is possible via the user-defined hot pixel list.

IS_HOTPIXEL_ENABLE_SENSOR_CORRECTION: Hot pixel correction is possible via the sensor-internal hot pixel correction.

IS_HOTPIXEL_GET_SOFTWARE_USER_LIST_EXISTS

Indicates whether the user-defined hot pixel list exists in the computer (Example 3)

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. The function can also be used with Unicode file names. (Example 4)

IS_HOTPIXEL_LOAD_SOFTWARE_USER_LIST

Loads the user-defined hot pixel list from a file. The function can also be used with Unicode file names.

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 (Example 5)

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 (Example 6)

pParam

Pointer to a function parameter, whose function depends on nCommand.

nSizeOfParam

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

Return values

IS_CANT_COMMUNICATE_WITH_DRIVER

Communication with the driver failed because no driver has been loaded.

IS_CANT_OPEN_DEVICE

An attempt to initialize or select the camera failed (no camera connected or initialization error).

IS_INVALID_CAMERA_TYPE

The camera type defined in the .ini file does not match the current camera model.

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_IO_REQUEST_FAILED

An IO request from the uEye driver failed. Possibly the versions of the ueye_api.dll (API) and the driver file (ueye_usb.sys or ueye_eth.sys) do not match.

IS_NO_SUCCESS

General error message

IS_NOT_CALIBRATED

The camera does not contain any calibration data.

IS_NOT_SUPPORTED

The camera model used here does not support this function or setting.

IS_NULL_POINTER

Invalid array

IS_OUT_OF_MEMORY

No memory could be allocated.

IS_SUCCESS

Function executed successfully

IS_TIMED_OUT

A timeout occurred. An image capturing process could not be terminated within the allowable period.

Example 1

// 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);

Example 2

// 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));

Example 3

// 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;

  }

}

Example 4

// Save user-defined list to file

char File1[100];

ZeroMemory(File1, sizeof(File1));

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

 

nRet = is_HotPixel(hCam, IS_HOTPIXEL_LOAD_SOFTWARE_USER_LIST, (void*)File1, 0);

 

nRet = is_HotPixel(hCam, IS_HOTPIXEL_SAVE_SOFTWARE_USER_LIST, (void*)File1, 0);

 

// Unicode

wchar_t File2[100];

ZeroMemory(File2, sizeof(File2));

wcscpy(File2, L"c:\\test.txt");

 

nRet = is_HotPixel(hCam, IS_HOTPIXEL_LOAD_SOFTWARE_USER_LIST_UNICODE, (void*)File2, 0);

 

nRet = is_HotPixel(hCam, IS_HOTPIXEL_SAVE_SOFTWARE_USER_LIST_UNICODE, (void*)File2, 0);

Example 5

// 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);

}

Example 6

// 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!

For technical questions please contact you local distributor or use the support form on our website.


© 2012 IDS Imaging Development Systems GmbH
http://www.ids-imaging.com