laurentkneip / opengv

OpenGV is a collection of computer vision methods for solving geometric vision problems. It is hosted and maintained by the Mobile Perception Lab of ShanghaiTech.
Other
1.01k stars 354 forks source link

[Potential bug] Regardless of the input, pyopengv.relative_pose_sixpt( ) returns NAN. #123

Open irtizaimmersal opened 2 months ago

irtizaimmersal commented 2 months ago

@laurentkneip @paulinus @simogasp

I am running a small test for pyopengv.relative_pose_sixpt( ). Tried multiple inputs, it appears it always return NAN and as a last entry I get identity.

d = RelativePoseDataset(10, 0.0, 0.0)
 indices = np.random.choice(d.bearing_vectors1.shape[0], 6, replace=False)
 sixpt_rotations = pyopengv.relative_pose_sixpt(
        d.bearing_vectors1[indices],
        d.bearing_vectors2[indices],
    )
    print("relative_pose_sixpt", sixpt_rotations)

I get all arrays as NAN except for last, see below.

 ...
 ...
  array([[nan, nan, nan],
       [nan, nan, nan],
       [nan, nan, nan]]), array([[nan, nan, nan],
       [nan, nan, nan],
       [nan, nan, nan]]), array([[nan, nan, nan],
       [nan, nan, nan],
       [nan, nan, nan]]), array([[1., 0., 0.],
       [0., 1., 0.],
       [0., 0., 1.]])]

`