标签: opencv file-io
如何在OpenCV visual studio中将数组中的元素写入文本文件?
答案 0 :(得分:0)
std::ofstream f("C:/file_to_write_to.txt"); // writing element my_matrix[10, 10] to file. assuming it's a float. f << my_matrix.at<float>(10, 10) << std::endl; f.close();