SCIENCE AND SCIENTIFIC RESEARCH IN THE MODERN WORLD Vol. 3 No. 4 (2025) 4 AUTOMATED QUANTIFICATION OF GRAIN SIZE AND PHASE RATIO IN DUPLEX STEEL MICROSTRUCTURES USING OPENCV Samandarov Ilxomjon Rasulovich Texnika fanlari nomzodi (PhD) Olmaliq davlat texnika universiteti Metallurgiya va kimyoviy texnologiyalar fakulteti Matematika va tabiiy fanlar kafedrasi
[email protected] Karimov Sardor Yashinovich Texnika fanlari nomzodi (PhD) Olmaliq davlat texnika universiteti Metallurgiya va kimyoviy texnologiyalar fakulteti Matematika va tabiiy fanlar kafedrasi
[email protected] The microstructural evaluation of duplex stainless steels plays a crucial role in determining their strength, toughness, and corrosion resistance. Conventional manual measurement of grain size, ferrite–austenite phase balance, and heataffected zone (HAZ) width is labor-intensive and strongly dependent on operator perception, which often leads to inconsistency in results. In this work, an automated computer‐vision‐based methodology is proposed for fast and reproducible quantitative metallographic analysis using the OpenCV library. The developed workflow includes image normalization, grayscale conversion, histogram equalization, adaptive thresholding, and morphological refinement to isolate ferrite and austenite regions. Grain boundary extraction is performed using Sobel and Canny operators, followed by watershed segmentation to accurately separate adjacent grains. Pixel measurements are calibrated to micrometers based on the scale bar present in the microscopic images, enabling precise dimensional quantification. The algorithm was tested on etched duplex steel micrographs acquired under optical microscopy. The automated results show less than 5% deviation from
SCIENCE AND SCIENTIFIC RESEARCH IN THE MODERN WORLD Vol. 3 No. 4 (2025) 5 manual ASTM‐based measurements of grain size and phase ratio, demonstrating strong reliability. In addition, the proposed pipeline significantly reduces analysis time and operator subjectivity, making it suitable for routine metallographic examination in both research and industrial laboratories. This study shows that open‐source computer vision techniques provide an effective alternative to traditional metallographic measurements. Future improvements may include the integration of machine-learning-based phase classifiers to handle complex multi-phase microstructures. FOYDALANILGAN ADABIYOTLAR 1. ASTM E112-13. Standard Test Methods for Determining Average Grain Size. ASTM International, 2013. 2. West, A., Wessman, S. “Quantification of Ferrite–Austenite Balance in Duplex Stainless Steels.” Materials Characterization, 2022. 3. Samandarov, I.R., Karimov, S.Y. Автоматизированный анализ толщины слоя и фазового состава микроструктуры упрочнённого чугуна, полученного методом Lost Foam Casting. Universum: технические науки 9(138) (2025). https://7universum.com/ru/tech/archive/item/20736