title: input arguments of python's cv2.calibrateCamera
body: <p>I get the following error when I try to calibrate camera using cv2.calibrateCamera:</p>
  
  <pre><code>rms, camera_matrix, dist_coefs, rvecs, tvecs = cv2.calibrateCamera(pts3d, pts2d, self.imgsize, None, None)
  cv2.error: /home/sarkar/opencv/opencv/modules/calib3d/src/calibration.cpp:2976: error: (-210) objectPoints should contain vector of vectors of points of type Point3f in function collectCalibrationData
  </code></pre>
  
  <p>I initially had nx3 and nx2 array for pts3d and pts2d. I then tried to reshape pts3d and pts2d in the following form as the function takes vectors of vector point3d (and correspondingly pts2d) as input: </p>
  
  <p>[1 x n x 3] and [1 x n x 2]</p>
  
  <p>[k x n' x 3] and [k x n' x 3], where k is some random value</p>
  
  <p>[1 x n x 1 x 3] and [1 x n x 1 x 2]</p>
  
  <p>nothing works and it always gives the same error. </p>
  
  <p>I saw the code sample code of cameraclibration provided which runs fine, and their input is of [k x n x 3]. I really don't know what is wrong with my implementation. Following is my code to be precise:</p>
  
  <pre><code>   #data contains [n x 5] dim array which is the hstacked arrays of pts3d and pts2d correspondences I obtained elsewhere. 
      pts3d = data[:, 0:3] #first 3 column 
      pts2d = data[:, 3:5] #next 2 column.. I checked the values are coming correctly 
      pts3d = pts3d.reshape(1,-1, 3) #Here, I have experimented by resizing with different values. 
      pts2d = pts2d.reshape(1,-1, 2)
  
      rms, camera_matrix, dist_coefs, rvecs, tvecs = cv2.calibrateCamera(pts3d, pts2d, self.imgsize, None, None)    
  </code></pre>
  
  <p>the error happens at the time of the function call. It would be nice to know what can be wrong here. </p>