c# - Getting the total number of frames to write it into BVH file while recording with kinect -
i'm trying write skeleton data bvh file, need total number of frames , write before joints data hierarchy of bvh file is. function sensorskeletonframeready
allows me have frame number i'm using function extract joints data of each frame , write directly bvh file.
can me, please?
bvh files have total number of frames represented in file. impossible know number until done recording.
using skeletonframeready
event could:
- save data
list
(or other array type structure) - stop recording , count number of frames (i.e.,
list
items) - write file, total frames
... or ...
- output file in real-time (as indicate in question), keeping running total of frame count
- stop recording , close file best can
- re-open file, seek "frames" line , enter appropriate value you've stored
... or ...
- output skeleton tracking data in real-time
- keep seeking point in file frames defined , keep updating it, seek end write next frame.
i'm not taking last 1 seriously. comes down fact you don't know number of frames until done! have complete recording first, before output line in file.
unless recording really long sessions, storing data in list
, writing data file once you've stopped straight forward means. in opinion.
Comments
Post a Comment