User Tools

Site Tools


cs276:a16:mp.hw4_5

CS 276 Programing Assignment #4 & 5

Click on the screenshots to access the sketches on the web.

Problem 1

Problem 2

Problem 2 WriteUp

For this problem, I focused on one algorithm to experiment with and modified it in order to try to make it a better experience for the user. Before I started modifying the Background Subtraction algorithm, I had to first understand the basic idea behind this algorithm. I learned that the Background Subtraction algorithm worked by detecting the presence of people and objects in the frame using a simple background-subtraction technique. In order to initialize the background, the user had to press any key. I noticed that once the original code was run, a 640 x 480 window popped up and the camera immediately started recording. Once the user pressed a key, the camera captured the person or object in the window with a black background around it. I wanted to modify the algorithm by making it more creative and more engaging for the user. An idea that first popped in my mind was the ability to capture an image and save it in the background and capture another image and save it as well. By doing this, the user would be able to capture as many images they want and have them shown all in the same window. In the original algorithm, once the user captured an image after the previous one, the previous image would be overwritten. My objective was to save the images instead of letting them be overwritten every time a key was pressed. In addition to this idea, I also wanted the camera to capture light colors as darker colors and vice versa. For example, my black hair would appear as white. Once I pressed any key the first time, I modified the algorithm so that the user is able to see themselves with a white background. After pressing a key twice, I made the background change into a darker color once again. This effect allows the user to make a creative portrait of themselves, while experimenting with Background Subtraction at the same time.

Problem 3

Problem 4

Problem 5

cs276/a16/mp.hw4_5.txt · Last modified: 2016/11/06 23:24 by miguelportillo