An approach to automatically correct illumination problems in dermatological images is presented. The illumination function is estimated after combining the thematic map indicating skin-produced by an automated classification scheme- with the dermatological image data. The user is only required to specify the class for which its thematic map is most suitable to be used in the illumination correction. Results are shown for real examples. It is also shown that the classification output improves after illumination correction.