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