Created
July 23, 2018 13:33
-
-
Save appoll/d5811ee564dd85f55a9fa299f0d64143 to your computer and use it in GitHub Desktop.
Homography estimation normalization
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
### normalization so that the points have zero mean and unit standard deviation - important for numerical reasons | |
m = np.mean(input_points[:2], axis=1) | |
maxstd = max(np.std(input_points[:2], axis=1)) + 1e-9 | |
C1 = np.diag([1/maxstd, 1/maxstd, 1]) | |
C1[0][2] = -m[0]/maxstd | |
C1[1][2] = -m[1]/maxstd | |
input_points = np.dot(C1, input_points) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment