In this topic Hide
The Gain Auto auto function and the Exposure Auto auto function must both be set to Continuous.
To set the auto function profile, set the AutoFunctionProfile parameter to one of the following values:
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.
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.
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.
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.
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:
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).
Camera Model | Available Auto Function Profiles |
---|---|
All ace 2 GigE camera models | None, Auto Function Profile feature not supported |
All ace 2 USB 3.0 camera models | None, Auto Function Profile feature not supported |
All ace GigE camera models |
|
All ace USB 3.0 camera models |
|
All MED ace USB 3.0 camera models |
|
All MED ace GigE camera models |
|
All boost CXP-12 camera models | None, Auto Function Profile feature not supported |
All dart BCON for LVDS camera models |
|
All dart BCON for MIPI cameras models | None, Auto Function Profile feature not supported |
All dart USB 3.0 camera models |
|
All pulse USB 3.0 camera models |
|
// 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);
// 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 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");
// 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");
// 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 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 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");
// 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 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);
/* 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.