top of page
White Structure

Asymmetry

After segmenting the image to extract the area that might contain melanoma, we must move on to the first of our ABC's checks, asymmetry. Melanoma is commonly not symmetrical across it's shape, and we employ a formula called the Asymmetry Index to quantify the magnitude of the differences.

01

Pre-Processing

To begin calculating the asymmetry index, we start by taking the already filtered image and using the imtranslate() function to center the image around the segmented section centroid found from the regionprops() command. Next, imrotate() is used to rotate the image by the orientation found by regionprops() so that the major axis of the segmented area’s fitted ellipse is even with the horizontal. 

Original image (left) and segmented image (right)

 

 

 

 

Image courtesy of: https://en.wikipedia.org/wiki/Melanoma

02

Symmetry Comparison

Once this preprocessing has been completed, we use flipud() to flip the elements of the image about the major axis of the fitted ellipse, and run xor() with that and the non-flipped image to find where the non-overlapping segments are. With this new matrix with non-overlapping elements, we run nnz() to find the area of the image that does not overlap, then divide that area by the area of the segmented melanoma section found from regionprops() and multiply it by 100 to get the asymmetry index.

03

Threshold Selection

For analyzing the results we chose a threshold value of 10%, above which we say the segmented area is asymmetrical. We chose this value after running test images of both asymmetrical melanoma and symmetrical moles and finding that most symmetrical tests had an index below 10%. 

Non-overlapping area highlighted in white

 

 

 

Image courtesy of: Joseph Wendt and 

https://en.wikipedia.org/wiki/Melanoma

DSP Tool:
Inner Product

01

Rotation Formula

One of the Digital Signal Processing tools we used is found in the imrotate() function. As mentioned above, imrotate() is used to rotate the image so that the major axis of the fitted ellipse is even with the horizontal axis. Imrotate() does this by using the equation shown on the left, where x2 and y2 are the new, rotated coordinates, x1 and y1 are the original coordinates of a pixel, x0 and y0 are the origin coordinates that the image is being rotated around, and theta is the angle the image is being rotated by in the counterclockwise direction.  

02

Inner Product

We can see in Equation 2 that we are using matrix multiplication, which is closely related to the concept of inner product in a Euclidean vector space that we learned in class. If we have matrix C = AB, where A and B are both matrices, then to calculate the element in C at [n,m], we would take the inner product of the n’th row of matrix A and the m’th column of matrix B. This relation is displayed in Equation 3 on the right.

bottom of page