How to Control and Verify Frame Rate Using the Basler pylon SDK (C# / .NET 8)

How to Control and Verify Frame Rate Using the Basler pylon SDK (C# / .NET 8)

When developing vision applications—especially for real-time inspection or production environments—one of the most important performance metrics is frame rate (fps). You may need to know:

  • Can the camera actually capture frames at the rate I’ve set?
  • What limits the maximum achievable frame rate?
  • How do I read both the requested and the actual frame rate?

This article explains how to set frame rate, enable frame-rate control, and check the actual resulting fps using the Basler pylon SDK in C#.


✔ Environment

Item Details
Camera Basler acA2500-14gm
SDK Basler pylon Camera Software Suite
Lang C# / .NET 8 (Windows)

💡 AcquisitionFrameRate vs. ResultingFrameRate

Parameter Meaning
AcquisitionFrameRate The requested frame rate (user setting)
ResultingFrameRate The actual achievable frame rate calculated by the camera

Even if you set 30 fps, the resulting fps may be lower depending on exposure time, ROI, interface bandwidth, etc.


🔧 Enabling Frame Rate Control

Frame-rate control must be explicitly enabled:

Helper method for Boolean parameters

AcquisitionFrameRateEnable is a boolean parameter (IBoolean), so we define:


🔧 Setting the Desired Frame Rate

💡 Depending on the camera model, the parameter name may be:

  • AcquisitionFrameRate
  • AcquisitionFrameRateAbs

Verify via pylon Viewer or by checking:


📏 Reading the Requested and Actual Frame Rate

Requested (user-set) frame rate:

Actual achievable rate:

ResultingFrameRate is essential—it tells you whether your settings are physically achievable given the exposure time, bandwidth, and ROI.


🚧 What Limits Maximum Frame Rate?

1. Image Size / ROI

Smaller ROI = fewer pixels = higher possible fps.

2. Exposure Time

If exposure is too long, the sensor cannot start the next frame.

Example: ExposureTime = 50,000 µs (50 ms) → max possible fps is 20 fps.

3. Interface Bandwidth (USB3 / GigE)

High-resolution images or 24-bit RGB increase bandwidth usage, lowering achievable fps.


📝 When Your Frame Rate Setting Is Ignored

If you set AcquisitionFrameRate but nothing changes, check:

✔ Is AcquisitionFrameRateEnable set to true?

If false, the camera ignores your setting and runs at the highest allowable frame rate.


🧪 Example Test: 5 fps → 15 fps → 30 fps

Example output on my machine:

Even though 30 fps was requested, the actual fps dropped to ~14.6 fps due to bandwidth or exposure constraints.


🧭 Troubleshooting

Symptom Likely Cause
Frame rate does not increase Exposure too long / ROI too large
Cannot set AcquisitionFrameRate AcquisitionFrameRateEnable is false
ResultingFrameRate reads 0 Camera not streaming or not initialized

📝 Summary

  • Enable frame-rate control via AcquisitionFrameRateEnable = true
  • Set target fps with AcquisitionFrameRateAbs
  • Verify actual achievable fps via ResultingFrameRateAbs
  • Exposure time, ROI size, and bandwidth all influence the maximum fps

Understanding both the requested and actual frame rate is essential for designing stable, real-time machine vision systems.


🔜 Next Article

Next, we will build on frame-rate control by implementing continuous acquisition (burst capture) for high-speed inspections and inline processing.


筆者: @MilleVision

コメント

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

CAPTCHA