Cricket umpire assistance and ball tracking system that using video from a single smartphone camera.
python object_detector/ballTracking.pywith 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.txtin the form:
x,y,radius,frame_no,is_bouncing_point, linear_reg_radius, quad_reg_y
- Finally run
python object_detector/3d.pywhich uses the coordinates generated by
ballTracking.pyto visualize the trajectory and output the umpiring decisions.
To use the GUI for running the tracking and visualization scripts directly, run
python gui/gui.py. The GUI requires the Kivy library to be installed.
python_bin paths in
gui/gui.py and path to the
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: https://www.youtube.com/watch?v=K9MP5UlGBEI
You can find a pre-print (unfinished) version of the report associated with this project here: https://peerj.com/preprints/3402/
- Ball Tracking
- OpenCV 3.x