Lab Collecting Comic Titles Due: date-time
CS 1124 Project 1
Due: Friday September 16 by 9:00am
What to do
For this project, we would like you to create a recipe that takes a picture and modifies it to create another image. The modification is a series of picture transformations like the ones we have discussed in class. Specifically, your recipe is given the name of an image and you have to produce a picture. Consider this example. If original image to start with is:

The transformation must produce the following image:

The transformed image is a grayscale image, but just converting the original to grayscale alone will not produce the above transformation (it is not enough). You need to use another transformation that is discussed in the book. That is, you have to apply two transformations to the original image. It is up to you to identify which other transformation you must apply.
Comments
You should comment your code so that other programmers (or the professor and TAs) can easily understand what the code does (or what you think it is supposed to do). In particular, for this project, you should use a file comment block as well function comment blocks.
File Comments
For each file in your projects, add a comment block at the top that provides information for the whole project. Your file comment block should have at least the information shown below.
# Filename: name.py # Author: your name # PID: your pid # Class: CS1124, Fall 2011 # Virginia Tech # # Purpose: this file is part of project x, etc. #
Recipe (Function) Comments
For each recipe, add a comment block that describes what the recipe does, the parameters, and the return value. Below is an example:
# Recipe: darkNight(name) # Argument: name - path to a file with a picture (jpeg) # Return: picture object # # Description: this recipe takes the path to a picture file # and returns a picture object. The recipe performs a transformation # that changes the picture by .... #
Specifics of your Solution
The following are specifics to which your recipe should conform:
- Your recipe should be named
darkNight(name)
. - Your recipe should take 1 parameter: the name of the file with the original picture to be manipulated.
- The
darkNight
recipe should return a new image with the transformations applied. If we do ashow()
of the image returned, we should see the second image above. But note that your recipe itself must not do a show(). - Your solution should use more than function to accomplish its job. That is, we expect you to do hierarchical decomposition of the
darkNight()
recipe. - You should write comments in your recipe (with #), as specified above.
Submission
- The file that you submit below should be named <PID>Project1.py, where PID is your VT's PID@vt.edu.
- The file must be submitted to the Moodle website by the due date.
- Do not submit any images with your submission, just your Python program.
How your work will be graded
The following are the details that we will look for when grading your program:
- The program loads and executes in JES
- The program meets the project specification
- Excellent -> The program meets the project specification.
- Good -> The program meets most of the project specification. For example, the program correctly produces the first transformation, but not the second (or vice-versa).
- Poor -> The program does not meet the project specification. For example, the program does not correctly produce the desired transformation.
- You have followed good programming practices
- Excellent -> The code has been decomposed into at several functions. The function/variable names help to make the program more readable and understandable.
- Good -> The code has been decomposed but not in a logical way. The function/variable names do not consistently make the program more readable and understandable. For example, the majority of the variable names may be appropriate, but a small subset are random or not related to the purpose of the program.
- Poor -> The code has been decomposed into only one or two functions. The variable names do not help to make the program more readable or understandable. For example, the variable names may be completely random or not related to the purpose of the program.
Policy on late submissions: Check the course syllabus to see the details of our projects late policy.