跳转到内容

Gain (dart E)#

相机的 Gain 功能可让您增加相机输出图像的亮度。

增加增益会增大图像的所有像素值。

要自动调整增益值,请使用 Gain Auto 功能。

该功能的使用#

配置增益设置#

  1. GainAuto 参数设置为 Off
  2. Gain 参数设置为所需值。
    最小和最大参数值因相机型号、所选像素格式和 Binning 设置而异。

详情#

模拟和数字增益#

在将来自相机传感器的信号转换为数字值之前,将应用模拟增益。在转换之后应用数字增益,即,它基本上是数字化值的乘积。

增益值#

相机型号 最小增益设置 启用垂直像素合并的最小增益设置 最大增益设置(8 位像素格式) 最大增益设置(10 位像素格式) 最大增益设置(12 位像素格式)
daA2500-60mc 0 - 26.85 - -
daA2500-60mci 0 不支持 33.98 - -
daA3840-30mc 0 - 15.56 - -
daA4200-30mci 0 不支持 33.06 - -

示例代码#

// Set the gain to 4.2 dB
camera.Gain.SetValue(4.2);
INodeMap& nodemap = camera.GetNodeMap();
// Set the gain to 4.2 dB
CFloatParameter(nodemap, "Gain").SetValue(4.2);
// Set the gain to 4.2 dB
camera.Parameters[PLCamera.Gain].SetValue(4.2);
/* 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 */
/* Set the gain to 4.2 dB */
errRes = PylonDeviceSetFloatFeature(hdev, "Gain", 4.2);
CHECK(errRes);
# Set the gain to 4.2 dB
camera.Gain.Value = 4.2
/* 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 */
/* Set the gain to 4.2 dB */
errRes = PylonDeviceSetFloatFeature(hdev, "Gain", 4.2);
CHECK(errRes);

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