Gain Auto (dart E)#
Gain Auto와 Exposure Auto를 동시에 사용하려면 Auto Function Profile 기능을 사용하여 두 기능의 효과가 균형을 이루는 방식을 지정하십시오.
gain을 수동으로 조절하려면 Gain 기능을 사용하십시오.
기능 사용법#
Gain Auto 활성화 또는 비활성화#
Gain Auto 자동 기능을 활성화 또는 비활성화하려면 다음을 설정하십시오. GainAuto 매개변수를 다음 Operating Mode 중 하나로 설정합니다.
Continuous: 이미지가 취득되는 동안 카메라는 계속해서 gain을 조절합니다.Off: Gain Auto 자동 기능을 비활성화합니다. gain은 마지막 자동 또는 수동 조절 결과로 얻은 값으로 유지됩니다.
정보
- daA2500-60mc 카메라에서는 Gain Auto를 활성화 또는 비활성화하면 Exposure Auto도 함께 활성화 또는 비활성화됩니다.
- 카메라가 이미지를 연속적으로 캡처할 때 자동 기능은 약간의 지연과 함께 적용됩니다. 처음 몇 장의 이미지는 자동 기능의 영향을 받지 않을 수 있습니다.
상한값 지정#
정보
이 기능은 daA…mci 카메라에서만 사용할 수 있습니다.
자동 기능은 Gain 매개변수 값을 지정된 한계 내에서 조정합니다.
상한값을 변경하려면 다음을 설정하십시오. AutoGainUpperLimit 매개변수를 원하는 값(µs)으로 설정합니다.
자동 조절 프로세스 동안에는 지정된 한계를 초과하여 Gain이 높아지지 않습니다.
목표 밝기 값 지정#
정보
이 기능은 daA…mci 카메라에서만 사용할 수 있습니다.
자동 기능은 목표 밝기 값, 즉 평균 회색조 값에 도달할 때까지 gain을 조절합니다.
목표 값을 지정하려면 다음을 사용하십시오. AutoTargetBrightness 파라미터.
정보
- 목표 값 계산에는 Gamma와 같은 다른 이미지 최적화가 포함되지 않습니다. 설정된 이미지 최적화에 따라 카메라에서 출력되는 이미지의 평균 회색 값은 목표 값보다 현저히 낮거나 높을 수 있습니다.
- 카메라는 또한 다음을 사용합니다.
AutoTargetBrightness매개변수를 사용하여 다음을 제어합니다. Exposure Auto 자동 기능입니다. Gain Auto를 사용하려면 Exposure Auto at the same time, use the Auto Function Profile feature to specify how the effects of both are balanced.
샘플 코드#
// Set the the Gain Auto auto function to its maximum upper limit
double maxUpperLimit = camera.AutoGainUpperLimit.GetMax();
camera.AutoGainUpperLimit.SetValue(maxUpperLimit);
// Specify the target value
camera.AutoTargetBrightness.SetValue(0.6);
// Enable Gain Auto by setting the operating mode to Continuous
camera.GainAuto.SetValue(GainAuto_Continuous);
INodeMap& nodemap = camera.GetNodeMap();
// Set the the Gain Auto auto function to its maximum upper limit
double maxUpperLimit = CFloatParameter(nodemap, "AutoGainUpperLimit").GetMax();
CFloatParameter(nodemap, "AutoGainUpperLimit").SetValue(maxUpperLimit);
// Specify the target value
CFloatParameter(nodemap, "AutoTargetBrightness").SetValue(0.6);
// Enable Gain Auto by setting the operating mode to Continuous
CEnumParameter(nodemap, "GainAuto").SetValue("Continuous");
// Set the the Gain Auto auto function to its maximum upper limit
double maxUpperLimit = camera.Parameters[PLCamera.AutoGainUpperLimit].GetMaximum();
camera.Parameters[PLCamera.AutoGainUpperLimit].SetValue(maxUpperLimit);
// Specify the target value
camera.Parameters[PLCamera.AutoTargetBrightness].SetValue(0.6);
// Enable Gain Auto by setting the operating mode to Continuous
camera.Parameters[PLCamera.GainAuto].SetValue(PLCamera.GainAuto.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 maxUpperLimit = 0;
/* Set the the Gain Auto auto function to its maximum upper limit */
errRes = PylonDeviceGetFloatFeatureMax(hdev, "AutoGainUpperLimit", &maxUpperLimit);
CHECK(errRes);
errRes = PylonDeviceSetFloatFeature(hdev, "AutoGainUpperLimit", maxUpperLimit);
CHECK(errRes);
/* Specify the target value */
errRes = PylonDeviceSetFloatFeature(hdev, "AutoTargetBrightness", 0.6);
CHECK(errRes);
/* Enable Gain Auto by setting the operating mode to Continuous */
errRes = PylonDeviceFeatureFromString(hdev, "GainAuto", "Continuous");
CHECK(errRes);
# Set the the Gain Auto auto function to its maximum upper limit
maxUpperLimit = camera.AutoGainUpperLimit.Max
camera.AutoGainUpperLimit.Value = maxUpperLimit
# Specify the target value
camera.AutoTargetBrightness.Value = 0.6
# Enable Gain Auto by setting the operating mode to Continuous
camera.GainAuto.Value = "Continuous"
You can also use the pylon Viewer to easily set the parameters.