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

Acquisition Frame Rate (dart E)#

Acquisition Frame Rate camera feature 允許您為相機的影格率設定上限。

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

使用此功能#

運作原理#

如果啟用了 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 Parameter Available
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 輕鬆設定參數。