Backlight Compensation#
使用功能#
運作原理#
如果影像目標後方有強光,目標可能會因曝光不足而呈現剪影效果。Backlight Compensation 功能可讓相機對此現象進行補償。
當此功能啟用時,在由 Gain Auto 及 Exposure Auto auto 函式進行的目標亮度值計算時,將忽略圖像中亮度最高的像素(即像素值最高的像素)中的一定百分比。
舉例來說,將參數值設定為 0.3 表示在計算目標值時,將不將影像中最亮的 30 % 像素納入考量。
這能讓相機正確地曝光影像中較暗的區域。
調整Backlight Compensation#
要調整背光補償:
- 啟用 Exposure Auto 自動功能或 Gain Auto 自動功能,或兩者皆可。
- 為
AutoBacklightCompensation參數。該參數的數值範圍為 0 至 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 */
/* Set the AutoBacklightCompensation parameter to 0.3 */
errRes = PylonDeviceSetFloatFeature(hdev, "AutoBacklightCompensation", 0.3);
CHECK(errRes);
您也可以 use the pylon Viewer 來輕鬆設定參數。