Skip to content
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

RealSense Viewer Saving #5123

Closed
josephdanielchang opened this issue Oct 24, 2019 · 4 comments
Closed

RealSense Viewer Saving #5123

josephdanielchang opened this issue Oct 24, 2019 · 4 comments

Comments

@josephdanielchang
Copy link

josephdanielchang commented Oct 24, 2019

Issue Description

I've built the realsense viewer in visual studio C++ on windows 10 and it works with D415 cameras.

I'm looking through the code for realsense-viewer.cpp though and it seems all gui related. Where would I modify the viewer so it saves frames live as png instead of saving to rosbag?

Also, I see the frames in viewer are aligned which is usually done with align_to_color.process. Where is the code for that if I want to edit it?

@MartyG-RealSense
Copy link
Collaborator

The graphics in the central window of the Viewer use OpenGL for their rendering, and the interface uses a system called imgui.

#2450

I can imagine that saving PNGs live, if it were possible, would provide very slow performance. Bags are the most efficient way to record live, and the bag can be converted into PNGs or another format such as csv after the recording is completed (by using a conversion tool or post-processing). The link below has a very long and interesting discussion on the subject

#1485

Depth can be aligned with color in the Viewer's 3D mode. It is harder to align in the Viewer's 2D mode though.

https://forums.intel.com/s/question/0D70P0000069EWaSAM

@josephdanielchang
Copy link
Author

josephdanielchang commented Oct 24, 2019

I see depth/color can't be aligned in the default viewer, but there must be a way to add align_to_color.process to the code so it can align. My question was where would I find that file to change the code. Same with saving as png. Despite it being slower, where would I find the code to add those to the existing viewer code?

Where as which folder or code file would I edit on the right below.
image

@MartyG-RealSense
Copy link
Collaborator

Custom editing of the Viewer is outside of my knowledge unfortunately. One of the Intel guys on this forum should be able to advise you well. Good luck!

@RealSenseCustomerSupport
Copy link
Collaborator


The Realsense SDK contains great resource/examples that demonstrate image saving (png) as well as frame align.
Please take a look at the following two examples:
https://github.com/IntelRealSense/librealsense/tree/master/examples/save-to-disk
https://github.com/IntelRealSense/librealsense/tree/master/examples/align

Please let us know if you have any other question. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants