Your instructor will assign one or more of the following problems. Submit all appropriate files for grading, including code files, screen captures, supplemental files (e.g., image files), and text files.

  1. Extend the lab exercise to do one of the following image processing effects

    1. The Blur effect “softens” the color boundaries through out the image. Here is an example of what the effect looks like after the “Blur” button has been pressed a few times:

      the original image: the blurred image:
      original image blur effect

      To create this effect, you average the color intensity values for a pixel based on the color values of all its neighboring pixels. For example, if your original image had a section of Pixels whose red components have the following intensity values:

      11611965
      851431
      177555

      you should, in your blurred image, set the new value of the red component for the center Pixel to 74, the average of all of the pixels in the 3x3 square. Note that because your blurring operation changes the pixel color values in your image, you will need to use a copy of the image as the source of the original pixel color values.

    2. The Polarize effect sets the color values of each pixel to extreme limits. Here is an example of what the effect looks like:

      the original image: the polarized image:
      original image polarize
		      image effect

      Polarize sets each pixel color intensity value to either 255 or 0 based on whether the value is greater or less than the average value for that color across the whole image. You must first find the three average pixel values in the image, one for each color, and then set each Pixel’s R, B, G value to either 0 or 255 based on its relation to the average values.

    3. The GrayScale effect removes the RGB color differentiation in the image. Here is an example of what the effect looks like:

      the original image: the image in gray-scale:
      original image gray-scale
		      image effect

      This effect is implemented by setting the color values for a pixel to the average of the individual red, green, and blue for that pixel.

    4. The Shift-Left effect from the lab exercise shifts the entire image to the left by 100 pixels. Modify that code in two ways: Provide a matching Shift-Down method; and refactor your code to support shift factors (in both directions) other than 100 pixels. Here is an example of what the effect looks like for a combined shift-left and shift-up effect:

      the original image: the image shifted left and up:
      original image multi-shift
		      image effect

      For this effect, you can hard-code two shift factors of 100 pixels, but your shifting methods should support any shift factor.

    5. The Zoom effect magnifies part of the image. Here is an example of what the effect looks like:

      the original image: the zoomed image:
      original image zoom
		      image effect

      In this effect, the image stays the same size, but the pixels from the upper left portion of the original are quadrupled in size, that is, each of the pixels in the upper left take up 4 pixels in the new image rather than just 1. You’ll notice that the zoomed image has a lower resolution that the original.

  2. Build a chooser of one of the following types: (1) a color chooser with RBG boxes, an intensity slider for each box, and a final color pane; (2) an image chooser with 4 image choices and a final pane; or (3) an audio chooser with 4 song choices.

  3. Build a pong game or a single-paddle bounce game (with sound).