Melanoma is acknowledged by the World Health Organization as the most severe type of skin cancer, significantly contributing to skin cancer-related deaths worldwide. This type of cancer manifests through noticeable changes in moles, including their size, shape, colour, or texture. In this study, we introduce an innovative and robust method for detecting and classifying melanoma in various image types, including both basic and clinical dermatological images. Our approach employs the HSV (Hue, Saturation, and Value) colour model, along with mathematical morphology and Gaussian filtering techniques. These methods are used to pinpoint the area of interest in an image and compute four key descriptors crucial for melanoma analysis: symmetry, border irregularity, colour variation, and dimension. Despite the prior usage of these descriptors over an extended period, the manner in which they are calculated in this proposal is a key factor contributing to the improvement of the outcomes. Following this, a multilayer perceptron is utilized for the purpose of categorizing malignant and benign melanoma. The study included three datasets consisting of basic and dermatological photographs that are frequently referenced in academic literature. These datasets were applied to both train and assess the effectiveness of the proposed technique. Based on the results obtained from k-fold cross-validation, it is evident that the proposed model surpasses three existing state-of-the-art approaches. In particular, the model demonstrates remarkable precision, with an accuracy rate of 98.5% for basic images and 98.6% for clinical dermatological images. It exhibits a high level of sensitivity, measuring 96.68% for simple images and 98.05% for dermatological images. Additionally, its specificity stands at 98.15% when analyzing basic images and 98.01% for dermatological images, indicating its effectiveness in both types of image analysis. The findings have demonstrated that the utilization of this gadget as an assistive tool for melanoma diagnosis would enhance levels of reliability in comparison to traditional methods