Submitted:
29 October 2024
Posted:
31 October 2024
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Literature Review and Related Work
2.1. Machine Vision-Based Methods
2.2. Deep Learning-Based Methods
2.3. Optimal Transport
2.3.1. Monge’s Problem
2.3.2. Kantorovitch’s Relaxed Problem
2.3.3. Discrete Optimal Transport in 1D with Finite Element
3. Problem Formulation
3.1. Core Problem
- Input: Two local images—one representing the reference (defect-free) welding area on PCB and the other representing the welding area on PCB under inspection.
- Objective: Identify any discrepancies between the reference image and the test image, which may correspond to welding defects.
-
Constraints:
- (a)
- Achieving high precision in detecting small, subtle welding defects.
- (b)
- Reducing dependency on large, labeled datasets for training detection algorithms
- (c)
- Providing interpretability of defect to enable actionable insights for defect tracing, process improvement, and product repair.
3.2. Formulation of Discrete Optimal Transport Problem
| Notation | Description |
|---|---|
| The size in pixel of the input image | |
| X | The 2 dimensional coordinates for each pixel in detecting image |
| Y | The 2 dimensional coordinates for each pixel in reference image |
| The set of gray scale | |
| Maximum of gray scale | |
| The measure on X representing the gray sacle detecting image | |
| The measure on Y representing the gray sacle reference image | |
| f | The normalized measure of on X |
| g | The normalized measure of on Y |
| The optimal cost of transporting f to g |
3.3. Solvability of the Assignment Problem
3.4. Properties of the Assignment Problem
- To solve the assignment problem does not need any outside information beside the detecting image and reference image.
- By solving the assignment, any slight difference between two image would be included in the transport plan and also represented by the optimal transport cost.
- The optimal transport plan is two-way since the cost is Euclidean, thus the plan could show that how can the detecting image be transported to the reference image and vice versa.
4. Solver Design
4.1. 2 Dimensional to 1 Dimensional
| Notation | Description |
|---|---|
| The bijective (2D to 1D) flatten function | |
| k | The number of pixels minus one |
| The 1 dimensional coordinates for the gray scale of both input images | |
| The measure on representing the gray scale detecting image | |
| The measure on representing the gray scale reference image | |
| The unit cost for transporting from ith coordinate to jth coordinate in | |
| The mass to transport from ith coordinate to jth coordinate in | |
| The cost of a transport | |
| Mass conservation constraints for detecting image at ith coordinate in | |
| Mass conservation constraints for reference image at jth coordinate in | |
| The cost map | |
| The transport plan | |
| The constraint matrix which project to vector in | |
| The constraint vector represents the gray scale at each point for both image |
4.2. Assignment Problem to Linear Programming Problem
5. Discrete Optimal Transport Based Welding Defect Detection Method
5.1. Method Overview
5.2. Image to Matrix
5.3. Find Welding Area
5.4. Refine Welding Area
5.5. RGB to Normalized Gray Scale
5.6. Matrix to 2D Measure
5.7. Resizing 2D Measure
5.8. 2D Measure to 1D Measure
5.9. 1D Measure to Discrete OT Problem
5.10. Discrete OT Problem to LP Problem
5.11. LP Problem Solution to Optimal Cost and Optimal Plan
5.12. Intermediate Images
6. Experimental Result and Discussion
- (Precision) Sensitivity to slight change in image
- (Efficiency) Computational cost comparison for entire component and only welding part
- (Independency) Do not need large training data sets
- (Directivity) Can provide actionable insights for manufacturing process improvement and product repair
6.1. Image Gathering
6.2. Sample And Standard Image
6.3. Find Welding Area
6.4. Defect Detection
7. Conclusions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Li, F.; Wu, X.; Phillips, M.A. Technical efficiency of the urban gas industry in china. Environmental Science and Pollution Research 2023, 30, 104477–104488. [Google Scholar] [CrossRef] [PubMed]
- Huang, L. City natural gas metering. Natural Gas—Extraction to End Use; Gupta, SB, Ed.; InTech: Rijeka, Croatia, 2012; pp. 181–208. [Google Scholar]
- Zehua, S. Intertet of Things And Smart City; Renmin Unviersity of China Press, 2022.
- Webster, J.G.; Eren, H. Measurement, Instrumentation, and Sensors Handbook: Two-Volume Set; CRC press, 2018.
- Sun, Q.; Li, H.; Ma, Z.; Wang, C.; Campillo, J.; Zhang, Q.; Wallin, F.; Guo, J. A comprehensive review of smart energy meters in intelligent energy networks. IEEE Internet of Things Journal 2015, 3, 464–479. [Google Scholar] [CrossRef]
- Ilea, P.; Săvescu, D.; Stoica, A. Some aspects of gas meter quality and analyzing the sustainability of a gas meter element. In Proceedings of the IOP Conference Series: Materials Science and Engineering. IOP Publishing, 2019, Vol. 568, p. 012063.
- Wu, R.; Backus, S.; Basu, I.; Blanchard, P.; Brice, K.; Dryfhout-Clark, H.; Fowlie, P.; Hulting, M.; Hites, R. Findings from quality assurance activities in the Integrated Atmospheric Deposition Network. Journal of Environmental Monitoring 2009, 11, 277–296. [Google Scholar] [CrossRef] [PubMed]
- Hacke, P.; Lokanath, S.; Williams, P.; Vasan, A.; Sochor, P.; TamizhMani, G.; Shinohara, H.; Kurtz, S. A status review of photovoltaic power conversion equipment reliability, safety, and quality assurance protocols. Renewable and Sustainable Energy Reviews 2018, 82, 1097–1112. [Google Scholar] [CrossRef]
- Kavitha, R.; Akshatha, K. Component identification and defect detection of printed circuit board using artificial intelligence. In Proceedings of the 2023 2nd International Conference on Applied Artificial Intelligence and Computing (ICAAIC). IEEE. 2023; pp. 100–106. [Google Scholar]
- Sezer, A.; Altan, A. Optimization of deep learning model parameters in classification of solder paste defects. In Proceedings of the 2021 3rd international congress on human-computer interaction, optimization and robotic applications (HORA). IEEE. 2021; pp. 1–6. [Google Scholar]
- Chen, I.C.; Hwang, R.C.; Huang, H.C. Pcb defect detection based on deep learning algorithm. Processes 2023, 11, 775. [Google Scholar] [CrossRef]
- Chen, X.; Wu, Y.; He, X.; Ming, W. A comprehensive review of deep learning-based PCB defect detection. IEEE Access 2023. [Google Scholar] [CrossRef]
- Ling, Q.; Isa, N.A.M. Printed circuit board defect detection methods based on image processing, machine learning and deep learning: A survey. IEEE Access 2023, 11, 15921–15944. [Google Scholar] [CrossRef]
- Baygin, M.; Karakose, M.; Sarimaden, A.; Erhan, A. Machine vision based defect detection approach using image processing. In Proceedings of the 2017 international artificial intelligence and data processing symposium (IDAP). Ieee. 2017; pp. 1–5. [Google Scholar]
- Chang, Y.; Xue, Y.; Zhang, Y.; Ma, J.; Li, G.; Wu, D.; Zhan, Q.; Zuo, J. Research on PCB solder joint defect detection method based on machine vision. In Proceedings of the Fourteenth International Conference on Graphics and Image Processing (ICGIP 2022). SPIE, 2023. Vol. 12705; pp. 181–188.
- Bhatt, P.M.; Malhan, R.K.; Rajendran, P.; Shah, B.C.; Thakar, S.; Yoon, Y.J.; Gupta, S.K. Image-based surface defect detection using deep learning: A review. Journal of Computing and Information Science in Engineering 2021, 21, 040801. [Google Scholar] [CrossRef]
- Liu, G. Surface defect detection methods based on deep learning: a brief review. In Proceedings of the 2020 2nd International Conference on Information Technology and Computer Application (ITCA). IEEE. 2020; pp. 200–203. [Google Scholar]
- Kantorovich, L.V. On the Translocation of Masses. Journal of mathematical sciences 2006, 133. [Google Scholar] [CrossRef]
- Liu, Z.; Qu, B. Machine vision based online detection of PCB defect. Microprocessors and Microsystems 2021, 82, 103807. [Google Scholar] [CrossRef]
- Ren, Z.; Fang, F.; Yan, N.; Wu, Y. State of the art in defect detection based on machine vision. International Journal of Precision Engineering and Manufacturing-Green Technology 2022, 9, 661–691. [Google Scholar] [CrossRef]
- Liao, S.; Huang, C.; Zhang, H.; Gong, J.; Li, M.; Wang, Z. Object detection of welding defects in SMT electronics production based on deep learning. In Proceedings of the 2022 23rd International Conference on Electronic Packaging Technology (ICEPT). IEEE, 2022. pp. 1–5.
- Legon, A.; Deo, M.; Albin, S.; Audette, M. Detection and classification of PCB defects using deep learning methods. In Proceedings of the 2022 IEEE 31st Microelectronics Design & Test Symposium (MDTS). IEEE, 2022. pp. 1–6.
- Liu, X.; Wang, J.; Zhang, R.; Ruan, W. Deep learning-based defect detection for printed circuit boards. In Proceedings of the Third International Conference on Computer Vision and Pattern Analysis (ICCPA 2023). SPIE, 2023. Vol. 12754; pp. 897–902.
- Ling, Z.; Zhang, A.; Ma, D.; Shi, Y.; Wen, H. Deep Siamese semantic segmentation network for PCB welding defect detection. IEEE Transactions on Instrumentation and Measurement 2022, 71, 1–11. [Google Scholar] [CrossRef]
- Pham, T.T.A.; Thoi, D.K.T.; Choi, H.; Park, S. Defect detection in printed circuit boards using semi-supervised learning. Sensors 2023, 23, 3246. [Google Scholar] [CrossRef] [PubMed]
- Mémoli, F. Gromov–Wasserstein distances and the metric approach to object matching. Foundations of computational mathematics 2011, 11, 417–487. [Google Scholar] [CrossRef]
- Colombo, M.; Di Marino, S. Equality between Monge and Kantorovich multimarginal problems with Coulomb cost. Annali di Matematica Pura ed Applicata (1923-) 2015, 194, 307–320. [Google Scholar] [CrossRef]
- Dantzig, G.B. Linear programming and extensions. In Linear programming and extensions; Princeton university press, 2016.
- Kuhn, H.W. The Hungarian method for the assignment problem. Naval research logistics quarterly 1955, 2, 83–97. [Google Scholar] [CrossRef]
- Bertsekas, D.P. The auction algorithm: A distributed relaxation method for the assignment problem. Annals of operations research 1988, 14, 105–123. [Google Scholar] [CrossRef]
- Evans, L.C. Partial differential equations and Monge-Kantorovich mass transfer. Current developments in mathematics 1997, 1997, 65–126. [Google Scholar] [CrossRef]
- Banciu, M. Dual simplex. In Wiley Encyclopedia of Operations Research and Management Science; Wiley, 2011.
- Potra, F.A.; Wright, S.J. Interior-point methods. Journal of computational and applied mathematics 2000, 124, 281–302. [Google Scholar] [CrossRef]
- Alrubaie, S.H.; Hameed, A.H. Dynamic weights equations for converting grayscale image to RGB image. Journal of University of Babylon for Pure and Applied Sciences 2018, 26, 122–129. [Google Scholar] [CrossRef]
















| 0 | 1 | 2 | 3 | |
|---|---|---|---|---|
| 0 | ||||
| 1 | ||||
| 2 | ||||
| 3 |
| 20 | 0 | 0 | ||
| 0 | 10 | 0 | ||
| 0 | 0 | 30 | ||
| 0 | 0 | 0 |
| Sample | Optimal Cost | Time Cost (s) |
|---|---|---|
| 1 left | 124.6884 | 81.7439 |
| 1 Right | 42.0153 | 65.8820 |
| 2 left | 97.4181 | 70.4414 |
| 2 Right | 90.3658 | 66.4491 |
| 3 left | 56.7008 | 54.8580 |
| 3 Right | 69.9283 | 76.9399 |
| 4 left | 89.5546 | 75.1159 |
| 4 Right | 72.1899 | 67.7810 |
| 5 left | 51.8627 | 74.7324 |
| 5 Right | 59.4787 | 58.4266 |
| 6 left | 72.9623 | 79.0964 |
| 6 Right | 105.3368 | 88.5780 |
| 7 left | 146.8131 | 76.0858 |
| 7 Right | 57.5372 | 64.3336 |
| 8 left | 110.2959 | 57.8042 |
| 8 Right | 52.8154 | 73.2075 |
| 9 left | 90.6085 | 71.9530 |
| 9 Right | 59.2622 | 80.9185 |
| 10 left | 76.7273 | 65.0734 |
| 10 Right | 91.0504 | 79.3705 |
| Sample | Optimal Cost | Time Cost (s) |
|---|---|---|
| 1 left | 61.8171 | 1.0307 |
| 1 Right | 21.8712 | 0.9719 |
| 2 left | 47.5094 | 1.0532 |
| 2 Right | 46.5524 | 1.0328 |
| 3 left | 29.6239 | 0.9313 |
| 3 Right | 31.6513 | 1.0388 |
| 4 left | 42.4647 | 1.0107 |
| 4 Right | 32.1805 | 0.9507 |
| 5 left | 24.3411 | 1.0018 |
| 5 Right | 29.5494 | 0.9604 |
| 6 left | 36.7987 | 0.9448 |
| 6 Right | 53.9450 | 1.0180 |
| 7 left | 72.1791 | 1.0598 |
| 7 Right | 30.2502 | 0.9749 |
| 8 left | 56.6340 | 0.9490 |
| 8 Right | 27.3963 | 1.0443 |
| 9 left | 43.7873 | 0.9613 |
| 9 Right | 32.8113 | 1.0480 |
| 10 left | 39.7919 | 0.9684 |
| 10 Right | 44.2695 | 1.0034 |
| Sample | Time Consumption (s) |
|---|---|
| 1 | 14.2441 |
| 2 | 13.8762 |
| 3 | 14.1679 |
| 4 | 14.6666 |
| 5 | 14.1432 |
| 6 | 14.0194 |
| 7 | 14.2059 |
| 8 | 14.1208 |
| 9 | 13.7494 |
| 10 | 13.9204 |
| Pixel Changed | Value Changed | Cost Changed |
|---|---|---|
| (7,0) | +1 | -0.0059 |
| +5 | -0.0297 | |
| +10 | -0.0585 | |
| +20 | -0.1151 | |
| (3,13) | +1 | -0.0072 |
| +5 | -0.0357 | |
| +10 | -0.0708 | |
| +20 | -0.1136 | |
| (8,10) | +1 | +0.0048 |
| +5 | +0.0242 | |
| +10 | +0.0486 | |
| +20 | +0.1090 |
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 (http://creativecommons.org/licenses/by/4.0/).