|
CSE 590 TU: Image Understanding
Autumn 2002
|
CSE 590 TU: Homework Set 2
Color Clustering and Skin Finding
Download the software you need
Download the images you need: zip, tarred gzip
In this assignment, you will segment images containing faces by color,
and use your results to develop an automatic skin finder.
|
|
|
face image
| segmented by color
| skin pixels highlighted
|
What You Should Do
The steps you should take (after downloading the images) are as follows:
- Pick several images from the set.
- Run the k-means algorithm on the colors of each of the chosen images (or the whole set
of images at once). This will assign each pixel to one of k clusters.
- Examine the clusters in a color-space histogram (by hand) and come up with a characterization for skin pixels. That is,
create a classifier that classifies pixels as "skin" or "not skin" based on the color values.
- Run your skin finder on the remaining images from the set, and see how well it performs.
Things to keep in mind:
- In addition to RGB color space, you may want to try HSV (HSI) color space, or any other color space
that strikes your fancy.
- Your k-means code should output a grayscale image where each pixel's value is the number of
the cluster to which it has been assigned. The provided autocolor function will transform this output
into something more easily interpretable.
Extra Credit
Here are some ideas for improvements to the basic assignment, any of which
will earn some extra credit:
- The k-means algorithm, as given, only uses the mean value for each cluster. In effect, this
forces each of your dimensions in color space to have equal significance. An easy, but effective, modification
is to use not just the mean, but also the covariance matrix. In other words, represent each cluster as a
Gaussian. This allows the shape of your clusters to be slightly more flexible.
- Instead of fixing the value of k initially, have your algorithm automatically determine k.
- Normally, the clusters are initialized randomly. Come up with a more interesting way to assign
initial clusters.
- For k-means, Try using other attributes of each pixel, besides just color. Some interesting ones
might be local mean intensity, local intensity variance, image pixel coordinates, or anything else you like.
Of course, if you have other ideas for improvements, you are free to ask us about them.
What You Should Turn In
You should turn in the following (print it, create a web page and send the URL, or send files in email to
iansimon@cs.washington.edu):
- For each of the images in your "training" set:
- The original image, in color.
- An image of the color clusters you got from k-means. Run autocolor on it
to make it look pretty.
- The number of clusters you used.
- For each of the images in your test set:
- The original image, in color.
- A binary image in which the pixels your algorithm identified as skin are white, and all other
pixels are black, or some other image that clearly differentiates the skin pixels from the other pixels.
- Your code for the k-means algorithm.
- Your code for skin detection.
- A few paragraphs describing what you did.
Remember that you should put headers on all your routines with the following information:
- NAME (of you)
- DATE
- TITLE (of routine)
- PURPOSE (of routine)
- PARAMETERS (of routine)