title: Python: solvePnP( ) not enough values to unpack?
body: <p>I'm having problem with a function called <code>cv2.solvePnP</code> from OpenCV. This function is used to get a pose estimation of a chess board. After the following code I get an error:</p>
  
  <pre><code>for fname in glob.glob('Images/Calibragem/img1*.jpg'):
      img = cv2.imread(fname)
      gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
      ret, corners = cv2.findChessboardCorners(gray, (9,6), None)
  
      if ret==True:
  
          corners2=cv2.cornerSubPix(gray,corners,(11,11),(-1,-1), criteria)
  
          #finds the vectors of rotation and translation
          ret, rotationVectors, translationVectors, inliers = 
              cv2.solvePnP(objp, corners2, matrix, distortion)
          #projects the 3D points in the image
  
          imgpts,jac = cv2.projectPoints(axis,rotationVectors,translationVectors,matrix,distortion)
  
          imgAxis=drawAxis(img,corners2,imgpts)
          cv2.imshow('imgAxis', imgAxis)
          cv2.imwrite('imgAxis.png',imgAxis)
  </code></pre>
  
  <p>The error says:</p>
  
  <blockquote>
    <p>ret, rotationVectors, translationVectors, inliers = cv2.solvePnP(objp, corners2, matrix, distortion)
    ValueError: not enough values to unpack (expected 4, got 3)</p>
  </blockquote>