TheWebMonks / meshmonk

Open mesh-to-mesh registration framework
Apache License 2.0
70 stars 25 forks source link

Eigenvector decomposer on Q failed! #21

Closed nirajpandkar closed 2 years ago

nirajpandkar commented 2 years ago

Hello,

I am trying to perform rigid and non-rigid transformations on the FLAME template using my own target 3D scanned faces. Both the target and the template have been landmarked with 32 points. The template and the target look as follows -

Template object

Target 3D object

As far as I know there are no NAN values in either the template or the object file. But when I run the BatchProcessingWithMeshMonk.m file, I get the following error -

eigenvector decomposer on Q failed!
Q : nan nan nan nan
nan nan nan nan
nan nan nan nan
nan nan nan nan

I isolated the line which is causing this error. It starts with the map() function in the above file and I traced it back to the rigid transformation switch case..

Further I observed that the program failed on update() in compute_rigid_registration function in meshmonk.cpp which in turn pointed me to the actually print statement of the error message I'm receiving in RigidTransformer.cpp - https://github.com/TheWebMonks/meshmonk/blob/master/src/RigidTransformer.cpp#L82

I'm kinda stumped as to how I can debug my particular scenario and check why the EigenVector decomposer is not working. Could you please give me some pointers?

Thank you, Niraj Pandkar

nirajpandkar commented 2 years ago

@alorcas I see you have faced this issue before in another issue. Any suggestions?

nirajpandkar commented 2 years ago

Ok so I figured out the problem.

The template landmarking i was using (provided by GeoMagick software) was (multiplied) offset by 10^3. This was throwing off the compute_transform function. For the uninitiated, this function essentially brings both - the template and the target - in the same coordinate space. This is done by rotating (orienting), translating and scaling the template in accordance to the target. You can go into more detail of the function linked above.

In this case, all I had to do was divide all my landmark coordinates by 10^3. :) Cheers!