mrharicot / monodepth

Unsupervised single image depth prediction with CNNs
Other
2.21k stars 628 forks source link

transform depth to real distance? #218

Open codermckee opened 5 years ago

codermckee commented 5 years ago

Hi, could you tell me how to get real distance from depth map?

ghost commented 5 years ago

I'm not the person who made this code, but you would have to find the part which the program makes the prediction, and the prediction is likely to be a matrix. Then, the program would convert the predictions into an image with colors corresponding to the distance. However, before that, you would have to save the array.

deffandchen commented 5 years ago

According my understand,this code does not generate depth map but only generates disparity map.

NatalyaSlepkova commented 5 years ago

According my understand,this code does not generate depth map but only generates disparity map.

Could you please explain the difference between depth and disparity map?

deffandchen commented 5 years ago

According my understand,this code does not generate depth map but only generates disparity map.

Could you please explain the difference between depth and disparity map?

Hi, disparity can be easily understood based on the binocular camera model.But I can't understand disparity map. In the author's paper, it seems that the disparity map is directly compared with the ground truth.Do you mind adding my Facebook for the convenience of communication?

macaodha commented 5 years ago

With a known focal length and camera baseline you can convert disparity to depth. Both of these quantities are available in the KITTI stereo dataset. https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.html

NovaMind-Z commented 4 years ago

Hi, How can I get the focal and the baseline of the KITTI datasets? Many thanks in advance for your reply.

With a known focal length and camera baseline you can convert disparity to depth. Both of these quantities are available in the KITTI stereo dataset. https://docs.opencv.org/3.0-beta/doc/py_tutorials/py_calib3d/py_depthmap/py_depthmap.html

Hi, Could you please tell me how to get the focal and the baseline of the KITTI datasets? Many thanks in advance for your reply.

macaodha commented 4 years ago

https://github.com/mrharicot/monodepth/issues/49#issuecomment-330595397

NovaMind-Z commented 4 years ago

#49 (comment)

Thanks for your reply! It really helps me a lot.