//#include "opencv2/opencv.hpp"
//写文件
FileStorage fs("test.yml",FileStorage::WRITE);
int fps = 5;
fs << "fps" << fps;
Mat m1 = Mat::eye(2,3,CV_32F);
Mat result = (m1+1).mul(m1+3);
fs << "Result" << result;
fs.release();
//读文件
FileStorage fs2("test.yml",FileStorage::READ);
Mat r;
fs2["Result"] >> r;
std::cout << r << std::endl;
fs2.release();
opencv读写xml或yxml文件
最新推荐文章于 2024-08-23 13:28:50 发布