Homework 3: Summary Images

Due: 8 a.m., Friday, September 7
No extensions!

Summary: In this assignment, you will use the basic pixel-manipulation techniques you learned in the lab on raster graphics to create simple color summaries of images.

Purposes: To get you comfortable working with the basic pixel operations in the GIMP. To help you think about colors.

Expected Time: One hour.

Collaboration: I would prefer that you work in groups of size three. However, you may work alone, in a group of size two, or a group of size four. You may discuss this assignment and possible solutions with anyone you wish. If you discuss this assignment with people other than group members, make sure to include a citation (e.g., I consulted this person, who helped me do this).

Submitting: Email me your answer. More details below. Each group need submit only one answer.

Warning: So that this exercise is a learning assignment for everyone, I may spend class time publicly critiquing your work.

Contents:


Background

You now know a few simple techniques for dealing with images and the pixels in those images. In particular, you can load an image with image.load, create a new image with image.new, get the value of a pixel at a particular location with image.get-pixel, set the value of a pixel at a particular location with image.set-pixel!, and determine the width and height of an image with image.width and image.height.

What can you do with this simple suite of procedures? One potentially interesting activity is to build new, simple, images from existing images. For example, you can take a small selection of pixels from one image and use those to build a new image. Such created art is a form of algorithmic art, art created by algorithm, rather than by hand.

Assignment

Assume that we've defined image-file as the name of a file that contains an image. For example, we might have written

(define image-file "/home/rebelsky/glimmer/samples/emily-stalkernet.jpg")

a. Write a series of Scheme commands that builds and shows a new 4x4 image, each of whose pixels is taken from the image stored in image-file. Which pixels should you choose? It is up to you. One natural technique is to divide the original image into sixteen portions, and take the middle pixel in each quadrant.

b. Pick at least three images and generate summary images from them using the instructions you developed in part (a). Identify one that you find particularly appealing.

Important Evaluation Criteria

I will primarily look to see if you've tried something creative in choosing the pixels. I will also consider whether the algorithm you've come up with does anything interesting with typical pictures (whatever those are).

Submitting Your Homework

Please submit this work via email. The email should be titled CSC151 HW3 and should contain your answers to all parts of this assignment. Please send your Scheme work as the body of an email message. Attach one source image and the corresponding result image.


Janet Davis (davisjan@cs.grinnell.edu)

Created September 4, 2007 based on http://www.cs.grinnell.edu/%7Erebelsky/Courses/CS151/2007F/Assignments/assignment.03.html
Last revised September 4, 2007