Effacer les filtres
Effacer les filtres

3D Mesh morphing

12 vues (au cours des 30 derniers jours)
ava
ava le 10 Fév 2012
Commenté : Celine Roux le 10 Fév 2017
I have two 3D meshes(460 by 3 )and I want to do simple morphing between them and save the morphing as an avi. file.
Does anyone have an idea ?
Thank you
  1 commentaire
Celine Roux
Celine Roux le 10 Fév 2017
Can you please share the final code? Thank you

Connectez-vous pour commenter.

Réponse acceptée

Anton Semechko
Anton Semechko le 10 Fév 2012
Before morphing, you first have to establish dense point correspondences between the two surfaces. You can address this problem in multiple ways. Here is one approach:
First, you have to make sure that the surfaces are registered within a common frame of reference. In other words you have to find a global rigid (or similarity if scale is not important) transformation that will maximally align the two surfaces. You could use one of the implementations of ICP (iterative closest point) algorithm from FEX for this purpose. For example: http://www.mathworks.com/matlabcentral/fileexchange/24301-finite-iterative-closest-point
Second, you need to find pointwise correspondences between the surfaces (S1 and S2). This means that given a point on S1, you can find its counterpart on S2. The simplest approach would be to select the points based on spatial proximity. After you selected a set of corresponding points {x1_i} and {x2_i}, you can use thin plate splines (TPS) to find a smooth displacement field, D(), such that D(x1_i)=x2_i. One of many TPS implementations from FEX: http://www.mathworks.com/matlabcentral/fileexchange/22227-thin-plate-splines
Third, you can now map all vertices from S1 to S2 using D() from step 2.
Finally, you can now morph S1 into S2 using S(t)=(1-t)*S1+t*S2, where t is a scalar on the interval [0,1]. Note S(t=0)=S1 and S(t=1)=S2.
  1 commentaire
ava
ava le 11 Fév 2012
Thanks Anton!

Connectez-vous pour commenter.

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by