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;
`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;