cvg / LightGlue

LightGlue: Local Feature Matching at Light Speed (ICCV 2023)
Apache License 2.0
3.15k stars 291 forks source link

How to display the matching status of each pair of feature points #106

Closed MrTHMX closed 4 months ago

MrTHMX commented 5 months ago

Is this a correct method? The matching results I get using this method have a large error.

for k in range(0, m_kpts0.shape[0]):
    axes = viz2d.plot_images([image0, image1])
    viz2d.plot_matches(m_kpts0[k:k + 1, :], m_kpts0[k:k + 1, :], color="lime", lw=0.2)
Phil26AT commented 5 months ago

I think it should be:

for k in range(0, m_kpts0.shape[0]):
    axes = viz2d.plot_images([image0, image1])
    viz2d.plot_matches(m_kpts0[k:k + 1, :], m_kpts1[k:k + 1, :], color="lime", lw=0.2)

However, there are simpler ways to plot the matches (see e.g. the demo notebook).

MrTHMX commented 4 months ago

thanks