Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

maybe bug about the queryIdx and trainIdx #454

Open
hwliu1997 opened this issue Sep 5, 2019 · 0 comments
Open

maybe bug about the queryIdx and trainIdx #454

hwliu1997 opened this issue Sep 5, 2019 · 0 comments

Comments

@hwliu1997
Copy link

`detector = cv.SIFT('ConstrastThreshold',0.04,'EdgeThreshold',10);
[keypoints1, descriptors1] = detector.detectAndCompute(im1g);
[keypoints2, descriptors2] = detector.detectAndCompute(im2g);

matcher = cv.DescriptorMatcher('BruteForce');
matches = matcher.knnMatch(descriptors1,descriptors2,2);
Goodmatches = [];
for i = 1:length(matches)
tmp = matches{i};
if (tmp(1).distance < 0.6*tmp(2).distance)
Goodmatches = [Goodmatches;tmp(1)];
end
end
`
when I do matches,in fact,I found that the two points below do not match :
keypoints1(Goodmatches(i).queryIdx).pt;
keypoints2(Goodmatches(i).trainIdx).pt;
however,these two below match :
keypoints1(Goodmatches(i).queryIdx+1).pt;
keypoints2(Goodmatches(i).trainIdx+1).pt;

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant