How to Stabilize Frame Rate for D-435 in C#
We are having trouble getting 30fps @640x360 for color frames in a well-lit office so we are dropping to 15fps @ 424x240 to accommodate various low light locations (hospitals).
Now we actually get 16fps sometimes (only asking for 15). We need to lock this down to a constant framerate.
Marty was very helpful to me on the old forum:https://forums.intel.com/s/question/0D50P00004SXszySAD/d435-framerate-way-off-saving-to-disk-using-c?language=en_US
I think we want to disable "Auto Exposure Priority" and still have auto-exposure enabled.
PLEASE: Can you please point me to code samples to change this option or, better yet, use the json config file in C#? Our application is based on the C# Wrapper - Sample Tutorial #2 - "Capture".
Thank you in advance,
Brent
-
C# for loading a json file can be found here:
https://github.com/IntelRealSense/librealsense/issues/2854#issuecomment-444803962
In the case of this example, the filename '1.json' refers to the "Default" visual preset json. Substitute in your own json file-name.
The easiest way to create your own json file is to define settings in the RealSense Viewer and then export them as a json using an icon on the toolbar at the top of the Viewer's options side-panel.
I was unable to locate a means to alter auto exposure priority in C#, unfortunately.
-
Thank you Marty. I also don't see an entry in the json file, or any differing values after disabling 'Auto-Exposure Priority' in the RS Viewer.
I understand that I am at a disadvantage, working with the C# wrapper instead of C++, but isn't it a fairly common requirement to fix the framerate? We are comparing datasets directly in AI with Deep Learning so a (nearly) constant framerate is critical across varying lighting circumstances..
-
I checked the Viewer's json export button. Its highlight tooltip text says that it only exports settings from the Stereo module, whilst the auto-exposure priority on-off control is in the RGB module.
I cannot think of another way to achieve a constant FPS other than the methods already discussed, aside from one possibility. It is apparently possible to sync a stream from a RealSense camera with a stream from a non-RealSense external camera by using metadata to align their separate recordings. An external camera separated from how RealSense handles its exposure may give finer control over stream FPS.
Details of a case where somebody attempts to align a RealSense with a Stereolabs ZED depth camera are in the link below.
https://github.com/IntelRealSense/librealsense/issues/2186#issue-347002434
Please sign in to leave a comment.
Comments
4 comments