Reducing the Impact of Confounding Factors on Skin Cancer Classification via Image Segmentation: Technical Model Study