Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to convert ARIA's camera coordinate system to COLMAP's camera coordinate system? #157

Open
zhejia01 opened this issue Nov 19, 2024 · 6 comments

Comments

@zhejia01
Copy link

We want to utilize given ARIA's camera pose(extrinsic matrix) to implement sparse reconstruction in COLMAP. However we found that simply convert the rotation matrix and translation matrix to quaternions input to COLMAP doesn't work. We wonder if they have different coordinate systems and how to convert between them?

@JiajieLi7012
Copy link

Hello, I'm trying to do the same thing. Have you solved the problem? Any help would be appreciated.

@zhejia01
Copy link
Author

ARIA's camera coordinate system seems like OpenGL coordinate system. I referred to conversion method in OpenGL and solved it.

@JiajieLi7012
Copy link

Thanks for your quick reply. I'll have a try. But do you know why it's the case? According to the description here, the ARIA's local coordinate system should be the same as COLMAP's convention.

@zhejia01 zhejia01 reopened this Dec 12, 2024
@zhejia01
Copy link
Author

zhejia01 commented Dec 12, 2024

Sorry I might mislead you, I reversed the second row and the third row of the transformation matrix and turned it to quaternion to initialize the extrinsic matrix in colmap. I referred to conversion code in NeRF and 3DGS and it works for DTC dataset. Other dataset might be different and the document you referred confused me as well.

@JiajieLi7012
Copy link

JiajieLi7012 commented Dec 12, 2024

Really appreciate your quick response. I referred to this documentation page to show that the camera coordinate system convention in Project Aria Glasses is the same as COLMAP's convention, namely Z forward, Y downward, X rightward. Therefore, the RGB camera extrinsic obtained with the following psedo-code should be compatible with the COLMAP extrinsic (except in different forms like rotation matrix and quaternion):

T_World_Device = AriaDigitalTwinDataProvider.get_aria_3d_pose_by_timestamp(some_timestamp)
T_Device_RgbCamera = AriaDigitalTwinDataProvider.get_aria_T_Device_Camera("214-1")
T_World_RgbCamera = T_World_Device * T_Device_RgbCamera
T_RgbCamera_World = T_World_RgbCamera.inverse()

I'm also not sure if the T_RgbCamera_World is the same transformation matrix you are referring to in your previous reply and I don't understand why you ever need to reverse the second and third line (row).

@zhejia01
Copy link
Author

I guess that I found where the question is! The camera coordinate system, as you mentioned, follows Z forward, Y downward, X rightward. But the world coordinate system follows X rightward, Y upward, Z backward, you could check it in session "3D Coordinate frame conventions", which has a picture of glasses and coordinate demonstrations. On the lower right corner of the picture is the world coordinate. So reversing the second and third row seems to be the correct transformation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants