Input: RGB image

Output: Lesion Segmentation

1) The RGB image is converted to grayscale image

2) The gradient of pixels in an image are calculated using the first order derivative of Gaussian.

3) Compute magnitude and orientation of gradient vector

4) The top p% highest gradient pixels are considered as threshold value.

5) The image is converted into black and white image, based on threshold

6) XOR of each pixel with the next pixel in an image is created which shows the edge of image.