Items with no label
3335 Discussions

Save and load recordings in D415

TBerr1
Novice
1,869 Views

Hi I'm unclear as to how to properly save and load recordings in the D415.

Saving each frame as a png is too performance heavy. If you do that, Intel Realsense will save approximately 1 image per second. Our application needs at least 30 images to be saved per second.

I also tried to save each image as a cv::Mat bu again, this means that the sdk will only save 1 image per second.

I looked into the source code of the realsense viewer, and they somehow save frames using the librealsense frame classes rather than the rs2 frame classes, where they have a ros_writer class actually write each frame as a ros message.

I'm fine with using the code from the realsense viewer to save recordings, but I need to somehow convert these recordings into a set of separate cv::Mat data pieces.

I tried to use the ros_reader class to do this, but unfortunately I'm getting a bunch of unresolved symbol references when doing this. Its very similar to https://stackoverflow.com/questions/49332616/opencv-realsense-visual-studio-link-2019-error/49333031# 49333031 this problem, except its for ros bag rather than opencv

Does anyone know how to record a stream quickly in the form of a bunch of images(or a format that can somehow be read as a bunch of cv::Mat data pieces eventually), or alternatively a way to read the .bag recording files supplied by the realsense viewer?

3 Replies
MartyG
Honored Contributor III
531 Views

There was a recent discussion about using Python to convert frames to ASCII text characters and saving them in a text file.

0 Kudos
TBerr1
Novice
531 Views

For the D400 series, do you think that this tutorial is outdated/depreciated? https://software.intel.com/en-us/blogs/2015/10/15/how-to-record-and-playback-streaming-sequences-in-intel-realsense-sdk Archived - How to Record and Playback Streaming Sequences in Intel® RealSense™ SDK | Intel® Software

The code for save-to-disk in the examples for the sdk is quite different to the code in the tutorial above. Although the guide above is exactly what I need. It even contains compression techniques too.

0 Kudos
MartyG
Honored Contributor III
531 Views

Unfortunately that tutorial will not work with the 400 Series cameras, as the SDKs it would be compatible with (such as '2016 R2' and '2016 R3') are totally different in architecture to the current 'SDK 2.0'. Its general principles could probably be reworked for the instructions of the current SDK though, given time.

Reading through the tutorial, the compression feature was only usable on PCs with Intel Iris graphics tech, and you needed an Iris-equipped machine to play compressed files back.

The subject of RGB-D stream compression in a more general sense was discussed last year in this post:

0 Kudos
Reply