Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
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/
# 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