CMSC 110 (Introduction to Computing)
Due by 2:15 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 PImage) 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 itself and another (from another image)
- Add/subtract images
- Blend images
- check out Processing's blend() for alternatives
- Area-based filters - pixel color is set depending on the neighbors
- 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
- 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:
- 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:
What to hand in:
- Any images you use - this is important as your program won't work without the original images!
- Include a screen shot of your collage - using the save() function from Processing maybe easier.
- Copy your entire sketch folder into your Dropbox folder.
- Make sure to name the sketch file/folder properly.
- Put your paragraph/description
and the header in your source
- Comment your code liberally with meaningful descriptions.
- Posting your assignment to opening processing.org by Wed 4/11, 2:15pm.