I m trying to compute joint speed using the kinect. My algorythm to get the coordinates executes one time every 30 frames, thats how i did it:
This event runs everytime the kinect has a skeleton frame:
public void SensorSkeletonFrameReady(object sender, SkeletonFrameReadyEventArgs e)
{
//*default code to draw skeleton here*
count++
if (count == 30){
//my code to acquire and display coordinates
count = 0;
}
}
In theory, the part for coordinates acquisition should run every 1 second in real life (aproximattely), but thats not whats is happening. Its much faster then what it should be, but its NOT as fast as it runs when i dont use the if count.
The point is, id like to use this time interval between 2 joints capturing to compute speed, it would be (x1 - x2)/1 to have a m/s speed, since the coordinates are in meters.
I know this would be pretty inaccurate, but its just for testing.
I think the kinect isnt capturing in 30 frames per second, its much faster?
Is there any easier way to do this?
Oh and im using Visual C# and Kinect SDK
System.Diagnostics.Stopwatch
orDateTime.UtcNow
. – Dan Bryant