manydepth icon indicating copy to clipboard operation
manydepth copied to clipboard

About cityscapes disparity to depth_gt

Open willemeng opened this issue 2 years ago • 2 comments

Hello, you mentioned in your README "We provide ground truth depth files HERE, which were converted from pixel disparities using intrinsics and the known baseline. Download this and unzip into splits/cityscapes.", how do you deal with the original disparity data and generate the .npy, I'm having some issues trying. If so, is it possible to make the code public?

willemeng avatar Aug 17 '22 10:08 willemeng

0_disp like this

willemeng avatar Aug 17 '22 10:08 willemeng

To convert a disparity map to a depth map you need the focal length in pixels (call this f, taken as the top left element of the intrinsics matrix, i.e. fx ) and the baseline between the 2 stereo cameras (call this b).

Given these you can obtain depth via depth = f * b / disparity

Hope this helps!

JamieWatson683 avatar Sep 02 '22 09:09 JamieWatson683