Skip to content
Discussion options

You must be logged in to vote

Found the solution to my issue.

The problem was in my get_camera_in_viewer_space() function. I was incorrectly converting camera coordinates to OpenGL space, even though the poses exported from COLMAP were already aligned to the OpenGL coordinate system.

This resulted in a double coordinate transformation, which caused incorrect camera positions.

The fix was simply to remove the redundant conversion and directly apply the scene transform and scale:

def get_camera_position(scene_name, image_name):
    poses = load_colmap_poses_raw(scene_name)
    T, scale = load_scene_transforms(scene_name)

    pose = poses[image_name]
    C_gl = pose[:3, 3]  # already OpenGL

    C_ns = T[:3, :3] @ C_gl + T

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by JoelHellberg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant