Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想将 OpenCV 创建的矩阵与 Matlab 中的矩阵进行比较。如果矩阵是 uint8,将它们保存为 pgm 图像就可以了。但我的矩阵是 CV_64FC1 (double),不能保存为图像。有什么简单的方法可以保存我的双矩阵以便在 Matlab 中阅读?
从 OpenCV 示例中尝试这个。
Mat r std::stringstream ss; ss << format(r,"csv") << endl << endl; myFile << ss.str(); // or even this myFile << format(r,"csv") << endl << endl;
只需将每个像素的强度写入文件,然后使用 MATLAB 使用importdata.
importdata