title: SolvePnp doesn't give the same result with four points and more points
body: <p>I'm computing the pose of the camera using <code>SolvePnP</code> function of <code>OpenCv</code> library and I'm facing the issue that when I give four point it gives me slightly better result than if I give more points. Here is an example of the code with some points as an example:</p>
  
  <pre><code>#include &lt;opencv2/opencv.hpp&gt;
  
  int main(int argc, char **argv)
  {
      //with 11 points
      std::vector&lt;cv::Point2f&gt; image_points_eleven =  {
                            cv::Point2f(905.63, 694.37),
                            cv::Point2f(936.403, 696.781),
                            cv::Point2f(988.424, 700.553),
                            cv::Point2f(1020.02, 702.846),
                            cv::Point2f(1016.45, 741.839),
                            cv::Point2f(1012.79, 781.955),
                            cv::Point2f(1009.06, 822.609),
                            cv::Point2f(951.48, 815.937),
                            cv::Point2f(894.528, 810.86),
                            cv::Point2f(898.26, 772.418),
                            cv::Point2f(901.867, 732.744) };
      std::vector&lt;cv::Point3f&gt; model_points_eleven =  {
                            cv::Point3f(-155.32,155.32, 0),
                            cv::Point3f(-70.6,155.32, 0),
                            cv::Point3f(70.6,155.32, 0),
                            cv::Point3f(155.32,155.32, 0),
                            cv::Point3f(155.32,52.95, 0),
                            cv::Point3f(155.32,-52.95, 0),
                            cv::Point3f(155.32,-158.85, 0),
                            cv::Point3f(0, -155.32, 0),
                            cv::Point3f(-155.32,-155.32, 0),
                            cv::Point3f(-155.32,-52.95, 0),
                            cv::Point3f(-155.32, 52.95, 0)};
  
      //with 4 points     
      std::vector&lt;cv::Point2f&gt; image_points_four =  {
                            cv::Point2f(921.808,714.396),
                            cv::Point2f(999.474,720.263),
                            cv::Point2f(992.486,800.519),
                            cv::Point2f(914.465,793.569) };
  
      std::vector&lt;cv::Point3f&gt; model_points_four =  {
                            cv::Point3f(-211.5 / 2.0f, 211.5 / 2.0f, 0),
                            cv::Point3f(-211.5 / 2.0f, 211.5 / 2.0f, 0),
                            cv::Point3f(-211.5 / 2.0f, 211.5 / 2.0f, 0),
                            cv::Point3f(-211.5 / 2.0f, 211.5 / 2.0f, 0)};    
      // Camera internals
      cv::Mat camera_matrix = (cv::Mat_&lt;double&gt;(3,3) &lt;&lt; 1296.2477, 0, 1028, 0 , 1296.2477, 771, 0, 0, 1);
      cv::Mat dist_coeffs = (cv::Mat_&lt;double&gt;(1,5) &lt;&lt; -0.12658285, 0.13909541, 0, 0, -0.040676277); // Assuming no lens distortion
  
      // Output rotation and translation
      cv::Mat rotation_vector; // Rotation in axis-angle form
      cv::Mat translation_vector;
  
      // Solve for pose 11 points
      cv::solvePnP(model_points_eleven, image_points_eleven, camera_matrix, dist_coeffs, rotation_vector, translation_vector);
      rotation_vector.convertTo(rotation_vector, CV_32F);
      translation_vector.convertTo(translation_vector, CV_32F);
  
      std::cout &lt;&lt; "Rotation Vector 11pts: " &lt;&lt; rotation_vector &lt;&lt; std::endl;
      std::cout &lt;&lt; "Translation Vector 11pts: " &lt;&lt; translation_vector &lt;&lt; std::endl;
  
      // Solve for pose 11 points  
      cv::solvePnP(model_points_four, image_points_four, camera_matrix, dist_coeffs, rotation_vector, translation_vector);
      rotation_vector.convertTo(rotation_vector, CV_32F);
      translation_vector.convertTo(translation_vector, CV_32F);
  
      std::cout &lt;&lt; "Rotation Vector 4pts: " &lt;&lt; rotation_vector &lt;&lt; std::endl;
      std::cout &lt;&lt; "Translation Vector 4pts: " &lt;&lt; translation_vector &lt;&lt; std::endl;
  
  }
  </code></pre>
  
  <p>I do get:</p>
  
  <pre><code>Rotation Vector 11pts: [3.0777242; 0.13331571; -0.26817828]
  Translation Vector 11pts: [-187.29686; -36.374325; 3410.5]
  Rotation Vector 4pts: [1.5553488; 0.13531595; -0.19250046]
  Translation Vector 4pts: [83.4842; -4.0712709; -163.0168]
  </code></pre>
  
  <p>Comparing to an external results (lazer), for me I should get more precision the more points I have or at least the same result, however it doesn't seem to be the case. I get better result with four points when comparing <code>X, Y and Z</code></p>
  
  <p>Is there something wrong with my code?</p>
  
  <p>PS: <code>model_points_four</code> and <code>model_points_eleven</code> have the same origin point in 3D world and in the image.</p>