Unstable findHomography due to h33 = 1 normalization. (Bug #3919)
Description
Docs say that H matrix is normalized so, that h33 = 1. There are perfectly valid homographies (that map point (0,0) to the infinity), where h33 = 0.
See Hartley-Zisserman (4.1.2)
p1 = np.float32( [[1, 1], [2, 2], [-1, 1], [-2, 2], [0,1]] ) p2 = np.float32( [[1, 0], [1, 1], [0, 0], [0, 1], [0.5, 0.0]] ) print cv2.findHomography(p1, p2)[0]
Output:
[[ inf inf nan] [ nan inf -inf] [ nan inf nan]]
Associated revisions
Merge pull request #3919 from cbalint13:brisk
History
Updated by András Kovács over 10 years ago
I have a strong feeling, that the system is underdefined, since 3 points are collinear, has a symetry etc.
At least 4 "general position" pointpairs needed.
Updated by Maksim Shabunin over 9 years ago
Issue has been transferred to GitHub: https://github.com/Itseez/opencv/issues/4834