Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To save vector "KeyPoint" to file using builtin write function


I want to write a vector of detected Keypoints to file and while I was told it can be done through operator overloading, I found out a function in the keypoint class documentation.

The documentation here shows a function called write..

// reading/writing a vector of keypoints to a file storage
void write(FileStorage& fs, const string& name, const vector<KeyPoint>& keypoints);
void read(const FileNode& node, vector<KeyPoint>& keypoints);

So basically there is a function to write the vector to file.. can some one please explain this and also, an example on how to use this would be great.

Thank you