How to captures frames and writes the every frame to disk?
Hello,I'm a freshman , my camera is Realsense D435i.My system is ubuntu 18.
I asked how to write the every frame to disk and can write the image faster.
Now I want to get the every frame of color and depth image and write then to the disk.
I have read the program on github.
https://github.com/IntelRealSense/librealsense/blob/master/examples/save-to-disk/rs-save-to-disk.cpp
Howevery,this just captures 30 frames and writes the last frame to disk, what's more, the speed of writing is so slow.
I wanna know how to solve the problem, thank you in advance for your apply.
-
The links below describe how to record a streaming session into a bag file and play the bag file back.
https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md
https://github.com/IntelRealSense/librealsense/tree/master/examples/record-playback
Once you have a bag file, its stored frames can be converted into other file formats.
https://github.com/IntelRealSense/librealsense/tree/master/tools/convert
A bag will likely be the fastest way to write the data, as writing to other formats such as ply and CSV may be slower. The 'Capture' example program saves frames to CSV format though if you would like to explore that possibility.
https://github.com/dorodnic/librealsense/tree/text_sample/examples/capture
There is also an in-depth discussion and code examples for saving data here:
https://github.com/IntelRealSense/librealsense/issues/1485
Another RealSense user took the approach of writing the data to binary 'bin' format.
Please sign in to leave a comment.
Comments
1 comment