flann-lib / flann

Fast Library for Approximate Nearest Neighbors
http://people.cs.ubc.ca/~mariusm/flann
Other
2.22k stars 649 forks source link

LSH and Harris in C bindings #404

Open vadixidav opened 5 years ago

vadixidav commented 5 years ago

I encountered strange behavior with the C bindings when I attempted to use LSH (I got random memory written out to my match indices). It seems that Harris distance + LSH doesn't work with the C bindings. Would there be any issue with me adding Harris distance appropriately to the C bindings. Also, was the behavior I encountered unexpected and was it supposed to work?

For clarification, I called flann_find_nearest_neighbors_byte with single byte input, 1 row, 1 column. It wrote back these: 1836216064, 1 (when it should have been 0), 52430598, 50462976, 0 (when it should have been 1), 18446744071676166400, and 1718026496. It seems to be giving me garbage memory, since some of those numbers look like stack garbage.