The 'ABCDE' of Detecting Skin Melanoma and Matlab.

by Arms For Wheelchair in Circuits > Software

78 Views, 0 Favorites, 0 Comments

The 'ABCDE' of Detecting Skin Melanoma and Matlab.

skincancer.jpg

Melanoma is a type of cancer that begins in the melanocytes. Other names for this cancer include malignant melanoma and cutaneous melanoma. Most melanoma cells still make melanin, so melanoma tumors are usually brown or black. But some melanomas do not make melanin and can appear pink, tan, or even white.

Melanomas can develop anywhere on the skin, but they are more likely to start on the trunk (chest and back) in men and on the legs in women. The neck and face are other common sites.

Early detection of melanoma is sometimes critical in order to save the patient.These characteristics are used by dermatologists to classify melanomas. Look for these signs: Asymmetry, irregular Borders, more than one or uneven distribution of Color, or a large (greater than 6mm) Diameter. Finally, pay attention to the Evolution of your moles - know what's normal for your skin and check it regularly for changes.(ABCDE)
If you see one or more of these, making an appointment with a dermatologist is very important.

In this project, we have integrated Matlab and the ABCDE detection technique in order to classify whether a given image of a skin defect is, in fact, a skin lesion or not.

Step 1: Initialisation

initialise.png

In this part of the code, we are basically reading the image file using the imread function and extracting its properties. The first step is to extract the individual r,g,b color channels as the files we are reading are color files. Next, to locate the lesion we are going to create a binary image by just using the red channel and are then going to modify the same binary image by using two techniques- one by using the function imclearborder and the second by filling the holes so that there are no discrepancies in the region we are about to test our ABCDE technique on.

Part A: Finding Whether the Region Is Symmetrical or Not

PartA.png

For this particular part of the code, we researched a lot about image processing techniques on Matlab that would allow us to find whether the image is symmetrical or not. After a lot of failed attempts, we finally stumbled across a method where we could flip the region we were testing and check whether the region overlaps itself completely or not. This method also uses the asymmetrical index formula.

Here the ol and nol matrices are two logical matrices. We have set the conditions for an object to be either perfectly symmetrical (ol matrix has ones), symmetrical and asymmetrical.

Part B : Finding the Boundary and Checking Whether It Is Smooth or Not

partB.png

This part uses the plotting technique in Matlab. All we did was plot a boundary line bounding the region we are testing on the original color image. It is quite easy to check whether the boundaries are consistent or not from the graph.

Part C: Finding Whether the Color of the Region Is Consistent or Not

partC.png

In this part, we are checking if the entire region is composed of one color or not. To do so we use the HSV image processing technique. We first convert our color image to an HSV format and extract the individual h,s,v images. We then use the threshold function to find vivid colors and then highlight them by making other masked images white. We then convert these pixel values back to a color format and then create a histogram for each r,g,b channel and plot them together.

One can make out from the histogram whether the region is composed of one or more colors.

Part D : Finding the Diameter of Region

partD.png

This part of the code just uses the built-in function regionprops to find the diameter of the region.

Skin lesions usually have a diameter greater or equal than 6mm.

Part E: Evolution of the Lesion & Future Improvements

partE.png

We could not find reliable data or images which showed the spreading of skin melanoma over a period of time on a single patient.

If we did however in the future had to improve our code we would definitely make sure to code something where successive images of skin melanoma over a period of time were converted to black and white images, then we would extract the lesion region and calculate the area of each particular region. We would then show how the area of the lesion increased as time increased. Or if the region was not a skin lesion we could show that the area of the region did not increase.