|
| 1. Determining Image Size Stopcup.ppm was 199 x 232 pixels. We determined this by printing out the columns and rows of the image once we had read it in using ReadPPM. |
| 2. Locating Image Origin - Pixel(0,0) The origin of the Stopcup image is the first element of the 1 dimensional pixel array. |
| 3. Origin of Image in xv In order to see the origin more clearly we placed a 10 x 10 pixel white box in the corner that starts with the origin. The origin was in the upper left hand corner of the Stopcup image. |
![]() |
4. Extract Stopsign from Image stopcup.ppm. In order to extract the stopsign and the white lettering (and highlights) we used a combination of two thresholds. We either took pixels with a red intensity greater than 100 or the average of the red and green intensities that was more than 255. (We made this threshold unusually high to get rid of the green highlights on the cup.) The pixels that passed either of these tests were red or white. Another image is loaded and for every corresponding pixel that was filter through, we replace it with stop size pixel. In order to map pixel to pixel, we resized the stopcup image to match our second image. |
![]() |
5. Modifying Background of Image stopcup.ppm To change the background we took the grayscale intensity (RGB/3) of each pixel and changed the color if it's intensity was less than 30. |
![]() |
|
![]() |
![]() |
|
![]() |
![]() |