An Improved Product Defect Detection Method Combining Centroid Distance and Textural Information
Abstract
:1. Introduction
2. Contour Matching Algorithm Combining Centroid Distance and Textural Information
2.1. Image Preprocessing
2.2. Closed Contour Extraction Based on Improved Fuzzy Clustering
2.3. Rough Matching Based on Contour Center Distance Feature Description Operator
2.4. Fine Matching Based on Improved Local Binary Pattern
3. Experimental Design and Result Analysis
3.1. Closed Contour Extraction Experiment
3.2. Matching Experiment of Anti-Rotation Transformation
3.3. Matching Experiment against Gray Difference
3.4. Defect Detection Experiment
- (1)
- The mean value of Accuracy for the character model, digital model, and ratchet workpiece under different light intensity conditions was 90.18%, 92.30% and 94.08%, respectively. The mean value of Precision for the character model, digital model, and ratchet workpiece under different light intensity conditions was 91.28%, 91.10%, and 93.04%, respectively. The mean value of Recall for the character model, digital model, and ratchet workpiece under different light intensity conditions was 91.01%, 93.65%, and 94.54%, respectively. The average detection accuracy can be kept above 90%, which proves the validity the proposed method.
- (2)
- When the light intensity E = 75 lux/100 lux/125 lux, the detection accuracy is higher than that under bright light (E = 150 lux) and dark (E = 50 lux) conditions. This is because when the illumination intensity is too dark or too bright, the contour features obtained by the same image preprocessing and image segmentation methods cannot be completely consistent, which will lead to the deviation of the rough matching and static matching results of the contour operator. However, because the proposed method uses a matching method based on contour features, a change in light intensity has limited influence on the matching accuracy, so it can still achieve a high accuracy.
- (3)
- Here, a statistical analysis is performed on the hundred-times matching accuracy of the character model, digital model, and ratchet workpiece. The standard deviations of Accuracy, Precision, and Recall were 0.0218, 0.0183, and 0.0230, and the confidence intervals were [87.72%, 96.25%], [88.09%, 95.26%], and [88.40%, 97.42%], respectively. The confidence interval shows the extent to which the true value of the parameter falls within the range of the measured result, and can represent the reliability of the measured value of the measured parameter. Here, the results with standard deviations of 0.0218, 0.0183, and 0.0230 have a 95% probability of falling within the interval of [87.72%, 96.25%], [88.09%, 95.26%], and [88.40%, 97.42%], respectively. Obviously, the Accuracy, Precision, and Recall averages are all within the corresponding confidence intervals, which indicates that the defect detection experiment results are reliable.
- (4)
- When there are multiple external interference sources, if the distance between the interference source and the product to be tested is great, the good product detection results are more accurate. However, if the distance between the interference source and the product to be tested is too close, the edge outline of the interference will appear in the search box, which will cause good products to be misjudged as defective, as shown in Figure 6. For the defect detection of incomplete edges or the contour occlusion type, this method can detect detection accurately because of the obvious difference, and the average Recall remains at 92%.
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Ren, Z.H.; Fang, F.Z.; Yan, N.; Wu, Y. State of the Art in Defect Detection Based on Machine Vision. Int. J. Precis. Eng. Manuf.-Green Technol. 2022, 9, 661–691. [Google Scholar] [CrossRef]
- Rao, X.S.; Zhang, F.H.; Lu, Y.J.; Luo, X.C.; Chen, F.M. Surface and subsurface damage of reaction-bonded silicon carbide induced by electrical discharge diamond grinding. Int. J. Mach. Tool. Manu 2020, 154, 103564. [Google Scholar] [CrossRef]
- Ravimal, D.; Kim, H.; Koh, D.; Hong, J.H.; Lee, S.K. Image-Based Inspection Technique of a Machined Metal Surface for an Unmanned Lapping Process. Int. J. Precis. Eng. Manuf.-Green Technol. 2020, 7, 547–557. [Google Scholar] [CrossRef]
- Ali, M.; Lun, A.K. A cascading fuzzy logic with image processing algorithm-based defect detection for automatic visual inspection of industrial cylindrical object’s surface. Int. J. Adv. Manuf. Tech. 2019, 102, 81–94. [Google Scholar] [CrossRef]
- Badmos, O.; Kopp, A.; Bernthaler, T.; Schneider, G. Image-based defect detection in lithium-ion battery electrode using convolutional neural networks. J. Intell. Manuf. 2020, 31, 885–897. [Google Scholar] [CrossRef]
- Jia, L.M.; Wang, Y. Research on Industrial Production Defect Detection Method Based on Machine Vision Technology in Industrial Internet of Things. Trait. Signal 2022, 39, 2061–2068. [Google Scholar] [CrossRef]
- Li, M.; Wan, S.H.; Deng, Z.M.; Wang, Y.J. Fabric defect detection based on saliency histogram features. Comput. Intell. 2019, 35, 517–534. [Google Scholar] [CrossRef]
- Pushpalatha, K.; Gowda, A.; Ramesh, D. Identification of Similar Looking Bulk Split Grams using GLCM and CGLCM Texture Features. Int. J. Comput. Appl. 2017, 167, 30–36. [Google Scholar]
- Zhang, L.; Jing, J.; Zhang, H. Fabric Defect Classiffcation Based on LBP and GLCM. J. Fiber Bioeng. Inform. 2015, 8, 81–89. [Google Scholar] [CrossRef]
- Schwind, P.; Suri, S.; Reinartz, P.; Siebert, A. Applicability of the SIFT operator to geometric SAR image registration. Int. J. Remote Sens. 2010, 31, 1959–1980. [Google Scholar] [CrossRef]
- Hsu, W.Y.; Lee, Y.C. Rat Brain Registration Using Improved Speeded Up Robust Features. J. Med. Biol. Eng. 2017, 37, 45–52. [Google Scholar] [CrossRef]
- Olvera, R.D.P.; Zeron, E.M.; Ortega, J.C.P.; Arreguin, J.M.R.; Hurtado, E.G. A Feature Extraction Using SIFT with a Preprocessing by Adding CLAHE Algorithm to Enhance Image Histograms. In Proceedings of the 2014 International Conference on Mechatronics, Electronics and Automotive Engineering, Cuernavaca, Mexico, 18–21 November 2014. [Google Scholar]
- Dunderdale, C.; Brettenny, W.; Clohessy, C.; Dyk, E.E.V. Photovoltaic defect classification through thermal infrared imaging using a machine learning approach. Prog. Photovolt. Res. Appl. 2020, 28, 177–188. [Google Scholar] [CrossRef]
- Wang, G.Q.; Chen, M.S.; Lin, Y.; Tan, X.H.; Zhang, C.Z.; Yao, W.X.; Gao, B.H.; Li, K.; Li, Z.H.; Zeng, W.D. Efficient multi-branch dynamic fusion network for super-resolution of industrial component image. Displays 2024, 82, 102633. [Google Scholar] [CrossRef]
- Du, W.Z.; Shen, H.Y.; Fu, J.H.; Zhang, G.; Shi, X.K.; He, Q. Automated detection of defects with low semantic information in X-ray images based on deep learning. J. Intell. Manuf. 2021, 32, 141–156. [Google Scholar] [CrossRef]
- Zhang, Y.X.; You, D.Y.; Gao, X.D.; Wang, C.Y.; Li, Y.J.; Gao, P.P. Real-time monitoring of high-power disk laser welding statuses based on deep learning framework. J. Intell. Manuf. 2020, 31, 799–814. [Google Scholar] [CrossRef]
- Nguyen, T.P.; Choi, S.; Park, S.J.; Park, S.H.; Yoon, J. Inspecting Method for Defective Casting Products with Convolutional Neural Network (CNN). Int. J. Precis. Eng. Manuf.-Green Technol. 2021, 8, 583–594. [Google Scholar] [CrossRef]
- Kim, M.; Lee, M.; An, M.; Lee, H. Effective automatic defect classification process based on CNN with stacking ensemble model for TFT-LCD panel. J. Intell. Manuf. 2020, 31, 1165–1174. [Google Scholar] [CrossRef]
- Liu, R.Q.; Huang, M.; Gao, Z.M.; Cao, Z.Y.; Cao, P. MSC-DNet: An efficient detector with multi-scale context for defect detection on strip steel surface. Measurement 2023, 209, 112467. [Google Scholar] [CrossRef]
- Adibhatla, V.A.; Chih, H.C.; Hsu, C.C.; Cheng, J.; Abbod, M.F.; Shieh, J.S. Defect Detection in Printed Circuit Boards Using You-Only-Look-Once Convolutional Neural Networks. Electronics 2020, 9, 1547. [Google Scholar] [CrossRef]
- Lv, X.M.; Duan, F.J.; Jiang, J.J.; Fu, X.; Gan, L. Deep Active Learning for Surface Defect Detection. Sensors 2020, 20, 1650. [Google Scholar] [CrossRef]
- Jing, J.F.; Zhuo, D.; Zhang, H.H.; Liang, Y.; Zheng, M. Fabric defect detection using the improved YOLOv3 model. J. Eng. Fiber Fabr. 2020, 15, 1558925020908268. [Google Scholar] [CrossRef]
- Deng, H.; Cheng, J.; Liu, T.; Cheng, B.; Sun, Z. Research on Iron Surface Crack Detection Algorithm Based on Improved YOLOv4 Network. J. Phys. Conf. Ser. 2020, 1631, 012081. [Google Scholar] [CrossRef]
- Wang, G.Q.; Zhang, C.Z.; Chen, M.S.; Lin, Y.C.; Tan, X.H.; Kang, Y.X.; Wang, Q.; Zeng, W.D.; Zhao, W.W. A high-accuracy and lightweight detector based on a graph convolution network for strip surface defect detection. Adv. Eng. Inform. 2024, 59, 102280. [Google Scholar] [CrossRef]
- Wang, G.Q.; Zhang, C.Z.; Chen, M.S.; Lin, Y.C.; Tan, X.H.; Liang, P.; Kang, Y.X.; Zeng, W.D.; Wang, Q. Yolo-MSAPF: Multiscale Alignment Fusion with Parallel Feature Filtering Model for High Accuracy Weld Defect Detection. IEEE Trans. Instrum. Meas. 2023, 72, 1–14. [Google Scholar] [CrossRef]
- Li, C.; Huang, Y.; Li, H.; Zhang, X. A weak supervision machine vision detection method based on artificial defect simulation. Knowl.-Based Syst. 2020, 208, 106466. [Google Scholar] [CrossRef]
- Honzatko, D.; Krulis, M. Accelerating block-matching and 3D filtering method for image denoising on GPUs. J. Real-Time Image Process. 2019, 16, 2273–2287. [Google Scholar] [CrossRef]
- Khan, S.A.; Hussain, S.; Yang, S.K. Contrast Enhancement of Low-Contrast Medical Images Using Modified Contrast Limited Adaptive Histogram Equalization. J. Med. Imaging Health Inform. 2020, 10, 1795–1803. [Google Scholar] [CrossRef]
- Wu, Y.; Liu, J.W.; Zhu, C.Z.; Bai, Z.F.; Gong, M.G. Computational Intelligence in Remote Sensing Image Registration: A survey. Int. J. Autom. Comput. 2020, 18, 1–17. [Google Scholar] [CrossRef]
- Li, H.Z.; Wang, J. From Soft Clustering to Hard Clustering: A Collaborative Annealing Fuzzy c-Means Algorithm. IEEE Trans. Fuzzy Syst. 2024, 32, 1181–1194. [Google Scholar] [CrossRef]
- Rahman, T.; Islam, M.S. Image Segmentation Based on Fuzzy C Means Clustering Algorithm and Morphological Reconstruction. In Proceedings of the 2021 International Conference on Information and Communication Technology for Sustainable Development (ICICT4SD), Dhaka, Bangladesh, 27–28 February 2021. [Google Scholar]
- Eshkevari, M.; Rezaee, M.J.; Zarinbal, M.; Izadbakhsh, H. Automatic dimensional defect detection for glass vials based on machine vision: A heuristic segmentation method. J. Manuf. Process. 2021, 68 Pt A, 973–989. [Google Scholar] [CrossRef]
- Ashok, S.K.; Ballav, S.; Billò, M.; Dell’Aquila, E.; Frau, M.; Gupta, V.; John, R.R.; Lerda, A. Surface operators, dual quivers and contours. Eur. Phys. J. C 2019, 79, 1–24. [Google Scholar] [CrossRef]
- Heylen, R.; Scheunders, P. Hyperspectral Intrinsic Dimensionality Estimation with Nearest-Neighbor Distance Ratios. IEEE J. Sel. Top. Appl. Earth Obs. Remote Sens. 2013, 6, 570–579. [Google Scholar] [CrossRef]
- Kang, H.; Xuefei, L.; Wenhui, Z. An adaptive fusion panoramic image mosaic algorithm based on circular LBP feature and HSV color system. In Proceedings of the 2020 IEEE International Conference on Information Technology, Big Data and Artificial Intelligence (ICIBA), Chongqing, China, 6–8 November 2020. [Google Scholar]
- Wang, Y.; Huang, Q.; Hu, J. Adaptive enhancement for nonuniform illumination images via nonlinear mapping. J. Electron. Imaging 2017, 26, 1. [Google Scholar] [CrossRef]
- Wu, H.R.; Luo, Z.Q.; Sun, F.C.; Li, X.X.; Zhao, Y.X. An Improvement Method for Improving the Surface Defect Detection of Industrial Products Based on Contour Matching Algorithms. Sensors 2024, 24, 3932. [Google Scholar] [CrossRef] [PubMed]
Products | Character Model | Digital Model | Ratchet Workpiece | |
---|---|---|---|---|
Experimental Condition | ||||
E = 50 lux | ||||
E = 75 lux | ||||
E = 100 lux | ||||
E = 125 lux | ||||
E = 150 lux |
Item | Fine Matching Results Based on Improved LBP Operator | The Number of Closed Contours in the Template Image | Correct Matching Rate |
---|---|---|---|
Character models | 7 | 100% | |
Digital models | 3 | 100% | |
Ratchet workpieces | 2 | 100% |
Item | Fine Matching Results Based on Improved LBP Operator | The Number of Closed Contours in the Template Image | Correct Matching Rate |
---|---|---|---|
Character models | 7 | 100% | |
Digital models | 3 | 100% | |
Ratchet workpieces | 2 | 100% |
Detection Type | Light Intensity | Character Models | Digital Models | Ratchet Workpieces | Test Results (Show Only) |
---|---|---|---|---|---|
Good product testing “Match Successful” | E = 50 lux | ||||
E = 75 lux | |||||
E = 100 lux | |||||
E = 125 lux | |||||
E = 150 lux | |||||
Defect detection “Match failed” | Arbitrary parameter | Arbitrary template | Arbitrary template | Arbitrary template |
Item | Light Intensity | Average Time | ||||
---|---|---|---|---|---|---|
50 lux | 75 lux | 100 lux | 125 lux | 150 lux | ||
Character models | 305 ms | 296 ms | 285 ms | 301 ms | 328 ms | 303.00 ms |
Digital models | 263 ms | 225 ms | 298 ms | 264 ms | 285 ms | 267.00 ms |
Ratchet workpieces | 333 ms | 314 ms | 398 ms | 377 ms | 391 ms | 362.60 ms |
Item | Light Intensity (lux) | Accuracy | Precision | Recall |
---|---|---|---|---|
Character models | E = 50 | 88.89 | 90.15 | 89.47 |
E = 75 | 90.12 | 91.11 | 88.09 | |
E = 100 | 92.25 | 93.52 | 94.85 | |
E = 125 | 91.98 | 92.08 | 91.87 | |
E = 150 | 87.65 | 89.56 | 90.75 | |
Mean value (Single) | 90.18 | 91.28 | 91.01 | |
Digital models | E = 50 | 89.55 | 87.55 | 90.63 |
E = 75 | 92.52 | 93.54 | 94.56 | |
E = 100 | 93.85 | 92.13 | 93.62 | |
E = 125 | 93.46 | 91.52 | 95.91 | |
E = 150 | 92.10 | 90.74 | 93.54 | |
Mean value (Single) | 92.30 | 91.10 | 93.65 | |
Ratchet workpieces | E = 50 | 92.32 | 93.41 | 95.41 |
E = 75 | 94.63 | 95.62 | 96.85 | |
E = 100 | 96.52 | 94.21 | 92.44 | |
E = 125 | 94.61 | 90.32 | 93.65 | |
E = 150 | 92.30 | 91.63 | 94.34 | |
Mean value (Single) | 94.08 | 93.04 | 94.54 | |
Analysis of statistical results | Mean value (All) | 91.98 | 91.68 | 92.91 |
Standard deviation | 0.0218 | 0.0183 | 0.0230 | |
Confidence interval | [87.72, 96.25] | [88.09, 95.26] | [88.40, 97.42] |
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. |
© 2024 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
Wu, H.; Li, X.; Sun, F.; Huang, L.; Yang, T.; Bian, Y.; Lv, Q. An Improved Product Defect Detection Method Combining Centroid Distance and Textural Information. Electronics 2024, 13, 3798. https://doi.org/10.3390/electronics13193798
Wu H, Li X, Sun F, Huang L, Yang T, Bian Y, Lv Q. An Improved Product Defect Detection Method Combining Centroid Distance and Textural Information. Electronics. 2024; 13(19):3798. https://doi.org/10.3390/electronics13193798
Chicago/Turabian StyleWu, Haorong, Xiaoxiao Li, Fuchun Sun, Limin Huang, Tao Yang, Yuechao Bian, and Qiurong Lv. 2024. "An Improved Product Defect Detection Method Combining Centroid Distance and Textural Information" Electronics 13, no. 19: 3798. https://doi.org/10.3390/electronics13193798
APA StyleWu, H., Li, X., Sun, F., Huang, L., Yang, T., Bian, Y., & Lv, Q. (2024). An Improved Product Defect Detection Method Combining Centroid Distance and Textural Information. Electronics, 13(19), 3798. https://doi.org/10.3390/electronics13193798