Dermoscopy is a technique used to better visualize pigmented skin lesion and aid the clinician in determining if a lesion is benign or malignant. Automated segmentation of dermoscopy images is an important step for computer-aided diagnosis of melanoma. In this paper, we investigate how to use the spatial constraints present in pigmented lesions to improve the segmentation of dermoscopy images. We present an unsupervised segmentation algorithm that embeds these constraints into the feature space. The algorithm groups image pixels with homogeneous properties, and merges the pixel groups into a few super-regions. The optimal lesionskin boundary is chosen from the set of all region boundaries, where the optimality is determined from the color and texture properties of the regions. We test our method on 67 dermoscopy images and compare the automatically generated segmentation with dermatologist-determined segmentation. The results demonstrate the advantage of incorporating domain-specific ...