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

Line Noise Reduction#

Line Noise Reduction camera feature 可讓您減少影像中的水平條紋。

使用功能#

運作原理#

檢視影像時,您可能會注意到不需要的水平條紋,也稱為「行噪聲 (line noise)」。

通常,啟用 Line Noise Reduction 功能應能顯著減少此效果:

Line noise reduction disabledLine noise reduction enabled

啟用 Line 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 來輕鬆設定參數。