Closed half-potato closed 4 years ago
The coordinate system is the standard one, but the poses are inverted.
@half-potato Hi! Sorry to bother.
I encounter a similar problem, I want to convert the 3x3 rotation matrix from BlendedMVS to OpenGL format (x-axis to the right, y-axis upward, and z-axis backward along the camera’s focal axis). But I couldn't find any information about the coordinate system convention of BlendedMVS.
The coordinate system is the standard one, but the poses are inverted.
Could you please tell me how does the poses inverted?
Thank you very much!!
Inverted, like, the transformation is inverted.
Hey I'm fighting with the same issue, can you give an example what you mean by that, only the rotation matrix or also the translation vector?
Did you find a solution for the OpenGL conversion @raynehe ?
@raynehe had the z axis backwards. Hope that helps!
Thanks, figured it out myself ... so inverted does mean to get the inverse of the Transform Matrix T^(-1). For everyone trying to format the poses to Nerfstudio, here is the code (not cleaned and could be further simplified):
# Load Transform
transform = ...
# Invert transform
transform = np.linalg.inv(transform)
# Conversion from OpenCV to Blender coordinate system
transform[0:3, 1:3] *= -1
transform = transform[np.array([1, 0, 2, 3]), :]
transform[2, :] *= -1
# Rotate 90 degrees around y axis (Optional)
transform = np.array([[0, 0, 1, 0],
[0, 1, 0, 0],
[-1, 0, 0, 0],
[0, 0, 0, 1]]) @ transform
Also be carefull es images might need to be rescaled as the height and weight differs from the stored images.
I'm trying to create a point cloud from the depth maps.I am using z forward, x right, y up and the results don't make sense.