fstream outFile1;
outFile1.open("test1.csv", ios::out);
outFile1 << "==Numpy风格==\n" << cv::format(plane[0], cv::Formatter::FMT_NUMPY) << std::endl;
打印格式可选:
enum { FMT_DEFAULT = 0,
FMT_MATLAB = 1,
FMT_CSV = 2,
FMT_PYTHON = 3,
FMT_NUMPY = 4,
FMT_C = 5
};
结果将保存在test1.csv文件夹下。