How to fit a 2d image onto 3d mesh?

4 vues (au cours des 30 derniers jours)
Elangkumaran
Elangkumaran le 27 Mai 2014
I have a face image (read using imread) that has labelled face features (matrix stored in [x y] format)
I have generated depth information (a 3d mesh) for each of the labelled points, and have a matrix in `[x y z]` format, where the coordinates x and y are the same as that of the points. It looks like this:
How do I fit or warp the original image (at least the region enclosed by the points) over the 3d mesh, using the x and y coordinates for mapping? I know I have to do a lot of interpolation in the 3d mesh before I see good results, but I'd like to know how to fit an image to that
I've looked at similar threads http://www.mathworks.in/matlabcentral/newsreader/view_thread/256787 and http://www.mathworks.com/matlabcentral/answers/91858-is-it-possible-to-perform-texture-mapping-within-matlab, but the instructions there warp the face out of position with the 3d mesh (i.e. the face part of the image is not aligned with the 3d mesh)

Réponses (2)

Marwa Jabberi
Marwa Jabberi le 25 Avr 2018
hello this code is usefull for fitting http://www.cbsr.ia.ac.cn/users/xiangyuzhu/projects/HPEN/main.htm can i have instructions that you used to create the mesh from xy keypoints plz?

shuai zhang
shuai zhang le 22 Avr 2019
hi. how is this going, I also meet this kind of problem, i need to fit 2d image on 3d mesh with specific coordinate correspondences. Hope to discuss with you.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by