An Optimized Hardware System on Chip for Melanoma Detection