Reputation: 3
I saved ORB and SIFT descriptors in xml.
I tried use Mat descriptors = imread("descriptor.xml")
but it didn't work.
it's blank.
Upvotes: 0
Views: 471
Reputation: 5649
Let say that you have stored the SIFT descriptor in descriptor.xml
. Use the following code to assign the saved descriptor back to a Mat
variable.
Mat sift_descriptor;
FileStorage fs("descriptor.xml", FileStorage::READ);
fs["descriptor"] >> sift_descriptor;
fs.release();
Upvotes: 1
Reputation: 8607
You have to save and load Mat
s that are not images with cv::FileStorage
.
Upvotes: 1