Acquisition Frame Rate (dart E)#
如果您希望在自由運行影像擷取中以恆定的影格率操作相機,這將非常有用。
使用此功能#
運作原理#
如果啟用了 Acquisition Frame Rate 功能,相機的最大影格率將受到您為擷取影格率參數所輸入的值所限制。
例如,將 Acquisition Frame Rate 設定為每秒 20 個影格 (fps) 會產生以下效果:
- 如果限制影格率的其他因素允許 大於 20 fps 的影格率,則影格率將保持在 20 fps 的恆定影格率。
- 如果其他限制影格率的因素僅允許小於 20 fps 的影格率,則影格率將不會受到 Acquisition Frame Rate 功能的影響。
設定 Acquisition Frame Rate#
- 將
AcquisitionFrameRateEnable參數設為true((如果可用)。 - 將
AcquisitionFrameRate將參數設為相機影格率所需的上限(以每秒影格數為單位)。
詳細資料#
| 相機型號 | 是否提供 AcquisitionFrameRateEnable 參數 |
|---|---|
| daA2500-60mc | 否 |
| daA2500-60mci | 是 |
| daA3840-30mc | 不支援 Acquisition Frame Rate 功能 |
| daA4200-30mci | 是 |
範例程式碼#
/* 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 upper limit of the camera's frame rate to 30 fps */
errRes = PylonDeviceSetBooleanFeature(hdev, "AcquisitionFrameRateEnable", 1);
CHECK(errRes);
errRes = PylonDeviceSetFloatFeature(hdev, "AcquisitionFrameRate", 30.0);
CHECK(errRes);
/* 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 upper limit of the camera's frame rate to 30 fps */
errRes = PylonDeviceSetBooleanFeature(hdev, "AcquisitionFrameRateEnable", 1);
CHECK(errRes);
errRes = PylonDeviceSetFloatFeature(hdev, "AcquisitionFrameRate", 30.0);
CHECK(errRes);
您也可以使用 pylon Viewer 輕鬆設定參數。