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

Acquisition Frame Rate (dart E)#

透過 Acquisition Frame Rate camera feature,您可以為相機的影格率設定上限。

如果您希望在自由運行影像擷取中以恆定的影格率操作相機,這將非常有用。

使用此功能#

運作原理#

如果啟用了 Acquisition Frame Rate 功能,相機的最大影格率將受到您為擷取影格率參數所輸入的值所限制。

例如,將 Acquisition Frame Rate 設定為每秒 20 個影格 (fps) 會產生以下效果:

  • 如果限制影格率的其他因素允許 大於 20 fps 的影格率,則影格率將保持在 20 fps 的恆定影格率。
  • 如果其他限制影格率的因素僅允許小於 20 fps 的影格率,則影格率將不會受到 Acquisition Frame Rate 功能的影響。

設定 Acquisition Frame Rate#

  1. 將 AcquisitionFrameRateEnable 參數設為 true ((如果可用)。
  2. 將 AcquisitionFrameRate 將參數設為相機影格率所需的上限(以每秒影格數為單位)。

詳細資料#

相機型號 是否提供 AcquisitionFrameRateEnable 參數
daA2500-60mc 否
daA2500-60mci 是
daA3840-30mc 不支援 Acquisition Frame Rate 功能
daA4200-30mci 是

範例程式碼#

// Set the upper limit of the camera's frame rate to 30 fps
camera.AcquisitionFrameRateEnable.SetValue(true);
camera.AcquisitionFrameRate.SetValue(30.0);
INodeMap& nodemap = camera.GetNodeMap();
// Set the upper limit of the camera's frame rate to 30 fps
CBooleanParameter(nodemap, "AcquisitionFrameRateEnable").SetValue(true);
CFloatParameter(nodemap, "AcquisitionFrameRate").SetValue(30.0);
// Set the upper limit of the camera's frame rate to 30 fps
camera.Parameters[PLCamera.AcquisitionFrameRateEnable].SetValue(true);
camera.Parameters[PLCamera.AcquisitionFrameRate].SetValue(30.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 */
/* 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);
# Set the upper limit of the camera's frame rate to 30 fps
camera.AcquisitionFrameRateEnable.Value = True
camera.AcquisitionFrameRate.Value = 30.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 */
/* 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 輕鬆設定參數。