title: OpenCV: Strange rotation and translation matrices from decomposeHomographyMat
body: <p>I am trying to solve a plane2plane projection problem using the findHomography function found in the OpenCV library. As a toy example I have a set of points in R2, P, and a second set of points in R2, Q, where Qx = Px+50, Qy = Py. Meaning I've offset the x-coordinates by 50. Now I run the following code:</p>
  
  <pre><code>Mat projectionMatrix = findHomography(Q, P);
  vector&lt;Point2f&gt; projectedPoints(objectCoordinates.size());
  perspectiveTransform(Q, projectedPoints, projectionMatrix);
  </code></pre>
  
  <p>And that gives me P, which is great. However, now I would like the rotation and translation matrices, R &amp; T, and this is where I get confused. OpenCV 3 has a function called <code>decomposeHomographyMat</code> that returns up to 4 solutions for R and T (also returns the normals but I do not store those). I run it as such:</p>
  
  <pre><code>vector&lt;Mat&gt; Rs;
  vector&lt;Mat&gt; Ts;
  decomposeHomographyMat(projectionMatrix, cameraMatrix, Rs, Ts, noArray());
  </code></pre>
  
  <p>The <code>cameraMatrix</code> I use is tried and tested from previous experiments. Ok, so I get my four results. Looking at them I notice that I get the identity matrix as a result for all R which is great. However, all of the translation vectors are [0,0,0]T, whereas I would expect at least one of them to be [-50,0,0]T. Is there something I need to do with the result from <code>decomposeHomographyMat</code> to get the expected behaviour?</p>
  
  <p>Thanks</p>