Image Modification

Due Date: Tuesday, April 11, 2006, at 11:59 pm

For this machine problem, you are to write a function in JES that will first separate an image into 4 parts or quadrants. In each quadrant of the picture we wish to modify the pixels in a different way. The quadrants would be created by "cutting" the picture in half vertically and horizontally.

Look at the table below to understand what should be done. We will number the quadrants in the same manner as is done with a coordinate plane in mathematics.

Quadrant 2

Modify
Red

Quadrant 1

Leave
Unchanged

Quadrant 3

Modify
Green

Quadrant 4

Modify
Blue

When you modify the saturation of a color in each quardant of the image, you may either remove all of that color (set the value of that color to 0) or you may set that amount of that color to the maximum (set the value of that color to 255). Below are three pictures. The first picture is the original picture. The second picture has all of desired color removed from each quadrant of the picture. The third picture has the desired color in each quadrant of the picture set to a maximum value.

Note the second picture. Since the picture is already dark, the amount of each color is already low. Thus setting the color value to zero doesn't make that big of a change in the picture. Now consider the third picture. Setting the color value to the maximum causes a much larger change in the picture.

Below is another set of three pictures. The first picture is the original picture. The second picture has all of desired color removed from each quadrant of the picture. The third picture has the desired color in each quadrant of the picture set to a maximum value.

Note the third picture. Since the picture is mostly white, the amount of each color is already high. Thus setting the color value to its maximum doesn't make that big of a change in the picture. Now consider the second picture. Setting the color value to zero causes a much larger change in the picture.

Your program can either set the appropraite color value in each quadrant to either zero or to 255. Once you find a picture you might like to modify, determine which way will give you the better effect. This choice is completely up to you; however, don't set one quardant's color value to zero and another quadrant's color value to 255. If you set one quadrant's color value to zero, set the other two quadrant's color values to zero.

A few items to note for this project:

You only need to electronically submit your hw3.py file via email. Email your file to the CS 100 instructor account:

      i100@cs.uic.edu
We will use our own picture for the grading of the assignment, so you don't have to send in a picture.

You are encouraged to set up a JES display web page on which you can display any images you created for this assignment.

 i100@cs.uic.edu
 Department of Computer Science
 University of Illinois at Chicago