检查记录的骨架数据 [英] check recorded skeleton data

查看:85
本文介绍了检查记录的骨架数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已将骨架数据记录到xls文件中。为了检查值是否正确,我需要再次读出数据并将其绘制成一个简单的图形。有人知道怎么做或有代码吗?

i have recorded the skeleton data in to a xls file. in order to check the value is correct,i need to read out the data again and plot it into a stickfigure. anyone know how to do it or have the code for it?

我现在正在使用C ++。并且i记录数据的格式类似于head.x; head.y; head.z等所有关节。所以我认为我应该做的方式是:

i'm using C++ right now. and the format i record data is like head.x; head.y;head.z and so on for all the joints.so i think the way i should do is:

1,逐行读取数据,每一行都争辩所有关节的值,所以我认为需要一个数组来做它,我想使用ifsteam

1,read the data out line by line, each line contends the value for all joints, so i think need a array to do it and i'm thinking to use ifsteam

2,联合x,y,z值到一个关节就像我们一样来自
GetSkeletonJointPosition函数。

2,joint x,y,z value to the one joint like what we get from GetSkeletonJointPosition function.

3,我们用stickfigure样本中的darw stickline函数来绘制图形。

3,us darw stickline function in stickfigure sample to plot the graph.

然而,由于我是C ++和kinect porgramming中的新手,我在前两个步骤中遇到困难,可以有人帮助我???

how ever,i have difficulty in the first 2 steps as i'm a newbie in C++ and kinect porgramming , can someone help me???

推荐答案

在将数据保存到文件之前,您应该考虑如何再次读取它。您可以使用Skeleton []的JSON序列化将其保存到文本文件中。为了读出来,我设置了一个Timer,每1/30秒左右读取一个新行,将
反序列化为Skeleton []并将Skeleton []反馈给绘制Skeletons的方法(你应该能够从其中一个样本中复制/粘贴 - 我使用C#并无法帮助您使用代码..)

Before saving the data to a file you should consider how you can read it out again. You could use JSON serialization of the Skeleton[] to save it to a textfile. To read it out I'd set up a Timer that reads a new line every 1/30 second or so, deserializes it to a Skeleton[] and feeds the Skeleton[] to the methods to paint the Skeletons (you should be able to copy/paste that from one of the samples - I use C# and can't help you with code..)

(实际上我建议您使用C#从一开始,既然你是新手..)

(Actually I'd recommend you to use C# from the beginning, since you're a newbie..)

祝你好运^


这篇关于检查记录的骨架数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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