The 8 Ball Pool Predictor is an innovative application utilizing the YOLOv8 object detection model and OpenCV to analyze and predict the trajectories of pool balls in real time. The system effectively detects key elements, including the cue, white ball, and colored balls, while predicting shot outcomes. By combining advanced computer vision techniques with real-time feedback, this project aims to enhance the understanding of pool mechanics and assist players in making informed shot decisions.
The methodology involves several key steps:
Image Preprocessing: The application captures and processes images of the pool table, isolating the green area and identifying pockets through contour detection.
Object Detection: YOLOv8 is employed to detect and classify objects on the pool table, including the cue, white ball, and colored balls. The model outputs their positions and confidence scores.
Trajectory Prediction: The application calculates the angles and potential paths of the balls based on their positions and movement vectors. Collision detection algorithms are applied to determine interactions between the white and colored balls.
Outcome Estimation: The system assesses whether a shot will result in a ball falling into a pocket, using trajectory prediction and distance calculations.
Visualization: Results are visualized by overlaying predicted paths and outcomes on the original image, providing real-time feedback.
The 8 Ball Pool Predictor successfully demonstrated its capabilities in various scenarios. Key results include:
Accuracy of Object Detection: The YOLOv8 model achieved a detection accuracy of over 90% for the cue, white ball, and colored balls, showcasing its effectiveness in a dynamic environment.
Trajectory Predictions: The system accurately predicted ball trajectories and outcomes in real-time, allowing users to see the potential results of their shots before taking them.
User Experience: Feedback from users indicated that the visualizations helped improve their understanding of shot mechanics and enhanced their gameplay strategy.
Overall, the application showcases the integration of machine learning and computer vision in recreational gaming, providing valuable insights and support for pool players.
There are no datasets linked
There are no datasets linked