kjhgfdsa1021
kjhgfdsa1021

Reputation: 3

How to read ORB and SIFT descriptors?

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

Answers (2)

skm
skm

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

ChronoTrigger
ChronoTrigger

Reputation: 8607

You have to save and load Mats that are not images with cv::FileStorage.

Upvotes: 1

Related Questions