We wanted to improve our pool skills so decided to make our own app that helps us find the optimal shots.
What it does
When given a picture of the table, it recognizes the table and the positions of the balls, then passes it to an algorithm which calculates the shot which you have the best chance of potting the ball. It will also display the table and shot alongside the picture.
How we built it
We built the application in Python with the kivy framework. The recognizing was done with cv2 and numpy, the calculations of the best shot utilised scipy and numpy, and the final images were drawn using canvas in kivy.
Challenges we ran into
The calculations were not entirely satisfactory but since we only needed to rank them against each other it was quickly dismissed. We also had trouble recognizing the balls but it was solved eventually. The canvas for the whole kivy was not needed so we adjusted the coordinates so the table can be drawn in the right place.
Accomplishments that we're proud of
- Actually recognizing the balls
- Figuring out the algorithm
- Attempting to put it all together in 24 hours
- Working with some great people :D
What we learned
- Working in the kivy framework
- Using cv2 for computer vision
- Communicating with others to make sure our code was compatible
What's next for Pool Companion
- Use video to continuously record the shots
- A better algorithm to rank the shots which includes the velocity of the ball