Size imageSize,
CV_IN_OUT InputOutputArray cameraMatrix,
CV_IN_OUT InputOutputArray distCoeffs,
- OutputArray rvecs, OutputArray tvecs,
+ OutputArrayOfArrays rvecs, OutputArrayOfArrays tvecs,
int flags=0 );
//! computes several useful camera characteristics from the camera matrix, camera frame resolution and the physical sensor size.
double cv::calibrateCamera( InputArrayOfArrays _objectPoints,
InputArrayOfArrays _imagePoints,
Size imageSize, InputOutputArray _cameraMatrix, InputOutputArray _distCoeffs,
- OutputArray _rvecs, OutputArray _tvecs, int flags )
+ OutputArrayOfArrays _rvecs, OutputArrayOfArrays _tvecs, int flags )
{
int rtype = CV_64F;
Mat cameraMatrix = _cameraMatrix.getMat();
camera_matrix = np.zeros((3, 3))\r
dist_coefs = np.zeros(4)\r
img_n = len(img_points)\r
- rvecs = [np.zeros(3) for i in xrange(img_n)]\r
- tvecs = [np.zeros(3) for i in xrange(img_n)]\r
- rms = cv2.calibrateCamera(obj_points, img_points, (w, h), camera_matrix, dist_coefs) #, rvecs, tvecs)\r
- print rms\r
+ rms, camera_matrix, dist_coefs, rvecs, tvecs = cv2.calibrateCamera(obj_points, img_points, (w, h), camera_matrix, dist_coefs)\r
+ print "RMS:", rms\r
+ print "camera matrix: ", camera_matrix\r
+ print "distortion coefficients: ", dist_coefs\r
+\r