Homography Decomposition Results

asked 2017-07-06 05:42:19 -0600

Hello,

Please see the answer to the stackoverflow question linked below.

https://stackoverflow.com/questions/3...

It's pretty straight forward with a homography decomposition.

https://hal.inria.fr/inria-00174036v3...

We already know that there exist 4 solutions, in the general case, for the homography decomposition problem, two of them being the ”opposites” of the other two.

Rtna = {Ra, ta, na} ; Rtna− = {Ra, −ta, −na} (131) Rtnb = {Rb, tb, nb} ; Rtnb− = {Rb, −tb, −nb} (132)

These can be reduced to only two solutions applying the constraint that all the reference points must be visible from the camera (visibility constraint). We will assume along the development that the two solutions verifying this constraint are Rtna and Rtnb and that, among them, Rtna is the ”true” solution. These solutions are related according to (102)- (104). In practice, in order to determine which one is the good solution, we can use an approximation of the normal n∗. Thus, having an approximated parameter vector μ we build a non-linear state observer:

There must be code somewhere for an OpenCV implementation for the refinement of the homographies.

  // decompose using identity as internal parameters matrix
  std::vector<cv::Mat> Rs, Ts;
  cv::decomposeHomographyMat(H,
                             K,
                             Rs, Ts,
                             cv::noArray());

Rs and Ts have multiple solutions. How do i determine which one?

1) Visibility Test - Project points to 3D space using R and t, and check it is in front of the camera. (+ve z value?) 2) How to reduce the final two solutions?

Regards,

Daniel

edit retag flag offensive close merge delete

Comments

Were you able to figure this out? I have the exact same question. The decomposeHomographyMat returns four solutions, we can reduce this to two, but I don't know how to decide between the last two solutions. Any help would be hugely appreciated!

rachel gravatar imagerachel ( 2018-04-27 19:34:40 -0600 )edit