def undistort_stereo(stereo_rig, test_im_left, test_im_right, size_factor):
im_size = test_im_left.shape
map1x, map1y, map2x, map2y = compute_stereo_rectification_maps(stereo_rig, im_size, size_factor)
rect_left = cv2.remap(test_im_left, map1x, map1y, cv2.INTER_LINEAR)
rect_right = cv2.remap(test_im_right, map2x, map2y, cv2.INTER_LINEAR)
return rect_left, rect_right
评论列表
文章目录