Matt's skin segmentation code