Distance transform for automatic dermatologic images composition