Accuracy & methodology

Last updated:

BallSpeed is not a radar gun; it makes no absolute-accuracy claim. Because everyone is measured with the same algorithm, the goal is consistency and relative comparison: the same shot measured on different phones gives a close result, and you can track your own progress fairly.

How we measure

The algorithm tracks the ball in each frame, derives the pixel-to-metre scale from the reference you mark, and computes speed over the fastest 5-frame window with a linear regression of x(t), y(t). The same code runs in the browser and on the server fallback.

Frame rate (fps) and error

A higher fps reduces motion blur and places each frame more precisely:

fpsExpected stability
30Poor — noticeable blur
60Fair
120Good
240Best (recommended)

Synthetic tests

We validate the algorithm with synthetic videos of circles moving at a known speed; results stay within ±3%. The same test suite runs in Node and in a real browser, and the two environments differ by at most 1%.

Consistency criteria

We film the same shot on different phones (iPhone, Samsung, Pixel) simultaneously and compare. Our acceptance criteria:

Known limitations

A single camera assumes planar motion; shots travelling toward/away from the camera, blur at 30 fps and an incorrect scale all affect the result. That’s why we show a confidence score and only admit measurements with confidence ≥ 60 to the leaderboards.

Was this article helpful?

Related articles