EduKG
← Back

Estimating motion from video or sensor data

Learning objectives

  • Outcome

    Extract an object's coordinates from successive video frames or sensor samples and build a table of x(t)x(t) with a known step Δt\Delta t.

  • Outcome

    Compute average and instantaneous velocity from coordinate differences and plot the graph of v(t)v(t).

  • Outcome

    Classify the motion (uniform or uniformly accelerated) by testing whether the first and second differences of the coordinates are constant.

  • Outcome

    Compare the measured acceleration with a free-body diagram and estimate the dominant force through ma⃗=∑F⃗m\vec a = \sum \vec F.

Understand the idea

Estimating Motion from Video or Sensor Data: From Frames to a Model

Text

Video and sensors do not give you the motion itself but a set of numbers: frames separated by Δt=1/f\Delta t = 1/f, or accelerometer samples taken at a rate fsf_s. The first step is to fix a scale from a known object (a ruler, a ball of known diameter) and convert pixels into metres, producing a table of coordinates x(t)x(t). Velocity is estimated from differences between neighbouring frames: vi+1/2=(xi+1−xi)/Δtv_{i+1/2} = (x_{i+1}-x_i)/\Delta t, so each point of the v(t)v(t) graph lies "between" frames. Acceleration is the slope of the v(t)v(t) graph, or the second difference a≈(xi+1−2xi+xi−1)/Δt2a \approx (x_{i+1}-2x_i+x_{i-1})/\Delta t^{2}. Real data are noisy and Δt\Delta t is finite, so it is useful to estimate the uncertainty δv≈δx/Δt\delta v \approx \delta x/\Delta t and to check whether the second differences really are constant. The kinematics becomes a physical model only when the measured acceleration agrees with a free-body diagram and Newton's second law, ma⃗=∑F⃗m\vec a = \sum \vec F.

Worked examples

Direct

Problem

A video is recorded at 25 frames per second and the scale is set with a ruler: 1 m=250 px1\ \text{m} = 250\ \text{px}. A ball rolls along the floor, and in frames 0, 1, 2, 3 its coordinates are 0, 25, 50, 75 px. Find the ball's velocity and its uncertainty if the coordinate is measured to δx=1 px\delta x = 1\ \text{px}.

Solution

Step 1. Time between frames: Δt=1/f=1/25=0.04 s\Delta t = 1/f = 1/25 = 0.04\ \text{s}.

Step 2. Convert pixels to metres by dividing by 250:

frame 0 1 2 3
xx, m 0 0.10 0.20 0.30

Step 3. Coordinate differences: Δx=0.10 m\Delta x = 0.10\ \text{m} at every step. Velocity:

v=ΔxΔt=0.100.04=2.5 m/s.v = \frac{\Delta x}{\Delta t} = \frac{0.10}{0.04} = 2.5\ \text{m/s}.

Step 4. All differences are equal, so the motion is uniform and v(t)v(t) is the horizontal line v=2.5 m/sv = 2.5\ \text{m/s}.

Step 5. Uncertainty: δv≈δx/Δt=(1/250)/0.04=0.1 m/s\delta v \approx \delta x/\Delta t = (1/250)/0.04 = 0.1\ \text{m/s}. Answer: v=2.5±0.1 m/sv = 2.5 \pm 0.1\ \text{m/s}.

Application

Problem

An object falls; the video was recorded at 20 frames per second, so Δt=0.05 s\Delta t = 0.05\ \text{s}. The scaled coordinates (m) by frame are 0, 0.012, 0.049, 0.110, 0.196. Determine the type of motion, find the acceleration, and write the model x(t)x(t). Does the result agree with a free-body diagram if air resistance is negligible?

Solution

Step 1. First differences Δx=xi+1−xi\Delta x = x_{i+1}-x_i: 0.012; 0.037; 0.061; 0.086 m. They grow, so the motion is not uniform.

Step 2. Second differences Δ2x=xi+1−2xi+xi−1\Delta^2 x = x_{i+1}-2x_i+x_{i-1}: 0.025; 0.024; 0.025 m. They are constant (within the noise of ±0.001\pm 0.001 m), so the acceleration is constant:

a≈Δ2xΔt2=0.0247(0.05)2≈9.9 m/s2.a \approx \frac{\Delta^2 x}{\Delta t^{2}} = \frac{0.0247}{(0.05)^{2}} \approx 9.9\ \text{m/s}^{2}.

Step 3. The average velocity over the first interval is v1/2≈0.012/0.05=0.24 m/sv_{1/2} \approx 0.012/0.05 = 0.24\ \text{m/s} and refers to the midpoint of the interval, t=0.025 st = 0.025\ \text{s}. Therefore the initial velocity at t=0t=0 is v0=v1/2−aΔt/2=0.24−9.9⋅0.025≈−0.008 m/sv_0 = v_{1/2} - a\Delta t/2 = 0.24 - 9.9\cdot 0.025 \approx -0.008\ \text{m/s}, i.e. v0≈0v_0 \approx 0 within uncertainty.

Step 4. Model with x0=0x_0 = 0 and v0≈0v_0 \approx 0: x(t)≈12(9.9)t2x(t) \approx \tfrac{1}{2}(9.9)t^{2} m. It reproduces the table within uncertainty. The model x(t)=0.24t+12(9.9)t2x(t)=0.24t+\tfrac{1}{2}(9.9)t^{2} does not fit: it would give x(0.05)=0.0244 mx(0.05)=0.0244\ \text{m}.

Step 5. Free-body diagram: only gravity mg⃗m\vec g acts, so a=g≈9.8 m/s2a = g \approx 9.8\ \text{m/s}^{2}. The measured 9.9±0.4 m/s29.9 \pm 0.4\ \text{m/s}^{2} agrees with gg — the "free fall" model is confirmed.

Transfer

Problem

A phone sensor fixed to a cart measures an acceleration a=2.6 m/s2a = 2.6\ \text{m/s}^{2} along an inclined plane with angle θ=20∘\theta = 20^{\circ}. Estimate the coefficient of friction μ\mu between the cart and the plane, and state what further checks are needed before the model can be trusted.

Solution

Step 1. Free-body diagram: gravity mg⃗m\vec g, normal force N⃗\vec N, friction force F⃗f\vec F_{f}. Along the plane (axis xx pointing down the slope):

ma=mgsin⁡θ−Ff.ma = mg\sin\theta - F_{f}.

Step 2. Perpendicular to the plane: N=mgcos⁡θN = mg\cos\theta, and for sliding Ff=μNF_{f} = \mu N. Substituting:

a=g(sin⁡θ−μcos⁡θ).a = g(\sin\theta - \mu\cos\theta).

Step 3. Solve for μ\mu and evaluate:

μ=gsin⁡θ−agcos⁡θ=9.8⋅0.342−2.69.8⋅0.940=0.7529.21≈0.08.\mu = \frac{g\sin\theta - a}{g\cos\theta} = \frac{9.8\cdot 0.342 - 2.6}{9.8\cdot 0.940} = \frac{0.752}{9.21} \approx 0.08.

Step 4. Model checks: (a) the second differences of the sensor velocity must be constant, so that aa really is constant; (b) the uncertainties δa\delta a and δθ\delta\theta must be estimated, because when μ\mu is small the difference gsin⁡θ−ag\sin\theta - a is small and the result is very sensitive to errors; (c) the experiment should be repeated at another θ\theta: if μ\mu stays the same, the friction model Ff=μNF_{f} = \mu N is reasonable; if not, a richer model (for example, one depending on speed) is needed.

Practice

Text

Self-study plan (safe, with nothing dropped from a height).

  1. Recording. Put the phone on a tripod or a stack of books so that it cannot fall, and record slow-motion video (120–240 frames per second) of a ball rolling along the floor. Place a ruler in the frame. There is no need to throw objects or film a fall: free fall will be handled in a simulation.
  2. Scale. In one frame measure the length of the ruler in pixels to obtain the factor kk (m per pixel).
  3. Table and graph. Mark the ball's position in 6–10 successive frames, convert to metres, and plot x(t)x(t) and v(t)v(t) (velocity from differences).
  4. Simulation. Open a motion simulation with graphs (for example, "Motion" or "Constant-acceleration motion"), set a=9.8 m/s2a = 9.8\ \text{m/s}^{2} and compare the shape of the graph with your data.
  5. Conclusion. Write down which model (x=x0+v0tx = x_0 + v_0 t or x=x0+v0t+12at2x = x_0 + v_0 t + \tfrac{1}{2}at^{2}) fits your data, and what uncertainty δv\delta v you expect at your Δt\Delta t.

Visual reference

Purpose

Show the transition from discrete frames to a continuous model: how position marks on frames become the graphs x(t)x(t) and v(t)v(t), and where the acceleration comes from.

Representation

Diagram + graphs. At the top, a row of frames (rectangles) with time labels t0,t1,t2,…t_0, t_1, t_2, \dots and the ball's marked positions; below them, an xx axis with the same points and the intervals Δx\Delta x shaded. Bottom left: the graph x(t)x(t) with points joined by a line and a tangent whose slope gives the velocity. Bottom right: the graph v(t)v(t) with points lying between frames and the straight line v=v0+atv = v_0 + at whose slope equals the acceleration aa.

Real-world examples

Smartphone at 240 fps: runner’s speed

Scenario

On a school track a runner passes the 60 m mark. A smartphone records at 240 frames/s; the frame interval is Δt=1/240 s≈4.17 ms\Delta t = 1/240\,\text{s} \approx 4.17\,\text{ms}. In two neighbouring frames the runner’s hip moves 0.034 m0.034\,\text{m} along the lane. The scale is set by a 1.00 m1.00\,\text{m} lane marking that spans 100 pixels.

Connection

This uses the frame-to-position-time table step: calibrating pixels to metres, attaching timestamps, and taking a numerical derivative. The average speed over the interval is v≈Δx/Δt=0.034 m/0.00417 s≈8.2 m/sv \approx \Delta x/\Delta t = 0.034\,\text{m}/0.00417\,\text{s} \approx 8.2\,\text{m/s}, i.e. the slope of the x(t)x(t) graph between two frames.

Phone accelerometer during car braking

Scenario

A phone is fixed to the dashboard of a 1400 kg1400\,\text{kg} car. While braking from 50 km/h=13.9 m/s50\,\text{km/h}=13.9\,\text{m/s} to zero in 3.2 s3.2\,\text{s}, the built-in accelerometer logs at 50 Hz50\,\text{Hz}, i.e. 160 samples. The mean acceleration along motion is a≈−13.9/3.2≈−4.3 m/s2a \approx -13.9/3.2 \approx -4.3\,\text{m/s}^2.

Connection

Estimating motion from sensor data requires numerical integration of acceleration: Δv=a Δt\Delta v = a\,\Delta t for each of the 160 intervals, then summing. The car’s free-body diagram (weight, normal reaction, braking friction) shows that horizontal friction produces this acceleration; with m=1400 kgm=1400\,\text{kg} the mean braking force is about F=ma≈6.0×103 NF=ma \approx 6.0\times10^3\,\text{N}.

Sensor on a footbridge: vibration after a truck

Scenario

On a footbridge an accelerometer measures vertical acceleration at 100 Hz100\,\text{Hz} for 50 s50\,\text{s} after a truck passes. The peak acceleration is 0.80 m/s20.80\,\text{m/s}^2, and the dominant frequency is 2.5 Hz2.5\,\text{Hz}. For a sinusoidal mode the displacement amplitude is A=amax/(2πf)2≈0.80/(2π⋅2.5)2 m≈3.2 mmA = a_{\text{max}}/(2\pi f)^2 \approx 0.80/(2\pi\cdot2.5)^2\,\text{m} \approx 3.2\,\text{mm}.

Connection

This is sensor-data processing: removing offset and drift, then converting acceleration to displacement by double numerical integration. The resulting y(t)y(t) graph shows the bridge vibration; amplitude and period can be read from it.