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

How can I transform depth map to real depth ? #57

Closed
kaixinbear opened this issue Aug 10, 2021 · 5 comments
Closed

How can I transform depth map to real depth ? #57

kaixinbear opened this issue Aug 10, 2021 · 5 comments

Comments

@kaixinbear
Copy link

I notice that you turn the depth map to real depth by dividing 256.
But when I change the depth to point cloud, I found this value not correct.
Could you tell me why you divide 256 to get the depth?

@codyreading
Copy link
Member

If you take a look at the depth completion code I used: https://github.com/kujason/ip_basic/blob/master/demos/depth_completion.py#L180.

They multiply by 256 before saving it to an image, so I just do the reverse when I load in the depth maps to recover the real depths.

@kaixinbear
Copy link
Author

OK, I solve it .Thx

@Len-Li
Copy link

Len-Li commented Sep 9, 2021

Hi, how can I transform depth distribution to depth map according to different Depth Discretization Methods?

@codyreading
Copy link
Member

Hello!

You can take the expectation of the depth distributions. Basically, you multiply the depth distribution scores by the bin center and sum these to get the estimated depth value for each pixel.

@Len-Li
Copy link

Len-Li commented Sep 10, 2021

Hello!

You can take the expectation of the depth distributions. Basically, you multiply the depth distribution scores by the bin center and sum these to get the estimated depth value for each pixel.

Thanks for your reply!
How about I simply using the argmax bin as the final depth? I can use the inverse form of the code to calculate the depth map.

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