For racer 2 S line scan cameras with CXP interface, the following is true: The algorithm for generating the target brightness value is applied on the "camera side", and therefore only applied to a single line, not to the complete frame. The complete frame is built in the frame grabber where the randomly selected lines with the applied target brightness value are part of the assembled frame.
// Set the Exposure Auto auto function to its minimum lower limit// and its maximum upper limitdoubleminLowerLimit=camera.AutoExposureTimeLowerLimitRaw.GetMin();doublemaxUpperLimit=camera.AutoExposureTimeUpperLimitRaw.GetMax();camera.AutoExposureTimeLowerLimitRaw.SetValue(minLowerLimit);camera.AutoExposureTimeUpperLimitRaw.SetValue(maxUpperLimit);// Set the target brightness value to 128camera.AutoTargetValue.SetValue(128);// Select auto function ROI 1camera.AutoFunctionAOISelector.SetValue(AutoFunctionAOISelector_AOI1);// Enable the 'Intensity' auto function (Gain Auto + Exposure Auto)// for the auto function ROI selectedcamera.AutoFunctionAOIUsageIntensity.SetValue(true);// 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 minimum lower limit// and its maximum upper limitdoubleminLowerLimit=CFloatParameter(nodemap,"AutoExposureTimeLowerLimitRaw").GetMin();doublemaxUpperLimit=CFloatParameter(nodemap,"AutoExposureTimeUpperLimitRaw").GetMax();CFloatParameter(nodemap,"AutoExposureTimeLowerLimitRaw").SetValue(minLowerLimit);CFloatParameter(nodemap,"AutoExposureTimeUpperLimitRaw").SetValue(maxUpperLimit);// Set the target brightness value to 128CIntegerParameter(nodemap,"AutoTargetValue").SetValue(128);// Select auto function ROI 1CEnumParameter(nodemap,"AutoFunctionAOISelector").SetValue("AOI1");// Enable the 'Intensity' auto function (Gain Auto + Exposure Auto)// for the auto function ROI selectedCBooleanParameter(nodemap,"AutoFunctionAOIUsageIntensity").SetValue(true);// Enable Exposure Auto by setting the operating mode to ContinuousCEnumParameter(nodemap,"ExposureAuto").SetValue("Continuous");
// Set the Exposure Auto auto function to its minimum lower limit// and its maximum upper limitdoubleminLowerLimit=camera.Parameters[PLCamera.AutoExposureTimeLowerLimitRaw].GetMinimum();doublemaxUpperLimit=camera.Parameters[PLCamera.AutoExposureTimeUpperLimitRaw].GetMaximum();camera.Parameters[PLCamera.AutoExposureTimeLowerLimitRaw].SetValue(minLowerLimit);camera.Parameters[PLCamera.AutoExposureTimeUpperLimitRaw].SetValue(maxUpperLimit);// Set the target brightness value to 128camera.Parameters[PLCamera.AutoTargetValue].SetValue(128);// Select auto function ROI 1camera.Parameters[PLCamera.AutoFunctionAOISelector].SetValue(PLCamera.AutoFunctionAOISelector.AOI1);// Enable the 'Intensity' auto function (Gain Auto + Exposure Auto)// for the auto function ROI selectedcamera.Parameters[PLCamera.AutoFunctionAOIUsageIntensity].SetValue(true);// 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 */doubleminLowerLimit=0;doublemaxUpperLimit=0;/* Set the Exposure Auto auto function to its minimum lower limit *//* and its maximum upper limit */errRes=PylonDeviceGetFloatFeatureMin(hdev,"AutoExposureTimeLowerLimitRaw",&minLowerLimit);CHECK(errRes);errRes=PylonDeviceGetFloatFeatureMax(hdev,"AutoExposureTimeUpperLimitRaw",&maxUpperLimit);CHECK(errRes);errRes=PylonDeviceSetFloatFeature(hdev,"AutoExposureTimeLowerLimitRaw",minLowerLimit);CHECK(errRes);errRes=PylonDeviceSetFloatFeature(hdev,"AutoExposureTimeUpperLimitRaw",maxUpperLimit);CHECK(errRes);/* Set the target brightness value to 128 */errRes=PylonDeviceSetIntegerFeature(hdev,"AutoTargetValue",128);CHECK(errRes);/* Select auto function ROI 1 */errRes=PylonDeviceFeatureFromString(hdev,"AutoFunctionAOISelector","AOI1");CHECK(errRes);/* Enable the 'Intensity' auto function (Gain Auto + Exposure Auto) *//* for the auto function ROI selected */errRes=PylonDeviceSetBooleanFeature(hdev,"AutoFunctionAOIUsageIntensity",1);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 minimum lower limit# and its maximum upper limitminLowerLimit=camera.AutoExposureTimeLowerLimitRaw.MinmaxUpperLimit=camera.AutoExposureTimeUpperLimitRaw.Maxcamera.AutoExposureTimeLowerLimitRaw.Value=minLowerLimitcamera.AutoExposureTimeUpperLimitRaw.Value=maxUpperLimit# Set the target brightness value to 128camera.AutoTargetValue.Value=128# Select auto function ROI 1camera.AutoFunctionAOISelector.Value="AOI1"# Enable the 'Intensity' auto function (Gain Auto + Exposure Auto)# for the auto function ROI selectedcamera.AutoFunctionAOIUsageIntensity.Value=True# Enable Exposure Auto by setting the operating mode to Continuouscamera.ExposureAuto.Value="Continuous"
// Set the Exposure Auto auto function to its minimum lower limit// and its maximum upper limitdoubleminLowerLimit=camera.AutoExposureTimeLowerLimit.GetMin();doublemaxUpperLimit=camera.AutoExposureTimeUpperLimit.GetMax();camera.AutoExposureTimeLowerLimit.SetValue(minLowerLimit);camera.AutoExposureTimeUpperLimit.SetValue(maxUpperLimit);// Set the target brightness value to 0.6camera.AutoTargetBrightness.SetValue(0.6);// Select auto function ROI 1camera.AutoFunctionROISelector.SetValue(AutoFunctionROISelector_ROI1);// Enable the 'Brightness' auto function (Gain Auto + Exposure Auto)// for the auto function ROI selectedcamera.AutoFunctionROIUseBrightness.SetValue(true);// 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 minimum lower limit// and its maximum upper limitdoubleminLowerLimit=CFloatParameter(nodemap,"AutoExposureTimeLowerLimit").GetMin();doublemaxUpperLimit=CFloatParameter(nodemap,"AutoExposureTimeUpperLimit").GetMax();CFloatParameter(nodemap,"AutoExposureTimeLowerLimit").SetValue(minLowerLimit);CFloatParameter(nodemap,"AutoExposureTimeUpperLimit").SetValue(maxUpperLimit);// Set the target brightness value to 0.6CFloatParameter(nodemap,"AutoTargetBrightness").SetValue(0.6);// Select auto function ROI 1CEnumParameter(nodemap,"AutoFunctionROISelector").SetValue("ROI1");// Enable the 'Brightness' auto function (Gain Auto + Exposure Auto)// for the auto function ROI selectedCBooleanParameter(nodemap,"AutoFunctionROIUseBrightness").SetValue(true);// Enable Exposure Auto by setting the operating mode to ContinuousCEnumParameter(nodemap,"ExposureAuto").SetValue("Continuous");
// Set the Exposure Auto auto function to its minimum lower limit// and its maximum upper limitdoubleminLowerLimit=camera.Parameters[PLCamera.AutoExposureTimeLowerLimit].GetMinimum();doublemaxUpperLimit=camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].GetMaximum();camera.Parameters[PLCamera.AutoExposureTimeLowerLimit].SetValue(minLowerLimit);camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].SetValue(maxUpperLimit);// Set the target brightness value to 0.6camera.Parameters[PLCamera.AutoTargetBrightness].SetValue(0.6);// Select auto function ROI 1camera.Parameters[PLCamera.AutoFunctionROISelector].SetValue(PLCamera.AutoFunctionROISelector.ROI1);// Enable the 'Brightness' auto function (Gain Auto + Exposure Auto)// for the auto function ROI selectedcamera.Parameters[PLCamera.AutoFunctionROIUseBrightness].SetValue(true);// 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 */doubleminLowerLimit=0;doublemaxUpperLimit=0;/* Set the Exposure Auto auto function to its minimum lower limit *//* and its maximum upper limit */errRes=PylonDeviceGetFloatFeatureMin(hdev,"AutoExposureTimeLowerLimit",&minLowerLimit);CHECK(errRes);errRes=PylonDeviceGetFloatFeatureMax(hdev,"AutoExposureTimeUpperLimit",&maxUpperLimit);CHECK(errRes);errRes=PylonDeviceSetFloatFeature(hdev,"AutoExposureTimeLowerLimit",minLowerLimit);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);/* Select auto function ROI 1 */errRes=PylonDeviceFeatureFromString(hdev,"AutoFunctionROISelector","ROI1");CHECK(errRes);/* Enable the 'Brightness' auto function (Gain Auto + Exposure Auto) *//* for the auto function ROI selected */errRes=PylonDeviceSetBooleanFeature(hdev,"AutoFunctionROIUseBrightness",1);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 minimum lower limit# and its maximum upper limitminLowerLimit=camera.AutoExposureTimeLowerLimit.MinmaxUpperLimit=camera.AutoExposureTimeUpperLimit.Maxcamera.AutoExposureTimeLowerLimit.Value=minLowerLimitcamera.AutoExposureTimeUpperLimit.Value=maxUpperLimit# Set the target brightness value to 0.6camera.AutoTargetBrightness.Value=0.6# Select auto function ROI 1camera.AutoFunctionROISelector.Value="ROI1"# Enable the 'Brightness' auto function (Gain Auto + Exposure Auto)# for the auto function ROI selectedcamera.AutoFunctionROIUseBrightness.Value=True# Enable Exposure Auto by setting the operating mode to Continuouscamera.ExposureAuto.Value="Continuous"