Dataset Reader for NeRF synthetic dataset
MatteoMarengo opened this issue · 1 comments
MatteoMarengo commented
Hi I wish to know why in the dataset_readers.py and especially in readCamerasfromTrasnform the loading of the camera is done like that:
matrix = np.linalg.inv(np.array(frame["transform_matrix"])) R = -np.transpose(matrix[:3, :3]) R[:, 0] = -R[:, 0] T = -matrix[:3, 3]
Indeed in vanilla 3DGS there is an adaptation for COLMAP dataset they use that:
# NeRF 'transform_matrix' is a camera-to-world transform c2w = np.array(frame["transform_matrix"]) # change from OpenGL/Blender camera axes (Y up, Z back) to COLMAP (Y down, Z forward) c2w[:3, 1:3] *= -1 # get the world-to-camera transform and set R, T w2c = np.linalg.inv(c2w) R = np.transpose(w2c[:3,:3]) # R is stored transposed due to 'glm' in CUDA code T = w2c[:3, 3]