-
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
How to record the depth value in D455 #10878
Comments
Hi @JasonChanJY If you are able to use C++ language, a RealSense team member created an adapted version of the RealSense SDK's rs-capture example program that could write depth values to a .csv format file. https://github.com/dorodnic/librealsense/tree/text_sample/examples/capture The amended code is highlighted at the link below. https://github.com/dorodnic/librealsense/blob/text_sample/examples/capture/rs-capture.cpp#L15-L31 Alternatively, you could try recording a bag file (which is like a video file of camera data) in the RealSense Viewer tool and then converting the bag's data to another format such as csv using the SDK's C++ rs-convert tool. https://github.com/IntelRealSense/librealsense/tree/master/tools/convert If you prefer to use Python then you could save the depth to an npy file as an array of scaled matrices, like in the script at #4934 (comment) Another approach would be to save the depth as a .raw format image file that preserves depth information (which the RealSense Viewer's Snapshot option can do), and then retrieve depth from the .raw file using scripting such as the code at #2231 (comment) |
Is it possible to get the depth value from .raw format image in Matlab? |
#5824 (comment) offers advice about loading a RealSense .raw file into MATLAB. |
Thank you for your reply. I try to load .raw file into MATLAB successfully. And another question I want to ask that the index of the point as shown in the .png file means 1144 mm? |
It looks as though it refers not to mm depth but instead to the index value of a particular pixel on an indexed image in MATLAB, as discussed at the links below: https://stackoverflow.com/questions/34256426/incorrect-pixel-value-from-data-cursor-on-matlab |
Thanks. I check depth value in RealSense viewer, and the index value in MATLAB is consist with the depth value. |
Thanks very much @JasonChanJY for the update! |
I want to record the depth value of depth stream. Is there any method to do that? THX.
The text was updated successfully, but these errors were encountered: