2 answers

I reproduced your problem. It's a bug in the LshIndex constuctor with its members types in lines 93-95 of lsh_index.h. 'unsigned' type has to be there instead of 'int'. It works for me with this fix. But I can not put the fix to the OpenCV repo because it's read-only now. Please open an issue on OpenCV redmine when it'll be also available to be sure that I have not forgotten to fix it.

@yes123 I suppose it's Flann bug that came to OpenCV. I was curious and checked the last Flann 1.7.1 today. It's OK in that place now. OpenCV definitely has to improve Flann testing. Some simple tests were added ~2 years ago and there was not LSH index in used version of Flann at that date.

Our effort is often not enough to make OpenCV ideal library :) You, OpenCV users, help us by your bug reports and fixing patches. But you can help us even more. Please, write tests for uncovered OpenCV functionality! (Here I repeat with Kirill). And we'll run and check them every day as we do with existing tests set now.

Those parameters are the ones of the LSH multi-probe algorithm but its implementation is only for binary features right now. I'll add that to the docs. What is the type of the FREAK features ? (floats ? binary ?).

My guess is that the cast error you get is because the type is not binary.