Line Noise Reduction#
使用功能#
運作原理#
檢視影像時,您可能會注意到不需要的水平條紋,也稱為「行噪聲 (line noise)」。
通常,啟用 Line Noise Reduction 功能應能顯著減少此效果:
啟用 Line Noise Reduction#
若要啟用行噪聲減少功能:
- 將相機中的
BslLineNoiseReductionEnable參數設為true. - 將相機中的
BslLineNoiseReduction參數設為 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 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);
您也可以 use the pylon Viewer 來輕鬆設定參數。