Tjun Jet’s Status Report for February 17, 2024

This week I focused on implementing the ball and cue stick detections using contour line detection using OpenCV. I also managed to create some functions to extrapolate line detections from the cue stick and output the reflections with the walls of the pool table. 

Using cv2.findContours() and cv2.minEnclosingCircles(), I managed to get a good detection of the cue balls and the cue stick. I then wrote a function to find the center and radius of each of the contours, and used that to distinguish between the cue stick and the balls. The accuracy of my contour detection was not the best, but it was enough for me to do a preliminary testing of my physics model. Some images can be found below. 

Debrina managed to successfully output the wall detections of the cue table using cv2.HoughLines. Using her output of the wall detections, I tried finding the intersection point between the cue stick’s trajectory through an extrapolation line function that Iwrote and output the predicted reflected trajectory against the pool table walls. The following image shows how our reflections work.

In terms of ballcollisions, I am currently testing between two models: A git package called pool tool: https://github.com/ekiefl/pooltool, and also referencing a project that was done from a team from Cornell University called “Pool Projection”. I have yet to successfully output a good predicted trajectory from the ball collision model from pool trajectory, but once I am able to do so, most of the work will be to fine tune the accuracy of the model and I can now present the proper outputs for Andrew to output onto the projector. 

I am currently on schedule and accomplished whatever I wanted to accomplish this week. The most crucial part next week is to get the ball collision model working. Furthermore, now I am only testing my model on a single image. Once I get everything working, I aim to perform the work on real-time video and tweak my code and parameters such that the physics simulations can be done on the video. I also want to start testing the IMU and see if we can get some substantial compass data to improve the accuracy of our cue stick detection. 

Leave a Reply

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