Ask Your Question

Revision history [back]

DMatch matches output

Hey,

I'm having some trouble trying to make sense out of the ouput of my matches. I print on screen both the query and train index and their respective distance, then I calculate the min and max distance. My logic tells me that if I'm comparing two different pictures of the same object, the min distance obtained should be smaller than the min distance obtained when matching two pictures of a different object, but that's not the case. Am I reading the output wrong? This is causing a lot of headaches, since I'm currently comparing two pictures and returning a matching rate percentage, but some of these rates are quite wrong.

Here's the DMatch output:

Query Index: 0; Train Index: 37; Distance: 113.0 Query Index: 1; Train Index: 79; Distance: 127.0 Query Index: 2; Train Index: 103; Distance: 136.0 Query Index: 3; Train Index: 103; Distance: 141.0 Query Index: 4; Train Index: 67; Distance: 117.0 Query Index: 5; Train Index: 33; Distance: 117.0 Query Index: 6; Train Index: 70; Distance: 102.0 Query Index: 7; Train Index: 168; Distance: 125.0 Query Index: 8; Train Index: 79; Distance: 68.0 Query Index: 9; Train Index: 101; Distance: 111.0 Query Index: 10; Train Index: 106; Distance: 93.0 Query Index: 11; Train Index: 69; Distance: 56.0 Query Index: 12; Train Index: 112; Distance: 102.0 Query Index: 13; Train Index: 66; Distance: 87.0 Query Index: 14; Train Index: 45; Distance: 104.0 [...] Min Distance: 39.0 Max Distance: 155.0

How can I use this to determine the good matches?

Cheers

DMatch matches output

Hey,

I'm having some trouble trying to make sense out of the ouput of my matches. I print on screen both the query and train index and their respective distance, then I calculate the min and max distance. My logic tells me that if I'm comparing two different pictures of the same object, the min distance obtained should be smaller than the min distance obtained when matching two pictures of a different object, but that's not the case. Am I reading the output wrong? This is causing a lot of headaches, since I'm currently comparing two pictures and returning a matching rate percentage, but some of these rates are quite wrong.

Here's the DMatch output:

Query Index: 0; Train Index: 37; Distance: 113.0 113.0
Query Index: 1; Train Index: 79; Distance: 127.0 127.0
Query Index: 2; Train Index: 103; Distance: 136.0 136.0
Query Index: 3; Train Index: 103; Distance: 141.0 141.0
Query Index: 4; Train Index: 67; Distance: 117.0 117.0
Query Index: 5; Train Index: 33; Distance: 117.0 117.0
Query Index: 6; Train Index: 70; Distance: 102.0 102.0
Query Index: 7; Train Index: 168; Distance: 125.0 125.0
Query Index: 8; Train Index: 79; Distance: 68.0 68.0
Query Index: 9; Train Index: 101; Distance: 111.0 111.0
Query Index: 10; Train Index: 106; Distance: 93.0 93.0
Query Index: 11; Train Index: 69; Distance: 56.0 56.0
Query Index: 12; Train Index: 112; Distance: 102.0 102.0
Query Index: 13; Train Index: 66; Distance: 87.0 87.0
Query Index: 14; Train Index: 45; Distance: 104.0 [...] 104.0
[...]
Min Distance: 39.0 39.0
Max Distance: 155.0


How can I use this to determine the good matches?

Cheers

DMatch matches output

Hey,

I'm having some trouble trying to make sense out of the ouput of my matches. I print on screen both the query and train index and their respective distance, then I calculate the min and max distance. My logic tells me that if I'm comparing two different pictures of the same object, the min distance obtained should be smaller than the min distance obtained when matching two pictures of a different object, but that's not the case. Am I reading the output wrong? This is causing a lot of headaches, since I'm currently comparing two pictures and returning a matching rate percentage, but some of these rates are quite wrong.

Here's the DMatch output:

Query Index: 0; Train Index: 37; Distance: 113.0
Query Index: 1; Train Index: 79; Distance: 127.0
Query Index: 2; Train Index: 103; Distance: 136.0
Query Index: 3; Train Index: 103; Distance: 141.0
Query Index: 4; Train Index: 67; Distance: 117.0
Query Index: 5; Train Index: 33; Distance: 117.0
Query Index: 6; Train Index: 70; Distance: 102.0
Query Index: 7; Train Index: 168; Distance: 125.0
Query Index: 8; Train Index: 79; Distance: 68.0
Query Index: 9; Train Index: 101; Distance: 111.0
Query Index: 10; Train Index: 106; Distance: 93.0
Query Index: 11; Train Index: 69; Distance: 56.0
Query Index: 12; Train Index: 112; Distance: 102.0
Query Index: 13; Train Index: 66; Distance: 87.0
Query Index: 14; Train Index: 45; Distance: 104.0
[...]
Min Distance: 39.0
Max Distance: 155.0

How can I use this to determine the good matches?matches? And why do the descriptors in orb return double if it's supposed to be a binary string?

Cheers

DMatch matches output

Hey,

I'm having some trouble trying to make sense out of the ouput of my matches. I print on screen both the query and train index and their respective distance, then I calculate the min and max distance. My logic tells me that if I'm comparing two different pictures of the same object, the min distance obtained should be smaller than the min distance obtained when matching two pictures of a different object, but that's not the case. Am I reading the output wrong? This is causing a lot of headaches, since I'm currently comparing two pictures and returning a matching rate percentage, but some of these rates are quite wrong.

Here's the DMatch output:

Query Index: 0; Train Index: 37; Distance: 113.0
Query Index: 1; Train Index: 79; Distance: 127.0
Query Index: 2; Train Index: 103; Distance: 136.0
Query Index: 3; Train Index: 103; Distance: 141.0
Query Index: 4; Train Index: 67; Distance: 117.0
Query Index: 5; Train Index: 33; Distance: 117.0
Query Index: 6; Train Index: 70; Distance: 102.0
Query Index: 7; Train Index: 168; Distance: 125.0
Query Index: 8; Train Index: 79; Distance: 68.0
Query Index: 9; Train Index: 101; Distance: 111.0
Query Index: 10; Train Index: 106; Distance: 93.0
Query Index: 11; Train Index: 69; Distance: 56.0
Query Index: 12; Train Index: 112; Distance: 102.0
Query Index: 13; Train Index: 66; Distance: 87.0
Query Index: 14; Train Index: 45; Distance: 104.0
[...]
Min Distance: 39.0
Max Distance: 155.0

How can I use this to determine the good matches? And why do the descriptors in orb return double if it's supposed to be a binary string?

Cheers

EDIT:

So after a few more tests, I've figured that those distances returned can only be the Hamming distance between the two given keypoints in query and train index. I've managed to apply some custom filters for my good matches, and the results are pretty good. If you need help with this, PM me. Cheers