逐帧保存txt文件中的3D关节位置 [英] Save 3D joint position in a txt file frame by frame

查看:82
本文介绍了逐帧保存txt文件中的3D关节位置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

伙计们,

我是一名新程序员,现在我正在尝试逐帧输出3D关节位置。

I am a new programmer, now I am trying to output the 3D joint position to a txt file frame by frame.

我有所有关节的3D位置,我尝试编写一个代码将其保存在txt中,但下一帧关节位置将

I have got the 3D position of all the joints, I try to write a code to save it in txt, but the next frame joint position will

覆盖位置这个框架,最后我只得到txt文件存储最后一帧的位置。如何逐帧输出

cover the position this frame, finally I only get the txt file store the position in last frame. How can I output them

任何人都可以给我一个帮助吗?我使用C#。

Can anyone give me a help ? I use C#.

 

非常感谢!

 

歌曲

 

推荐答案

嗨歌,

我认为你被编程问题所困扰。我保存了所有关节的3D位置,程序运行正常。

I think you're trapped by a programming problem. I have saved 3D position of all the joints and the program works ok.

所以,我想知道你必须检查你的代码。

So, I'm wondering that you have to check your code.

接下来是我的代码片段,你可以参考它供你使用。

Next is my code fragment, you can reference that for your use.

原谅我的游泳池英语......

Forgive my pool English...


m_WriteToTxt = new StreamWriter("Data\\score.txt", true);
string Data = "";
                        m_WriteToTxt.Write(DateTime.Now.ToString("HH:mm:ss:fff") + '\t');
for (int i = 0; i < NumOfJoint; i++){
                            x = (int)X[i];
                            y = (int)Y[i];
                            z = (int)Z[i];
                            Data += x.ToString() + '\t' + y.ToString() + '\t' + z.ToString() + '\t';
}
m_WriteToTxt.Write(Data);
m_WriteToTxt.Write(m_WriteToTxt.NewLine);


这篇关于逐帧保存txt文件中的3D关节位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆