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

Resulting Acquisition Frame Rate#

「Acquisition Frame Rate 」相機功能可讓您根據當前的相機設定,估算預期的幀率。

舉例來說,如果您想知道在各個 triggers 之間需要等待多長時間,這會非常有用。

幀率以每秒幀數(fps)表示。

使用功能#

為何要檢查結果Acquisition Frame Rate#

優化幀率#

當相機設定為自由運行影像擷取及連續擷取模式時,若您希望針對影像應用優化擷取幀率,了解最終的擷取幀率將有所助益。您可以調整相機設定以限制幀率,直到最終的擷取幀率達到預期值為止。

最佳化觸發影像擷取#

當相機設定為觸發式影像擷取時,若您希望在不造成過度觸發的情況下盡可能頻繁地觸發相機,了解最終的擷取幀率將有所助益。您可以透過計算最終擷取幀率的倒數,來推算每次觸發訊號後必須等待的時間:1 / 最終Acquisition Frame Rate 。

範例:若最終的擷取幀率為 12.5,則每次觸發訊號後,必須等待至少 1/12.5 = 0.08 秒。否則,攝影機將忽略該觸發訊號,並產生「幀起始過觸發」事件。

檢查結果Acquisition Frame Rate#

若要檢查最終的擷取幀率(即根據當前相機設定所估算的幀率),請取得 BslResultingAcquisitionFrameRate 參數。其值以每秒幀數(fps)為單位。

該參數值已將所有會限制幀率的因素納入考量。

資訊

  • 在某些相機型號上,提供有 ResultingFramePeriod 參數亦可使用。它允許您判定結果算出的影格週期(frame period),也就是結果算出的影格率的倒數(1 / 影格率)。
  • 檢查所得的擷取幀率,無論是在相機閒置時,還是在相機正在擷取影像時,皆能正常運作。
  • 若您想查詢目前未連接至電腦的 Basler 攝影機的實際擷取幀率,請使用線上Basler 幀率計算器。

限制幀率的因素#

以下幾項因素可能會限制任何 Basler 攝影機的幀率:

  • Acquisition Frame Rate:若啟用「Acquisition Frame Rate 」功能,攝影機的幀率將受取樣幀率的限制。例如,若您啟用「Acquisition Frame Rate 」功能並將取樣幀率設定為 10 fps,則攝影機的幀率絕不會超過 10 fps。
  • 已分配頻寬:頻寬限制可能會降低幀率,特別是在有多台攝影機連接至同一台電腦時。幀率降低的程度取決於攝影機型號、連接至電腦的攝影機數量,以及電腦的硬體規格。
  • Binning:若可用,感測器像素合併功能可提高幀率。
  • Camera Operation Mode: 若 buffer operator 的 CameraOperationMode 參數可用且設定為 LongExposure, 幀率便會下降。
  • Device Link Throughput: 若 buffer operator 的 DeviceLinkThroughputLimitMode 參數可用且設定為 On時,它會限制資料傳輸到 DeviceLinkThroughputLimit 參數值。這也會限制幀率。
  • Exposure Time:若使用非常長的曝光時間,每秒可拍攝的幀數就會減少。
  • 場輸出模式:若可用,使用「場 0 輸出模式」或「場 1 輸出模式」可提高攝影機的幀率。
  • Image ROI:若使用較大的影像 ROI,每秒可擷取的幀數會減少。在大多數相機上,減少影像 ROI 的高度可提高幀率。在某些相機上,減少影像 ROI 的寬度同樣也能提高幀率。
  • 參數限制:在某些相機上,您可以使用 Remove Parameter Limits 功能來解除幀率限制。
  • Sensor Bit Depth:在某些相機上,您可以降低感光元件的位元深度來提高幀率。
  • Sensor Readout Mode:在某些相機上,您可以啟用快速感光元件讀取模式,藉此提高幀率。然而,此舉可能會對畫質造成負面影響。
  • Sensor Shutter Mode:若選取「全域重置釋放」快門模式,則無法進行重疊影像擷取。這會降低相機的幀率。
  • Stacked Zone Imaging:若有此功能,啟用「Stacked Zone Imaging 」功能可提高幀率。
  • Transfer Bit Depth:在某些相機上,您可以降低傳輸位元深度以提高幀率。

範例程式碼#

ace Classic/U/L GigE 相機#
// Get the resulting acquisition frame rate
double d = camera.ResultingFrameRateAbs.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Get the resulting acquisition frame rate
double d = CFloatParameter(nodemap, "ResultingFrameRateAbs").GetValue();
// Get the resulting acquisition frame rate
double d = camera.Parameters[PLCamera.ResultingFrameRateAbs].GetValue();
/* 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;
/* Get the resulting acquisition frame rate */
errRes = PylonDeviceGetFloatFeature(hdev, "ResultingFrameRateAbs", &d);
CHECK(errRes);
# Get the resulting acquisition frame rate
d = camera.ResultingFrameRateAbs.Value
aceClassic/U/L USB 3.0、dart Classic 及 pulse 攝影機#
// Get the resulting acquisition frame rate
double d = camera.ResultingFrameRate.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Get the resulting acquisition frame rate
double d = CFloatParameter(nodemap, "ResultingFrameRate").GetValue();
// Get the resulting acquisition frame rate
double d = camera.Parameters[PLCamera.ResultingFrameRate].GetValue();
/* 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;
/* Get the resulting acquisition frame rate */
errRes = PylonDeviceGetFloatFeature(hdev, "ResultingFrameRate", &d);
CHECK(errRes);
# Get the resulting acquisition frame rate
d = camera.ResultingFrameRate.Value
其他相機#
// Get the resulting acquisition frame rate
double d = camera.BslResultingAcquisitionFrameRate.GetValue();
INodeMap& nodemap = camera.GetNodeMap();
// Get the resulting acquisition frame rate
double d = CFloatParameter(nodemap, "BslResultingAcquisitionFrameRate").GetValue();
// Get the resulting acquisition frame rate
double d = camera.Parameters[PLCamera.BslResultingAcquisitionFrameRate].GetValue();
/* 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;
/* Get the resulting acquisition frame rate */
errRes = PylonDeviceGetFloatFeature(hdev, "BslResultingAcquisitionFrameRate", &d);
CHECK(errRes);
# Get the resulting acquisition frame rate
d = camera.BslResultingAcquisitionFrameRate.Value

您也可以 use the pylon Viewer 來輕鬆設定參數。