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

Line Noise Reduction#

「Noise Reduction 」相機功能可讓您減少影像中的水平條紋。

使用功能#

運作原理#

檢視您的影像時,您可能會注意到一些不想要的橫向條紋,這也被稱為「線性雜訊」。

通常,啟用「Line」的「Noise Reduction 」功能應能大幅減輕此現象:

已停用線路雜訊抑制功能已啟用線路雜訊抑制

啟用行Noise Reduction#

若要啟用線路雜訊抑制功能:

  1. 將相機中的 BslLineNoiseReductionEnable 參數設為 true.
  2. 將相機中的 BslLineNoiseReduction 參數設為 0.0 到 1.0 之間的值。
    此設定用於調整線性雜訊抑制的強度。數值越高,影像中的線性雜訊(水平條紋)就越不明顯。然而,若數值過高,可能會導致影像資訊的損失。

範例程式碼#

// Enable line noise reduction
camera.BslLineNoiseReductionEnable.SetValue(true);
// Adjust the amount of line noise reduction
camera.BslLineNoiseReduction.SetValue(0.5);
INodeMap& nodemap = camera.GetNodeMap();
// Enable line noise reduction
CBooleanParameter(nodemap, "BslLineNoiseReductionEnable").SetValue(true);
// Adjust the amount of line noise reduction
CFloatParameter(nodemap, "BslLineNoiseReduction").SetValue(0.5);
// Enable line noise reduction
camera.Parameters[PLCamera.BslLineNoiseReductionEnable].SetValue(true);
// Adjust the amount of line noise reduction
camera.Parameters[PLCamera.BslLineNoiseReduction].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 line noise reduction */
errRes = PylonDeviceSetBooleanFeature(hdev, "BslLineNoiseReductionEnable", 1);
CHECK(errRes);
/* Adjust the amount of line noise reduction */
errRes = PylonDeviceSetFloatFeature(hdev, "BslLineNoiseReduction", 0.5);
CHECK(errRes);
# Enable line noise reduction
camera.BslLineNoiseReductionEnable.Value = True
# Adjust the amount of line noise reduction
camera.BslLineNoiseReduction.Value = 0.5

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