title: rotate a image on the nose and eye axis with opencv
body: <p>I have the following image with eyes and noise points. The guy in the picture has a minimal tilt and I want to normalize this. I have mark the landmarks with dlib and so I can calculate the tilt. </p>
  
  <p>Now, how can I rotate simply the whole image, that the guy is straight?
  <a href="https://i.stack.imgur.com/iMaWs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/iMaWs.png" alt="enter image description here"></a></p>
  
  <pre><code>LEFT_EYE: [(274, 269), (286, 259), (302, 258), (317, 268), (302, 271), (286, 272)]
  RIGHT_EYE : [(388, 264), (401, 254), (417, 252), (431, 261), (419, 265), (403, 265)]
  NOSE: [(352, 257), (353, 278), (354, 297), (354, 319)]
  </code></pre>
  
  <p>As an idea, the nose points on the x axis are 352, 353, 354, 354. Theoretically if I make a matrix transformation, that change the all x points to 352, the noise will be straight in a line. </p>
  
  <p>I think it can be done with a matrix transformation, and the noise or eye points as vector transformation. But I need an approach, how can this be solved.</p>