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

I have some depth files saved in .png format by SR300, how can I restore the true depth from these png files #7324

Closed
chky opened this issue Sep 13, 2020 · 9 comments
Labels

Comments

@chky
Copy link

chky commented Sep 13, 2020

  • 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..>

@MartyG-RealSense
Copy link
Collaborator

Hi @chky Saving depth data into PNG image format causes depth detail to be lost, unfortunately. A .raw file is the appropriate format for preserving depth detail in an image file.

The link below has scripting for obtaining depth information from a .raw file if you have the opportunity to recreate the scenes for the SR300 camera and re-save them as .raw.

#2231 (comment)

@chky chky changed the title I have so depth files saved in .png format by SR300, how can I restore the true depth from these png files I have some depth files saved in .png format by SR300, how can I restore the true depth from these png files Sep 14, 2020
@chky
Copy link
Author

chky commented Sep 14, 2020

Thanks for your reply @MartyG-RealSense. Actually I do not have a realsense sr300 in hand, what I have are some .png files. Is it possible to restore true depth without .RAW files? An approximate depth will be OK.

@MartyG-RealSense
Copy link
Collaborator

I researched your question extensively in case there was a possible way, but every source says it will not work. Even if you could convert a color on the image to a depth value representing that color, you could not be sure that it is accurate.

#3640

@chky
Copy link
Author

chky commented Sep 14, 2020

would you mind provide me with links to these possible ways? much appreciation. @MartyG-RealSense

@MartyG-RealSense
Copy link
Collaborator

I mean that I searched for possible ways but found that it was not practical. Nonetheless, the best of the resources that I found other than #3640 is below. You probably will not get a meaningful depth value though since a PNG does not store depth data.

#2200 (comment)

Alternatively, the link below suggests a somewhat complex way to generate a depth map from a single image using a 'deep network'.

https://stackoverflow.com/a/41830992

@chky
Copy link
Author

chky commented Sep 14, 2020

got it! thanks a lot

@MartyG-RealSense
Copy link
Collaborator

Hi @chky Do you require further assistance with this case, please? Thanks!

@chky
Copy link
Author

chky commented Sep 22, 2020

Hi @chky Do you require further assistance with this case, please? Thanks!

Your reply had solved my problem, thank you!

@MartyG-RealSense
Copy link
Collaborator

Great news, thanks for the update! I will close this case now that you have a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants