In acquired images, some pixels may appear significantly brighter or darker than the rest, even if uniform light is used. This problem is caused by differences in sensitivity of the individual pixels which in turn are due to production tolerances.
The Defect Pixel Correction feature minimizes the influence of these sensitivity differences. The camera identifies pixels that have a significantly higher or lower intensity value than their neighboring pixels ("outlier pixels") and adjusts their intensity value.
Basler cameras can perform two types of pixel corrections:
To configure the Defect Pixel Correction feature, set the DefectPixelCorrectionMode parameter to one of the following values:
// Disable defect pixel correction
camera.DefectPixelCorrectionMode.SetValue(DefectPixelCorrectionMode_Off);
INodeMap& nodemap = camera.GetNodeMap();
// Disable defect pixel correction
CEnumerationPtr(nodemap.GetNode("DefectPixelCorrectionMode"))->FromString("Off");
// Disable defect pixel correction
camera.Parameters[PLCamera.DefectPixelCorrectionMode].SetValue(PLCamera.DefectPixelCorrectionMode.Off);
// Disable defect pixel correction
Pylon.DeviceFeatureFromString(hdev, "DefectPixelCorrectionMode", "Off");
/* Macro to check for errors */
#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)
GENAPIC_RESULT errRes = GENAPI_E_OK; /* Return value of pylon methods */
/* Disable defect pixel correction */
errRes = PylonDeviceFeatureFromString(hdev, "DefectPixelCorrectionMode", "Off");
CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.