1 | initial version |
I assume the "naive" approach you're talking about is O(N^2), that is comparing each point in list A to list B. If you use a KD-tree like structure it'll run close to O(logN). OpenCV has a wrapper around FLANN, which does this. Another library that I use frequently for these tasks is libANN from http://www.cs.umd.edu/~mount/ANN, only because I'm more familiar with it than FLANN.
2 | Corrected link |
I assume the "naive" approach you're talking about is O(N^2), that is comparing each point in list A to list B. If you use a KD-tree like structure it'll run close to O(logN). OpenCV has a wrapper around FLANN, which does this. Another library that I use frequently for these tasks is libANN from http://www.cs.umd.edu/~mount/ANN, http://www.cs.umd.edu/~mount/ANN only because I'm more familiar with it than FLANN.