texture map an image on triangular mesh

Given an irregular triangle mesh with V and F as the no. of vertices and faces respectively and an image. How to map image (texture) to Mesh(V,F) ?
There are other answers but they are using meshgrid. Can I do this without using meshgrid as my Mesh is irregular.

댓글 수: 5

Ameer Hamza
Ameer Hamza 2020년 5월 2일
Can you show the code to create the mesh?
MB
MB 2020년 5월 2일
I m just reading an '.off' file with vertices as N*3 matrix and face/triangle as F*3 matrix, where each row of F holds the vertex indices for the vertex of respective triangle.
Ameer Hamza
Ameer Hamza 2020년 5월 2일
But how are you plotting these points? Mesh(V,F) is not a function in MATLAB.
MB
MB 2020년 5월 3일
Using trimesh

댓글을 달려면 로그인하십시오.

답변 (2개)

KSSV
KSSV 2020년 5월 2일

0 개 추천

Read about triplot, trimesh, trisurf and patch.
Ameer Hamza
Ameer Hamza 2020년 5월 3일

0 개 추천

By default, trimesh returns a patch object. MATLAB does not seem to support texture mapping on the patch object. See this FEX package: https://www.mathworks.com/matlabcentral/fileexchange/28106-texture-patch, which uses the surface object to create the patches which support texture mapping.

카테고리

질문:

MB
2020년 5월 2일

답변:

2020년 5월 3일

Community Treasure Hunt

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

Start Hunting!

Translated by