magicleap / SuperGluePretrainedNetwork

SuperGlue: Learning Feature Matching with Graph Neural Networks (CVPR 2020, Oral)
Other
3.31k stars 672 forks source link

is there some thing with your code ”compute_epipolar_error“? #83

Closed lvzhengyi0204 closed 3 years ago

lvzhengyi0204 commented 3 years ago

Hello: I am looking at the source code, but found some problems。

https://github.com/magicleap/SuperGluePretrainedNetwork/blob/master/models/utils.py#L355 In L367 :E = t_skew @ T_0to1[:3, :3] but the essential matrix is wrong. the correct code is E = T_0to1[:3, :3] @ t_skew

and In L369 L370, the code is also wrong Ep0 = kpts0 @ E.T # N x 3 p1Ep0 = np.sum(kpts1 * Ep0, -1) # N

the correct code is Ep0 = E@kpts0.T p1Ep0 = np.sum(kpts1.T@Ep0,-1)

I don't know why you wrote that. Can you explain it?