Configure Your Project
- Follow the instructions for proposing a final project given here: final project proposal.
- Create a new package in your
project named
edu.INSTITUTION.USERNAME.hotj.homework10. - Create a file named
design10.txtfor your time estimates. - Import the classes you built in lab #10 into
the
edu.INSTITUTION.USERNAME.hotj.homework10package.
The Projects
Your instructor will assign you one or more of the problems below. They all involved adding image manipulation effects to the Chimp tool.¹
Homework #10.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: 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:
116 119 65 85 14 31 177 5 55 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.
Homework #10.2: The “Rotate” effect turns the image 90 degrees. Here is an example of what the effect looks like:
the original image: the rotated image: Though it may be hard to see in this relatively square image, the rotated picture has its width and height swapped with respect to the original picture.
Homework #10.3: 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: 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.
Homework #10.4: The “Gray Scale” 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: 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.
Homework #10.5: The Shift effect from the lab exercise shifts the entire image to the right by 1/2 of the width. Modify that code in two ways: it should shift to the right and down; and it should support shift factors (in both directions) other than 1/2. Here is an example of what the effect looks like for a shift factor of 1/3 in both directions:
the original image: the image shifted 1/3 right and down: For this effect, you can hard-code the two shift factors (i.e., the right and the down factors); You can receive extra credit if you modify the interface to request the shift factors from the user.
Homework #10.6: The Zoom effect magnifies part of the image. Here is an example of what the effect looks like:
the original image: the zoomed image: 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.
Turn In
Turn the following things:
- All source files you created for your project
- Sample executions of your GUI (using a screen captured image file)
- Your estimated/actual times
- Your final project proposal
¹ This homework is based on work by Wicentowski & Newhall (see http://web.cs.swarthmore.edu/~newhall/imagemanip/).






