I want to write some data to a .txt file using c ++ / opencv
I want to save some information about each frame in a video to a file .txt
.
Information can be like the number of the current frame, the position of the points, etc.,
I could only find ways to write it to XML / YML file. Can I write them to a .txt file? IF so how?
Thanks in advance!
+3
source to share
1 answer
you need to cast your own implementation. The main C ++ stream files are
#include <iostream>
#include <fstream>
using namespace std;
void writeSomething()
{
ofstream outputfile;
outputfile.open("data.txt");
for (int i=0; i<10;i++)
outputfile << i << endl;
}
Your question is not very clear, so you'd better edit it to be clear what exactly you want to do.
+5
source to share