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

Question about reprojection of reconstructed mesh #13

Closed
fyviezhao opened this issue Mar 19, 2020 · 3 comments
Closed

Question about reprojection of reconstructed mesh #13

fyviezhao opened this issue Mar 19, 2020 · 3 comments

Comments

@fyviezhao
Copy link

Hi Shunsukesaito, amazing work! I want to get the depth map from the predict mesh (e.g. result_ryota.obj reconstructed from the sample imgs in the repo), but have trouble in reprojecting the mesh to (512*512) image plane. I use the Camera in lib.renderer.camera for projection but get a all-black image. Can you or anyone give me some tips on how to correctly set the camera and reproject the reconstructed mesh to depth map? Thanks a lot!

@shunsukesaito
Copy link
Owner

The reconstructed mesh is in normalized image coordinates [-1,1]. If you want to align it with image pixels, you may need to do something like
v = 512 * (0.5 * v + 0.5)
assuming 512 is the input image resolution.

@bbico
Copy link

bbico commented May 15, 2020

Hi, I have same issue about reprojecting mesh to image.
Is the equation means that the camera have orthogonal view so that I can project the mesh?

@shunsukesaito
Copy link
Owner

Yes. The released PIFu is trained with weak perspective camera model (orthogonal projection + scale), so the equation above lets you align the reconstructed mesh with the input image in the pixel coordinate space.

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

3 participants