Printing Defect Detection Based on Scale-Adaptive Template Matching and Image Alignment
Abstract
:1. Introduction
- (1)
- A scale-adaptive deep convolutional feature extraction method is proposed for template matching. Moreover, the feature extraction is implemented on a low-resolution version of the template and the target image. Therefore, the method effectively decreases the matching time.
- (2)
- A feature map cross-correlation (FMCC) matching metric is proposed to measure the similarity between the feature map of the template and the target image. The introduction of a matching metric can greatly improve the accuracy of the similarity measurement.
- (3)
- Furthermore, an image alignment and difference detection module is introduced to adjust the defect position and greatly improve the effect of defect detection. Therefore, the proposed method can obtain state-of-the-art detection performance with strong real-time performance and anti-interference capabilities.
2. Related Work
3. Methods
3.1. Template Matching Module
3.1.1. Scale-Adaptive Deep Convolutional Feature Extraction Method
3.1.2. FMCC-Based Similarity Measure Method
3.2. Image Alignment Module
4. Experimental Results and Analysis
4.1. Evaluation Metrics
4.2. Experiment Results of Scale-Adaptive Template Matching
4.3. Experiment Results of Printed Matter Defect Detection
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Ma, B.; Zhu, W.; Wang, Y.; Wu, H.; Yang, Y.; Fan, H.; Xu, H. The defect detection of personalized print based on template matching. In Proceedings of the IEEE International Conference on Unmanned Systems, Beijing, China, 27–29 October 2017; pp. 266–271. [Google Scholar] [CrossRef]
- Ming, W.; Shen, F.; Li, X.; Zhang, Z.; Du, J.; Chen, Z.; Cao, Y. A comprehensive review of defect detection in 3C glass components. Measurement 2015, 158, 107722. [Google Scholar] [CrossRef]
- Wang, Y.; Xu, S.; Zhu, Z.; Sun, Y.; Zhang, Z. Real-time Defect Detection Method for Printed Images Based on Grayscale and Gradient Differences. J. Eng. Sci. Technol. Rev. 2018, 11, 180–188. [Google Scholar] [CrossRef]
- Gao, F.; Li, Z.; Xiao, G.; Yuan, X.; Han, Z. An online inspection system of surface defects for copper strip based on computer vision. In Proceedings of the 5th International Congress on Image and Signal Processing, Chongqing, China, 16–18 October 2012; pp. 1200–1204. [Google Scholar] [CrossRef]
- Xing, Z.; Zhang, Z.; Yao, X.; Qin, Y.; Jia, L. Rail wheel tread defect detection using improved YOLOv3. Measurement 2022, 203, 111959. [Google Scholar] [CrossRef]
- Lu, Q.; Lin, J.; Luo, L.; Zhang, Y.; Zhu, W. A supervised approach for automated surface defect detection in ceramic tile quality control. Adv. Eng. Inform. 2022, 53, 101692. [Google Scholar] [CrossRef]
- Zhang, T.; Zhang, C.; Wang, Y.; Zou, X.; Hu, T. A vision-based fusion method for defect detection of milling cutter spiral cutting edge. Measurement 2021, 177, 109248. [Google Scholar] [CrossRef]
- Zhang, Z.; Yang, X.; Jia, X. Scale-Adaptive NN-Based Similarity for Robust Template Matching. IEEE Trans. Instrum. Meas. 2021, 70, 1–9. [Google Scholar] [CrossRef]
- Lei, X.; Ohuchi, T.; Kitamura, M.; Li, X.; Li, Q. An effective method for laboratory acoustic emission detection and location using template matching. J. Rock Mech. Geotech. Eng. 2022, 14, 1642–1651. [Google Scholar] [CrossRef]
- Yan, B.; Xiao, L.; Zhang, H.; Xu, D.; Ruan, L.; Wang, Z.; Zhang, Y. An adaptive template matching-based single object tracking algorithm with parallel acceleration. J. Vis. Commun. Image Represent. 2019, 64, 102603. [Google Scholar] [CrossRef]
- Kong, Q.; Wu, Z.; Song, Y. Online detection of external thread surface defects based on an improved template matching algorithm. Measurement 2022, 195, 111087. [Google Scholar] [CrossRef]
- Ouyang, W.; Tombari, F.; Mattoccia, S.; Di Stefano, L.; Cham, W.K. Performance Evaluation of Full Search Equivalent Pattern Matching Algorithms. IEEE Trans. Pattern Anal. Mach. Intell. 2012, 34, 127–143. [Google Scholar] [CrossRef]
- Hisham, M.B.; Yaakob, S.N.; Raof, R.A.A.; Nazren, A.B.A.; Wafi, N.M. Template Matching using Sum of Squared Difference and Normalized Cross Correlation. In Proceedings of the IEEE Student Conference on Research and Development, Kuala Lumpur, Malaysia, 13–14 December 2015; pp. 100–104. [Google Scholar] [CrossRef]
- Wang, X.; Wang, X.; Han, L. A Novel Parallel Architecture for Template Matching based on Zero-Mean Normalized Cross-Correlation. IEEE Access 2019, 7, 186626–186636. [Google Scholar] [CrossRef]
- Wong, S.; Vassiliadis, S.; Cotofana, S. A sum of absolute differences implementation in FPGA hardware. In Proceedings of the EUROMICRO, Dortmund, Germany, 4–6 September 2002; pp. 183–188. [Google Scholar] [CrossRef]
- Zhang, X.; Zhai, D.; Li, T.; Zhou, Y.; Li, Y. Image inpainting based on deep learning: A review. Inf. Fusion 2023, 90, 74–94. [Google Scholar] [CrossRef]
- Saada, M.; Kouppas, C.; Li, B.; Meng, Q. A multi-object tracker using dynamic Bayesian networks and a residual neural network based similarity estimator. Comput. Vis. Image Underst. 2022, 225, 103569. [Google Scholar] [CrossRef]
- Li, H.; Fan, J.; Hua, Q.; Li, X.; Wen, Z.; Yang, M. Biomedical sensor image segmentation algorithm based on improved fully convolutional network. Measurement 2022, 197, 111307. [Google Scholar] [CrossRef]
- He, A.; Luo, C.; Tian, X.; Zeng, W. A twofold siamese network for real-time object tracking. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Beijing, China, 18–23 June 2018; pp. 4834–4843. [Google Scholar] [CrossRef]
- Oron, S.; Dekel, T.; Xue, T.; Freeman, W.T.; Avidan, S. Best-Buddies Similarity—Robust Template Matching Using Mutual Nearest Neighbors. IEEE Trans. Pattern Anal. Mach. Intell. 2018, 40, 1799–1813. [Google Scholar] [CrossRef]
- Talmi, I.; Mechrez, R.; Zelnik-Manor, L. Template matching with deformable diversity similarity. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; pp. 175–183. [Google Scholar] [CrossRef]
- Fang, F.; Xu, Q.; Cheng, Y.; Sun, Y.; Lim, J.-H. Image Understanding With Reinforcement Learning: Auto-Tuning Image Attributes and Model Parameters for Object Detection and Segmentation. IEEE Trans. Circuits Syst. Video Technol. 2022, 32, 6671–6685. [Google Scholar] [CrossRef]
- Luo, J.; Yang, Z.; Li, S.; Wu, Y. FPCB Surface Defect Detection: A Decoupled Two-Stage Object Detection Framework. IEEE Trans. Instrum. Meas. 2021, 70, 1–11. [Google Scholar] [CrossRef]
- Golnabi, H.; Asadpour, A. Design and application of industrial machine vision systems. Robot. Comput.-Integr. Manuf. 2007, 23, 630–637. [Google Scholar] [CrossRef]
- Luo, J.; Zhang, Z. Automatic colour printing inspection by image processing. J. Mater. Process. Technol. 2017, 139, 373–378. [Google Scholar] [CrossRef]
- Salahdine, F.; Ghazi, H.E.; Kaabouch, N.; Fihri, W.F. Matched filter detection with dynamic threshold for cognitive radio networks. In Proceedings of the International Conference on Wireless Networks and Mobile Communications (WINCOM), Marrakech, Morocco, 20–23 October 2015; pp. 1–6. [Google Scholar] [CrossRef]
- Tian, C.; Zheng, M.; Zuo, W.; Zhang, B.; Zhang, Y.; Zhang, D. Multi-stage image denoising with the wavelet transform. Pattern Recognit. 2023, 134, 109050. [Google Scholar] [CrossRef]
- Simakov, D.; Caspi, Y.; Shechtman, E.; Irani, M. summarizing visual data using bidirectional similarity. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Anchorage, AK, USA, 24–26 June 2008; pp. 1–8. [Google Scholar] [CrossRef]
- Cheng, J.; Wu, Y.; AbdAlmageed, W.; Natarajan, P. QATM: Quality-aware template matching for deep learning. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 11553–11562. [Google Scholar] [CrossRef]
- Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar] [CrossRef]
- Wang, Z.; Bovik, A.C.; Sheikh, H.R.; Simoncelli, E.P. Image quality assessment: From error visibility to structural similarity. IEEE Trans. Image Process. 2004, 13, 600–612. [Google Scholar] [CrossRef] [PubMed]
- Kaur, R.; Singh, S. A comprehensive review of object detection with deep learning. Digit. Signal Process. 2022, 132, 103812. [Google Scholar] [CrossRef]
- Wu, Y.; Lim, J.; Yang, M. Online object tracking: A benchmark. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Portland, OR, USA, 23–28 June 2013; pp. 2411–2418. [Google Scholar] [CrossRef]
Positive | Negative | |
---|---|---|
Positive | TP | FP |
Negative | FN | TN |
Image | FMCC | SZ-FMCC | SZ-FMCC+IA |
---|---|---|---|
Figure 7a | 0.910 | 0.839 | 0.845 |
Figure 7b | 0.791 | 0.663 | 0.753 |
Figure 7c | 0.534 | 0.523 | 0.534 |
Figure 7d | 0.887 | 0.754 | 0.926 |
Figure 7e | 0.569 | 0.563 | 0.586 |
Figure 7f | 0.807 | 0.791 | 0.907 |
Accuracy (%) | Precision (%) | Recall (%) | F1 (%) | AUC (%) |
---|---|---|---|---|
93.62 | 88.69 | 100.00 | 94.01 | 94.00 |
Sample Types | TDR (%) | FDR (%) |
---|---|---|
ZD | 96.07 | 0.98 |
ZD_I | 78.43 | 5.39 |
D | 94.12 | 1.47 |
D_I | 92.16 | 1.96 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Liu, X.; Li, Y.; Guo, Y.; Zhou, L. Printing Defect Detection Based on Scale-Adaptive Template Matching and Image Alignment. Sensors 2023, 23, 4414. https://doi.org/10.3390/s23094414
Liu X, Li Y, Guo Y, Zhou L. Printing Defect Detection Based on Scale-Adaptive Template Matching and Image Alignment. Sensors. 2023; 23(9):4414. https://doi.org/10.3390/s23094414
Chicago/Turabian StyleLiu, Xinyu, Yao Li, Yiyu Guo, and Luoyu Zhou. 2023. "Printing Defect Detection Based on Scale-Adaptive Template Matching and Image Alignment" Sensors 23, no. 9: 4414. https://doi.org/10.3390/s23094414
APA StyleLiu, X., Li, Y., Guo, Y., & Zhou, L. (2023). Printing Defect Detection Based on Scale-Adaptive Template Matching and Image Alignment. Sensors, 23(9), 4414. https://doi.org/10.3390/s23094414