I am trying to extract keypoints from an image. The image is a frame from a video I captured myself.
I already extracted the keypoints using SURF.
I found cv2.FileStorage
and cv2.FileNode
in the help but I don't know how to use them.
FileNode(...)
FileNode() -> <FileNode object>
FileStorage(...)
FileStorage([source, flags[, encoding]]) -> <FileStorage object>
Every time I try to dump the keypoints to a file using cPickle
, json
or numpy
I get an error from these libraries for not being able to save a cv2.FileStorage file type.
I found the official documentation of opencv for C++ on how to save these type of files, but I haven't found one for Python yet.
What I want to do is to dump these keypoints into an XML file for later use for object detection and recognition.