Automated microstructural segmentation and grain size measurement of Al + SiC nanocomposites using advanced image processing techniques on backscattered electron images - Harikrishna, Katika; Nithin, Abeyram; Davidson, M.J. (Materials characterization, 2025)
Grain size analysis is crucial for understanding material properties, yet traditional manual methods are often time-consuming and labor-intensive. This study presents a novel approach utilizing Python's OpenCV, SciPy, and NumPy libraries for automated microstructure segmentation and grain size analysis of Al + SiC nanocomposites fabricated through powder metallurgy (PM). When segmenting backscattered electron (BSE) images, challenges such as noise, local contrast variations, inaccurate thresholding, fused grains, edge grain removal, and grain boundary separation arise. To address these, advanced image processing techniques were employed: Gaussian filtering reduced noise, and Contrast Limited Adaptive Histogram Equalization (CLAHE) enhanced local contrast, making grain boundaries more distinct. Automated thresholding was performed using Otsu's method to differentiate grains and boundaries, while morphological operations (erosion and dilation) refined the separation of fused grains. Edge grains were excluded using cv2.floodFill(), and the distance transform function clearly delineated grains and boundaries. Connected components analysis was used to identify and label distinct regions in the image, aiding in the determination of the number of grains. The algorithm was tested on multiple BSE images for robustness, with results compared to manual grain size measurements according to ASTM standards. A Bland-Altman plot and Pearson correlation were used to validate the algorithm, showing that the error is within the limits of agreement and the correlation coefficient of 0.98 demonstrates high accuracy in predicting grain sizes, maintaining a reasonable level of precision. [Display omitted] •Addresses challenges in grain size measurement in BSE images, including fused grains, noise, and edge effects.•Erosion and dilation filters in OpenCV, “cv2.erode()” and “cv2.dilate()”, connect fragmented boundaries for precise identification.•Image processing functions segment binary images into grains, boundaries, and edge grains, aiding precise microstructure analysis.•Computer vision-based methods show promising accuracy for grain counting, ASTM grain size measurement, and quantifying grain size, compared to manual methods.