opencv 常用程序(一)

矩阵存储:

Mat RoiReImg;

RoiReImg = m_sResizeImg(m_sLSAlgRoi).clone();
//save the data of mat
FileStorage fs("RoiMat.xml", FileStorage::WRITE);
fs<<"RoiMat"<<RoiReImg;
fs.release();

矩阵读取:

Mat RoiReImg;

//read the data of mat
FileStorage fs("RoiMat.xml", FileStorage::READ);
fs[RoiMat]>>RoiReImg;

fs.release();

你可能感兴趣的:(opencv 常用程序(一))