is that possible to map and texture on a flatten mesh surface?

6 views (last 30 days)
I'm using the "nefertiti" obj in MATLAB to perform the surface flattening, is that possible to map an image on the flatten surface?
I used isomap technique to flatten the surface,actually i'm trying to flatten a human face image which the picture posted below.i'm been struggling on the mapping technique for along period, please kindly advise. A big Thanks
The paper i refer has given a ideal of mapping every point on the 3D surface to its corresponding 2D flattened point on 3D surface. - find the corresponding 2D point in the flattend map -translate the 2D coordinate to the texture image coordinate -use the point's color as texture
how i convert it to a program?
  2 Comments
svanimisetti
svanimisetti on 8 Mar 2019
Have you found a solution yet? I had a way to apply texture to a mesh, but I was looking for a way to flatten my mesh. Currently I just project 3D points on to a plane. Of course this will not work for complex manifolds. Can you share your method to flatten the mesh? I can share how I am applying texture to the flattened mesh.
Rasoul
Rasoul on 3 Mar 2022
You can compute BaryCentric coordinates for each triangle in the flattened mesh and then warping the image using the correspondance texture in the original 2d image. I performed this procedure in my flatten image and it amazingly texturized my flatten surface.

Sign in to comment.

Answers (1)

yanqi liu
yanqi liu on 4 Mar 2022
Edited: yanqi liu on 4 Mar 2022
yes,sir,may be consider image transform,such as
img=imread('cameraman.tif');
[h,w]=size(img);
hfOV=pi/2;
f=w/(2*tan(hfOV/2));
newh=h;
neww=floor(f*atan((w-w/2)/f)+f*atan(w/(2*f)));
imgn=zeros(newh,neww);
for i=1:newh
for j=1:neww
x=floor(f*tan(j/f-atan(w/(2*f)))+w/2);
y=floor((i-h/2)*sqrt((x-w/2)^2+f^2)/f+h/2);
if x>=1 && x<=w && y>=1 && y<=h
imgn(i,j)=img(y,x);
end
end
end
imshow(img);
figure;
imshow(imgn,[]);

Community Treasure Hunt

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

Start Hunting!