Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
361 views
in Technique[技术] by (71.8m points)

python - Why I have this Error? "System Error: new style getargs format but argument is not a tuple"

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...