I'm trying to customize the Flann matcher in opencv by editing the index parameters, but I'm using java for android, and I don't know how exactly it works.
I found this answer but I don't know how to apply it in a correct way
here is the code I've tried
String yamlParam="%YAML:1.0\n"
+ "indexParams:\n"
+ " -\n"
+ " name: algorithm\n"
+ " type: 23\n"
+ " value: 1\n"
+ " -\n"
+ " name: trees\n"
+ " type: 4\n"
+ " value: 4\n";
File outputF = File.createTempFile("FlannfDetectorParams", ".YAML", outputDir);
writeToFile(outputF,yamlParam);
descriptorMatcher.read(outputF.getPath());
and here's the error I'm getting
OpenCV Error: Assertion failed (sp.type() == FileNode::SEQ) in virtual void cv::FlannBasedMatcher::read(const cv::FileNode &)