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?

  • 1
    $\begingroup$ 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. $\endgroup$
    – nammerkage
    Mar 10, 2022 at 11:30
  • 1
    $\begingroup$ How many $\{t_i,\,x\left(t_i\right)\}$ points are you using to compute the velocity? $\endgroup$
    – Kyle Kanos
    Mar 10, 2022 at 14:08
  • $\begingroup$ 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? $\endgroup$
    – MOOSE
    Mar 10, 2022 at 14:25
  • $\begingroup$ Are you using a two point stencil? Three points? Forward, Backward or Central scheme? $\endgroup$
    – Kyle Kanos
    Mar 10, 2022 at 15:21
  • 1
    $\begingroup$ 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. $\endgroup$
    – Kyle Kanos
    Mar 11, 2022 at 15:24

1 Answer 1


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.

By the way, in writing this answer, I have in my mind objects like a stone falling in the air, a ball in sports, a rocket, etc., which would have a smooth trajectory. However, if you are thinking of a vehicle on the road, etc., the result of noisy acceleration might actually be reflecting reality rather than measurement errors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.