CMSC 110 (Introduction to Computing)
Spring 2012
Assignment #6
Due by 4:00 pm on Tuesday April 10, 2012
Task: Write a Processing program that generates a collage of images.
The collage should be created by applying image processing techniques to draw modified copies of the same image (or same set of images) at multiple locations on your sketch window. At least four distinct modifications of the source image(s) should be used to create your collage.
For example, you may load your source image four times into separate PImage objects and then modify the colors of one to create distinct appearance, i.e. creating Warhol-esque variations, or draw each pixel as a square of a certain size with colors from the original image. Each modified PImage can then be drawn multiple times on your sketch at various locations, rotations and sizes to form your collage.
Step 1: Create at least 4 processed images (as PImages) from the original, using distinct image processing techniques. Example PImage modifications include:
- Simple Filters - pixel color is set depending on its own color
- mapping to grayscale, sepia, negative
- modifying brightness, contrast, color and transparency
- check out Processing's tint() for alternatives
- Pixel math - pixel color is set as a weighted average of pixels from another image
- Add/subtract images
- Blend images
- check out Processing's blend() for alternatives
- Area-based filters - pixel color is set depending on neighboring pixels
- highpass filter - sharpen areas with rapid intensity changes (sharpen)
- lowpass filter - blur areas with rapid intensity changes (blur)
- noise removal
- Dilation/erosion - morphological operation expanding/shrinking bright regions
- Image segmentation - pixel color is set depending on some threshold (note that those listed here also use filtering techiniques, simple color filters for posterizeing and area-based filters for edge detection and feature extraction typically, so they technically belong to more than one categories)
- thresholding color values - posterize, histogram, etc
- check out processing's filter() for alternatives
- edge detection
- feature extraction - lines, edges, ridges, blobs, faces, etc
- Image visualization
- pointillism
- other representations such as letters, symbols, shapes, fragments of other images etc
- extrusion and other 3D transformations
You are highly encouraged to checkout the tutorials on Image Processing on www.processing.org, which can be found there:
Requirements:
- All modifications must be performed on the individual pixels of the original PImage.
- You may not use existing Processing image processing functions like filter(), tint(), and blend().
- Among the required 4 images to create, you must implement at least one technique from "Image visualization" and one from "Area-based filters". Any one that fits the category will do, it does not have to be one that is listed.
- The other two (or more) can be your choice.
Step 2: Create a collage from the set of processed images you generated in step 1.
- Copy, resize, crop and sample the images at will to create fragments. Useful functions:
- img.get(x, y, width, height) - returns a rectangular region of the PImage img starting at (x, y), with the specified width and height
- Arrange the fragments in your sketch window to create a meaningful composite. Use transformations liberally. Useful functions:
- translate()
- rotate()
- scale()
- pushMatrix()
- popMatrix()
- image()
- imageMode()
What to hand in:
- Copy your entire sketch folder into your Dropbox folder as well as any images you use.
This is important as your program won't work without the original images!
- Make sure to name the sketch file/folder properly.
- Put your paragraph/description
and the header in your source
code file.
- Comment your code liberally with meaningful descriptions.