# Determine position, velocity, and acceleration from video tracking software

I'm working with some video tracking software, and I'm interested in determining the position, velocity, and acceleration as a function of time of the object of a video. For simplicity, let the motion be one dimensional.

By fixing and tracking a point on the object, and a reference point on something stationary, one can calculate the position as a function of time $$x(t)$$, given the framerate (e.g 1000 fps), shutterspeed (1/80 000 of a second), and how many pixels are in 1 centimeter (e.g. 500). Once, $$x(t)$$ is known in principle one can differentiate with respect to time to obtain the velocity $$\dot{x}(t)$$ and acceleration $$\ddot{x}(t)$$. However, I have noticed that in practise this usually causes the velocity, and especially the acceleration to have large fluctuations presumably because of the numerical differentiation (central scheme).

So my question is, is there a better way to determine the velocity and acceleration through a video?

• You are forgetting about the perspective from the lens. You must take into account the distance to the camera, the censor used and the lens used as well. Mar 10, 2022 at 11:30
• How many $\{t_i,\,x\left(t_i\right)\}$ points are you using to compute the velocity? Mar 10, 2022 at 14:08
• The core of the question is the following. When calculating derivatives, data noise is amplified. Velocity calculations are generally acceptable (except at the initial and final few velocity points), but the second derivative calculation is often unacceptably noisy. Is there a way around this issue? Mar 10, 2022 at 14:25
• Are you using a two point stencil? Three points? Forward, Backward or Central scheme? Mar 10, 2022 at 15:21
• It would also be beneficial, though not a hard requirement like my previous comment, to include an image of the spurious fluctuations you are observing. Mar 11, 2022 at 15:24

I view the situation as following. You have a data set, $$\{(t_j, x_j)\}$$, of the shutter time $$t_j$$ and the position of the object $$x_j$$ at that time. These measured values contain errors. (Random errors due to shutter timing jitter, mechanical vibration, etc. and systematic errors due to lens characteristics, etc. You should first correct the systematic errors as much as you can.)
I would fit a model $$\hat{x}(t)$$, which is a smooth function with some fitting parameters, to this data set. (You might fit a single model over the entire time span or might repeat the fitting over a sufficiently large segments by imposing the condition that the models of different regions connect smoothly.)
I would then calculate the velocity and acceleration from $$\hat{x}(t)$$ by analytically differentiating the model formula.