Defect Detection and Grain Size Evaluation based on Metallographic Images of Long Shafts
DOI:
https://doi.org/10.6919/ICJE.202608_12(8).0015Keywords:
Long Shaft Inspection; YOLOv8; Grain Size Grading; Watershed Algorithm.Abstract
Aiming at the difficulties in identifying tiny surface defects and automatic grain size evaluation of long shaft parts, this paper proposes an automatic detection and grading method based on robot visual guidance and adaptive image segmentation. The YOLOv8 algorithm is adopted to identify surface defects on long shafts, and the defect coordinates are mapped to the base coordinate system through the hand-eye calibration matrix with a positioning error within 0.9 mm, which guides the end effector to complete fixed-point grinding and etching. This paper focuses on developing an OpenCV-based grain size calculation algorithm: CLAHE contrast enhancement, adaptive Gaussian threshold segmentation and watershed algorithm are applied to metallographic images after etching to accurately separate adhered grains. Pseudo-boundary interferences are eliminated via contour morphological filtering, and the average grain area method is finally used to calculate and grade grain sizes. Experiments verify that the proposed system realizes integrated operations from defect localization to metallographic grading for long shafts, with a repeatability error of grain size grading less than 0.5 grades, satisfying the high-precision detection requirements of industrial sites.
Downloads
References
[1] Liu, W. W., Qiu, J. H., Hu, G. D., et al. (2024). A method for detecting surface damage on decommissioned shaft components based on an improved YOLOv5. Journal of Northeastern University (Natural Science Edition), 45(07), 1002–1010.
[2] Liu, Z. H., Zhang, J. X., Xue, F., et al. (2025). A method for precise surface defect detection in pipe fittings based on an improved YOLO-v8. Journal of Zhejiang University. Engineering Edition, 59(7), 1514–1522, 1546.
[3] Sun, Y., Cao, J. J., Tang, J. Y., et al. (2024). An improved YOLOv8-based algorithm for crank shaft surface defect detection. Combined Machine Tools and Automated Machining Technology, (10), 77–81.
[4] Hu, H. J., Guo, R., & Zhang, Y. (2023). A deep learning-based method for grading the grain size of steel metallographic images. Optoelectronics and Lasers, 34(10), 1075.
[5] Song, Y., Su, R. C., & Wang, B. H. (2023). A method for extracting grain boundaries for automatic machine vision inspection of metal grain size. Metallurgical Automation, 47(S1), 320–326.
[6] Bao, J. Y. (2020). A study on automatic grain boundary segmentation and grading of metallographic images based on fully convolutional neural networks [Master’s thesis]. Jiangsu University. https://doi.org/10.27170/d.cnki.gjsuu.2020.001060
[7] Zhu, J. D. (2018). A study on algorithms for grain boundary extraction from metallographic images of steel and the design of intelligent grading software [Master’s thesis]. Jiangsu University.
[8] Zhang, Q. (2018). A study on an automatic metallographic structure grading method based on ensemble learning [Master’s thesis]. Jiangsu University.
[9] Banerjee, S., Chakraborti, P. C., & Saha, S. K. (2019). An automated methodology for grain segmentation and grain size measurement from optical micrographs. Measurement, 140, 142–150.
[10] Li X, Cui L, Li J, Chen Y., et al. (2022). Automation of intercept method for grain size measurement: A topological skeleton approach. Materials & Design, 224: 111358.
[11] Xu, X., Yu, Z., Chen, W. Y., et al. (2024). Automated analysis of grain morphology in TEM images using convolutional neural network with CHAC algorithm. Journal of Nuclear Materials, 588, 154813.
[12] Gao, Z., & Zhou, Y. (2025). Automated grain analysis via data augmentation and grain boundary detection. Micron, 103961.
Downloads
Published
Issue
Section
License
Copyright (c) 2026 International Core Journal of Engineering

This work is licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.




