我想将有关视频中每一帧的一些信息保存到 .txt
文件中。
信息可以是当前帧号,特征点位置等,
我只能找到将其写入 XML/YML 文件的方法。是否可以将这些写入 .txt 文件?如果可以,怎么做?
提前致谢!
最佳答案
您必须自行实现。 c++文件流的基础是
#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;
}
你的问题不是很清楚,所以你最好编辑一下,明确你到底想做什么。
关于c++ - 我想使用 c++/opencv 将一些数据写入 .txt 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14892356/