Exposure Auto (dart E)#
Exposure AutoとGain Autoを同時に使用する場合は、Auto Function Profile機能を使用して、両方の効果のバランスを調整する方法を指定します。
露光時間を手動で調整するには、Exposure Time機能を使用します。
機能を使用する#
Exposure Autoの有効化/無効化#
Exposure Autoのオートファンクションを有効または無効にするには、ExposureAuto
パラメーターを次のいずれかの動作モードに設定します。
Continuous
:カメラは、画像の取得中に継続的に露光時間を調整します。Off
:Exposure Autoオートファンクションを無効にします。露光時間は、最後の自動調整または手動調整の結果として得られた値に維持されます。
情報
- daA2500-60mcカメラでは、Exposure Autoを有効または無効にすることでGain Autoも有効または無効になります。
- カメラが画像を連続的にキャプチャしている場合、オートファンクションは短い遅延を伴って有効になります。最初の何枚かの画像は、オートファンクションの影響を受けない場合があります。
上限値の指定#
情報
この機能は、daA…mciカメラでのみ使用できます。
オートファンクションは、指定された制限内でExposureTime
パラメーター値を調整します。
上限値を変更するには、AutoExposureTimeUpperLimit
パラメーターを値(μs)に設定します。
自動調整プロセス中、露光時間が指定された制限を超えることはありません。
上限値を高く設定すると、カメラのフレームレートが低下する場合があります。
明るさの目標値の指定#
情報
この機能は、daA…mciカメラでのみ使用できます。
オートファンクションにより、明るさの目標値(平均グレー値など)に達するまで露光時間が調整されます。
目標値を指定するには、AutoTargetBrightness
パラメーターを使用します。
情報
- 目標値の計算には、Gammaなどの他の画像最適化は含まれません。設定された画像最適化によっては、カメラから出力される画像の平均グレー値が、目標値で示されたグレー値よりも大幅に低くなったり高くなったりする場合があります。
- また、カメラは、
AutoTargetBrightness
パラメーターを使用してGain Autoオートファンクションを制御します。Exposure AutoとGain Autoを同時に使用する場合は、Auto Function Profile機能を使用して、両方の効果のバランスを調整する方法を指定します。
サンプルコード#
// Set the Exposure Auto auto function to its maximum upper limit
double maxUpperLimit = camera.AutoExposureTimeUpperLimit.GetMax();
camera.AutoExposureTimeUpperLimit.SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
camera.AutoTargetBrightness.SetValue(0.6);
// 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 maximum upper limit
double maxUpperLimit = CFloatParameter(nodemap, "AutoExposureTimeUpperLimit").GetMax();
CFloatParameter(nodemap, "AutoExposureTimeUpperLimit").SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
CFloatParameter(nodemap, "AutoTargetBrightness").SetValue(0.6);
// Enable Exposure Auto by setting the operating mode to Continuous
CEnumParameter(nodemap, "ExposureAuto").SetValue("Continuous");
// Set the Exposure Auto auto function to its maximum upper limit
double maxUpperLimit = camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].GetMaximum();
camera.Parameters[PLCamera.AutoExposureTimeUpperLimit].SetValue(maxUpperLimit);
// Set the target brightness value to 0.6
camera.Parameters[PLCamera.AutoTargetBrightness].SetValue(0.6);
// 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 maxUpperLimit = 0;
/* Set the Exposure Auto auto function to its maximum upper limit */
errRes = PylonDeviceGetFloatFeatureMax(hdev, "AutoExposureTimeUpperLimit", &maxUpperLimit);
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);
/* 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 maximum upper limit
maxUpperLimit = camera.AutoExposureTimeUpperLimit.Max
camera.AutoExposureTimeUpperLimit.Value = maxUpperLimit
# Set the target brightness value to 0.6
camera.AutoTargetBrightness.Value = 0.6
# Enable Exposure Auto by setting the operating mode to Continuous
camera.ExposureAuto.Value = "Continuous"
You can also use the pylon Viewer to easily set the parameters.