콘텐츠로 건너뛰기
STAGING SERVER
DEVELOPMENT SERVER

Exposure Auto#

Exposure Auto camera feature는 지정된 한계 내에서 exposure time을 자동으로 조정하여 목표 밝기에 도달하도록 합니다.

자동 기능을 위한 픽셀 데이터는 하나 또는 여러 개의 auto function ROI에서 가져올 수 있습니다.

Exposure Auto와 Gain Auto를 동시에 사용하려면 Auto Function Profile 기능을 사용하여 두 기능의 효과가 균형을 이루는 방식을 지정하십시오.

exposure time을 수동으로 조정하려면 Exposure Time 기능을 사용하십시오.

기능 사용법#

Exposure Auto 활성화 또는 비활성화#

Exposure Auto 자동 기능을 활성화하거나 비활성화하려면:

  1. Assign 적어도 하나의 auto function ROI를 Exposure Auto 자동 기능에 할당합니다.
    auto function ROI가 Image ROI와 부분적으로 또는 완전히 겹치도록 하십시오.
  2. 다음 값 중 하나로 ExposureMode 매개변수: Timed.
  3. 다음 값 중 하나로 ExposureAuto 매개변수를 다음 Operating Mode 중 하나로 설정합니다.
    • Once: 지정된 값에 도달할 때까지 목표 밝기 값 이(가) 도달할 때까지 카메라가 노출 시간을 조정합니다. 이 목표에 도달하거나 최대 30회의 계산 주기가 지난 후, 카메라는 자동 기능을 다음과 같이 설정합니다. Off. 이후의 모든 이미지에 대해 카메라는 마지막 계산에서 산출된 노출 시간을 적용합니다.
    • Continuous: 카메라가 이미지를 획득하는 동안 exposure time을 연속적으로 조정합니다.
    • Off: Exposure Auto 자동 기능을 비활성화합니다. exposure time은 마지막 자동 또는 수동 조정으로 인해 발생한 값으로 유지됩니다.

정보

카메라가 이미지를 연속적으로 캡처할 때 자동 기능은 약간의 지연과 함께 적용됩니다. 처음 몇 장의 이미지는 자동 기능의 영향을 받지 않을 수 있습니다.

하한 및 상한 지정#

자동 기능은 ExposureTime 파라미터 값은 사용자가 지정한 제한 범위 내에 있습니다.

제한 범위를 변경하려면, 해당 AutoExposureTimeLowerLimit 그리고 다음을 설정하십시오: AutoExposureTimeUpperLimit 파라미터를 원하는 값(µs 단위)으로 설정합니다.

예: 예를 들어, AutoExposureTimeLowerLimit 파라미터를 1000으로 설정하고 AutoExposureTimeUpperLimit 파라미터를 5000으로 설정합니다. 자동 조정 과정 동안 노출 시간은 절대 1000 µs 미만으로 떨어지지 않으며 5000 µs를 초과하지 않습니다.

만약 AutoExposureTimeUpperLimit 파라미터가 높은 값으로 설정된 경우 카메라의 프레임 속도 가 감소할 수 있습니다.

목표 밝기 값 지정#

자동 기능은 목표 밝기 값(즉, 평균 회색 값)에 도달할 때까지 exposure time을 조정합니다.

목표 값을 지정하려면 다음을 사용하십시오. AutoTargetBrightness 파라미터.

정보

  • 목표 값 계산에는 Gamma와 같은 다른 이미지 최적화가 포함되지 않습니다. 설정된 이미지 최적화에 따라 카메라에서 출력되는 이미지의 평균 회색 값은 목표 값보다 현저히 낮거나 높을 수 있습니다.
  • 카메라는 또한 다음을 사용합니다. AutoTargetBrightness 매개변수를 사용하여 다음을 제어합니다. 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.
  • CXP 인터페이스가 탑재된 racer 2 S 라인 스캔 카메라의 경우 다음 사항이 적용됩니다.
    목표 밝기 값을 생성하는 알고리즘은 "카메라 측"에서 적용되므로 전체 프레임이 아닌 단일 라인에만 적용됩니다. 전체 프레임은 프레임 그래버에서 구축되며, 여기서 목표 밝기 값이 적용된 임의로 선택된 라인들이 조립된 프레임의 일부가 됩니다.
  • 일부 카메라 모델에서는 Remove Parameter Limits 기능을 사용하여 목표 값 파라미터 제한을 늘릴 수 있습니다.

Basler ace GigE 카메라 모델에서는 Gray Value Adjustment Damping 팩터를 지정할 수도 있습니다. Basler dart 및 pulse 카메라 모델에서는 Brightness Adjustment Damping 팩터를 지정할 수 있습니다.

댐핑 팩터를 사용하면 목표 값에 더 천천히 도달하게 됩니다.

샘플 코드#

ace Classic/U/L GigE 카메라#
// Set the Exposure Auto auto function to its minimum lower limit
// and its maximum upper limit
double minLowerLimit = camera.AutoExposureTimeLowerLimitRaw.GetMin();
double maxUpperLimit = camera.AutoExposureTimeUpperLimitRaw.GetMax();
camera.AutoExposureTimeLowerLimitRaw.SetValue(minLowerLimit);
camera.AutoExposureTimeUpperLimitRaw.SetValue(maxUpperLimit);
// Set the target brightness value to 128
camera.AutoTargetValue.SetValue(128);
// Select auto function ROI 1
camera.AutoFunctionAOISelector.SetValue(AutoFunctionAOISelector_AOI1);
// Enable the 'Intensity' auto function (Gain Auto + Exposure Auto)
// for the auto function ROI selected
camera.AutoFunctionAOIUsageIntensity.SetValue(true);
// 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 minimum lower limit
// and its maximum upper limit
double minLowerLimit = CFloatParameter(nodemap, "AutoExposureTimeLowerLimitRaw").GetMin();
double maxUpperLimit = CFloatParameter(nodemap, "AutoExposureTimeUpperLimitRaw").GetMax();
CFloatParameter(nodemap, "AutoExposureTimeLowerLimitRaw").SetValue(minLowerLimit);
CFloatParameter(nodemap, "AutoExposureTimeUpperLimitRaw").SetValue(maxUpperLimit);
// Set the target brightness value to 128
CIntegerParameter(nodemap, "AutoTargetValue").SetValue(128);
// Select auto function ROI 1
CEnumParameter(nodemap, "AutoFunctionAOISelector").SetValue("AOI1");
// Enable the 'Intensity' auto function (Gain Auto + Exposure Auto)
// for the auto function ROI selected
CBooleanParameter(nodemap, "AutoFunctionAOIUsageIntensity").SetValue(true);
// Enable Exposure Auto by setting the operating mode to Continuous
CEnumParameter(nodemap, "ExposureAuto").SetValue("Continuous");
// Set the Exposure Auto auto function to its minimum lower limit
// and its maximum upper limit
double minLowerLimit = camera.Parameters[PLCamera.AutoExposureTimeLowerLimitRaw].GetMinimum();
double maxUpperLimit = camera.Parameters[PLCamera.AutoExposureTimeUpperLimitRaw].GetMaximum();
camera.Parameters[PLCamera.AutoExposureTimeLowerLimitRaw].SetValue(minLowerLimit);
camera.Parameters[PLCamera.AutoExposureTimeUpperLimitRaw].SetValue(maxUpperLimit);
// Set the target brightness value to 128
camera.Parameters[PLCamera.AutoTargetValue].SetValue(128);
// Select auto function ROI 1
camera.Parameters[PLCamera.AutoFunctionAOISelector].SetValue(PLCamera.AutoFunctionAOISelector.AOI1);
// Enable the 'Intensity' auto function (Gain Auto + Exposure Auto)
// for the auto function ROI selected
camera.Parameters[PLCamera.AutoFunctionAOIUsageIntensity].SetValue(true);
// 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 minLowerLimit = 0;
double maxUpperLimit = 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 limit
minLowerLimit = camera.AutoExposureTimeLowerLimitRaw.Min
maxUpperLimit = camera.AutoExposureTimeUpperLimitRaw.Max
camera.AutoExposureTimeLowerLimitRaw.Value = minLowerLimit
camera.AutoExposureTimeUpperLimitRaw.Value = maxUpperLimit
# Set the target brightness value to 128
camera.AutoTargetValue.Value = 128
# Select auto function ROI 1
camera.AutoFunctionAOISelector.Value = "AOI1"
# Enable the 'Intensity' auto function (Gain Auto + Exposure Auto)
# for the auto function ROI selected
camera.AutoFunctionAOIUsageIntensity.Value = True
# Enable Exposure Auto by setting the operating mode to Continuous
camera.ExposureAuto.Value = "Continuous"
기타 카메라#
// Set the Exposure Auto auto function to its minimum lower limit
// and its maximum upper limit
double minLowerLimit = camera.AutoExposureTimeLowerLimit.GetMin();
double maxUpperLimit = camera.AutoExposureTimeUpperLimit.GetMax();
camera.AutoExposureTimeLowerLimit.SetValue(minLowerLimit);
camera.AutoExposureTimeUpperLimit.SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
camera.AutoTargetBrightness.SetValue(0.6);
// Select auto function ROI 1
camera.AutoFunctionROISelector.SetValue(AutoFunctionROISelector_ROI1);
// Enable the 'Brightness' auto function (Gain Auto + Exposure Auto)
// for the auto function ROI selected
camera.AutoFunctionROIUseBrightness.SetValue(true);
// 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 minimum lower limit
// and its maximum upper limit
double minLowerLimit = CFloatParameter(nodemap, "AutoExposureTimeLowerLimit").GetMin();
double maxUpperLimit = CFloatParameter(nodemap, "AutoExposureTimeUpperLimit").GetMax();
CFloatParameter(nodemap, "AutoExposureTimeLowerLimit").SetValue(minLowerLimit);
CFloatParameter(nodemap, "AutoExposureTimeUpperLimit").SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
CFloatParameter(nodemap, "AutoTargetBrightness").SetValue(0.6);
// Select auto function ROI 1
CEnumParameter(nodemap, "AutoFunctionROISelector").SetValue("ROI1");
// Enable the 'Brightness' auto function (Gain Auto + Exposure Auto)
// for the auto function ROI selected
CBooleanParameter(nodemap, "AutoFunctionROIUseBrightness").SetValue(true);
// Enable Exposure Auto by setting the operating mode to Continuous
CEnumParameter(nodemap, "ExposureAuto").SetValue("Continuous");
// Set the Exposure Auto auto function to its minimum lower limit
// and its maximum upper limit
double minLowerLimit = camera.Parameters[PLCamera.AutoExposureTimeLowerLimit].GetMinimum();
double maxUpperLimit = camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].GetMaximum();
camera.Parameters[PLCamera.AutoExposureTimeLowerLimit].SetValue(minLowerLimit);
camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
camera.Parameters[PLCamera.AutoTargetBrightness].SetValue(0.6);
// Select auto function ROI 1
camera.Parameters[PLCamera.AutoFunctionROISelector].SetValue(PLCamera.AutoFunctionROISelector.ROI1);
// Enable the 'Brightness' auto function (Gain Auto + Exposure Auto)
// for the auto function ROI selected
camera.Parameters[PLCamera.AutoFunctionROIUseBrightness].SetValue(true);
// 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 minLowerLimit = 0;
double maxUpperLimit = 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 limit
minLowerLimit = camera.AutoExposureTimeLowerLimit.Min
maxUpperLimit = camera.AutoExposureTimeUpperLimit.Max
camera.AutoExposureTimeLowerLimit.Value = minLowerLimit
camera.AutoExposureTimeUpperLimit.Value = maxUpperLimit
# Set the target brightness value to 0.6
camera.AutoTargetBrightness.Value = 0.6
# Select auto function ROI 1
camera.AutoFunctionROISelector.Value = "ROI1"
# Enable the 'Brightness' auto function (Gain Auto + Exposure Auto)
# for the auto function ROI selected
camera.AutoFunctionROIUseBrightness.Value = True
# Enable Exposure Auto by setting the operating mode to Continuous
camera.ExposureAuto.Value = "Continuous"

또한 pylon Viewer를 사용하여 파라미터를 손쉽게 설정할 수 있습니다.