You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Can you please tell me how to figure out the actual depth value(in metres or centimeteres) at any (x,y) coordinate of the image that is being predicted by the model?
#136
Open
shreyash0502 opened this issue
Oct 25, 2022
· 2 comments
How to convert the pixel value to depth? What is the formula for that? I want to get the depth of some object (in metres or centimetres) from the predicted depths given by the model.
The text was updated successfully, but these errors were encountered:
shreyash0502
changed the title
Can you please tell me how to figure out the actual depth value(in metres or centimeteres) at any (x,y) coordinate of the image that is being predicted by the model? How to convert the pixel value to depth? What is the formula for that? I want to get the depth of some object (in metres or centimetres) from the predicted depths given by the model.
Can you please tell me how to figure out the actual depth value(in metres or centimeteres) at any (x,y) coordinate of the image that is being predicted by the model?
Oct 25, 2022
Hi, I've been thinking about this as well.
For what I understand, each depth value is represented with 2 Bytes = 16 bits.
If you interpret that as one positive integer, you get a range between 0 and 65535 (these seem to be the values I get if I open the output images with PIL).
So I guess that we should map the numerical range we get to the known range in meters for a specific dataset. For example, the KITTI data has a range between 0 and 80 meters. So to go from the pixel value to the depth, I would use this formula:
metric_depth = (pixel_value * 80) / 65535.
But this is only a guess. Anyone of the authors can confirm or refute my guess, please?
How to convert the pixel value to depth? What is the formula for that? I want to get the depth of some object (in metres or centimetres) from the predicted depths given by the model.
The text was updated successfully, but these errors were encountered: