Automated diagnosis of pigmented skin lesions