How-to guide

How does ball tracking work in cricket?

Ball tracking finds the ball in video, works out where it was in the air at every moment and joins those positions into one 3D path. The bowling speed, line and length, bounce, swing and spin all come from that path, and so does the prediction of where the ball would have gone. With several cameras, you can find the ball where their views cross. A cricket ball tracking app on a phone does it with one camera, a neural network and some physics.

Join the YORKER AI waitlist

What is ball tracking in cricket?

Ball tracking turns video of a delivery into the ball's path through the air. A computer finds the ball in each frame, works out where it was on the pitch and how high, and joins those points into one smooth flight. Everything on a tracking graphic comes from that flight.

Once you have the flight, the numbers follow. Release speed is how fast the ball is moving just after it leaves the hand. Length is where it hits the pitch, and line is where it's heading relative to the stumps. Swing is the curve in the air, spin shows as the change of direction off the pitch, and the same path carried forward is what a review uses to say whether the ball would have hit the stumps.

How does ball tracking work with several cameras?

Put several cameras around the pitch, each looking from a different direction, and each one tells you which direction the ball is in. Where those directions cross is where the ball is, in three dimensions.

Several cameras, seen from above A pitch seen from above with four cameras around it. A dashed line runs from each camera to the ball, and the four lines cross at the ball. Camera Camera Lines of sight cross at the ball
Several cameras: each one sees the ball from a different direction, and the ball is where their lines of sight cross.

It's the same idea as fixing a point on a map from two places. It only works if the system knows exactly where each camera is, and that much kit is a lot to set up at a club net.

How can one phone track a ball in 3D?

One camera sees the ball as a dot on a flat picture. It knows which direction the ball is in, but not how far away. The phone fills that gap with two things it does know: the size of the pitch and stumps, and the way a ball has to travel through the air.

One phone, seen from the side A phone on the left looks down the pitch. Lines run from the phone through four positions of the ball. Along one line, faint circles show other distances where the ball would look exactly the same to the phone. A red curve, falling under gravity to a bounce on the pitch, passes through one point on every line. Phone Same spot on screen The path that obeys gravity Pitch
One phone, seen from the side: each frame gives a line from the phone to the ball, but not how far along it the ball is. Only one physical path fits every line at once.

First, the pitch. The stumps stand 22 yards apart. Once the phone has found both sets in the picture, it knows where it is standing and which way it is pointing.

Then, the flight. A ball near the phone and a ball further away can sit on the same spot on the screen, but a real ball can't jump between them from one frame to the next. It leaves the hand, drops under gravity, bounces once and carries on. Only one path like that matches where the ball appeared in every frame, and that path is the ball's flight in 3D.

How does a cricket ball tracking app work, step by step?

In four steps. A neural network trained on cricket footage finds the ball in every frame. The app recognises the pitch and stumps and builds a 3D scene of the net. A physics simulation recreates the ball's 3D trajectory. Bowling speed, line, length, bounce, swing and spin are read from that trajectory.

Finding the ball

A neural network is a program that learns to recognise things from examples. Shown enough cricket footage with the ball marked, it learns what a ball looks like in flight: small, fast, often blurred, against nets, grass, kit and sky. In each frame it reports where on the screen it thinks the ball is.

Building the 3D scene

The stumps stand 22 yards apart, so once the app has found both sets it can work out where the phone is, which way it points and how many metres each part of the picture covers. That turns a flat video into a 3D scene of your net.

Recreating the trajectory

A physics simulation knows how a ball moves: gravity pulls it down, the air slows it, and it bounces once off the pitch. It searches for the one path from release to the batter that lands on every spot where the ball was seen.

Reading the numbers

Every number comes from that one trajectory. Release speed is distance along the path divided by the time it took, read as the ball leaves the hand. Length is where it hit the pitch, line is where it was heading against the stumps, swing is how far it moved sideways in the air and spin is read from how far it changed direction off the pitch.

One 130 km/h ball, in numbers

At 60 frames a second, each frame lasts 1 ÷ 60 s = 16.7 ms.

130 km/h is 130 ÷ 3.6 = 36.1 m/s, or 130 ÷ 1.609 = 81 mph.

Between two frames the ball travels 36.1 ÷ 60 = 0.60 m.

Even the full 22 yards takes only 20.12 ÷ 36.1 = 0.56 s, about 33 frames.

How does ball tracking predict where the ball would have gone?

It carries the 3D trajectory on past the point where the ball was stopped. For an LBW, the physics simulation keeps the ball moving from where it hit the pad on to the stumps. The further the path has to be carried, the less certain the prediction is.

A path carried half a metre is far more certain than one carried three metres. That's why a review needs a margin: when a check is too close to call, the on-field decision should stand.

YORKER AI uses the same idea for DRS on your phone. You make the call first, then the app checks pitching, impact and wicket from the tracked path, and replays the review in 3D.

The review filling in over the replay: contact, pitching, impact and wicket
2. Review. Contact, pitching, impact and wicket, one at a time.
The decision over the replay: pad, in line, in line, hitting, out
3. Decision. Out or not out, once every check is in.

What can trip up single-camera tracking?

Mostly the setup. A pitch shorter than 22 yards, a phone that moves, poor light, or a ball hidden at release or lost at the far end all leave the tracking less to go on. A good system notices when it hasn't seen enough and tells you, instead of guessing.

  • A short pitch. The phone assumes the stumps are 22 yards apart, so on a shorter pitch every distance, and every bowling speed, comes out wrong.
  • A phone that moves. If it moves after you've lined up the stumps, it no longer knows where the pitch is.
  • Not seeing enough of the flight. The more of the flight the camera sees, the clearer the answer.
  • A small, fast ball. At the far end a cricket ball is only a few pixels across, and in poor light it blurs.

Our guide to phone tripod setup in the nets covers how to avoid each one.

Ball tracking in your own nets

Track your bowling speed with YORKER AI, coming to the App Store for iPhone. Put your phone on a tripod behind the bowler's stumps, line up the stumps and bowl. Every ball gets its bowling speed, line, length, swing, spin and 3D trajectory, which you can replay from any angle, with a clip of each one.

It all runs on the phone, so it works in the nets with no signal and syncs your sessions when you're back online. See how the bowling speed app works.

Join the YORKER AI waitlist

Quick answers

Can a phone do ball tracking?

Yes. A phone has only one camera, but it can work out where the ball is from the known size of the pitch and stumps and the way a ball moves through the air.

What is a cricket ball tracking app?

An app that tracks the ball from video and rebuilds its path in 3D. YORKER AI uses a neural network to find the ball, the pitch and stumps to build a 3D scene, and a physics simulation to recreate the trajectory.

Does ball tracking need special cameras?

Not in the nets. One phone on a tripod can do it, as long as it sees both sets of stumps and stays still. The pitch gives it the scale, and the way a ball moves through the air does the rest.

Why does a tracking prediction have a margin of error?

Every position in the video has a tiny error, and a path carried forward carries that error with it. The further it has to go, the bigger the error, which is why a review keeps a margin.

Read next

Get it first.

We’ll email you when YORKER AI is live on the App Store. For bowlers, batters, coaches and clubs.

Join the YORKER AI waitlist