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

Backlight Compensation#

藉由 Backlight Compensation 相機功能,相機可以補償曝光不足的影像區域。

使用此功能#

運作原理#

如果您的拍攝目標後方有強光,目標可能會曝光不足並呈現剪影。Backlight Compensation 功能可讓相機補償此一現象。

啟用此功能後,影像中指定百分比的最亮像素(即像素值最高的像素)將不計入由 Gain Auto 和 Exposure Auto 自動功能所執行的 目標亮度值計算 中。

例如,將參數值設為 0.3 意味著影像中 30 % 的最亮像素將不計入目標值計算中。

這可讓相機正確曝光影像中較暗的區域。

調整 Backlight Compensation#

若要調整背光補償:

  1. 啟用 Exposure Auto 自動功能、Gain Auto 自動功能或兩者。
  2. 為 AutoBacklightCompensation 參數。此參數的值域為 0 到 0.5。

範例程式碼#

// Set the AutoBacklightCompensation parameter to 0.3
camera.AutoBacklightCompensation.SetValue(0.3);
INodeMap& nodemap = camera.GetNodeMap();
// Set the AutoBacklightCompensation parameter to 0.3
CFloatParameter(nodemap, "AutoBacklightCompensation").SetValue(0.3);
// Set the AutoBacklightCompensation parameter to 0.3
camera.Parameters[PLCamera.AutoBacklightCompensation].SetValue(0.3);
/* 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);
# Set the AutoBacklightCompensation parameter to 0.3
camera.AutoBacklightCompensation.Value = 0.3

您也可以 使用 pylon Viewer 來輕鬆設定參數。