c++ - Head pose variation removal using POSIT
I've been working on an AAM model using opencv for quite a while now and have been able to extract 2D coordinates from an image , and using POSIT (solvePnP) I have been able to extract the translation and rotation vector from the image , my issue is , that now I do not know how to reverse this translation and rotation to got a centralized normalized point set . Thanks in advance.
Let me reeterate what you said: you got 3d coordinates of some points of a head as well as their projections. You plug them into solvePnP() and got the pose. You want to reverse the transformation.
The way to get a reverse transformation is to invert a general matrix encompassing all transformations or separetly negate a translations and transpose a rotation matrix and then put them back together. I assume in a forward model rotation is applied first. In the reverse model apply the translation first. In the case you got a rotation vector instead of matrix you can use Rodrigues() to convert it back to matrix form.