I'm writing both descriptors (SurfDescriptorExtractor output) and keypoints (SurfFeatureDetector output) to an XML file. Before writing keypoints (std::vector) conversion to Mat is done ( following this: convert keypoints to mat or save them to text file opencv ). For descriptors isn't neccesary, they're Mat already. So both are saved as Mat, there's no problem on reading either. But when using a FlannBasedMatcher, and then drawMatches, this method asks for keypoint data.
The question is: how would you convert Mat to Keypoint's vector, and which would be the best approach?