We are about to switch to a new forum software. Until then we have removed the registration on this forum.
I am aware how to create a velocity of an object / boundaries, etc. What I am trying to achieve is measuring a dynamic velocity of a point moving within window coordinate space. I am using a kinect thats tracking the coordinates of a ball, and would like it to compare the velocity from its current point to its new previous point. I checked the API, but some functions were depreciated.
Answers
So what's the problem exactly?
If you have all the positions, then you have all the velocities (aka the distance between consecutive points).
Please clarify: Are you trying to find the velocity of the point in the window that the ball is at, or the velocity of the ball in real-world space?
Velocity of the "virtual" ball (point im choosing from skeleton data) in relation to window, i.e.
and velocity of current location(movingX, movingY) to its new location of movingX + Y
Well, record the ball's position from the previous frame, and then the velocity is the vector between those two points.
To get the actual velocity you would need to measure the distance moved between frames and divide this by the elapsed time.
The code below does that. Just in case you are confusing velocity with speed it also calculates the speed.