pointnerf icon indicating copy to clipboard operation
pointnerf copied to clipboard

Consideration of function "w2pers" in Neural Points module?

Open MobiusLqm opened this issue 1 year ago • 5 comments

Hi, Charlie, thanks for your awesome work of PointNeRF.
But I had a question about the code In "w2pers" function of NeuralPoints.py. According to my understanding and your codes,"point_xyz" is the point position in reference view coordinates, which has shape(N,3), and "Campos" is the origin of target-view camera in reference view coordinates, "camrotc2w" is the transform matrix to transform points from target view coordinates to reference view coordinates(According to "getitem" function of dtu_dataset.py). So my question is:

  1. what's the meaning of point_xyz_shift?
  2. I think the second line of codes below have the same function of "Point_xyz_shift@camrotc2w", do you want to transform the point from reference view coords to target view coords? but point position is a row vector, why didn't you transpose the Matrix?
  3. what is the purpose of dividing x and y by z to get 'xper' and 'yper'?

`

point_xyz_shift = point_xyz[None, ...] - campos[:, None, :] # (1,N,3) xyz = torch.sum(camrotc2w[:, None, :, :] *point_xyz_shift[:, :, :, None], dim=-2) # same as point_xyz_shift@camrotc2w???

xper = xyz[:, :, 0] / xyz[:, :, 2] yper = xyz[:, :, 1] / xyz[:, :, 2]

` Looking forward to your reply! best regards

MobiusLqm avatar Nov 07 '22 13:11 MobiusLqm