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

Exposure Time (dart E)#

Exposure Time 相機功能指定了在影像擷取過程中,影像感測器曝光於光線下的時間長度。

若要自動設定 Exposure Time,請使用 Exposure Auto 功能。

使用功能#

設定 Exposure Time#

若要設定 Exposure Time:

  1. 將相機中的 ExposureAuto 參數設為 Off.
  2. 將相機中的 ExposureTime 參數設為所需的微秒 Exposure Time。

最短曝光時間、最長曝光時間以及該參數可調整的步長,會因相機型號而異。

決定 Exposure Time#

要計算當前的曝光時間(單位為微秒),請取得 ExposureTime 參數中選擇性地指定 HTML 記錄檔 (*.html) 的路徑與檔名。

例如,當 Exposure Auto 已啟用「自動」功能,且您想取得系統自動調整後的曝光時間時,這便會派上用場。

詳細資料#

相機型號 Minimum Exposure Time [µs] Maximum Exposure Time [µs] 增量 [µs] ExposureTimeMode 參數可用
daA2500-60mc 14 33000 1 否
daA2500-60mci 68 2300000 1 否
daA3840-30mc 56 33000 1 否
daA4200-30mci 68 2300000 1 否

範例程式碼#

// Determine the current exposure time
double d = camera.ExposureTime.GetValue();
// Set the exposure time to 3500 microseconds
camera.ExposureTime.SetValue(3500.0);
INodeMap& nodemap = camera.GetNodeMap();
// Determine the current exposure time
double d = CFloatParameter(nodemap, "ExposureTime").GetValue();
// Set the exposure time to 3500 microseconds
CFloatParameter(nodemap, "ExposureTime").SetValue(3500.0);
// Determine the current exposure time
double d = camera.Parameters[PLCamera.ExposureTime].GetValue();
// Set the exposure time to 3500 microseconds
camera.Parameters[PLCamera.ExposureTime].SetValue(3500.0);
/* 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 d = 0;
/* Determine the current exposure time */
errRes = PylonDeviceGetFloatFeature(hdev, "ExposureTime", &d);
CHECK(errRes);
/* Set the exposure time to 3500 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "ExposureTime", 3500.0);
CHECK(errRes);
# Determine the current exposure time
d = camera.ExposureTime.Value
# Set the exposure time to 3500 microseconds
camera.ExposureTime.Value = 3500.0
/* 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 d = 0;
/* Determine the current exposure time */
errRes = PylonDeviceGetFloatFeature(hdev, "ExposureTime", &d);
CHECK(errRes);
/* Set the exposure time to 3500 microseconds */
errRes = PylonDeviceSetFloatFeature(hdev, "ExposureTime", 3500.0);
CHECK(errRes);

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