Fix conversion from Blender to COLMAP coords in NeRF camera import. #111
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The NeRF camera import code incorrectly converts from OpenGL/Blender camera axes to COLMAP camera axes.
The original code flips the sign of YZ rows of the world-to-camera matrix, which turns the world 180 degrees around the X axis, but doesn't convert the camera. Then the line
T = -matrix[:3, 3]
moves the camera to an antipodal point, which accidentally works, but the cameras stay in the Blender format and project "backwards". With the random initial point cloud the synthetic NeRF benchmarks work, but using a initial point cloud from custom data fails.The Blender cameras need to be converted while the matrix is still in the camera-to-world format, which is what this PR does.
(The PR addresses issue #100)