autonomousvision / unimatch

[TPAMI'23] Unifying Flow, Stereo and Depth Estimation
https://haofeixu.github.io/unimatch/
MIT License
960 stars 98 forks source link

Question about Real Distance Calculation from Disparity Map #58

Open ArmanFz opened 2 weeks ago

ArmanFz commented 2 weeks ago

Hello, I have a question regarding the calculation of real distance from a disparity map using the formula $D = b*f/d$

Should I use centimeters or meters for these metrics? Specifically, should the baseline ($b$) and focal length ($f$) be in centimeters or meters, or does it not matter as long as they are in the same unit? Thank you!

haofeixu commented 2 weeks ago

Hi typically the focal length is expressed in pixels, and disparity is also in pixels. The unit of b*f/d is consistent with the baseline b (i.e., you get meters if you provide the baseline with unit meters).

ArmanFz commented 1 week ago

thank you for your response.