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

Gray Value Adjustment Damping#

當啟用 Exposure Auto、Gain Auto 或兩者同時啟用時,Gray Value Adjustment Damping camera feature 用於控制像素灰階值的變更速度。

此功能類似於 Brightness Adjustment Damping 功能,該功能僅適用於部分 USB 3.0 Basler dart 和 pulse 相機型號。

使用此功能#

運作原理#

灰階值調整阻尼係數越低,達到目標亮度值的速度就越慢。例如,這有助於避免自動功能受到進出相機視野的物體幹擾。

資訊

Brightness Adjustment Damping 功能僅適用於部分 USB 3.0 Basler dart 和 pulse 相機型號,其運作方式則相反:亮度調整阻尼係數越低,達到目標亮度值的速度就越快。

指定阻尼因數#

若要指定 Damping 係數:

  1. 將 Exposure Auto 或 Gain Auto 自動功能或兩者 Once 或 Continuous.
  2. 將 GrayValueAdjustmentDampingAbs 參數設定為所需的值。

您可以將參數設定在 0.0 到 0.78125 的範圍內。使用較高的參數值意味著能更快達到目標值。

預設情況下,此係數設定為 0.6836。在此設定下,阻尼控製既穩定又快速。

範例程式碼#

// Enable Gain Auto by setting the operating mode to Continuous
camera.GainAuto.SetValue(GainAuto_Continuous);
// Set gray value adjustment damping to 0.5859
camera.GrayValueAdjustmentDampingAbs.SetValue(0.5859);
INodeMap& nodemap = camera.GetNodeMap();
// Enable Gain Auto by setting the operating mode to Continuous
CEnumParameter(nodemap, "GainAuto").SetValue("Continuous");
// Set gray value adjustment damping to 0.5859
CFloatParameter(nodemap, "GrayValueAdjustmentDampingAbs").SetValue(0.5859);
// Enable Gain Auto by setting the operating mode to Continuous
camera.Parameters[PLCamera.GainAuto].SetValue(PLCamera.GainAuto.Continuous);
// Set gray value adjustment damping to 0.5859
camera.Parameters[PLCamera.GrayValueAdjustmentDampingAbs].SetValue(0.5859);
/* 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 Gain Auto by setting the operating mode to Continuous */
errRes = PylonDeviceFeatureFromString(hdev, "GainAuto", "Continuous");
CHECK(errRes);
/* Set gray value adjustment damping to 0.5859 */
errRes = PylonDeviceSetFloatFeature(hdev, "GrayValueAdjustmentDampingAbs", 0.5859);
CHECK(errRes);
# Enable Gain Auto by setting the operating mode to Continuous
camera.GainAuto.Value = "Continuous"
# Set gray value adjustment damping to 0.5859
camera.GrayValueAdjustmentDampingAbs.Value = 0.5859

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