cv
cv copied to clipboard
BoW matching algorithm
It would be good to have at least a simple BoW matching algorithm. Refer to the wikipedia page for more information.
This is necessary to make the matching process go quickly. Right now a brute force match is performed. BoW by a well-distributed but constant position selection of bits should be an improvement in speed over the current brute force matching. To elaborate, choosing the first 8 bits, for instance, would be biased towards certain gradients in the binary feature (same side of the feature or same scale, like an AKAZE feature). Collecting a selection of 8 well-distributed bits from different places in the feature will avoid this bias. This can be done quickly on x86 processors with the BMI-2 extension using this crate's PEXT abstraction for u64
. No x86 processors currently support PEXT on numbers bigger than 64-bit, so multiple PEXT operations will be required if this approach is taken. Another fast approach may be to mask and OR together separate 8 bit pieces.