跳至內容
測試伺服器
開發伺服器

Gain (dart E)#

透過 Gain camera feature,您可以增加相機所輸出影像的亮度。

增加 gain 會提高影像的所有像素值。

若要自動調整 gain 值,請使用 Gain Auto 功能。

使用此功能#

設定 Gain 設定#

  1. 將 GainAuto 參數設為 Off.
  2. 將 Gain 將參數設為所需的值。
    最小和最大參數值 會因相機型號、所選的 Pixel Format 以及 Binning 設定而異。

詳細資料#

類比與數位 Gain#

類比 gain 是在相機感光元件的訊號轉換為數位值之前套用的。數位 gain 則是在轉換之後套用,也就是說,它基本上是對數位化數值進行相乘。

Gain 值#

相機型號 最低 Gain 設定 已啟用垂直 Binning 的最低 Gain 設定 最高 Gain 設定 (8-bit Pixel Formats) 最高 Gain 設定 (10-bit Pixel Formats) 最高 Gain 設定 (12-bit Pixel Formats)
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);

您也可以使用 pylon Viewer 輕鬆設定參數。