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.
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.
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.
// Set the Exposure Auto auto function to its maximum upper limitdoublemaxUpperLimit=camera.AutoExposureTimeUpperLimit.GetMax();camera.AutoExposureTimeUpperLimit.SetValue(maxUpperLimit);// Set the target brightness value to 0.6camera.AutoTargetBrightness.SetValue(0.6);// Enable Exposure Auto by setting the operating mode to Continuouscamera.ExposureAuto.SetValue(ExposureAuto_Continuous);
INodeMap&nodemap=camera.GetNodeMap();// Set the Exposure Auto auto function to its maximum upper limitdoublemaxUpperLimit=CFloatParameter(nodemap,"AutoExposureTimeUpperLimit").GetMax();CFloatParameter(nodemap,"AutoExposureTimeUpperLimit").SetValue(maxUpperLimit);// Set the target brightness value to 0.6CFloatParameter(nodemap,"AutoTargetBrightness").SetValue(0.6);// Enable Exposure Auto by setting the operating mode to ContinuousCEnumParameter(nodemap,"ExposureAuto").SetValue("Continuous");
// Set the Exposure Auto auto function to its maximum upper limitdoublemaxUpperLimit=camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].GetMaximum();camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].SetValue(maxUpperLimit);// Set the target brightness value to 0.6camera.Parameters[PLCamera.AutoTargetBrightness].SetValue(0.6);// Enable Exposure Auto by setting the operating mode to Continuouscamera.Parameters[PLCamera.ExposureAuto].SetValue(PLCamera.ExposureAuto.Continuous);
/* Macro to check for errors */#define CHECK(errc) if (GENAPI_E_OK != errc) printErrorAndExit(errc)GENAPIC_RESULTerrRes=GENAPI_E_OK;/* Return value of pylon methods */doublemaxUpperLimit=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 limitmaxUpperLimit=camera.AutoExposureTimeUpperLimit.Maxcamera.AutoExposureTimeUpperLimit.Value=maxUpperLimit# Set the target brightness value to 0.6camera.AutoTargetBrightness.Value=0.6# Enable Exposure Auto by setting the operating mode to Continuouscamera.ExposureAuto.Value="Continuous"
You can also use the pylon Viewer to easily set the parameters.