在FileStorage中保存向量<dmatch> </dmatch>

时间:2014-08-18 09:16:50

标签: opencv vector

我想在文件中写一个vector<DMatch>。我检查过可能会写一些像Keypoints,Mat等类的向量,但它不可能用它。谁知道我该怎么做?代码部分如下:

Mat ImDescriptors;
Vector<KeyPoints> ImKeypoints;
FileStorage fs(Name, cv::FileStorage::WRITE);
fs <<” C” << "{";
fs << "Descriptors" << ImDescriptors;
fs << "Keypoints" << ImKeypoints;
fs << “}”;

它工作正常,但是当我向此代码添加元素时:

Vector<DMatch> good_matches;
fs << “GoodMatches” << good_matches;

我收到以下错误:

c:\opencv248\build\include\opencv2\core\operations.hpp(2713): error C2665: 'cv::write' : any of the 9 overloads could convert all the argument types.

0 个答案:

没有答案