def undistort_crop(orig_img):
#cv2.remap(src, map1, map2, interpolation[, dst[, borderMode[, borderValue]]]) -> dst
dst = cv2.remap(orig_img, map1, map2, cv2.INTER_LINEAR)
x,y,w,h = roi
crop_frame = dst[y:y+h, x:x+w]
return crop_frame
评论列表
文章目录