Changing camera configuration during runtime on D405 depth camera
- I am working on an application that requires me to change the resolution and frame rate coming from a D405 quickly and frequently. Currently, the only setup I have gotten to do this reliably uses rs2:pipeline, and device.hardware_reset(). This is too slow for my application, are there alternative approaches to reconfigure camera streams that don't require hardware resets?
-
The stream configuration cannot be changed whilst the stream is enabled, but you do not need to perform a hardware reset to change it. You can instead stop() the pipeline, set a new cfg configuration on the line after the stop() instruction and then start() the pipeline again to apply the new stream configuration.
If you would prefer not to stop the pipeline, workarounds for adjustment during runtime could include using the Decimation post-processing filter to reduce image resolution and setting a custom FPS by only using every 'x' number of frames (for example, getting 5 FPS by setting 30 FPS but only using every 6th frame, and changing the 'x' value to achieve different rates).
-
The link below has a Python example of a script for using every 'nth' frame.
Please sign in to leave a comment.
Comments
4 comments