TESTING & DEBUGGING

Our design has two main components:
(1) Game graphics
(2) Skin color detection
We designed and tested each component separately to ensure their functionalities before we combined them together. The first component can be tested without the use of the camera. We used one of the switches on the DE2 board to control the paddle. After verifying the basic functionality of the game, we started to add the color features and the sounds effects. For the second component, we used the project Virtual Paint from last year as a reference to get started. We drew only the paddle on the screen and used the yellow screwdriver to control its direction. When the paddle was able to move stably, we adjusted the intensity check until the camera was able to detect human skin color. We learned that this part was the most challenging part in our design since different people possess different skin colors. We tried to find an RGB color range that would allow the camera to detect all skin colors. Because were unable to find the desired range, we chose a very wide range to ensure that most of the common skin colors will fall into this range. However, since the chosen range was too wide, the camera started to detect other unwanted colors. We, then, narrowed down the RGB range so that it could only detect one specific skin tone. This worked fairly well for our skin colors. We then learned that with proper lighting settings, this scheme works for most skin colors. Indeed, the room lighting plays an important role here. With insufficient lighting, the camera cannot detect the skin color at all. However, if the room is too bright, the camera can be sensitive and, thus, detect some unwanted regions. During testing, we also had to make sure there were enough lighting on both sides of the camera so that the paddle could reach both edges of the screen.