alexsax / 2D-3D-Semantics

The data skeleton from Joint 2D-3D-Semantic Data for Indoor Scene Understanding
http://3dsemantics.stanford.edu
Apache License 2.0
464 stars 67 forks source link

How can I use ./depth/xxx.png to get the distance, which is consistent with the xyz of points and camera center? Thanks. #39

Closed stc1995 closed 3 years ago

stc1995 commented 3 years ago

Hello,

Thank you very much for opening a great dataset.

Can I ask a question?

When I do some research about back-projecting pixel to points, I encounter something confusing. There are two files related to the back-projection, ./global_xz/xxx.exr and ./depth/xxx.png.

As mentioned in README.md, depth images are stored as 16-bit PNGs and the valus are hundreds or thousands.

When I calculate the distance between the camera center (c2w matrix's last column; c2w matrix is the inverse of rt matrix in Pose folder) and the points from xxx.exr, I find the distance is 0 ~ a number less than 100. I guess the rt matrix in the Pose folder, camera center's coordinate, and the points' coordinate in xxx.exr are in the same world coordinate system, right?

Then, I think there may be a certain scale ratio between the depth_from_png and the depth_from_exr. When I divide the depth_from_png by the depth_from_exr and draw the ratio, I find it is not consistent as below. (The image is area_1/data/rgb/camera_0d600f92f8d14e288ddc590c32584a5a_conferenceRoom_1_frame_13_domain_rgb.png. The lightning-like part is due to missing data.)

image

image

image

Does the panorama to perspective transformation result in the inconsistency? If so, how to rectify it? And I also want to ask how can I use ./depth/xxx.png to get the distance, which is consistent with the xyz of points and camera center.

Thanks for your help!

Best, Tiancheng

asamra18 commented 2 years ago

Hi, I had a similar question, did you figure it out? The depth image is the absolute depth relative to the camera position right?