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

Access estimated transformation of mesh #110

Closed
mjvanderboon opened this issue Feb 23, 2022 · 3 comments
Closed

Access estimated transformation of mesh #110

mjvanderboon opened this issue Feb 23, 2022 · 3 comments

Comments

@mjvanderboon
Copy link

Hi, thanks for the great work and repository.

I am looking to access the estimated homogeneous transform that aligns the mesh from an initial frame to a frame that is aligned with the camera position of an input image. Or conversely the homogeneous transform that transform the camera pose to align the mesh with the image.

I suspect that the rotational information I need is available as an angle axis representation in the first pose entry in the code_dict: code_dict['pose'][..., 0:3], could you confirm this is correct? I also suspect the translation vector I desire is available as code_dict['cam'], but I am unsure how to transform this [scale, t_x, t_y] vector into a translation vector in R3.

Could you provide any hints or pseudocode on how to generate a homogeneous transformation matrix from the available pose estimation?

@FeiiYin
Copy link

FeiiYin commented Mar 17, 2022

Can the tform in dataset works?

@mjvanderboon
Copy link
Author

I looked at the code in /decalib/datasets/datasets.py and I would be able to write a similar functionality to extract the estimated transformation for a general input image using a face detector. However, as far as I understand code_dict['pose'] should also encode the pose of the face together with code_dict['cam']. Do you know if this is correct? Or do these values encode other parameters?

@mjvanderboon
Copy link
Author

A bit more detail is available in the issue linked above. It explains how to use code_dict['pose'] and code_dict['cam'] to estimate full homogeneous transformation matrices.

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