Firstly, I would like to thank CVzone and Nvidia for hosting this competition. I have implemented Pool Shot Predictor project that predicts the path and outcome of 10 pool shots provided in the video. In the first step, we import all the required libraries, including numpy, opencv-python, math, pillow library. In the next step, we define an HSV filter for the Playing Field and Cue Balls in the Pool. Then we find the contours inside the playing field. We also mark the location of pockets and walls with their coordinates. In the next step, we create a ball trajectory along the cue i.e. getting the tangent line of the white ball and the target ball. if the line intersects any of the pockets, then the “Predictions: IN” text appears in the UI and if the line doesnot intersects then the “Prediction: Out” text appears in the UI. And for the visualization, i have used the Pillow Library and sfpro.ttf font to make the visualization attractive.

Leave a Reply

Your email address will not be published. Required fields are marked *