surf特征点keypoint转化成mat类型或存储起来的办法

来源:互联网 发布:java在线学习系统源码 编辑:程序博客网 时间:2024/06/11 02:52
surf特征点keypoint转化成mat类型或存储起来的办法
std::vector<cv::KeyPoint> keypoints;std::vector<cv::Point2f> points;std::vector<cv::KeyPoint>::iterator it;for( it= keypoints.begin(); it!= keypoints.end();it++){    points.push_back(it->pt);}cv::Mat pointmatrix(points);

Write to filestorage is

cv::FileStorage fs("test.yml", cv::FileStorage::WRITE);cv::FileStorage fs2("test2.xml", cv::FileStorage::WRITE);detector.write(fs);detector.write(fs2);
0 0
原创粉丝点击