跳至內容
測試伺服器
開發伺服器

Pixel Correction Beyond#

Pixel Correction Beyond 相機功能可動態修正影像中的缺陷像素。

此功能會校正那些亮度值明顯高於或低於鄰近像素的像素。系統會根據內建的閾值來決定何時對某個像素進行校正。

「動態」意指會針對每張擷取的影像,分別計算缺陷像素的校正值。

使用功能#

啟用Pixel Correction Beyond#

要啟用Pixel Correction Beyond :

  1. 將相機中的 BslPixelCorrectionBeyondEnable 參數設為 true.
  2. 將相機中的 BslPixelCorrectionBeyond 將參數設定為介於 0.0 至 1.0 之間的數值。
    此設定用於調整動態缺陷像素校正的強度。數值越高,影像中可見的缺陷像素就越少。不過,數值過高可能會導致影像資訊的損失。

範例程式碼#

// Enable dynamic user defect pixel correction
camera.BslPixelCorrectionBeyondEnable.SetValue(true);
// Adjust the amount of defect pixel correction to be applied
camera.BslPixelCorrectionBeyond.SetValue(0.5);
INodeMap& nodemap = camera.GetNodeMap();
// Enable dynamic user defect pixel correction
CBooleanParameter(nodemap, "BslPixelCorrectionBeyondEnable").SetValue(true);
// Adjust the amount of defect pixel correction to be applied
CFloatParameter(nodemap, "BslPixelCorrectionBeyond").SetValue(0.5);
// Enable dynamic user defect pixel correction
camera.Parameters[PLCamera.BslPixelCorrectionBeyondEnable].SetValue(true);
// Adjust the amount of defect pixel correction to be applied
camera.Parameters[PLCamera.BslPixelCorrectionBeyond].SetValue(0.5);
/* 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);
# Enable dynamic user defect pixel correction
camera.BslPixelCorrectionBeyondEnable.Value = True
# Adjust the amount of defect pixel correction to be applied
camera.BslPixelCorrectionBeyond.Value = 0.5

您也可以 use the pylon Viewer 來輕鬆設定參數。