CSE 576: Image Understanding

Autumn 1998

Instructor: Linda Shapiro
TA: Doug Zongker

CSE 576: Lab Exercise 2
Clustering for Image Segmentation

In this assignment, you will segment images into regions of similarly-colored pixels, using the K-means algorithm discussed in class.

original image false-colored labeling

Your K-means implementation should take a color PPM image, such as the one shown above on the left, and a number of clusters K. It should output a grayscale image with each pixel labeled by its class. (You can pass this image to autocolor to produce a false-colored image such as the one above.)

You can also pass this output image to conrgn (make sure you have the updated version!) to separate out the connected components within each class.

You should use the input images fb06931, fb06932, fb06933, fb11117, fb11122, fb23460, and fb23469, available from the image data page. For each input image, turn in printouts (preferably color) of

Also, note how many classes you divided the pixels into (the value of K) and the number of connected components produced.

This technique will likely produce too many connected components. How could you apply techniques covered in class to clean up the connected components results? Answer this question in your submission. You don't need to implement your answer, just describe a procedure and argue that it would work.

You should also turn in a listing of your K-means implementation.