24,854
社区成员
发帖
与我相关
我的任务
分享
fstream of("matB.txt");
of << warpMat;
这样子保存下来或有[]和, ;for (int r = 0; r < warpMat.rows; r++)
{
for (int c = 0; c < warpMat.cols; c++)
{
double data = warpMat.at<double>(r, c); //读取数据,at<type> - type 是矩阵元素的具体数据格式
outFile << data << "\t"; //每列数据用 tab 隔开
}
outFile << endl; //换行
}
这样子会损失精度