Created
April 11, 2018 22:40
-
-
Save Yengas/9b87734cdb9f8bd19151d582c024b3fa to your computer and use it in GitHub Desktop.
Multiplying two homography with opencv python. Combining two homography so the output will be rotated
This file contains hidden or 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
| # Rotates the given homography from the origin point | |
| def getRotatedHomography(homography, size, angle): | |
| width, height = size | |
| rotation = cv2.getRotationMatrix2D((width / 2, height / 2), angle, 1) | |
| rotationHomography = np.concatenate((rotation, np.array([[0, 0, 1]]))) | |
| return np.dot(rotationHomography, homography) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment