I am trying to use FLANN with binary descriptors (brief, orb) with no luck. My code looks something like this:
vector<vector<KeyPoint> > dbKeypoints;
vector<Mat> dbDescriptors;
vector<Mat> objects;
/*
load Descriptors from images (with OrbDescriptorExtractor())
*/
FlannBasedMatcher matcher;
matcher.add(dbDescriptors); //> Crash!
If I use SurfDescriptorExtractor()
it works well.
How can I solve this?
OpenCV says:
OpenCV Error: Unsupported format or combination of formats (type=0
) in unknown function, file D:\Value\Personal\Parthenope\OpenCV\modules\flann\sr
c\miniflann.cpp, line 299
(Note: i have posted the same question on stackoverflow)
I have found an hacky solution but i think it's not so good here
Basically the author before adding to FLANN converts the binary descriptors to CV_32F. But i don't think it's good beacuse distance must be calculated with HAMMING distance, and not euclian distance with float values.