gaoxiang12 / slambook2

edition 2 of the slambook
MIT License
5.39k stars 2k forks source link

Why depth is divided by 5000 in slambook2/ch7/pose_estimation_3d2d.cpp in PnP Code implemantation? #221

Open fettahyildizz opened 2 years ago

fettahyildizz commented 2 years ago

In order to find 3d feature points coordinates in world, we divide depth by 5000. What is the reason for that? What are the units of 3d coordinates (mm, cm, m) ? I want to implement PnP algorithm using Intel RealSense D435 but I am not sure how much it should be divided by?

alessandroTorresani commented 2 years ago

The dataset used in the example is taken from the TUM RGB-D Dataset. According to the documentation

The depth images are scaled by a factor of 5000, i.e., a pixel value of 5000 in the depth image corresponds to a distance of 1 meter from the camera, ...