eldar / differentiable-point-clouds

The reference implementation of "Unsupervised Learning of Shape and Pose with Differentiable Point Clouds"
MIT License
155 stars 11 forks source link

Point cloud perspective transfrom #4

Open cvey opened 4 years ago

cvey commented 4 years ago

Hi! I'm currently trying to understand the source code for pointcloud_project_fast() in dpc/util/point_cloud.py.

I am assuming that pc_perspective_transform() transforms the point cloud information from one camera to another camera. So first, the reference coordinate system is camera 1, then the reference coordinate system is camera 2?

If so, why do we need to incorporate intrinsics information in this transform?

eldar commented 4 years ago

Hi! The point cloud is always predicted in canonical orientation in the world coordinate system and pc_perspective_transform transforms the coordinates to the camera coordinate system, and not from camera1 to camera2.

cvey commented 4 years ago

Thanks for your answer! All right, so I get to use the cameras' extrinsics matrices then. But also the intrinsics matrix is included, does this not mean we convert to image coordinates instead of camera coordinates?

eldar commented 4 years ago

We compute the image coordinates of 3D points, because we want to compute the reconstruction loss in the image space: we minimize the difference between the projection of the predicted 3D shape and the projection in the training set.

cvey commented 4 years ago

I have another question regarding the camera matrices files: Where is your world center point? Is the object centered at this point? Why do you rearrange the extrinsic matrix that you read from the camera_x.mat file?