def init_undistort():
#cv2.initUndistortRectifyMap(cameraMatrix, distCoeffs, R, newCameraMatrix, size, m1type[, map1[, map2]]) -> map1, map2
frame_size=(640,480)
map1, map2=cv2.initUndistortRectifyMap(mtx, dist, None, newcameramtx, frame_size, cv2.CV_32FC1)
return map1, map2
# this is a faster undistort_crop that only does remapping. Requires call to init_undistort first to
# to create the map1 and map2
评论列表
文章目录