Skip to content
Cricket umpire assistance and ball tracking system using a single smartphone camera
Python Shell
Branch: master
Clone or download
Latest commit 5cd6eff Feb 12, 2019


Cricket umpire assistance and ball tracking system that using video from a single smartphone camera.


  • Run python object_detector/ with the following arguments:
    • -v/--video (Required): Path to the video file
    • -a/--attack (Optional): Specify bowling attack - 1 for Spin bowling and 0 for Fast
    • -s/--sliding (Optional): Show sliding windows during ball detection
    • -f/--first (Optional): First frame number
  • This will save run the ball tracking algorithm and generate the 3D coordinates of the tracked ball, which will be written to coordinates.txt in the form:
    • x,y,radius,frame_no,is_bouncing_point, linear_reg_radius, quad_reg_y
  • Finally run python object_detector/ which uses the coordinates generated by to visualize the trajectory and output the umpiring decisions.


To use the GUI for running the tracking and visualization scripts directly, run python gui/ The GUI requires the Kivy library to be installed.

(The python_bin paths in gui/ and path to the object_detector and gui directories will have to be updated accoridng to the local machine before running the GUI.)


You can see the frame-by-frame visualization of the tracked ball here:


You can find a pre-print (unfinished) version of the report associated with this project here:


  • Ball Tracking
    • OpenCV 3.x
    • Numpy
    • Scipy
  • Visualization
    • VPython
    • Pillow
  • GUI
    • Kivy
You can’t perform that action at this time.