Skip to content

Unstable findHomography due to h33 = 1 normalization. #4834

@opencv-pushbot

Description

@opencv-pushbot

Transferred from http://code.opencv.org/issues/3919

|| Alexander Mordvintsev on 2014-09-25 15:02
|| Priority: Normal
|| Affected: branch 'master' (3.0-dev)
|| Category: calibration, 3d
|| Tracker: Bug
|| Difficulty: 
|| PR: 
|| Platform: Any / Any

Unstable findHomography due to h33 = 1 normalization.

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)

<pre>
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]
</pre>
Output:
<pre>
[[ inf  inf  nan]
 [ nan  inf -inf]
 [ nan  inf  nan]]
</pre>

History

András Kovács on 2014-10-20 20:12
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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions