How to transfer pointcloud to mesh

I have got an obj file of a year. I want to transfer it to mesh.The file has two variables v and f. I don't know how to use commands like delaunay,trisurf,meshgrid to make it into mesh. Help?Has nayone done something sililiar before?

Réponses (3)

Fangjun Jiang
Fangjun Jiang le 11 Nov 2011

1 vote

mesh is for 3-D data. If you only have v and f, I am not sure how do you want to present it in 3-D. However, if you have x, y and z data in a vector, this post might help you.
Patrick Kalita
Patrick Kalita le 11 Nov 2011

1 vote

Perhaps v and f represent vertex and face information? If that is the case you can use the patch command. patch objects have the properties Vertices and Faces. Read the documentation to ensure you set these values using the right format; you may not be able to apply the variables v and f directly without some preprocessing.

4 commentaires

YE HUICHAO
YE HUICHAO le 14 Nov 2011
Thanks a lot. I have read through the Patch document. It seems that we can generate a mesh with vertices and faces. But when I run my file, the v variable seems represent the vertices, however the f might be something else. F is a 125731*3 matrix and number in each row is the same. I don't think there is a connection matrix to plot mesh. What is f? If I can generate a connection matrix with vertices, it should be easier for me to do further things.
Walter Roberson
Walter Roberson le 15 Nov 2011
We don't know what your F matrix is: you have not given us any information about how it was created.
Patrick Kalita
Patrick Kalita le 15 Nov 2011
If f is a 125731-by-3 array, it certainly has the right shape to describe how the faces are connected. Are all the values integers? They should be. You might want to also look at the minimum of the array to see if it is 0 -- if so you might need to add 1 to account for MATLAB's 1-based indexing.
Walter Roberson
Walter Roberson le 15 Nov 2011
Please show us the first few rows of your F matrix.

Connectez-vous pour commenter.

YE HUICHAO
YE HUICHAO le 14 Nov 2011

0 votes

I just need to know what is f which is a 125731*3 matrix and number in each row is the same. I need to find someway to create faces thus I can use patch command.Thanks.

Tags

Modifié(e) :

le 27 Sep 2023

Community Treasure Hunt

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

Start Hunting!

Translated by