Hi team, thanks for the great work! I'm wondering what camera coordinate system you're using. the look_at_matrix function in camera_utils.py looks a bit confusing to me:
def look_at_matrix(camera_pos, target, invert_pos=True):
"""Creates a 4x4 look-at matrix, keeping the camera pointing towards a target."""
forward = (target - camera_pos).float()
forward = forward / torch.norm(forward)
up = torch.tensor([0.0, 1.0, 0.0], device=camera_pos.device) # assuming Y-up coordinate system
right = torch.cross(up, forward)
right = right / torch.norm(right)
up = torch.cross(forward, right)
look_at = torch.eye(4, device=camera_pos.device)
look_at[0, :3] = right
look_at[1, :3] = up
look_at[2, :3] = forward
look_at[:3, 3] = (-camera_pos) if invert_pos else camera_pos
return look_at
it seems to me your camera coordinate system is X-left (unlike what the name "right" suggests), Y-up, Z-forward? Then how is this used together with VIPE's convention which is X-right, Y-down, Z-forward?
Hi team, thanks for the great work! I'm wondering what camera coordinate system you're using. the
look_at_matrixfunction incamera_utils.pylooks a bit confusing to me:it seems to me your camera coordinate system is X-left (unlike what the name "right" suggests), Y-up, Z-forward? Then how is this used together with VIPE's convention which is X-right, Y-down, Z-forward?