Items with no label
3335 Discussions

how to extract the distance from d415?

cjiin
Beginner
1,292 Views

When I run the distance code in the realsense example, the distance displayed on the screen in real time.

I want to extract this distance in any form (ex. txt ....)

0 Kudos
3 Replies
MartyG
Honored Contributor III
247 Views

When you say that you want to 'extract' the distance, you mean that you want to save the depth data in a permanent form such as a file? But you do not want to save it as text?

RealSense SDK 2.0 has the ability to save camera data in a file format called 'rosbag' and play it back.

https://github.com/IntelRealSense/librealsense/blob/master/src/media/readme.md librealsense/readme.md at master · IntelRealSense/librealsense · GitHub

0 Kudos
cjiin
Beginner
247 Views

When I run the distance code here, distance displayed on the screen like this

I would like to save the distance displayed on second picture in any form

Can I save the distance below when I use the rosbag??

0 Kudos
MartyG
Honored Contributor III
247 Views

Someone else may have a better answer, but the only alternative that I can think of is to use the Python language to write the text to a text file.

https://stackoverflow.com/a/38583493 Python Print String To Text File - Stack Overflow

An even simpler way to capture it would be to use the Print Screen key on your keyboard to take a picture of what is on screen and then open a paint software package and Paste the captured picture into the paint software so you can save it as an image file.

0 Kudos
Reply