In this paper, an unsupervised algorithm, called the Independent Histogram Pursuit (IHP), for segmenting dermatological lesions is proposed. The algorithm estimates a set of linear combinations of image bands that enhance different structures embedded in the image. In particular, the first estimated combination enhances the contrast of the lesion to facilitate its segmentation. Given an N-band image, this first combination corresponds to a line in N dimensions, such that the separation between the two main modes of the histogram obtained by projecting the pixels onto this line, is maximized. The remaining combinations are estimated in a similar way under the constraint of being orthogonal to those already computed. The performance of the algorithm is tested on five different dermatological datasets. The results obtained on these datasets indicate the robustness of the algorithm and its suitability to deal with different types of dermatological lesions. The boundary detection precision using k-means segmentation was close to 97%. The proposed algorithm can be easily combined with the majority of classification algorithms.