1 | initial version |
this is a simple typo.
see:
>>> help(cv2.BFMatcher())
Help on BFMatcher object:
class BFMatcher(DescriptorMatcher)
...
| knnMatch(...)
| knnMatch(queryDescriptors, trainDescriptors, k[, mask[, compactResult]])
-> matches or knnMatch(queryDescriptors, k[, masks[, compactResult]]) -> matches
|
| match(...)
| match(queryDescriptors, trainDescriptors[, mask]) -> matches or match(
queryDescriptors[, masks]) -> matches
|
| train(...)
| train() -> None
|
...
so, it simply should be:
matches=bf.knnMatch(des1,des2,k=2) # case sensitive !
2 | No.2 Revision |
this is a simple typo.
see:
>>> help(cv2.BFMatcher())
Help on BFMatcher object:
class BFMatcher(DescriptorMatcher)
...
| knnMatch(...)
| knnMatch(queryDescriptors, trainDescriptors, k[, mask[, compactResult]])
-> matches or knnMatch(queryDescriptors, k[, masks[, compactResult]]) -> matches
|
| match(...)
| match(queryDescriptors, trainDescriptors[, mask]) -> matches or match(
queryDescriptors[, masks]) -> matches
|
| train(...)
| train() -> None
|
...
so, it simply should be:
matches=bf.knnMatch(des1,des2,k=2) # case sensitive !