import cv2
import glob
import numpy as np
objp = np.zeros((9*6, 3), np.float32)
objp[:, :2] = np.mgrid[0:9, 0:6].T.reshape(-1, 2)
objpoints =[]
imgpoints =[]
images = glob.glob('./chess_board_img/left*.jpg')
calibration_output_images = []
for i, frame in enumerate(images):
img = cv2.imread(frame)
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
ret, corners = cv2.findChessboardCorners(gray, (9*6), None)
if ret == True:
objpoints.append(objp)
imgpoints.append(corners)
img = cv2.drawChessboardCorners(img, (9, 6), corners, ret)
cv2.imwrite('./chessbord_ouutput/calibration_output%d.jpg'%i, img)
calibration_output_images.append(img)
Error message:
File "C:UsersRushikeshPycharmProjectspythonProjectp1.py", line
18, in ret, corners = cv2.findChessboardCorners(gray,
(9*6), None)
SystemError: new style getargs format but argument is not a tuple
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…