Texture mapping the face image on 3D model

89 views
Skip to first unread message

Rishubh Parihar

unread,
Feb 12, 2018, 12:42:14 PM2/12/18
to scalismo-faces
Hi Andreas,

Thanks a lot for the help. I not able to figure out that as the input face image is (512 x 512) but the mesh-coordinates vary from -100 to 100 in x, y, and z dimensions. Is there any transformation on the input image to the 3D mesh so that I can transform from mesh space to 2D image space such as (eye from the mesh to eye on the 2D image, nose tip to nose tip). I would be helpful for texture mapping.

Thank you

Andreas Forster

unread,
Feb 21, 2018, 4:07:07 AM2/21/18
to Rishubh Parihar, scalismo-faces
Hi Rishubh,

I assume you are still in the fitting scenario. When you fitted the image you get as one result a full set of RenderParameters. This class directly provides you with a transformation from world coordinates to image coordinates: 
val rps: RenderParameter = ???
val point: Point[_3D] = ???
val pointInImage = rps.renderTransform(point)
In principle, you could calculate the mapping for every point of the mesh and store the texture coordinates as the texture mapping. However, this is not a good idea as it does not provide a distinct location for every point on a face. What you need is an embedding of the mesh into a 2d plane. Look for texture embedding or mesh parameterization. Used methods are Multi Dimensional Scaling, Laplacian Eigenmaps or Discrete Conformal Mappings etc. We started recently with a branch (meshParameterization) where some of the math is provided.

An interesting other project is for example:

I hope that helps.

Best regards
Andreas

--
You received this message because you are subscribed to the Google Groups "scalismo-faces" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo-faces+unsubscribe@googlegroups.com.
To post to this group, send email to scalismo-faces@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalismo-faces/b2b4824a-41fa-4047-8ee7-5519ef7e42d4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
*****************************************
Dr. Andreas Morel-Forster
Departement Mathematik und Informatik
Spiegelgasse 1
CH-4051 Basel
PHONE: +41 61 207 05 52
MAIL: Andreas.Forster@unibas.ch
*****************************************

Rishubh Parihar

unread,
Apr 8, 2018, 3:20:18 PM4/8/18
to scalismo-faces
Hi Andreas,

I have successfully generated the 3D reconstruction from scalismo. I have done texture mapping to the mesh and I want to display the result with respect to the original image. Can you suggest us some way so that we can incorporate pose and camera models of the original fit to compare our results with the original image.

Thank you

Andreas Forster

unread,
Apr 17, 2018, 3:29:14 AM4/17/18
to Rishubh Parihar, scalismo-faces
Hi Rishubh,

I assume you have a set of parameters from the 3D reconstruction and the new mesh as ColorNormalMesh3D. Then you can easily render the mesh with the camera, light etc. from the parameters using the following snippet:

val parameters: RenderParameter = ???
val mesh: ColorNormalMesh3D = ???

val image = ParametricRenderer.renderParameterMesh(parameters,mesh,RGBA.BlackTransparent)
Best, Andreas

--
You received this message because you are subscribed to the Google Groups "scalismo-faces" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo-faces+unsubscribe@googlegroups.com.
To post to this group, send email to scalismo-faces@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages