title: Pose correction for face recognition
body: <p>I have a dataset of images with faces. I also have for each face within the dataset a set of 66 2D points that correspond to my face landmarks(nose, eyes, shape of my face, mouth).</p>
  
  <p>So basically I have the shape of my face in terms of 2D points from my image.</p>
  
  <p>Do you know any algorithm that I can use and that can rotate my shape so that the face shape is straight? Let's say that the pan angle is 30 degrees and I want it rotated to 30 degrees so that it is positioned at 0 degrees on the pan angle. I have illustrated bellow what I want to say. </p>
  
  <p><img src="https://i.stack.imgur.com/RR9s9.png" alt="enter image description here"></p>
  
  <p><img src="https://i.stack.imgur.com/wUqcp.png" alt="enter image description here"></p>
  
  <p>Basically you can consider the above illustrated shapes outlines for my images, which are represented in 2D. I want to rotate my first shape points so that they can look like the second shape. A shape is made out of a set of <code>66 2D points which are basically pixel coordinates</code>. All I want to do is to find the correspondence of each of those <code>66 points</code> so that the new shape is rotated with a certain degree on the pan angle.</p>