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

Endianness of Depth Raw Data from "Save snapshot" Button #2147

Closed
apoorva-sriv opened this issue Jul 25, 2018 · 1 comment
Closed

Endianness of Depth Raw Data from "Save snapshot" Button #2147

apoorva-sriv opened this issue Jul 25, 2018 · 1 comment
Assignees

Comments

@apoorva-sriv
Copy link
Contributor

Required Info
Camera Model D415
Firmware Version 05.09.14.00
Operating System & Version Win 10
Platform PC
SDK Version 2.13.0

Issue Description

Hi, I have an issue with the endianness of depth raw data obtained from the "Save snapshot" button of RealSense Viewer. Reading it as little endian gives the correct depth values for each pixel but doesn't display correctly, and vice versa for big endian.

Little endian gives the correct depth value (499 mm) but displays the image incorrectly (with colormap jet):
depth little endian

Big endian displays the image correctly but gives the wrong depth value (6221 mm >> 499 mm!):
depth big endian

RealSense Viewer snapshot png:
realsense viewer snapshot

If I read a frame from a bag file recorded in RealSense Viewer, little endian also displays correctly (with the correct depth values), and big endian is the same (displays correctly but wrong depth values). So, this seems to be an issue with the "Save snapshot" button only.

@ev-mp
Copy link
Collaborator

ev-mp commented Aug 9, 2018

Hello @apoorva2398 ,
What tools do you use to display the raw data that you get from "Save snapshot"?
In case you're using PNG renderer/interpreter to parse _file_name_.raw blob, then it will not work as PNG by design assumes that the binary data is ordered as big endianness.

The raw format saves the depth stream in its native format, as transmitted over UVC. The depth format definition can be obtained from linux documentation

Please check #815 for additional info.

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