跳转到内容

Gain Auto (BCON for MIPI)#

相机的 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.

信息

  • On daA2500-60mc cameras, enabling or disabling Gain Auto also enables or disables Exposure Auto.
  • 当相机连续拍摄图像时,自动功能会在经过较短的延迟后生效。前几张图像可能不受自动功能的影响。

示例代码#

// Enable Gain Auto by setting the operating mode to Continuous
camera.GainAuto.SetValue(GainAuto_Continuous);
// Enable Gain Auto by setting the operating mode to Continuous
CEnumParameter(nodemap, "GainAuto").SetValue("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 */
/* Enable Gain Auto by setting the operating mode to Continuous */
errRes = PylonDeviceFeatureFromString(hdev, "GainAuto", "Continuous");
CHECK(errRes);

You can also use the pylon Viewer to easily set the parameters.