dspnet icon indicating copy to clipboard operation
dspnet copied to clipboard

disparity to depth calculations

Open MrGemy95 opened this issue 5 years ago • 1 comments

can you mention where's this calibration numbers coming from ' dist = 2200 * 75. / (disparity + 1e-3)

as it doesn't match the calibration parameters provided by cityscapes dataset

MrGemy95 avatar Apr 10 '20 13:04 MrGemy95

Because disparity and distance from the cameras are inversely related, the distance ground-truth is generated from the disparity map by computing

D_gt = b * f / d

where D is the distance between the camera and an object in real world, b is the base offset (i.e., the distance between cameras), and f is the focal length of the camera with d being disparity.

Note that the numbers in the code are rough estimates to the equation of my own.

liangfu avatar Apr 12 '20 12:04 liangfu