2016-02-07 17:04:08 -0600 | commented question | Unexpected results from decomposeHomographyMat findHomography returns the same result as getPerspectiveTransform. Hmm, that's interesting. |
2016-02-07 11:45:57 -0600 | asked a question | Unexpected results from decomposeHomographyMat I am getting unexpected results from decomposeHomographyMat. My use case is to find the pose and perspective of a square spanned by 4 coplanar points. It works fine most of the time with solvePNP, however sometimes it finds the incorrect pose. I want to find the 4 possible poses so I can further apply some heuristics to get the correct one. I thought this to be possible with decomposeHomographyMat, doing this:
However, It doesn't seem to work the way I expect it, no tvec/rvec returns a sensible result that corresponds to the answer given by solvePNP. Have I understood decomposeHomographyMat incorrectly? In the following small code snippet I would expect the pts3d to be projected back on top the src_points, however it it not close. (The side of the square is 70 pixel units) Python 3.5, opencv 3.1 While the following works, and finds a pose: |