コンテンツにスキップ

Gain Auto (dart E)#

Gain Autoカメラ機能により、明るさの目標値に達するまで、指定された範囲内でゲインが自動的に調整されます。

Gain AutoとExposure Autoを同時に使用する場合は、Auto Function Profile機能を使用して、両方の効果のバランスを調整する方法を指定します。

ゲインを手動で調整するには、Gain機能を使用します。

機能を使用する#

Gain Autoの有効化/無効化#

To enable or disable the Gain Auto auto function, set the GainAuto parameter to one of the following operating modes:

  • Continuous: The camera adjusts the gain continuously while images are being acquired.
  • Off: Disables the Gain Auto auto function. The gain remains at the value resulting from the last automatic or manual adjustment.

情報

  • daA2500-60mcカメラでは、Gain Autoを有効または無効にすると、Exposure Autoも有効または無効になります。
  • カメラが画像を連続的にキャプチャしている場合、オートファンクションは短い遅延を伴って有効になります。最初の何枚かの画像は、オートファンクションの影響を受けない場合があります。

上限値の指定#

情報

この機能は、daA…mciカメラでのみ使用できます。

The auto function adjusts the Gain parameter value within specified limits.

To change the upper limit, set the AutoGainUpperLimit parameters to the desired value (in µs).

自動調整プロセス中、ゲインが指定された制限を超えることはありません。

明るさの目標値の指定#

情報

この機能は、daA…mciカメラでのみ使用できます。

オートファンクションにより、明るさの目標値(平均グレー値など)に達するまでゲインが調整されます。

To specify the target value, use the AutoTargetBrightness parameter.

情報

  • 目標値の計算には、Gammaなどの他の画像最適化は含まれません。設定された画像最適化によっては、カメラから出力される画像の平均グレー値が、目標値で示されたグレー値よりも大幅に低くなったり高くなったりする場合があります。
  • The camera also uses the AutoTargetBrightness parameter to control the Exposure Auto auto function. If you want to use Gain Auto and 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"

pylonViewerアを使用して、パラメーターを簡単に設定することもできます。