Automated Defect Detection using Stereo Vision Algorithm for Metal Surfaces
Authors
Fakulti Teknologi dan Kejuruteraan Elekronik dan Komputer, Universiti Teknikal Malaysia Melaka, Durian Tunggal, 76100 Melaka (Malaysia)
Centre for Telecommunication Research and Innovation (CETRI), Universiti Teknikal Malaysia Melaka, Durian Tunggal, 76100 Melaka (Malaysia)
Centre for Telecommunication Research and Innovation (CETRI), Universiti Teknikal Malaysia Melaka, Durian Tunggal, 76100 Melaka (Malaysia)
Centre for Telecommunication Research and Innovation (CETRI), Universiti Teknikal Malaysia Melaka, Durian Tunggal, 76100 Melaka (Malaysia)
Faculty of Electrical and Electronic Engineering Technology. Universiti Malaysia Pahang Al-Sultan Abdullah, Lebuh Persiaran Tun Khalil Yaakob, 26300, Kuantan, Pahang (Malaysia)
IT Support Department, Amcorp Services Sdn Bhd, Petaling Jaya, 46050 Selangor (Malaysia)
Article Information
DOI: 10.47772/IJRISS.2026.100700146
Subject Category: Computer Science
Volume/Issue: 10/7 | Page No: 2009-2019
Publication Timeline
Submitted: 2026-07-01
Accepted: 2026-07-07
Published: 2026-07-27
Abstract
Automated surface defect inspection on metallic components presents significant challenges due to the specular reflectivity and low surface texture of polished metal, which render conventional two-dimensional (2D) vision systems incapable of detecting geometrically invisible defects. This paper presents a stereo vision and image processing framework that integrates a custom GPU-accelerated classical stereo matching pipeline with a YOLOv8 deep learning detection model to perform simultaneous defect classification and physical depth measurement on metal surfaces in real time. The stereo pipeline is implemented entirely in PyTorch without pre-built stereo functions, comprising a fused matching cost function combining census transform, absolute difference, and gradient cost, followed by guided filter cost aggregation, Semi-Global Matching in four scan directions, subpixel-accurate Winner-Takes-All disparity selection, and a multi-stage refinement process. A YOLOv8 nano model is trained on the NEU Surface Defect Database (NEU-DET), covering six steel defect classes including crazing, inclusion, patches, pitted surface, rolled-in scale, and scratches. The integrated system maps each detected bounding box onto the computed disparity map and applies the depth formula Z = (f × B) / d to compute physical depth in millimetres per defect. The stereo pipeline achieves an average Bad-1.0 error of 7.57% across all 15 Middlebury MiddEval3 training scenes at quarter resolution. The YOLOv8 detector achieves 70.0% mean Average Precision (mAP) at 0.50 IoU threshold on the NEU-DET validation set. The integrated live system operates at 28 to 30 frames per second on a ZED stereo camera using an NVIDIA GeForce RTX 3070 GPU, providing simultaneous defect classification and depth measurement output. The proposed low-cost framework addresses the geometric measurement gap of existing 2D inspection systems, offering a practical and affordable solution for surface defect inspection in small and medium manufacturing environments.
Keywords
Stereo vision, surface detection, semi-global matching; depth estimation
Downloads
References
1. Kumar, S. and Patel, V., "Manual vs. automated surface inspection: A performance analysis in manufacturing," International Journal of Advanced Manufacturing Technology, vol. 118, pp. 1425-1437, 2022. [Google Scholar] [Crossref]
2. Qiu, T. and Luo, Y., "A review of computer vision techniques for industrial defect detection," Sensors, vol. 23, no. 4, pp. 1823-1848, 2023. [Google Scholar] [Crossref]
3. Li, Z. and Wang, Q., "Geometric invisibility in metallic surface inspection: Challenges for 2D vision systems," IEEE Transactions on Industrial Electronics, vol. 70, no. 3, pp. 3120-3130, 2023. [Google Scholar] [Crossref]
4. Zhao, J., Sun, Q. and Li, X., "Depth-based surface anomaly detection for metallic components," Measurement, vol. 214, p. 112785, 2023. [Google Scholar] [Crossref]
5. Redmon, J., Divvala, S., Girshick, R. and Farhadi, A., "You only look once: Unified, real-time object detection," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), 2016, pp. 779-788. [Google Scholar] [Crossref]
6. Alam, M. A., Akter, M. and Islam, M. T., "Deep learning for surface defect detection on metallic surfaces using YOLOv8," IEEE Access, vol. 11, pp. 88421-88432, 2023. [Google Scholar] [Crossref]
7. Hartley, R. and Zisserman, A., Multiple View Geometry in Computer Vision, 2nd ed. Cambridge: Cambridge University Press, 2003. [Google Scholar] [Crossref]
8. Hirschmuller, H., "Stereo processing by semiglobal matching and mutual information," IEEE Transactions on Pattern Analysis and Machine Intelligence, vol. 30, no. 2, pp. 328-341, 2008. [Google Scholar] [Crossref]
9. Scharstein, D. and Szeliski, R., "A taxonomy and evaluation of dense two-frame stereo correspondence algorithms," International Journal of Computer Vision, vol. 47, pp. 7-42, 2002. [Google Scholar] [Crossref]
10. Chen, Y., Li, P. and Yang, F., "Fusion of depth and visual features for metallic surface analysis," Applied Optics, vol. 62, no. 18, pp. 4823-4832, 2023. [Google Scholar] [Crossref]
11. Zhou, X., Zhang, H. and Liu, C., "Integration of 3D surface data with YOLOv8 for industrial defect detection," Expert Systems with Applications, vol. 238, p. 121892, 2024. [Google Scholar] [Crossref]
12. Azhar, M. A., Saad, N. M. and Fattah, S. A., "Stereo vision for surface defect recognition through disparity mapping," Engineering Applications of Artificial Intelligence, vol. 127, p. 107215, 2024. [Google Scholar] [Crossref]
13. Song, K. and Yan, Y., "A noise robust method based on completed local binary patterns for hot-rolled steel strip surface defects," Applied Surface Science, vol. 285, pp. 858-864, 2013. [Google Scholar] [Crossref]
14. Zabih, R. and Woodfill, J., "Non-parametric local transforms for computing visual correspondence," in Proc. European Conf. Computer Vision (ECCV), 1994, pp. 151-158. [Google Scholar] [Crossref]
15. Chang, J. R. and Chen, Y. S., "Pyramid stereo matching network," in Proc. IEEE Conf. Computer Vision and Pattern Recognition (CVPR), 2018, pp. 5410-5418. [Google Scholar] [Crossref]
16. Lipson, L., Teed, Z. and Deng, J., "RAFT-Stereo: Multilevel recurrent field transforms for stereo matching," in Proc. Int. Conf. 3D Vision (3DV), 2021, pp. 218-227. [Google Scholar] [Crossref]
17. Wang, H., Liu, Y. and Chen, S., "Evaluation of stereo matching optimization methods for disparity selection," Optics and Lasers in Engineering, vol. 148, p. 106783, 2021. [Google Scholar] [Crossref]
18. Jocher, G., Chaurasia, A. and Qiu, J., "Ultralytics YOLOv8," 2023. [Online]. Available: https://github.com/ultralytics/ultralytics [Google Scholar] [Crossref]
19. He, J., Zhou, X. and Zhang, L., "Enhanced YOLOv8 with attention mechanism for industrial surface inspection," IEEE Sensors Journal, vol. 24, no. 6, pp. 8821-8830, 2024. [Google Scholar] [Crossref]
20. Wang, Y., Chen, L. and Zhou, R., "YOLO-based detection framework for steel surface defects with improved feature extraction," Computers in Industry, vol. 156, p. 104082, 2024. [Google Scholar] [Crossref]
21. Yang, F., Liu, Z. and Huang, T., "A review of two-dimensional and three-dimensional methods for metal surface defect detection," Engineering Applications of Artificial Intelligence, vol. 133, p. 108421, 2024. [Google Scholar] [Crossref]
22. Du, J., Tao, C., Cao, X. et al. 3D vision-based anomaly detection in manufacturing: A survey. Front. Eng. Manag. 12, 343–360 (2025). https://doi.org/10.1007/s42524-025-4189-9 [Google Scholar] [Crossref]
23. Hu, Q., Xu, H., Wei, X. et al. Damage location and area measurement of aviation functional surface via neural radiance field and improved Yolov8 network. Artif Intell Rev 58, 61 (2025). https://doi.org/10.1007/s10462-024-11073-x [Google Scholar] [Crossref]
24. C. You and H. Kong, "Improved Steel Surface Defect Detection Algorithm Based on YOLOv8," in IEEE Access, vol. 12, pp. 99570-99577, 2024, doi: 10.1109/ACCESS.2024.3429555. [Google Scholar] [Crossref]
25. Liu, X., Wu, L., Guo, X., et al. The International Journal of Advanced Manufacturing Technology (2023) 127:971–985 https://doi.org/10.1007/s00170-023-11507-w [Google Scholar] [Crossref]
26. Wang, C., Chen, J., & Zhang, H. (2026). DCRDF-Net: A Dual-Channel Reverse-Distillation Fusion Network for 3D Industrial Anomaly Detection. Sensors, 26(2), 412. https://doi.org/10.3390/s26020412 [Google Scholar] [Crossref]
27. Wang, L., Zhang, G., Wang, W., et al. A defect detection method for industrial aluminum sheet surface based on improved YOLOv8 algorithm. https://doi.org/10.3389/fphy.2024.1419998 [Google Scholar] [Crossref]
28. Geiger, A., Roser, M. and Urtasun, R., "Efficient large-scale stereo matching," in Proc. Asian Conf. Computer Vision (ACCV), 2010, pp. 25-38. [Google Scholar] [Crossref]
Metrics
Views & Downloads
Similar Articles
- What the Desert Fathers Teach Data Scientists: Ancient Ascetic Principles for Ethical Machine-Learning Practice
- Comparative Analysis of Some Machine Learning Algorithms for the Classification of Ransomware
- Comparative Performance Analysis of Some Priority Queue Variants in Dijkstra’s Algorithm
- Transfer Learning in Detecting E-Assessment Malpractice from a Proctored Video Recordings.
- Dual-Modal Detection of Parkinson’s Disease: A Clinical Framework and Deep Learning Approach Using NeuroParkNet