Sunday 15 March 2015

opencv - Extract face rotation from homography in a video -


I am trying to determine the face orientation in a video.

The video starts with the frontal face of the face, it is not a rotation, it rotates in the following frames and I am trying to determine the rotation, which gives me face orientation based on the camera's position. Will help in determining

I am using OpenCV and C ++ for the job. I am using a SURF descriptor to find points on the face which I use to calculate a morphology between the two images. Being two frames of being close to each other, the rotation of the head will be reduced in that interval and my echo matrix will be close to the identity matrix.

This is my personality matrix:

  H = searchogram (k1, k2, RANSAC, 8);   

Where k1 and k2 are the main points drawn with the SURF.

I am using rotation matrix to remove, but now I am not sure how the rotatrix It is also basically (where numbers are in e-10 to E-16 numbers).

In theory, what was to find the angle of rotation in every frame and store it somewhere, so that if I get a 1 degree change in every frame, after 10 frames I know that My head has changed its orientation by 10 degrees.

I spend some time reading everything about QR decomposition, brephography matrix, but I can not find it around. So any help would be appreciated.

Thank you!

Upper-symmetry matrix is ​​a 2D rotation matrix left if you take a point (or Low R * P), you will see that: code>

In other words, the first line of the matrix is ​​an unit vector that is the new axis of the new head . (If there is a difference between frames then this will not be a unit vector, but this method will still work.) Then you should be able to calculate

  rotation = atan2 (second entry) First line, first entry of first line)    

No comments:

Post a Comment