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

Depth map is kind of incorrect #4

Open
AlexsaseXie opened this issue May 16, 2020 · 1 comment
Open

Depth map is kind of incorrect #4

AlexsaseXie opened this issue May 16, 2020 · 1 comment

Comments

@AlexsaseXie
Copy link

AlexsaseXie commented May 16, 2020

First, the depth map in README.
https://github.com/Xharlie/ShapenetRender_more_variation/blob/master/samples/depth_1176dff7f0ec879719d740e0f6a9a113/hard/32.png
depth

Where are the depth values for the back of the car? Apparently some parts of the depth map are missing.

I think it's incorrect to map the original z-value from [0.7, 0.7+depth_scale] to [0, 1].
First, there may be z-value smaller than 0.7 or bigger than (0.7 + depth_scale), these z-values aren't on the depth map. This is kind of incorrect.
Second, when you output png of the depth map, you need to again map [0, 1] to [0, 255] (8-bits png e.g.) then floor to integer values. Then there may be mass accuracy loss. Consider a view with all z-values between [ 0.9, 1.0 ], these depth values will be mapped to very close integers, so that we can barely tell the different of depth(z-value) between pixels. This is also kind of incorrect.

I think the correct mapping is to map z-values from [z-min, z-max] to [0, 1].

@caiyongqi
Copy link

Hi, how can I modify the code as you explained?

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

2 participants