Media Collages

Mark Guzdial
School of Interactive Computing
Georgia Institute of Technology
guzdial@cc.gatech.edu

Overview

Manipulating media (i.e., pixels of a picture, samples of a sound) is a theme in several Nifty Assignments, e.g., Joshua Guerin and Debby Keen's text images, or David Malan's BMP Puzzles, or Daniel Zingaro's Stereo Sound Processing or Kevin Wayne's Guitar Heroine. Once you know how to manipualte a single image or create a single sound, what comes next is a common computer science story: Scale, increase complexity.

A collage assignment asks students to compose images into a canvas (or sounds into a larger sound) in order to create a single creative artifact. The students can use any number of images that they want, but they have to include the same image at least three times: Once in its original form, and two more times modified in any way that the students want (e.g., shifting colors, cropping, scaling).

Sample Image Collages

Sample Sound Collages

The Secret Plan: Soup: Guitar Song:

Meta Information


Summary Combine images (or sounds) with modifications in order to create a creative artifact.
Topics
Depends in part on how you are doing image composition. If you are using strings, then it's all string concatenation. Using the Media Computation libraries, it's about manipulating 1-D arrays (for sound) and 2-D arrays (for images). Good solutions need to know how to define functions or methods. Students need to be able to write out their images (or sounds), but a single function/method call using Media Computation.
Audience
CS1 and introductory programming at the high school level. We have used it with children as young as middle schoolers, by providing a lot of pre-written code.
Difficulty
This is an early assignment, but not a first assignment. Typically, we do this assignment in CS1 between weeks 2 and 4. At high school level, it might be further on in the term. This is also an opportunity to talk about functional decomposition.
Strengths
  • It's a creative assignment where students can express their individuality. Students will often use pictures of their favorite music or movie stars, their favorite motorcycles or places, or their favorite athletes.
  • Probably the biggest strength is that even the average student's collage looks great.
  • It's a great opportunity to talk about functional decomposition. You can build the whole collage as one long piece of code, but it might be 100-200 lines of code. Students ask, "How can I make this smaller, or easier to debug, or easy to write?"
Weaknesses
  • If students know how to do image or sound manipulations, and composition, there aren't new programming ideas here. All the new content is engineering and design. The focus is on how to design your collage, how to design your program, and how to engineer your program.
  • Students need media in order to create their collages.
    • We make royalty-free digital media that they are welcome to use.
    • Students can use media that they find on the Web (for their own personal collages, not for publication) but we have to explain how to save pictures from the Web to their own computer (e.g., right-click and "Save As"). An advantage of using Web-found media is that they are often small enough to be computable. A second advantage is that students can find media that they find personally meaningful.
    • They can use their own pictures, but they may be too large. (12 megapixel pictures are too large to manipulate in Java or Python, without serious optimization.) We often provide mechanisms for shrinking images (e.g., in Gimp, or using standalone tools like MediaTools).
Dependencies
Students need some kind of library for manipulating pixels in a picture or samples in a sound. We provide Jython and Java tools at www.mediacomputation.org, but appropriate libraries are also available for Javascript and Lisp. (See 2010 SIGCSE paper describing various toolsets for doing collage-level media manipulations.)
Variants
  • As mentioned, we have done this assignment in both images and sounds.
  • As will be described below, we have created some more structured collage assignments, mostly to deal with plagiarism. While we found it easy to identify duplicate collages within a term (even with 300 submissions) simply by scanning them, we found it much more difficult to identify plagiarism between terms. So, we developed other forms of image collages that were computationally similar and had the same strengths, but was different enough to make plagiarism difficult.

Variations

The original Image Collage assignment

Write a function/class/program, to create a collage of the same image at least four times fit onto any background image you choose. (You are welcome to add additional images, too.) One of those four copies must be the original picture. The other three should be modified forms. You can do any of:

Examples:

A Sound Image Collage Assignment

Write a function to generate an audio collage. You must compose together at least two separate sounds, and your result must be at least FIVE seconds long. One of the sounds must appear at least TWICE where it is changed in some way.

You have a variety of ways that you can change sounds:

Examples:

A Flag Collage Assignment

Example:

Your assignment is to write a function that will create a collage of pictures. Your collage will be made by copying at least 3 pictures onto a blank canvas. You must use at least 3 different pictures. When finished, your collage should look like the flag of a country by using color modifications.

Examples:

A Cartoon Collage Assignment

Example:

Place several characters (at least three) into a scene, and make at least two of the characters "say" something using the addText function. Use some image manipulation to modify a character's look in response to the dialog, e.g., "I feel blue" (then tinge the character blue).

Yes, you are ENCOURAGED to be humorous – but tasteful!. If it couldn't appear in the school newspaper, don't hand it in as homework!

Examples:

A Turtle-based Collage Assignment (in Java using Media Computation)

Example:

Modify Picture.java so that when run (i.e., running the main() method), a collage is generated and shown (via .show). Here are the specs that you have to meet:

Submit Picture.java as your turn-in. You must use good commenting style. You are bound by the honor code not to share code with anyone.

Grading Rubric

Examples:

Grading for Basic Collage

We typically grade base mostly on the artifacts. For the basic image collage assignment:

Other Resources

Powerpoint slides from SIGCSE 2013 and as PDF.

Extra info about this assignment: