Search code examples
c++opencvsiftsurf

opencv FLANN with ORB descriptors?


I am trying to use FLANN with ORB descriptors, but opencv crashes with this simple code:

vector<vector<KeyPoint> > dbKeypoints;
vector<Mat> dbDescriptors;
vector<Mat> objects;   

/*
  load Descriptors from images (with OrbDescriptorExtractor())
*/

FlannBasedMatcher matcher;

matcher.add(dbDescriptors); 
matcher.train() //> 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

Solution

  • It's a bug. It will be fixed soon.

    http://answers.opencv.org/question/503/how-to-use-the-lshindexparams/