ICP return the global rotation euler angles

Skip to first unread message

Cedric Hemom

Aug 13, 2021, 4:40:36 AMAug 13
to scalismo
I tried several solutions to calculate the euler angles corresponding to the total ICP but nothing work.
During the ICP, I calculate the total rotation matrix that is applied to the mesh but I can't get back to the euler angle from the matrix. 
I wanted to know if a method was implemented to calculate the matrix product between two rotation matrix but using directly the Rotation[_3D] objects .


Marcel Luethi

Aug 16, 2021, 4:14:14 AMAug 16
to Cedric Hemom, scalismo
Hi Cedric

Unfortunately the Euler angles are currently not exposed in the API of the rotation class. This is something we should maybe add.
In the mean time you can use the method RotationSpace3D.rotMatrixToEulerAngles as a workaround.

Something like this should work:
val sourcePoints: IndexedSeq[Point[_3D]] = ???
val targetPoints: IndexedSeq[Point[_3D]] = ???
val rigidTransformation = LandmarkRegistration.rigid3DLandmarkRegistration(sourcePoints.zip(targetPoints), center = Point3D(0, 0, 0))
val (phi, theta, psi) = RotationSpace3D.rotMatrixToEulerAngles(rigidTransformation.rotation.rotationMatrix)
Best regards


You received this message because you are subscribed to the Google Groups "scalismo" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scalismo+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scalismo/63d9ce96-9d82-4bb1-9988-e5864fe2782an%40googlegroups.com.
Reply all
Reply to author
0 new messages