This week, we managed to successfully output the line of projection on the software in real time. This took up the majority of the week, but we finally managed to get the output line shown on the canvas.
Many errors arose when I was trying to project the output line on the screen. Many edge cases were not considered when I was testing the output line projection on multiple different images, and this led to a lot of issues that came about in real time. One such example is accounting for the directionality of the line projection. For example, if we had a specific line that was going through two points, we couldn’t tell exactly which wall it was going to bounce off. The only way to tell which wall it was going to bounce off was to know which direction the cue stick was pointing to. Thus, we needed to find a method to find the point on the cue stick that was closest to the cue ball. By setting the dx and dy direction with the line, we were now able to figure out which way the projection should go, giving us the right projection. We can see an example image below:
The next step after this is to show this projection on the projector, which we will do so in our group meeting tomorrow. In order to project the output line, we will plot the output line on an empty black canvas. After some testing, we have realized that this was the best way for us to achieve a good line projection. Here is the picture of how we intend the projected line to look like (in the picture below, we haven’t projected the actual output line).
I am currently on track for whatever I wanted to accomplish. Over the week, I was definitely a little behind as I did not manage to get the output line in time. However, we managed to solve quite a bit of edge cases in the cue stick’s direction. Currently, our team’s biggest goal is to make sure that all our subsystems work flawlessly together. We will also need to divide and conquer to try solving the computer vision issues, and making sure that we accurately detect walls, balls, cue balls, and especially cue sticks for every frame.