Skip to content

Exposure Auto (dart E)#

The Exposure Auto camera feature automatically adjusts the exposure time within specified limits until a target brightness has been reached.

If you want to use Exposure Auto and Gain Auto at the same time, use the Auto Function Profile feature to specify how the effects of both are balanced.

To adjust the exposure time manually, use the Exposure Time feature.

Using the Feature#

Enabling or Disabling Exposure Auto#

To enable or disable the Exposure Auto auto function, set the ExposureAuto parameter to one of the following operating modes:

  • Continuous: The camera adjusts the exposure time continuously while images are being acquired.
  • Off: Disables the Exposure Auto auto function. The exposure time remains at the value resulting from the last automatic or manual adjustment.

Info

  • On daA2500-60mc cameras, enabling or disabling Exposure Auto also enables or disables Gain Auto.
  • When the camera is capturing images continuously, the auto function takes effect with a short delay. The first few images may not be affected by the auto function.

Specifying an Upper Limit#

Info

This functionality is available for daA…mci cameras only.

The auto function adjusts the ExposureTime parameter value within specified limits.

To change the upper limit, set the AutoExposureTimeUpperLimit parameters to the desired value (in µs).

During the automatic adjustment process, the exposure time will never be higher than the specified limit.

If the upper limit is set to a high value, the camera's frame rate may decrease.

Specifying the Target Brightness Value#

Info

This functionality is available for daA…mci cameras only.

The auto function adjusts the exposure time until a target brightness value, i.e., an average gray value, has been reached.

To specify the target value, use the AutoTargetBrightness parameter.

Info

  • The target value calculation does not include other image optimizations, e.g., Gamma. Depending on the image optimizations set, images output by the camera may have a significantly lower or higher average gray value than indicated by the target value.
  • The camera also uses the AutoTargetBrightness parameter to control the Gain Auto auto function. If you want to use Exposure Auto and Gain Auto at the same time, use the Auto Function Profile feature to specify how the effects of both are balanced.

Sample Code#

// Set the Exposure Auto auto function to its maximum upper limit
double maxUpperLimit = camera.AutoExposureTimeUpperLimit.GetMax();
camera.AutoExposureTimeUpperLimit.SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
camera.AutoTargetBrightness.SetValue(0.6);
// Enable Exposure Auto by setting the operating mode to Continuous
camera.ExposureAuto.SetValue(ExposureAuto_Continuous);
INodeMap& nodemap = camera.GetNodeMap();
// Set the Exposure Auto auto function to its maximum upper limit
double maxUpperLimit = CFloatParameter(nodemap, "AutoExposureTimeUpperLimit").GetMax();
CFloatParameter(nodemap, "AutoExposureTimeUpperLimit").SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
CFloatParameter(nodemap, "AutoTargetBrightness").SetValue(0.6);
// Enable Exposure Auto by setting the operating mode to Continuous
CEnumParameter(nodemap, "ExposureAuto").SetValue("Continuous");
// Set the Exposure Auto auto function to its maximum upper limit
double maxUpperLimit = camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].GetMaximum();
camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
camera.Parameters[PLCamera.AutoTargetBrightness].SetValue(0.6);
// Enable Exposure Auto by setting the operating mode to Continuous
camera.Parameters[PLCamera.ExposureAuto].SetValue(PLCamera.ExposureAuto.Continuous);
/* 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 */
double maxUpperLimit = 0;
/* Set the Exposure Auto auto function to its maximum upper limit */
errRes = PylonDeviceGetFloatFeatureMax(hdev, "AutoExposureTimeUpperLimit", &maxUpperLimit);
CHECK(errRes);
errRes = PylonDeviceSetFloatFeature(hdev, "AutoExposureTimeUpperLimit", maxUpperLimit);
CHECK(errRes);
/* Set the target brightness value to 0.6 */
errRes = PylonDeviceSetFloatFeature(hdev, "AutoTargetBrightness", 0.6);
CHECK(errRes);
/* Enable Exposure Auto by setting the operating mode to Continuous */
errRes = PylonDeviceFeatureFromString(hdev, "ExposureAuto", "Continuous");
CHECK(errRes);
# Set the Exposure Auto auto function to its maximum upper limit
maxUpperLimit = camera.AutoExposureTimeUpperLimit.Max
camera.AutoExposureTimeUpperLimit.Value = maxUpperLimit
# Set the target brightness value to 0.6
camera.AutoTargetBrightness.Value = 0.6
# Enable Exposure Auto by setting the operating mode to Continuous
camera.ExposureAuto.Value = "Continuous"

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