solve deprecated function in numpy

This commit is contained in:
David PAGNON 2023-06-07 10:20:29 +02:00 committed by GitHub
parent 91546d02c8
commit 0aea192ffb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -290,7 +290,7 @@ def calib_checkerboard_fun(config):
# Calibration
r, mtx, dist, rvecs, tvecs = cv2.calibrateCamera(objpoints, imgpoints, img.shape[1::-1],
None, None, flags=(cv2.CALIB_FIX_K3 + cv2.CALIB_FIX_PRINCIPAL_POINT))
h, w = [np.float(i) for i in img.shape[:-1]]
h, w = [np.float32(i) for i in img.shape[:-1]]
print(r, repr(mtx), repr(dist))
print(w,h)