Is there a way to obtain data, such as positioning of a joint, from the Kinect for specific times? I would like to get and save this data for a certain time of my choosing to use for other calculations. Example would be getting the position data of the head at time = 5 seconds after running program and at time = 10 seconds after running program and saving it to a variable.
Error while running: Here is part of the code ....
void sensor_AllFramesReady(object sender, AllFramesReadyEventArgs e)
{
if (closing)
{
return;
}
//Get a skeleton
Skeleton first = GetFirstSkeleton(e);
if (first == null)
{
return;
}
GetCameraPoint(first, e);
using (SkeletonFrame skeletonFrame = e.OpenSkeletonFrame())
{
if (skeletonFrame == null)
{
return;
}
this.Recorder.Record(skeletonFrame); // I get an error after the RGB camera view freezes
}
// some more stuff
}
This is the error message I get:
System.NullReferenceException was unhandled Message=Object reference not set to an instance of an object. Source=SkeletalTracking StackTrace: at SkeletalTracking.MainWindow.sensor_AllFramesReady(Object sender, AllFramesReadyEventArgs e)
Will this.Recorder.Record(skeletonFrame);
start the recording or do I need to initialize and declare or call one of the functions to start recording and ask for a name of the file to save to?
Does the replay of the data allow me to pull out specific timestamp values and the data associated at those timestamps?