def draw_images(img, undistorted, title, cmap):
f, (ax1, ax2) = plt.subplots(1, 2, figsize=(24, 9))
f.tight_layout()
ax1.imshow(img)
ax1.set_title('Original Image', fontsize=50)
if cmap is not None:
ax2.imshow(undistorted, cmap=cmap)
else:
ax2.imshow(undistorted)
ax2.set_title(title, fontsize=50)
plt.subplots_adjust(left=0., right=1, top=0.9, bottom=0.)
plt.show()
# TODO: Write a function that takes an image, object points, and image points
# performs the camera calibration, image distortion correction and
# returns the undistorted image
评论列表
文章目录