rust-cv / hwt

Hamming Weight Tree from the paper "Online Nearest Neighbor Search in Hamming Space"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support lowes ratio retrieval

vadixidav opened this issue · comments

Once we reach a search distance for the second nearest neighbor that exceeds the Lowes ratio, we know that the Lowes ratio test has succeeded. We should return a Result<u128, (u128, u128)> for this operation. If the Lowes ratio test succeeds, we return the nearest neighbor. If the Lowes ratio test fails, we return the nearest neighbor and also the feature that caused the Lowes ratio test to fail (which is the second nearest neighbor).

This will speed up photogrammetry algorithms because we can stop searching once the Lowes ratio has been fulfilled.