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.
-
Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):
- Consider checking out SDK examples.
- Have you looked in our documentations?
- Is you question a frequently asked one?
- Try searching our GitHub Issues (open and closed) for a similar issue.
-
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..>
@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.
@ankith001, can we close this ticket if there is no further question?