Created
September 15, 2015 14:45
-
-
Save zhou-chao/7a7de79de47c652196f1 to your computer and use it in GitHub Desktop.
Save OpenCV mat as CSV format
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <fstream> | |
void writeCSV(string filename, Mat m) | |
{ | |
ofstream myfile; | |
myfile.open(filename.c_str()); | |
myfile<< cv::format(m, cv::Formatter::FMT_CSV) << std::endl; | |
myfile.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Great! Simple and efficient. Thanks!