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

The position of reconstructed mesh in quali_eval #10

Closed
lw-ethan opened this issue Mar 7, 2024 · 2 comments
Closed

The position of reconstructed mesh in quali_eval #10

lw-ethan opened this issue Mar 7, 2024 · 2 comments

Comments

@lw-ethan
Copy link

lw-ethan commented Mar 7, 2024

Hi, thanks for your nice work and concise repo!

I'm working on the project that needs to leverage on the reconstructed mesh generated from dbw, and I found the position and scale of mesh have certain gap compared to points computed from colmap.
I'm wondering if the mesh is not placed on the real position of world coordinates, and instead always placed at the origin?

@monniert
Copy link
Owner

Hi @lw-ethan, the scene is indeed always placed at the origin. It is transformed to the colmap space using a predefined rotation, translation and scale matrix

@lw-ethan
Copy link
Author

@monniert, thanks for your reply, I found that it was my mistake:
I kept stuck at the configuration of S_world, R_world, T_world, which should be obtained easily by delta transformation in Blender
I came to realize later the problem arise from the settings of R_world, the mesh applies world coordinate this way verts = (verts * self.S_world) @ self.R_world + self.T_world[:, None], the vertices are at the left side of R_world
However I used the convention that R = RzRyRx * verts, which caused the transformation wasn't as my expect
Changing the conversion R_world = (elev_to_rotation_matrix(elev) @ azim_to_rotation_matrix(azim) @ roll_to_rotation_matrix(roll))[None] to R_world = (roll_to_rotation_matrix(roll) @ azim_to_rotation_matrix(azim) @ elev_to_rotation_matrix(elev)).T[None] met my assumption and solved my problem

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