- Convert the image to a binary format through thresholding. MATLAB’s “graythresh” method provides a global threshold based on Otsu’s method. After the threshold is determined, the ‘imbinarize’ function can then be used to binarize the image. Refer to the following documentation link to understand about “graythresh” and “imbinarize”. https://www.mathworks.com/help/images/ref/graythresh.html
- The segregation between isolated and clustered structures can be seen visually. Therefore, to separate them into two different images, use the flood fill algorithm with the starting point as one of the pixels in the large clusters. MATLAB’s ‘imfill’ function can help achieve this. After obtaining the large clusters from the flood fill operation, use image subtraction, that is, subtract the image of the large clusters with the original image to obtain the image containing small clusters only. Refer to the following documentation to understand about “imfill” and “imsubtract” respectively. https://www.mathworks.com/help/images/flood-fill-operations.html https://www.mathworks.com/help/images/ref/imsubtract.html
- For the analysis of the separated regions, MATLAB’s ‘regionprops’ function can be used. The analysis of small structures is relatively straightforward. Distinction between etch pits and noise specs can be made based on the properties returned by the “regionprops” function such as the center of mass and the eccentricities. Refer to the following documentation to understand about “regionprops”.
- For the analysis of the larger clusters, the image is divided into square tiles. The tile size should be less than the grain size of the material such that the grain boundaries appear as a straight line in the tiles. Again, the ‘regionprops’ function is used. In a particular tile, if the eccentricity epsilon > 0.93, it is concluded that the structure is highly elongated in one direction and thus is a grain boundary.
- Discard the identified noise specs and grain boundaries and apply the etch pit density calculation formulas to both the images for pit density calculation.