CS 151: Project #4

Project 4: Building a Collage

Main course page

The purpose of this assignment is to give you more practice with conditionals, function design, and image manipulation.


Tasks

  1. In your copyIntoEffect() function, make sure there are at least 5 different options, including 'normal'.
  2. Create a function copyIntoWithoutBlueEffect() that works similarly to copyIntoEffect but does not copy over the blue pixels.
  3. Make a function collage4() that takes in 9 arguments. The first four arguments should be the filenames of four pictures, the next four arguments should be the effects for those four pictures, and the final argument should be the filename of your bluescreen picture (the small version).
    • Create a background image that is big enough to hold a collage of the first four images, one in each corner.
    • Use your copyIntoEffect function to put the foreground image into the background image at each corner with the specified effects.
    • Use your copyIntoWithoutBlueEffect function to put a copy of your bluescreen picture directly in the middle of the background image.
    • Return the background image as the output of the collage4() function.
  4. Add a main program that calls collage4() and then shows the resulting image.
  5. Take screen captures of your final collage. Alternatively, try using the JES function writePictureTo() to write the collage to files.

Extensions


Code Handin

Hand in your code for this assignment using the Moodle drop box. There will be a drop box for each week's assignment. Hand in your python code file. If there are any specific images required for your system to work, zip them up with your code file.

In the unlikely (we hope) event that Moodle is down when you need to hand in your assignment, please email the python file to Professor Maxwell.

Please do not place code anywhere public. Do not include it in your writeups on the wiki, for example.

Writeup

Each of you should create your own wiki page for your writeup. The writeup can be brief, but should include the following components.

  1. A brief abstract (200 words or less) describing the project.
  2. A more detailed description of what you did. For this project, be sure to give a brief description of the function copyIntoWithoutBlueEffect(). Include in your description how you filtered out the blue screen and the effects you used.
  3. Include any images or other output your program created. For this project, include a picture of your collage(s).
  4. Describe any extensions you implemented and show results for them.
  5. Give a brief (1 paragraph) description of what you learned.

Colby Wiki

Please put the label cs151s09proj4 on your writeup page (down below the editing window on the edit tab). Please make sure you type the label exactly as given above.