Homework 14: Image Processing

Assigned
Wednesday November 9, 2016
Due
5 p.m., Friday November 11, 2016
Goals
You will practice with two-dimensional data. You’ll create some simple image effects that you might see in commercial photo editing software.
Collaboration
Do this assignment with your assigned partner.
Submitting
Submit a Python program using the online turnin form. See below.
Scoring
16 points

Prerequisites

You will need to download the book’s image.py module (also available from our course site.)

You will also need images to work with. You can find your own or use the author's penguin image.

Assignment

Create a module called photolab.py, or add onto the module we started building in class. In this module, write the following functions as described in the textbook exercises (p. 470):

Function name
Exercise
Points
reduce(photo)
9.3.8 (Hint: Refer to given reduce function on p. 468)
4
blur(photo)
9.3.9 (Hint: Refer to the neighborhood function on p. 454 for a pattern to follow)
4
repeat_blur(photo, times)
9.3.10
2
crop(photo,
     topleft_x, topleft_y,
     width, height)
9.3.11 (Hint: Remember our algorithm for drawing a rectangle)
4
Style and comments

2

Submission

Submit your code via online the turn-in tool.

Good luck, and have fun!



Janet Davis (davisj@whitman.edu).

Rewritten November 9, 2016
Last revised November 09, 2016, 01:53:12 PM PST
CC-BY-NC-SA This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License.