The output precision looks poor. Shouldn't you multiply by 65535 (0xFFFF unsigned) for output to 16 bit png?

#4
by mcnabbd - opened

I see you multiply by 255. If the source range is 0.0 to 1.0 float, or double, then multiplying by 65535 will occupy the full 16-bit dynamic range.

btw, this work is absolutely amazing!! Thank you for sharing!

Thanks for your attention! Here is the case. In fact, the model output should be from 0 to max_depth meters (80 in our case) since it's metric depth estimation. If we want to make full use of the range of 0-65535, it would be depth=depth/max_depth*65535.

In our implementation, we follow ZoeDepth's implementation to multiply 255. It also makes sense for me to use the depth=depth/max_depth*65535. What do you think about? Feel free to discuss or modify the pull request when you are free. Thanks a lot.

Hi. (I was unable to reply because my account is new). I submitted a new pull request. I'm guessing I should have modified the original, somehow. Rather than continue to make a mess, I'll leave it to you to decide what to do :) It would be interesting to add an option to the GUI for maximize dynamic range: find the min and max of the actual pixel data and stretch that over the entire available 65535 values. Or, at least to hand-pick the max. The real range might be 80, but a user might be interested only in the foreground.

Yes, ZoeDepth has the same issue. I tried a similar PR there. But, I've never used this system before, so there's a high likelyhood I didn't do something right.

Cheers!
Doug

Sign up or log in to comment