Skip to content

Gray Value Adjustment Damping#

The Gray Value Adjustment Damping camera feature controls the speed with which pixel gray values are changed when Exposure Auto, Gain Auto, or both are enabled.

This feature is similar to the Brightness Adjustment Damping feature, which is only available on Basler dart and pulse camera models.

Using the Feature#

How It Works#

The lower the gray value adjustment damping factor, the slower the target brightness value is reached. This can be useful, for example, to avoid the auto functions being disrupted by objects moving in and out of the camera's area of view.

Info

The Brightness Adjustment Damping feature, which is only available on Basler dart and pulse camera models, works vice versa: The lower the brightness adjustment damping factor, the faster the target brightness value is reached.

Specifying a Damping Factor#

To specify a damping factor:

  1. Set the Exposure Auto or the Gain Auto auto function or both to Once or Continuous.
  2. Set the GrayValueAdjustmentDampingAbs parameter to the desired value.

You can set the parameter in a range from 0.0 to 0.78125. Using higher parameter values means that the target value is reached sooner.

By default, the factor is set to 0.6836. This is a setting where the damping control is as stable and quick as possible.

Sample Code#

// 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

You can also use the pylon Viewer to easily set the parameters.