Unstable findHomography due to h33 = 1 normalization. (Bug #3919)


Added by Alexander Mordvintsev over 10 years ago. Updated over 9 years ago.


Status:New Start date:2014-09-25
Priority:Normal Due date:
Assignee:Vadim Pisarevsky % Done:

0%

Category:calibration, 3d
Target version:-
Affected version:branch 'master' (3.0-dev) Operating System:Any
Difficulty: HW Platform:Any
Pull request:

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

Revision a31b2930
Added by Vadim Pisarevsky almost 10 years ago

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

Also available in: Atom PDF