nerfstudio icon indicating copy to clipboard operation
nerfstudio copied to clipboard

c2w matrices cannot have 0 translation vector?

Open sagesimhon opened this issue 1 year ago • 1 comments

Describe the bug One of my cameras is located at the origin: [tx, ty, tz] = [0,0,0], hence the last column of the matrix in my frame['transform_matrix'] in transforms.json is the column vector [0,0,0,1]. This causes an 'nan' in the poses matrix from the scale factor becoming infinity here.

This might be a bug in the way the scale factor is being computed, since the scale factor should be the value of the [:,3,3]th elements of the c2w matrices, for homogeneous coordinates, but the current implementation drops the last row.

sagesimhon avatar Jan 13 '23 04:01 sagesimhon

It seems like the pose will only go to nan if all of the cameras a located at the origin (which is not supported by NeRF). I just tested by setting one position to [0,0,0] and the code seemed to run fine. Can you post your transforms.json file?

tancik avatar Jan 17 '23 17:01 tancik

Closing as this appear stale, feel free to reopen if it is still and issue.

tancik avatar Feb 22 '23 18:02 tancik