Auto Function Profile#
Using the Feature#
Prerequisites#
The Gain Auto auto function and the Exposure Auto auto function must both be set to Continuous.
Setting the Auto Function Profile#
To set the auto function profile, set the AutoFunctionProfile parameter to one of the following values:
- GainMinimum
- ExposureMinimum
- GainMinimumQuick (if available)
- ExposureMinimumQuick (if available)
- Smart (if available)
- AntiFlicker50Hz (if available)
- AntiFlicker60Hz (if available)
Available Auto Function Profiles#
Minimize Gain (= Gain Minimum)#
The gain is kept as low as possible during the automatic adjustment process. If the exposure time is at its upper limit and the target brightness value has not been reached yet, the gain will be increased in order to reach the target.
Minimize Exposure Time (= Exposure Minimum)#
The exposure time is kept as low as possible during the automatic adjustment process. If the gain is at its upper limit and the target brightness value has not been reached yet, the exposure time will be increased in order to reach the target.
Minimize Gain Quick (= Gain Minimum Quick)#
This profile works the same as the Minimize Gain profile. The difference is that it reacts more quickly in situations with extreme changes in brightness or where the image brightness changes rapidly. This situation occurs, for example, when microscope objective lenses are changed using the objective turret.
Minimize Exposure Time Quick (= Exposure Minimum Quick)#
This profile works the same as the Minimize Exposure Time profile. The difference is that it reacts more quickly in situations with extreme changes in brightness or where the image brightness changes rapidly. This situation occurs, for example, when microscope objective lenses are changed using the objective turret.
Smart#
Gain is kept as low as possible and the frame rate will be kept as high as possible during automatic adjustments.
This is a four-step process:
- The camera adjusts the exposure time to achieve the target brightness value.
- If the exposure time must be increased to achieve the target brightness value, the camera does so until the frame rate drops.
- If the frame rate drops, the camera stops increasing the exposure time and increases the gain until the AutoGainRawUpperLimit value is reached.
- When the AutoGainRawUpperLimit value has been reached, the camera stops increasing the gain and increases the exposure time until the target brightness value is reached. Increasing the exposure time results in a lower frame rate.
Anti-Flicker 50 Hz / 60 Hz#
Gain and exposure time are optimized to reduce flickering. If the camera is operating in an environment where the lighting flickers at a 50-Hz or a 60-Hz rate, the flickering lights can cause significant changes in brightness from image to image. Enabling the anti-flicker profile may reduce the effect of the flickering in the captured images.
Choose the frequency (50 Hz or 60 Hz) according your local power line frequency (e.g., North America: 60 Hz, Europe: 50 Hz).
Specifics#
Camera Model | Available Auto Function Profiles |
---|---|
a2A1920-51gcBAS | None, Auto Function Profile feature not supported |
a2A1920-51gmBAS | None, Auto Function Profile feature not supported |
a2A1920-160ucBAS | None, Auto Function Profile feature not supported |
a2A1920-160umBAS | None, Auto Function Profile feature not supported |
acA640-90gc | Gain Minimum Exposure Minimum |
acA640-90gm | Gain Minimum Exposure Minimum |
acA640-90uc | Minimize Gain Minimize Exposure Time |
acA640-90um | Minimize Gain Minimize Exposure Time |
acA640-120gc | Gain Minimum Exposure Minimum |
acA640-120gm | Gain Minimum Exposure Minimum |
acA640-120uc | Minimize Gain Minimize Exposure Time |
acA640-120um | Minimize Gain Minimize Exposure Time |
acA640-121gm | Gain Minimum Exposure Minimum |
acA640-300gc | Gain Minimum Exposure Minimum |
acA640-300gm | Gain Minimum Exposure Minimum |
acA640-750uc | Minimize Gain Minimize Exposure Time |
acA640-750um | Minimize Gain Minimize Exposure Time |
acA720-290gc | Gain Minimum Exposure Minimum |
acA720-290gm | Gain Minimum Exposure Minimum |
acA720-520uc | Minimize Gain Minimize Exposure Time |
acA720-520um | Minimize Gain Minimize Exposure Time |
acA780-75gc | Gain Minimum Exposure Minimum |
acA780-75gm | Gain Minimum Exposure Minimum |
acA800-200gc | Gain Minimum Exposure Minimum |
acA800-200gm | Gain Minimum Exposure Minimum |
acA800-510uc | Minimize Gain Minimize Exposure Time |
acA800-510um | Minimize Gain Minimize Exposure Time |
acA1280-60gc | Gain Minimum Exposure Minimum |
acA1280-60gm | Gain Minimum Exposure Minimum |
acA1300-22gc | Gain Minimum Exposure Minimum |
acA1300-22gm | Gain Minimum Exposure Minimum |
acA1300-30gc | Gain Minimum Exposure Minimum |
acA1300-30gm | Gain Minimum Exposure Minimum |
acA1300-30uc | Minimize Gain Minimize Exposure Time |
acA1300-30um | Minimize Gain Minimize Exposure Time |
acA1300-60gc | Gain Minimum Exposure Minimum |
acA1300-60gm | Gain Minimum Exposure Minimum |
acA1300-60gmNIR | Gain Minimum Exposure Minimum |
acA1300-75gc | Gain Minimum Exposure Minimum |
acA1300-75gm | Gain Minimum Exposure Minimum |
acA1300-200uc | Minimize Gain Minimize Exposure Time |
acA1300-200um | Minimize Gain Minimize Exposure Time |
acA1440-73gc | Gain Minimum Exposure Minimum |
acA1440-73gm | Gain Minimum Exposure Minimum |
acA1440-220uc | Minimize Gain Minimize Exposure Time |
acA1440-220um | Minimize Gain Minimize Exposure Time |
acA1600-20gc | Gain Minimum Exposure Minimum |
acA1600-20gm | Gain Minimum Exposure Minimum |
acA1600-20uc | Minimize Gain Minimize Exposure Time |
acA1600-20um | Minimize Gain Minimize Exposure Time |
acA1600-60gc | Gain Minimum Exposure Minimum |
acA1600-60gm | Gain Minimum Exposure Minimum |
acA1920-25gc | Gain Minimum Exposure Minimum |
acA1920-25gm | Gain Minimum Exposure Minimum |
acA1920-25uc | Minimize Gain Minimize Exposure Time |
acA1920-25um | Minimize Gain Minimize Exposure Time |
acA1920-40gc | Gain Minimum Exposure Minimum |
acA1920-40gm | Gain Minimum Exposure Minimum |
acA1920-40uc | Minimize Gain Minimize Exposure Time |
acA1920-40ucMED | Minimize Gain Minimize Exposure Time Minimize Gain Quick Minimize Exposure Time Quick |
acA1920-40um | Minimize Gain Minimize Exposure Time |
acA1920-40umMED | Minimize Gain Minimize Exposure Time Minimize Gain Quick Minimize Exposure Time Quick |
acA1920-48gc | Gain Minimum Exposure Minimum |
acA1920-48gm | Gain Minimum Exposure Minimum |
acA1920-50gc | Gain Minimum Exposure Minimum |
acA1920-50gm | Gain Minimum Exposure Minimum |
acA1920-150uc | Minimize Gain Minimize Exposure Time |
acA1920-150um | Minimize Gain Minimize Exposure Time |
acA1920-155uc | Minimize Gain Minimize Exposure Time |
acA1920-155ucMED | Minimize Gain Minimize Exposure Time Minimize Gain Quick Minimize Exposure Time Quick |
acA1920-155um | Minimize Gain Minimize Exposure Time |
acA1920-155umMED | Minimize Gain Minimize Exposure Time Minimize Gain Quick Minimize Exposure Time Quick |
acA2000-50gc | Gain Minimum Exposure Minimum |
acA2000-50gm | Gain Minimum Exposure Minimum |
acA2000-50gmNIR | Gain Minimum Exposure Minimum |
acA2000-165uc | Minimize Gain Minimize Exposure Time |
acA2000-165um | Minimize Gain Minimize Exposure Time |
acA2000-165umNIR | Minimize Gain Minimize Exposure Time |
acA2040-25gc | Gain Minimum Exposure Minimum |
acA2040-25gm | Gain Minimum Exposure Minimum |
acA2040-25gmNIR | Gain Minimum Exposure Minimum |
acA2040-35gc | Gain Minimum Exposure Minimum |
acA2040-35gm | Gain Minimum Exposure Minimum |
acA2040-55uc | Minimize Gain Minimize Exposure Time |
acA2040-55um | Minimize Gain Minimize Exposure Time |
acA2040-90uc | Minimize Gain Minimize Exposure Time |
acA2040-90um | Minimize Gain Minimize Exposure Time |
acA2040-90umNIR | Minimize Gain Minimize Exposure Time |
acA2040-120uc | Minimize Gain Minimize Exposure Time |
acA2040-120um | Minimize Gain Minimize Exposure Time |
acA2440-20gc | Gain Minimum Exposure Minimum |
acA2440-20gm | Gain Minimum Exposure Minimum |
acA2440-35uc | Minimize Gain Minimize Exposure Time |
acA2440-35ucMED | Minimize Gain Minimize Exposure Time Minimize Gain Quick Minimize Exposure Time Quick |
acA2440-35um | Minimize Gain Minimize Exposure Time |
acA2440-35umMED | Minimize Gain Minimize Exposure Time Minimize Gain Quick Minimize Exposure Time Quick |
acA2440-75uc | Minimize Gain Minimize Exposure Time |
acA2440-75ucMED | Minimize Gain Minimize Exposure Time Minimize Gain Quick Minimize Exposure Time Quick |
acA2440-75um | Minimize Gain Minimize Exposure Time |
acA2440-75umMED | Minimize Gain Minimize Exposure Time Minimize Gain Quick Minimize Exposure Time Quick |
acA2500-14gc | Gain Minimum Exposure Minimum |
acA2500-14gm | Gain Minimum Exposure Minimum |
acA2500-14uc | Minimize Gain Minimize Exposure Time |
acA2500-14um | Minimize Gain Minimize Exposure Time |
acA2500-20gc | Gain Minimum Exposure Minimum |
acA2500-20gcMED | Gain Minimum Exposure Minimum Gain Minimum Quick Exposure Minimum Quick |
acA2500-20gm | Gain Minimum Exposure Minimum |
acA2500-20gmMED | Gain Minimum Exposure Minimum Gain Minimum Quick Exposure Minimum Quick |
acA2500-60uc | Minimize Gain Minimize Exposure Time |
acA2500-60um | Minimize Gain Minimize Exposure Time |
acA3088-16gc | Gain Minimum Exposure Minimum |
acA3088-16gm | Gain Minimum Exposure Minimum |
acA3088-57uc | Minimize Gain Minimize Exposure Time |
acA3088-57um | Minimize Gain Minimize Exposure Time |
acA3800-10gc | Gain Minimum Exposure Minimum |
acA3800-10gm | Gain Minimum Exposure Minimum |
acA3800-14uc | Minimize Gain Minimize Exposure Time |
acA3800-14um | Minimize Gain Minimize Exposure Time |
acA4024-8gc | Gain Minimum Exposure Minimum |
acA4024-8gm | Gain Minimum Exposure Minimum |
acA4024-29uc | Minimize Gain Minimize Exposure Time |
acA4024-29um | Minimize Gain Minimize Exposure Time |
acA4096-11gc | Gain Minimum Exposure Minimum |
acA4096-11gm | Gain Minimum Exposure Minimum |
acA4096-30uc | Minimize Gain Minimize Exposure Time |
acA4096-30ucMED | Minimize Gain Minimize Exposure Time |
acA4096-30um | Minimize Gain Minimize Exposure Time |
acA4096-30umMED | Minimize Gain Minimize Exposure Time |
acA4096-40uc | Minimize Gain Minimize Exposure Time |
acA4096-40ucMED | Minimize Gain Minimize Exposure Time |
acA4096-40um | Minimize Gain Minimize Exposure Time |
acA4096-40umMED | Minimize Gain Minimize Exposure Time |
acA4112-8gc | Gain Minimum Exposure Minimum |
acA4112-8gm | Gain Minimum Exposure Minimum |
acA4112-20uc | Minimize Gain Minimize Exposure Time |
acA4112-20ucMED | Minimize Gain Minimize Exposure Time |
acA4112-20um | Minimize Gain Minimize Exposure Time |
acA4112-20umMED | Minimize Gain Minimize Exposure Time |
acA4112-30uc | Minimize Gain Minimize Exposure Time |
acA4112-30ucMED | Minimize Gain Minimize Exposure Time |
acA4112-30um | Minimize Gain Minimize Exposure Time |
acA4112-30umMED | Minimize Gain Minimize Exposure Time |
acA4600-7gc | Gain Minimum Exposure Minimum |
acA4600-10uc | Minimize Gain Minimize Exposure Time |
acA5472-5gc | Gain Minimum Exposure Minimum |
acA5472-5gm | Gain Minimum Exposure Minimum |
acA5472-17uc | Minimize Gain Minimize Exposure Time |
acA5472-17um | Minimize Gain Minimize Exposure Time |
boA4096-93cc | None, Auto Function Profile feature not supported |
boA4096-93cm | None, Auto Function Profile feature not supported |
boA4112-68cc | None, Auto Function Profile feature not supported |
boA4112-68cm | None, Auto Function Profile feature not supported |
daA1280-54lc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1280-54lm | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1280-54uc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1280-54um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1600-60lc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1600-60lm | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1600-60uc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1600-60um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1920-15um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1920-30uc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA1920-30um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA2500-14lc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA2500-14lm | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA2500-14uc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA2500-14um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
daA2500-60mc | Auto Function Profile feature not supported |
puA1280-54uc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
puA1280-54um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
puA1600-60uc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
puA1600-60um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
puA1920-30uc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
puA1920-30um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
puA2500-14uc | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
puA2500-14um | Minimize Gain Minimize Exposure Time Smart Anti-Flicker 50 Hz Anti-Flicker 60 Hz |
Sample Code#
ace classic/U/L GigE cameras#
// Set the auto function profile to Gain Minimum camera.AutoFunctionProfile.SetValue(AutoFunctionProfile_GainMinimum); // Set the auto function profile to Exposure Minimum camera.AutoFunctionProfile.SetValue(AutoFunctionProfile_ExposureMinimum); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous camera.GainAuto.SetValue(GainAuto_Continuous); camera.ExposureAuto.SetValue(ExposureAuto_Continuous);
INodeMap& nodemap = camera.GetNodeMap(); // Set the auto function profile to Gain Minimum CEnumerationPtr(nodemap.GetNode("AutoFunctionProfile"))->FromString("GainMinimum"); // Set the auto function profile to Exposure Minimum CEnumerationPtr(nodemap.GetNode("AutoFunctionProfile"))->FromString("ExposureMinimum"); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous CEnumerationPtr(nodemap.GetNode("GainAuto"))->FromString("Continuous"); CEnumerationPtr(nodemap.GetNode("ExposureAuto"))->FromString("Continuous");
INodeMap& nodemap = camera.GetNodeMap(); // Set the auto function profile to Gain Minimum CEnumParameter(nodemap, "AutoFunctionProfile").SetValue("GainMinimum"); // Set the auto function profile to Exposure Minimum CEnumParameter(nodemap, "AutoFunctionProfile").SetValue("ExposureMinimum"); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous CEnumParameter(nodemap, "GainAuto").SetValue("Continuous"); CEnumParameter(nodemap, "ExposureAuto").SetValue("Continuous");
// Set the auto function profile to Gain Minimum camera.Parameters[PLCamera.AutoFunctionProfile].SetValue(PLCamera.AutoFunctionProfile.GainMinimum); // Set the auto function profile to Exposure Minimum camera.Parameters[PLCamera.AutoFunctionProfile].SetValue(PLCamera.AutoFunctionProfile.ExposureMinimum); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous camera.Parameters[PLCamera.GainAuto].SetValue(PLCamera.GainAuto.Continuous); camera.Parameters[PLCamera.ExposureAuto].SetValue(PLCamera.ExposureAuto.Continuous);
// Set the auto function profile to Gain Minimum Pylon.DeviceFeatureFromString(hdev, "AutoFunctionProfile", "GainMinimum"); // Set the auto function profile to Exposure Minimum Pylon.DeviceFeatureFromString(hdev, "AutoFunctionProfile", "ExposureMinimum"); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous Pylon.DeviceFeatureFromString(hdev, "GainAuto", "Continuous"); Pylon.DeviceFeatureFromString(hdev, "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 */ /* Set the auto function profile to Gain Minimum */ errRes = PylonDeviceFeatureFromString(hdev, "AutoFunctionProfile", "GainMinimum"); CHECK(errRes); /* Set the auto function profile to Exposure Minimum */ errRes = PylonDeviceFeatureFromString(hdev, "AutoFunctionProfile", "ExposureMinimum"); CHECK(errRes); /* Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous */ errRes = PylonDeviceFeatureFromString(hdev, "GainAuto", "Continuous"); CHECK(errRes); errRes = PylonDeviceFeatureFromString(hdev, "ExposureAuto", "Continuous"); CHECK(errRes);
Other Cameras#
// Set the auto function profile to Minimize Gain camera.AutoFunctionProfile.SetValue(AutoFunctionProfile_MinimizeGain); // Set the auto function profile to Minimize Exposure Time camera.AutoFunctionProfile.SetValue(AutoFunctionProfile_MinimizeExposureTime); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous camera.GainAuto.SetValue(GainAuto_Continuous); camera.ExposureAuto.SetValue(ExposureAuto_Continuous);
INodeMap& nodemap = camera.GetNodeMap(); // Set the auto function profile to Minimize Gain CEnumerationPtr(nodemap.GetNode("AutoFunctionProfile"))->FromString("MinimizeGain"); // Set the auto function profile to Minimize Exposure Time CEnumerationPtr(nodemap.GetNode("AutoFunctionProfile"))->FromString("MinimizeExposureTime"); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous CEnumerationPtr(nodemap.GetNode("GainAuto"))->FromString("Continuous"); CEnumerationPtr(nodemap.GetNode("ExposureAuto"))->FromString("Continuous");
INodeMap& nodemap = camera.GetNodeMap(); // Set the auto function profile to Minimize Gain CEnumParameter(nodemap, "AutoFunctionProfile").SetValue("MinimizeGain"); // Set the auto function profile to Minimize Exposure Time CEnumParameter(nodemap, "AutoFunctionProfile").SetValue("MinimizeExposureTime"); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous CEnumParameter(nodemap, "GainAuto").SetValue("Continuous"); CEnumParameter(nodemap, "ExposureAuto").SetValue("Continuous");
// Set the auto function profile to Minimize Gain camera.Parameters[PLCamera.AutoFunctionProfile].SetValue(PLCamera.AutoFunctionProfile.MinimizeGain); // Set the auto function profile to Minimize Exposure Time camera.Parameters[PLCamera.AutoFunctionProfile].SetValue(PLCamera.AutoFunctionProfile.MinimizeExposureTime); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous camera.Parameters[PLCamera.GainAuto].SetValue(PLCamera.GainAuto.Continuous); camera.Parameters[PLCamera.ExposureAuto].SetValue(PLCamera.ExposureAuto.Continuous);
// Set the auto function profile to Minimize Gain Pylon.DeviceFeatureFromString(hdev, "AutoFunctionProfile", "MinimizeGain"); // Set the auto function profile to Minimize Exposure Time Pylon.DeviceFeatureFromString(hdev, "AutoFunctionProfile", "MinimizeExposureTime"); // Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous Pylon.DeviceFeatureFromString(hdev, "GainAuto", "Continuous"); Pylon.DeviceFeatureFromString(hdev, "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 */ /* Set the auto function profile to Minimize Gain */ errRes = PylonDeviceFeatureFromString(hdev, "AutoFunctionProfile", "MinimizeGain"); CHECK(errRes); /* Set the auto function profile to Minimize Exposure Time */ errRes = PylonDeviceFeatureFromString(hdev, "AutoFunctionProfile", "MinimizeExposureTime"); CHECK(errRes); /* Enable Gain and Exposure Auto auto functions and set the operating mode to Continuous */ errRes = PylonDeviceFeatureFromString(hdev, "GainAuto", "Continuous"); CHECK(errRes); errRes = PylonDeviceFeatureFromString(hdev, "ExposureAuto", "Continuous"); CHECK(errRes);
You can also use the pylon Viewer to easily set the parameters.