1 | initial version |
XOR, count the bits. The result is the distance. Lower is better.
XOR gives a 1 for the locations the vectors are different. Since every bit in the vector has the same importance, this is the same as doing (x1-x2)^2 for every bit individually.
The Brute Force Matcher checks every possible match and keeps the k best. Simple. The Flann based matcher is more complicated. More info is here.