the openCV DescriptorMatcher has two methods read / write and I think it is not totally clear what they do. I need to save a trained FlannBasedMatcher such that I don’t need to train it every time the program starts. But the methods read / write what seems like to be the config for the matcher. Is that correct? If so how do I store a trained Matcher?
Best
The write and read methods of flann save/read just the search and index parameters not the learned index. The FlannBasedMatcher class has member object
flannIndexwhich has a save function. Basically you need to save and load the learned index and that’s all needed by the NN algorithm to match the feature descriptors. SeeIndex::loadandIndex::savein/opencv/modules/flann/src/miniflann.cpp.