An ensemble template matching and content-based image retrieval scheme towards early stage detectio of melanoma