Pool Shot Predictor

Sponsored by Nvidia

Contest is finished!
Previous video
Title: Solve Pool Shot Predictor Problem Using Tangent line and reflection Angle...
Author: nadhirhasan
Votes: 24

Views: 662
Description: Firstly, I would like to express my gratitude to CVzone and Nvidia for hosting this amazing competition. My approach to solving the problem involved the following steps: 1.) Detecting the balls using YOLOv8 object detection model. This was necessary as the target ball had a green color that made it difficult to detect using color detection techniques. 2.) Getting the tangent line of the white ball and the target ball. 3.) Matching those two balls and validating if the line intersects any of the pockets. If it does, I drew that line and made sure the target ball goes inside the pocket. 4.) If the lines didn't intersect, I extended the line till the pool board's border and got the reflection from there. 5.) I repeated step 3 on the reflected line to confirm whether the ball is out or not. If the reflected line intersects any pockets, I drew the line and made sure the target ball goes inside the pocket. If it didn't, I confirmed that the ball is out. 6.) It's important to note that although the basic idea was the tangent line, it wasn't 100% accurate for all cases. Therefore, I did post-processing to find the exact theta value and the reflection angle. This was necessary because the ball doesn't always go in the reflected line. In conclusion, my approach to solving the problem involved a combination of ball detection using YOLOv8 and techniques involving tangent lines and reflections to determine if the target ball goes inside or outside the pockets.