The Mohs Micrographic Skin Defect Analyzer utilizes the principle of Otsu’s thresholding segmentation and a novel image stitching technique to generate a template of the patient’s defect in the form of a binary mask. The structure of the processing program can be divided into four main parts: image acquisition and raw processing, image stitching (if needed), image segmentation, and defect area calculation.
Image stitching
The image stitching algorithm is a simple algorithm designed to connect images of defects with complex geometry, typically those located at the nose and jawline. The algorithm first splits the images into smaller arrays of five columns and all rows. Then the 2-D correlation coefficient between each window of the first image and each window of the second image is calculated. The window with the highest correlation the first image gives the location to which the first image will be cut. The window with the highest correlation in the second image gives the index where it will be stitched to the first image. The same procedure is repeated with the resulting stitched image and the third image.
Image segmentation
The image segmentation algorithm utilizes the principles of Otsu’s thresholding - a discriminant analysis technique. From the grayscale image of the defect, the thresholding process entails imposing a running threshold t along the pixel intensity of the image. The threshold will separate all pixels of the image into two classes: background and foreground. The selected threshold is the one that minimizes the intra-class varianceThe output of the image segmentation is the key result of the program - a binary image of the defect which serves as a template for reconstruction.
On the right is a walk-through video of the prototype v.2.0 MATLAB script. Three images of a skin cancer defect on the cheek were analyzed. The images were edited to simulate being taken by rotating the camera around the defect while maintaining the same distance from the defect. The script outputs a stitched image of the defect and a binary mask with defect area calculation which can be use as a template for reconstruction.
Three images of a team member's eye are taken by rotating the camera while maintaining the same distance between the camera and the eyes. Based on 2D correlation, a stitched image containing the entire eye is generated. This example demonstrates the capacity of our image stitching algorithm.
A well-lit skin cancer defect on the nose is cropped and segmented by Otsu's thresholding. A binary mask is generated as a result. This example demonstrates the capacity of our image segmentation algorithm.