1 | initial version |
That's not because of your code.
When you match, say, image A to image B, you actually find the best correspondence in B for each feature in A.
And this is definitely not symmetric:
imgFeat1
) has 1095 features. For each of those features, the algorithm gives you the closest feature in imgFeat2
. It might happen that two features in imgFeat1
are matched to the same feature in imgFeat2
.2 | No.2 Revision |
EDIT: I think that you are right. In the second part of the code (2->1), the new matches that are found are never added to the list of matches which is returned.
PREVIOUS VERSION OF MY ANSWER:
That's not because of your code.
When you match, say, image A to image B, you actually find the best correspondence in B for each feature in A.
And this is definitely not symmetric:
imgFeat1
) has 1095 features. For each of those features, the algorithm gives you the closest feature in imgFeat2
. It might happen that two features in imgFeat1
are matched to the same feature in imgFeat2
.3 | No.3 Revision |
EDIT: My mistake: I think that you are right. In the second part of the code (2->1), the new matches that are found are never added to the list of matches which is returned.
Which means that in the end, this matcher is not matching in both ways, and my previous explanation applies:
PREVIOUS VERSION OF MY ANSWER:
That's not because of your code.
When you match, say, image A to image B, you actually find the best correspondence in B for each feature in A.
And this is definitely not symmetric:
imgFeat1
) has 1095 features. For each of those features, the algorithm gives you the closest feature in imgFeat2
. It might happen that two features in imgFeat1
are matched to the same feature in imgFeat2
.4 | No.4 Revision |
EDIT: My mistake: I think that you are right. In the second part of the code (2->1), the new matches that are found are never added to the list of matches which is returned.
Which means that in the end, this matcher is not matching in both ways, and my previous explanation applies:
PREVIOUS VERSION OF MY ANSWER:
When you match, say, image A to image B, you actually find the best correspondence in B for each feature in A.
And this is definitely not symmetric:
imgFeat1
) has 1095 features. For each of those features, the algorithm gives you the closest feature in imgFeat2
. It might happen that two features in imgFeat1
are matched to the same feature in imgFeat2
.