0

I tried few methods to rotate my object with reference of another standard object. Those are Quaternion and some angle multiplication etc. But none of those methods are giving good results. Actually what I'm trying is there are two human meshes one is fixed to the origin another one is rotated with some angles. I want to get that rotated object as standard object. Can anyone give me some methods to achieve that problem.

Thank you

KIRAN
  • 31
  • 2
  • 6
  • What do you mean by standard object? What methods did you try and why are the results not good? – Nico Schertler Apr 29 '19 at 15:28
  • Quaternions are just rotations but you have also position of object so you need [4x4 homogenous transform matrices](https://stackoverflow.com/a/28084380/2521214). Convert your quaternions+positions to transform matrices there should be some API for that if not do it yourself by rotating basis vectors like `(1,0,0)`,`(0,1,0)`,`(0,0,1)` and constructing the matrix with result and position) after this just construct desired transform matrix using your input matrices ... but without any info about your coordinate systems and what exactly you want to achieve is this unclear/broad so +Close – Spektre Apr 30 '19 at 07:46

1 Answers1

1

If the two human meshes have the same number of vertices and the same connectivity (i.e., it is the same polygonal mesh) then you can find the best rigid transformation solving a non-linear least squares optimization problem.

For instance check this academic reference: https://igl.ethz.ch/projects/ARAP/svd_rot.pdf

Or this tutorial with python code: http://nghiaho.com/?page_id=671

If you want to find the best rigid transformation (i.e., rotation + translation) that aligns two point clouds (different number of points, different polygonal mesh) then you need the ICP algorithm.