Enhanced Vision-Based Surface Value Roughness Detection for Industry 4.0 Quality Assurance
1. Aditya Agarwal, Thapar Institute of Engineering & Technology, Developer, India
2. Vineet Srivastava, Thapar Institute of Engineering & Technology, Associate Professor, India
3. Raunak Ujawane, DAIPL, Other, India
4. Balaji Mali, DAIPL, Other, India
Surface roughness is a critical factor affecting friction, wear, and corrosion resistance of machined components. Traditional contact-based roughness testers provide reliable measurements (e.g., Roughness Average Ra), but manual reading and recording of results can be slow, error-prone, and lack traceability. This paper presents an enhanced automated surface roughness detection system built upon a prior vision-based pipeline that used YOLOv5 object detection and EasyOCR for reading Ra values. The new system extends the capability to five surface texture parameters – Ra, Rz, Rsk, Rpc, and Rpm – delivering a comprehensive roughness profile in real time. A Python-based user interface (UI) integrates the detection pipeline with real-time statistical process control charts (Six Sigma), process capability indices (Cp, Cpk), and data logging for Industry 4.0 traceability. The implementation includes a refined image preprocessing stage (resolution-specific letterboxing, dynamic padding to capture negative value signs), improved bounding box scaling and text region extraction, metric-specific text cleaning rules, and validation of readings against expected limits. Multithreading and caching optimizations reduce processing latency, enabling near-instant measurement updates. Over 2,000 test samples, the system achieved ~98.5% accuracy in correctly identifying all five metrics per sample, outperforming earlier OCR-only approaches (e.g., Tesseract) in speed and robustness. The paper provides a detailed literature review of vision-based OCR in industrial metrology and surface roughness evaluation, discusses the limitations of previous methods, and explains the architectural choices that enable high accuracy and industrial reliability. The proposed solution demonstrates significant improvements in quality monitoring, historical data capture, and process automation, illustrating a practical step toward smart manufacturing and Quality 4.0.
OCR Text detection Surface Roughness YOLO v5
We have presented a comprehensive vision-based system for automated surface roughness detection that advances the state of the art in terms of scope (multiple parameters), accuracy, and integration with quality control processes. By extending a YOLOv5+OCR pipeline from a single metric (Ra) to five key roughness metrics (Ra, Rz, Rsk, Rpc, Rpm), and by reinforcing it with targeted image preprocessing and validation techniques, we achieved high recognition accuracy (~98.5%) on a large test set. The system effectively replaces manual data recording with a faster, more reliable alternative, thus closing the gap between measurement and data utilization.
Key contributions of this work include:
• A refined image processing strategy that used downscaling and upscaling to attain the highest possible performance levels.
• Improved OCR reliability for challenging seven-segment displays.
• The implementation of context-aware text parsing and limit checking, which adds a layer of intelligence to OCR results filtering in real time – preventing outlandish errors from propagating.
• A user-friendly UI that not only displays results but actively contributes to process control via Six Sigma charts and capability indices. This bridges automated inspection with human decision-making, facilitating immediate corrective actions when needed.
• Integration of performance optimizations and fail-safes (multithreading, caching, backups) that ensure the system can operate continuously in an industrial environment with minimal downtime or supervision.
From an industrial impact perspective, the system promotes greater traceability – every roughness measurement is automatically logged, time-stamped, and can be traced, which is invaluable for audits and quality investigations. It also enhances process transparency; trends that would otherwise be hidden in logbooks become visible and actionable. In a practical deployment, this means improved consistency in product quality and potentially reduced scrap rates, as issues are caught earlier. By enabling 100% inspection of parts for roughness (which might have been impractical manually), the solution aligns with modern quality philosophies of zero defect manufacturing and continuous monitoring.
This research also highlights that upgrading legacy quality control processes does not always require new hardware or sensors; sometimes, a smart camera and AI algorithms can retrofit existing tools to meet contemporary needs. The roughness tester in our study, like many devices in factories, was not originally designed for networked data output – yet, through computer vision, it has been made a part of the digital thread. This exemplifies a cost-effective path toward Industry 4.0 adoption, one that can be replicated for various instruments across the shop floor.
In conclusion, the enhanced automated surface roughness detection system demonstrates a successful fusion of computer vision and industrial metrology. It provides a template for similar systems where reading and logging of instrument outputs can be automated. Future expansions will look at broader device support and even tighter integration into control loops, but the core achievement is clear: we turned a once-manual, error-prone step into a seamless, intelligent operation that not only records data but actively contributes to quality assurance. This elevates the role of surface roughness measurement from a simple pass/fail check to a rich source of data for process optimization in the era of smart manufacturing.
1. [1] N. Karimova, U. Ochilov, O. Tuyboyov, S. Yakhshiev, and I. Egamberdiev, “Advanced surface roughness characterization using 3D scanning technologies and YOLOv4,” E3S Web of Conferences, vol. 525, Art. 05014, pp. 1–9, 2024.e3s-conferences.org [2] U. Kulkarni, S. Agasimani, P. P. Kulkarni, S. Kabadi, P. S. Aditya, and R. Ujawane, “Vision based Roughness Average Value Detection using YOLOv5 and EasyOCR,” in Proc. 8th IEEE Int. Conf. for Convergence in Technology (I2CT), Apr. 2023, pp. 979–984.ieeexplore.ieee.org [3] X. Lv, H. Yi, R. Fang, S. Ai, and E. Lu, “Visual detection of milling surface roughness based on improved YOLOv5,” Metrology and Measurement Systems, vol. 30, no. 2, pp. 317–331, 2023.journals.pan.pl [4] P. Imura, A. Wongkamhang, P. Chotikunnan, and A. Nirapai, “Development of OCR Technology Application System for Health Data Recording,” Int. J. Online and Biomedical Engineering, vol. 21, no. 4, pp. 4–17, 2025.researchgate.net [5] R. G. Lins, R. E. dos Santos, and R. Gaspar, “Vision-Based Measurement for Quality Control Inspection Integrated into a Die-Casting Process in Industry 4.0 Era,” IEEE Access, vol. 13, pp. 1–14, 2025.researchgate.netresearchgate.net [6] M. Bell, “Comparing Surface Roughness Parameters,” Gear Solutions Magazine, pp. 32–35, Dec. 2016.gearsolutions.comgearsolutions.com
Aditya Agarwal devised the novel approach, built a dataset, performed testing, and deployed the solutions under the guidance of Dr. Vineet Srivastava, and guidance of Mr. Raunak Ujawane and Mr. Balaji Mali
No funding needed
Python 3.8
No conflict of interest
We acknowledge the resources and tools provided by Thapar Institute of Engineering & Technology that helped us effectively train and optimise the model
No necessary data sharing