Skip to content

Instantly share code, notes, and snippets.

@andijakl
Last active April 20, 2022 07:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andijakl/0c0dc510b70f12699f4cd8006f609d5c to your computer and use it in GitHub Desktop.
Save andijakl/0c0dc510b70f12699f4cd8006f609d5c to your computer and use it in GitHub Desktop.
Draw the stereo rectified images along with horizontal lines to compare them. Full article for context and remaining code: https://www.andreasjakl.com/understand-and-apply-stereo-rectification-for-depth-maps-part-2/
# Draw the rectified images
fig, axes = plt.subplots(1, 2, figsize=(15, 10))
axes[0].imshow(img1_rectified, cmap="gray")
axes[1].imshow(img2_rectified, cmap="gray")
axes[0].axhline(250)
axes[1].axhline(250)
axes[0].axhline(450)
axes[1].axhline(450)
plt.suptitle("Rectified images")
plt.savefig("rectified_images.png")
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment