librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

How can I get the depth values from the raw image/png images in centimeters/millimeters? I want to get the high precision values. Not by just converting the meters into centimeters.

Open arake001 opened this issue 7 years ago • 2 comments

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { R200 / F200 / SR300 / ZR300 / D400 }
Firmware Version (Open RealSense Viewer --> Click info)
Operating System & Version {Win (8.1/10) / Linux (Ubuntu 14/16/17) / MacOS
Kernel Version (Linux Only) (e.g. 4.14.13)
Platform PC/Raspberry Pi/ NVIDIA Jetson / etc..
SDK Version { legacy / 2.. }
Language {C/C#/labview/nodejs/opencv/pcl/python/unity }
Segment {Robot/Smartphone/VR/AR/others }

Issue Description

<Describe your issue / question / feature request / etc..>

arake001 avatar Aug 05 '19 19:08 arake001

@ankith001 , to convert the raw depth data (uint16_t) into metric values you need to multiply those by the depth_scale value ,e.g. Link:

depth_scale = profile.get_device().first_depth_sensor().get_depth_scale()

This multiplication is also performed internally in rs-hello-realsense example

You cannot extract depth values from the exported PNG (colored) depth images. The color mapping is a one-way function due to histogram equalization.

ev-mp avatar Aug 05 '19 20:08 ev-mp


@ankith001, can we close this ticket if there is no further question?