cv2.imwrite('%s/%s_chess.bmp' % (debug_dir, name), vis)\r
if not found:\r
print 'chessboard not found'\r
- break\r
+ continue\r
img_points.append(corners.reshape(-1, 2))\r
obj_points.append(pattern_points)\r
\r
\r
camera_matrix = np.zeros((3, 3))\r
dist_coefs = np.zeros(4)\r
- rms = cv2.calibrateCamera(obj_points, img_points, (w, h), camera_matrix, dist_coefs)\r
- print rms
\ No newline at end of file
+ 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