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

Acquisition Frame Rate (dart E)#

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

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

使用功能#

運作原理#

如果啟用了 Acquisition Frame Rate 功能,相機的最大影格速率將受限於您為 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 輕鬆設定參數。