代码
// save xml file cv::FileStorage file(save_transform, cv::FileStorage::WRITE); cv::Mat TransM = cv::Mat::ones(100,200,CV_8UC1); file << "TransM" << TransM; // read xml file cv::FileStorage file("xml_file_path", cv::FileStorage::READ); if (!file.isOpened()) return std::vector<cv::Mat>(); cv::Mat TransM; file["TransM"] >> TransM;
注意
xml中保存的节点超过4个就会打开失败,opencv的问题。
原文地址:https://www.cnblogs.com/alexYuin/p/9614185.html
时间: 2024-10-14 00:50:28