Last active
April 20, 2022 07:15
-
-
Save andijakl/9c5fec59b33073125dd8d5fb5d0aebd7 to your computer and use it in GitHub Desktop.
Perspective transformations applied to the source images. Full article for context and remaining code: https://www.andreasjakl.com/understand-and-apply-stereo-rectification-for-depth-maps-part-2/
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Undistort (rectify) the images and save them | |
# Adapted from: https://stackoverflow.com/a/62607343 | |
img1_rectified = cv.warpPerspective(img1, H1, (w1, h1)) | |
img2_rectified = cv.warpPerspective(img2, H2, (w2, h2)) | |
cv.imwrite("rectified_1.png", img1_rectified) | |
cv.imwrite("rectified_2.png", img2_rectified) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment