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

增益 (dart E)#

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

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

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

使用功能#

設定增益 (Gain)#

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

詳細資料#

類比與數位增益#

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

增益值#

相機型號 最低增益設定 啟用 Vertical Binning 時的最低增益設定 最高增益設定(8-bit Pixel Format) 最高增益設定(10-bit Pixel Format) 最高增益設定(12-bit Pixel Format)
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 輕鬆設定參數。