ANALYSES OF SKIN LESION AREAS AFTER THRESHOLDING

Melanoma is one of the fastest spreading cancers. The aim of the article is to segment the skin lesions from human skin dermatoscopic images covered by melanoma. Threshold segmentation was used, which allows a single skin lesion to be analyzed. It shows the four areas of each based on their color. The created software monitors the border of skin lesion areas. Segmentation and analysis of the resulting images with different areas of skin change was carried out in the Matlab software.


Introduction
Global warming through sunlight can lead to an increase in skin cancer cases. Melanoma is one of the fastest growing cancers among the world's population of fair-skinned people. However, its early diagnosis can lead to effective, life-saving treatment. Dermatoscopy seems to be a complicated and obscure technique for beginners. This non-invasive imaging technique provides many features of skin lesions. Skin images are subjected to a dermatologist's analysis. However, when they are inexperienced, the cancer may not be diagnosed. Therefore, the development of an effective computerized diagnostic process in the diagnosis of skin cancers is needed. The article briefly presents methods for assessing dermatoscopic images, segmentation methods based on thresholding and analyses of melanoma images based on regions.

Dermatoscopy
In the last decade, many researchers have dealt with changes in human skin. If its malignant variety is diagnosed in the early stages, a much larger percentage of patients can be cured. Many techniques have been developed to detect the border of skin lesions on dermatoscopic images. Dermatoscopy is an imaging technique that shows the many features of skin lesions. The resulting skin images are subjected to a dermatologist's analysis.
The primary goal of dermoscopic examination is differential diagnosis of pigmented lesions divided into melanocytic and nonmelanocytic lesions. It is then possible to isolate melanocytic lesions requiring surgical excision. The skin segment taken at that time is subjected to histopathological examination. Atypical moles, melanomas, basal cell carcinoma of the skin, benign moles, histiocytomas, hemangiomas and seborrheic warts are then defined. The advantages of dermatoscopic examination are its greater diagnostic sensitivity compared to looking at birthmarks with the naked eye. This enables more accurate examination of skin lesions and avoids unnecessary skin biopsies in cases difficult to assess with the naked eye. Scoring systems cannot be used for some specific locations such as the face, mucous membranes, hands or soles of the feet as they do not provide reasonable results.
This means that these methods are not sufficient in these locations. Therefore, the development of a computerized diagnostic process is extremely beneficial for the diagnosis of skin cancers [19,20,21]. The developed methods for transforming dermatoscopic images include splitting the original image into regions. Image analysis based on computer systems monitors the boundaries of skin lesions.

Image assessment methods
Many methods have been adopted that allow a dermatologist to evaluate a skin change for skin melanoma. These include scales developed by doctors to characterize the dermatological traits under examination: classical pattern analysis, ABCD scale (sometimes extended to ABCDE form), CASH algorithm, Hunter scale, Clark and Breslow scale, TNM scale, list of 3 points, list of 7 points, Menzies method, and Chaos and Clues.
The pattern analysis method is used to assess pigmented skin eruptions. The natural skin color (different for each person) is often the reference point in the process of analyzing the colors of the birthmark. Dye efflorescence usually consists of more than one color, which can make it difficult for the human eye to distinguish colors.
The ABCD (E) scale is used by doctors when diagnosing melanoma. On its basis, it is possible to calculate the TDS (Total Dermatoscopy Score) determining whether the test mark has features of melanoma [28].
(1) where A (asymmetry)melanoma is asymmetrical about each axis, unlike benign lesions; B (borders)edges are uneven and jagged; C (color)light brown to black, D (diameter)diameter > 5 mm or (dynamics) dynamics of morphological changes in the tumor; in the extended version E (elevate)convex change over the surrounding epidermis.
The Glasgow scale is considered to be a set of clinical signs of locally developed melanoma [6]. The CASH algorithm (Color, Architecture, Symmetry, Homogeneity) has comparable sensitivity with slightly greater specificity. The indicators of the effectiveness of doctors include specificity and sensitivity [12].
MoleMate allows a preliminary diagnosis to be performed semi-automatically to assess the skin change. In addition, next to the descriptions of birthmarks, additional photos appear to simplify the process. It is a useful tool for classifying features such as birthmark size, hemoglobin accumulation, infiltration, individual blood vessels, and significant collagen and hemoglobin deficiencies [9]. The Clark [8] and Breslow [2] scales determine the extent of infiltration of lesions into the depths. There are four levels of infiltration on the Breslow scale. The degrees correspond to the depth of infiltration expressed in millimeters. The higher the grade, the worse the prognosis.
In dermoscopic examination, in addition to analyzing the pattern of pigmented lesions, dermoscopic diagnostic algorithms (7-point rule, 3-point rule), Menzies principle, and evaluation of the total dermoscopic examination index (TDS) are used. It is believed that the approach to the diagnosis of nevi and melanoma should be adapted to the clinical data and the macroscopic appearance of the lesion, therefore the assessment methods are constantly being modified [1,17,29,30].

Thresholding
The goal of many projects is to create a semi-automatic and automatic computer system that allows you to take pictures of skin lesions and then subject them to individual analysis [22,[24][25][26]. The available versions of the diagnostic programs still improve the effectiveness of early melanoma detection.
The image pre-processing method is primarily used to remove unwanted artifacts from clinical dermatoscopic images. Color analysis is one of the basic elements for a dermatologist in the initial diagnosis of melanoma. It concerns the change of color, shape and texture of the skin change on the patient's body [3,11,15]. In [15], the background from the dermatoscopic image was segmented using the last peak on a gray scale image histogram. It is found and the 90th percentile of its location is selected as the threshold. The images are then qualified using different classifiers as those representing a cancer-endangered lesion or those showing only healthy tissue.  [23] For the general data set, there are images containing other objects in their marginal areas, some ranges of damage reach the image boundaries. Figure 2 shows an example of using segmentation based on thresholding [23]. It uses the selected intensity value threshold to separate the skin change from the background of the patient's light skin. In dermoscopy, the healthy skin around the lesion can be taken as the background, but the background must be correctly determined. Threshold segmentation was also used in [4,27].

Materials and methods
Two dermatoscopic image databases were used in the article: ISIC (The International Skin Imaging Collaboration) [8] and DermIS (Dermatology Information System) [7]. These are public databases of clinical dermoscopic images of skin lesions. Melanoma can spread by satellite lesions, or extend via the lymphatics or blood stream. This means it can appear everywhere in the body, especially the lungs, liver, brain, skin and bones. From the databases 20 patient images were selected in which malignant melanoma was guided. The results of the tests were confirmed by histopathological examination of the lesion.
In the process of pre-processing dermatoscopic images, special attention is paid to the artifacts created during the imaging process. Their removal is of particular importance in the process of further image processing. Dermatoscopic images often contain some artifacts that are an obstacle to identifying skin lesions from healthy skin [14,18]. The artifacts include the patient's hair present on the dermatoscopic image, large blood vessels, skin lines, hematomas, vesicles under the skin, markers of lesions and scars on the skin. Automatic programs such as DullRazor [16] and VirtualShave [10] are frequently used.
To avoid the difficult stage of releasing artifacts in the images. Dermatoscopic images of light skin were used, free of dark and thick hair in the area of the melanoma. Threshold segmentation was used for the process of segmentation of selected areas of the skin lesions with diagnosed melanoma. One or two thresholds were included in the algorithm. The areas segmented in the image contain pixels below a given threshold, above it, and within a selected range. The areas obtained in the resulting images were analyzed using the measured properties of the image regions by functions in Matlab: bwarea (estimates the area of the objects in an image), Sum(sum)e, and BwEuler (calculate the Euler number for the binary segmented image) [13].

Results
Color images were converted into grayscale images, and their normalized histograms were also determined. The received images had intensity values in the range of 1-256. For each patient, four optimal areas were distinguished, differing in the value of pixel intensity, which corresponded to visible changes in the color of the melanomamark. Values less than 45, between 55-100, between 115-130 and less than 150 were selected. Figures 3 and 4 show the results of segmentation for 2 of selected patients. The results of binarization with an upper threshold are shown in Figure  3b and Figure 4b, and binarization with a lower threshold of 150 in Figure 3e and Figure 4e. Areas of skin lesions obstructing pixels from 55 to 100 for each of the patients are in Figure 3c and Figure 4c. Melanoma is characterized by color changes inside the lesion. Areas of a similar color accumulating side-by-side form the clusters of cells.
The values of the bwarea, Sum(sum)e, and bwEuler functions were calculated, and are listed in Table 1 for the four segmented areas. The results are presented for five selected patients. Each of the images obtained after segmentation selected from four areas has different values. In addition, the entire skin lesion was segmented using image intensities above 150. Larger segmented elements in the resulting images have higher values from Table 1 than other segmented areas. The values allow you to assess the size of the segmented area. In most skin lesions, the darkest area of the lesion (with pixel intensity values below 45) covers the smallest part of the image. The area covering the skin lesionmelanoma with pixels in the range of 115-130 mostly shows the border between the lesion and healthy tissue.

Conclusions
Threshold-based methods include specifying one or more histogram threshold values that separate objects from the background. Region-based methods include grouping pixels into homogeneous regions using region merging, region division, or both. The area of the entire skin lesion has been divided into four smaller areas of different color that characterize it, making it possible to analyze the entire skin lesion more effectively.
The proposed algorithm for segmenting dermatoscopic images in Matlab allows four areas of the skin covered by malignant melanoma to be distinguished.
However, there are many problems with the segmentation process, which provides the ability to detect features and later classify skin lesions. Archiving the obtained images of birthmarks enables their comparison in time and the creation of the body maps.
Development of teledermoscopy, transmission of videodermoscopic images during teleconsultation increases the diagnostic possibilities.