我想将从OpenCV创建的矩阵与Matlab中的矩阵进行比较。如果矩阵是uint8格式的,那么将它们保存为pgm图像就可以了。但是我的矩阵是CV_64FC1 (双精度),不能保存为图像。有没有什么简单的方法可以保存我的双矩阵,以便在Matlab中读取?
发布于 2012-10-03 03:16:47
请尝试OpenCV示例中的此示例。
Mat r
std::stringstream ss;
ss << format(r,"csv") << endl << endl;
myFile << ss.str();
// or even this
myFile << format(r,"csv") << endl << endl;发布于 2012-10-03 02:17:43
只需将每个像素的强度写入一个文件,并使用importdata使用MATLAB读取它。
https://stackoverflow.com/questions/12695066
复制相似问题