This project implements a complete classical computer vision techniques pipeline to analyze billiard match videos. What makes it more challenging, no machine learning is implemented. The process automatically extracts key information from the video feed through a series of steps:
- Table Detection: Isolates the playing surface.
- Ball Detection & Classification: Localizes each ball and classifies it as white, black, solid, or striped.
- Tracking & Projection: Tracks the balls' trajectories over time and projects their movements onto a standardized 2D minimap.
For an in-depth explanation of the algorithms, methodology, and detailed evaluation metrics, please refer to the complete report: Report_Computer_Visionaries.pdf.
1. Navigate to the build folder:
mkdir build
cd build2. Clean the build directory (if necessary):
rm -rf *3. Build the project:
cmake ..
make4. Run the program: Pass the path to a specific game clip as an argument, example:
./Billiard_CV path/to/Billiard_CV/data/game1_clip3/game1_clip3.mp4The process allows for the visualization, in order, of:
- The first frame of the video
- The results of the ball localization and classification
- The plotting on the minimap
- The segmentation mask
- The resulting mAP and IoU of the process, in the terminal
- The tracking of the balls that are moved in the video
To move onto the next image, press any key.
All generated images and videos resulting from the various computations (such as table/ball detection and tracking) are automatically saved to the data/output folder.



