-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Saving pyrealsense2.pyrealsense2.depth_frame object #6164
Comments
Hi Evgeny, I recalled a recent case in which a RealSense user who was using a Python array could not process more than 15 frames. The research in that case led me to the comment in the link below regarding saving frames inside a collection. In regard to saving frames in memory, I wonder if you might be able to do so with the Keep() function and then apply post-processing on the frames all at the same time as a batch operation once the pipeline is closed. The links below have examples of Python code for Keep(): |
Keep() indeed allows storing the frames in memory. Thanks a lot! |
I'm very glad you were able to solve your problem with Keep(). Thanks for the update! |
Issue Description
It is not possible to save pyrealsense2.pyrealsense2.depth_frame/color_frame/composite_frame in memory.
I iterate over a bag file and want to save all frames. Within the pipeline, I can process the frames the way I want, but I also want to save them for postprocessing. I do not want to save images, point clouds or anything else. I need to save pyrealsense2.pyrealsense2.depth_frame object itself.
It turns out that I can append a list or NumPy array with pyrealsense2.pyrealsense2.depth_frame object only 32 times. Below is my implementation
Here is the output:
But actually the bag file contains much more than 32 frames. I am able to go through all of them if I comment
d435_data_list.append(depth_frame)
line. I am also not able tocopy.copy(depth_frame)
orcopy.deepcopy(depth_frame)
- some issue with pickle.Question:
How to save pyrealsense2.pyrealsense2.depth_frame/color_frame/composite_frame objects in memory for postprocessing?
Thanks!
Best
Evgeny
The text was updated successfully, but these errors were encountered: