for Youtube link: click here
This last week I finished resoldering everything to make the final cool cue system. I also made adjustments to the Arduino code to better update the direction of the pool cue. Now it should be more accurate and also more accurately detect when a shot …
Our biggest problem has been lighting for the CV. As always, it detects the balls’ shadows as part of the ball, meaning that with poor or uneven lighting, it can merge two balls together or even fail to detect a ball since the shape is too large. This would not be much of a problem in our actual use case, as many pool tables already have bright overhead lighting, but without fixing it, we will have trouble demo-ing our project. Over this last week we experimented with some desk lamps to improve our lighting. We had four lamps, one near each corner of the pool table. While they are not prefect, as they can’t outshine the sun, they worked well at reducing the amount of shadows after dusk. These lamps also have the additional cost of taking up power, as we now also use a power strip to plug in both the lamps and the laptop. Our unit tests were mostly experimental tests on each aspect of our system. For the CV system, we would take pictures of the balls on the table, and made sure that all the balls in the image were detected, and they were correctly labeled. With the shot calculation, as there is no way to always find the “best shot” to check against, it was a little harder. For this, we map the table as a grid and placed imaginary balls on the grid, then checked the shots it calculated. This testing included checking all edge cases, such as when multiple balls are near each other or the easiest shot to make is blocked by the 8-ball. For the pool cue, unit testing involved making many measurements and checking for their correctness, like if the sensor is turned 90 degrees, the output shows it. For our system testing, we would place the balls in various locations on the pool table and make sure the results were what we expected, and that nothing broke during integration. Our system test results were how we discovered that we need to make sure the lighting was good, or else the CV would fail to properly detect the balls.
This week, Justin worked on resoldering the components using softer wire. He also made some updates so that the pool cue will also send the direction it is facing when a shot is made. Devank made some changes to the frame to allow the webcam and projector to function together. This was done by adding buttons that use a servo to cover the projector so the webcam can take a picture of the table. Jimmy has continued with his work on making sure the CV system can accurately detect a ball that is adjacent to another ball(s). Currently our largest risk is still the lighting of the pool table. If there are significant shadows, it causes the CV system to fail to properly detect the balls, which breaks the whole system. The LEDs we bought were not bright enough to be useful vs sunlight. We are now experimenting with getting some floodlamps, one for each corner, to provide even brighter light, which should hopefully remove shadows. We are still on track to meet our deadlines.