ShapenetRender_more_variation icon indicating copy to clipboard operation
ShapenetRender_more_variation copied to clipboard

Depth map is kind of incorrect

Open AlexsaseXie opened this issue 4 years ago • 1 comments

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

AlexsaseXie avatar May 16 '20 04:05 AlexsaseXie

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

caiyongqi avatar Mar 18 '22 07:03 caiyongqi