Ошибка Expected Ptr<cv:::UMat>for argument'%s'
при калибровке камеры. В чем причина этой ошибки и как ее исправить?
def findCorner(img) :
CHECKERBOARD=(6,9)
criteria=(cv.TERM_CRITERIA_EPS+cv.TERM_CRITERIA_MAX_ITER,30,0.001)
ret, corners=cv.findChessboardCorners(images,(6,9),None)
corner_refine = cv.cornerSubPix(images, corners, (11,11), (-1,-1), (cv.TERM_CRITERIA_EPS + cv.TERM_CRITERIA_MAX_ITER), criteria)
corner_img = cv.drawChessboardCorners(images, CHECKERBOARD, corner_refine, ret)
return ret, corner_refine, corner_img
objpoints = []
imgpoints = []
corner_imgs = []
for img in images :
ret, corner, corner_img = findCorner(img)
if ret == True :
objpoints.append(objp)
imgpoints.append(corner)
corner_imgs.append(corner_img)