Skip to content

Pylon::CStaticDefectPixelCorrection#

Provides utility functions to use Static Defect Pixel Correction on certain ace 2 cameras.

#include <pylon/StaticDefectPixelCorrection.h>

Public Types#

Name
enum EListType { ListType_Factory, ListType_User}
Type of list.

Public Functions#

Name
bool GetDefectPixelList(GenApi::INodeMap * pNodeMap, StaticDefectPixelList_t & pixelList, EListType listType =ListType_User)
Gets the defect pixel list from the camera.
bool SetDefectPixelList(GenApi::INodeMap * pNodeMap, StaticDefectPixelList_t & pixelList, EListType listType =ListType_User)
Sets the defect pixel list in the camera.
bool NormalizePixelList(GenApi::INodeMap * pNodeMap, StaticDefectPixelList_t & pixelList)
Sort and erase duplicates of a defect pixel list.

Public Types Documentation#

enum EListType#

Enumerator Value Description
ListType_Factory A Factory list is computed when the camera is made and can't be changed by the user.
ListType_User A User list can be updated by the user. It is empty initially.

Type of list.

Public Functions Documentation#

function GetDefectPixelList#

static bool GetDefectPixelList(
    GenApi::INodeMap * pNodeMap,
    StaticDefectPixelList_t & pixelList,
    EListType listType =ListType_User
)

Gets the defect pixel list from the camera.

Parameters:

  • pNodeMap The nodemap of the camera.
  • pixelList List of defect pixels read from camera.
  • listType The type of list to read.

Return: Returns true if the list was read successfully. Otherwise, false is returned.

Error Safety: Can throw exceptions if the communication with the camera fails.

The camera stores all defect pixels in a sorted list. For more details, consult the camera's documentation.

function SetDefectPixelList#

static bool SetDefectPixelList(
    GenApi::INodeMap * pNodeMap,
    StaticDefectPixelList_t & pixelList,
    EListType listType =ListType_User
)

Sets the defect pixel list in the camera.

Parameters:

  • pNodeMap The nodemap of the camera.
  • pixelList A list of defect pixels.
  • listType The type of list to write.

Return: Returns true if the list was written successfully. Otherwise, false is returned.

Error Safety: Can throw exceptions if the communication with the camera fails.

The camera stores all defect pixels in a sorted list. The list will be normalized, see NormalizePixelList, before it is written to the camera. For more details, consult the camera's documentation.

function NormalizePixelList#

static bool NormalizePixelList(
    GenApi::INodeMap * pNodeMap,
    StaticDefectPixelList_t & pixelList
)

Sort and erase duplicates of a defect pixel list.

Parameters:

  • pNodeMap : The nodemap of the camera.
  • pixelList : The pixel list to normalize. The normalized pixel list will be returned.

Return: True if the normalization runs correctly. Otherwise, false is returned.

Exceptions: May throw a RuntimeException if the camera doesn't support user-specific defect pixel lists or if there are too many entries in the pixel list.

Normalizing the list is optional. The list will be normalized automatically when SetDefectPixelList is called.