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

mapping 2d and 3d to UV #16

Open
xiang-zhu127 opened this issue Jun 30, 2020 · 1 comment
Open

mapping 2d and 3d to UV #16

xiang-zhu127 opened this issue Jun 30, 2020 · 1 comment

Comments

@xiang-zhu127
Copy link

Hello,
Great work on CSM.
So I had two questions:

  1. How do I map a 2d image to UV param.
  2. I followed your instructions to convert my template off file to sphere (matlab code) then UV param it using the pythone module as described here: https://github.com/nileshkulkarni/csm/blob/master/csm/docs/preprocess.md
    But i am not sure how to read the final output .mat file to map between UV to 3d triangles.
    I would also like to map an image of the same class to this UV param (my Q1)
    Any help on this will be greatly appreciated. Thanks !
@nileshkulkarni
Copy link
Owner

Hello,
Thanks for your interest in our work

  1. The mapping from a 2D image to UV is a predicted value output by the learned CNN.
  2. The mat file that generated by the python code is like a lookup table that tells for every UV value which face of the template shape the UV value belongs too. Then you can use the UV's of the vertices of the corresponding face and compute barycentric coordinates. Using these coordinates you can compute the 3D location with the 3D vertex locations you can compute the location for the 3D point corresponding to the give UV.

This all is implemented here

Hope this helps.
Best,
Nilesh

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