#include <iostream>
#include <fstream>
#include <string>
void writeMat(const std::string &path, const cv::Mat &m)
{
std::ofstream out(path.c_str());
if (out.is_open())
{
for (size_t i = 0; i < m.rows; i++)
{
for (size_t j = 0; j < m.cols; j++)
{
out << m.at<float>(i,j) << " ";
}
out << std::endl;
}
out.close();
}
}
OpenCV写float型Mat入硬盘
最新推荐文章于 2024-04-07 10:19:47 发布