title: error arising in solvepnp ; Assertion error OpenCV
body: <p>This is done for pose estimation</p>
  <p>After performing calibration, the output imgpoints and objpoints are being given as input to the <code>solvePnP</code> function as:</p>
  <pre><code>ret,revc,tvec= cv.solvePnP(temp1,temp2, cameraMatrix, dist)
  </code></pre>
  <p>Error which is arising is:</p>
  <pre><code>error: (-215:Assertion failed) ( (npoints &gt;= 4) || (npoints == 3 &amp;&amp; flags == SOLVEPNP_ITERATIVE &amp;&amp; useExtrinsicGuess) || (npoints &gt;= 3 &amp;&amp; flags == SOLVEPNP_SQPNP) ) &amp;&amp; npoints == std::max(ipoints.checkVector(2, CV_32F), ipoints.checkVector(2, CV_64F)) in function 'cv::solvePnPGeneric'
  </code></pre>
  <p>adding a code snippet :</p>
  <pre class="lang-py prettyprint-override"><code>objpoints = np.ascontiguousarray(objpoints)
  
  imgpoints = np.ascontiguousarray(imgpoints)
  
  temp1 = np.stack(objpoints,axis=0)
  
  temp2 = np.stack(imgpoints,axis=0)
  
  ret,revc,tvec= cv.solvePnP(temp1,temp2, cameraMatrix, dist)
  </code></pre>
  <p>Can someone pls help with this ?</p>