Pixel Correction Beyond#
它会校正灰度值显著高于或低于相邻像素的像素。内部阈值决定了何时对像素进行校正。
“动态”意味着坏点校正是针对每幅采集到的图像单独计算的。
该功能的使用#
启用 Pixel Correction Beyond#
要启用 Pixel Correction Beyond:
- 设置
BslPixelCorrectionBeyondEnableacquisition modetrue. - 设置
BslPixelCorrectionBeyond参数设为 0.0 到 1.0 之间的值。
这用于调整应用的动态坏点校正量。较高的值意味着图像中可见的坏点更少。但是,过高的值可能会导致图像信息丢失。
示例代码#
/* 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 */
/* Enable dynamic user defect pixel correction */
errRes = PylonDeviceSetBooleanFeature(hdev, "BslPixelCorrectionBeyondEnable", 1);
CHECK(errRes);
/* Adjust the amount of defect pixel correction to be applied */
errRes = PylonDeviceSetFloatFeature(hdev, "BslPixelCorrectionBeyond", 0.5);
CHECK(errRes);
您也可以使用 pylon Viewer 轻松设置参数。