Abstract
To address the issue of misjudgment in traditional connected domain marking algorithms during the dense assembly and welding of SMT components, a method combining connected domain marking with localized watershed algorithms has been proposed. After preprocessing the component images, including grayscale conversion and noise filtering, the connected domain marking algorithm’s identified soldered areas are masked and processed. The soldered areas are then extracted, histogram equalization and distance transformation are performed, and the watershed algorithm is used to segment the misjudged soldering areas. An SMT solder defect detection test bench was developed on the LabVIEW platform, and a comparative experiment was conducted with traditional connected domain algorithms. The experimental results demonstrate that the optimized algorithm not only maintains the accuracy of traditional connected-component labeling but also significantly reduces the false-positive rate in densely soldered environments. Consequently, it exhibits stronger adaptability and robustness to interference, better fulfilling the requirements of real-world engineering applications. This method exhibits superior environmental adaptability and markedly higher interference resistance, rendering it well-suited to real-world engineering applications.
Data availability
All data generated or analysed during this study are included in this published article.
References
Shao, J. Application of mechatronics technology in construction machinery. Intell. City 8 (08), 42–44 (2022).
Bian, W., Wang, M. & Yang, Z. Scanning electron microscope calibration with SE2 and InLens detectors. In 2019 IEEE 19th International Conference on Nanotechnology (IEEE-NANO) 76–79 (IEEE, 2019).
Su, S. Automatic detection of soldering on SMT component pins based on machine vision. Combin. Mach. Tool Autom. Process. Technol. 12, 63–65 + 69 (2018).
Zhao, S. et al. Quantitative study on coal and shale pore structure and surface roughness based on atomic force microscopy and image processing. Fuel 244, 78–90 (2019).
Dai, H. D., Hu, M., Lu, H. Z. & Wang, Y. Design and implementation of a target detection algorithm based on connected domain marking. Mod. Electron. Technol. 38 (20), 71–74 (2015).
Saladra, D. & Kopernik, M. Qualitative and quantitative interpretation of SEM image using digital image processing. J. Microsc. 264 (1), 102–124 (2016).
Zhou, J. et al. Research on magnetic steel sheet defect detection based on machine vision. Mech. Electr. Eng. 31 (12), 1541–1546 (2014).
Beucher, S. & Meyer, F. Mathematical Morphology in Image Processing (CRC, 2018).
Zhao, M. Q. Research on image segmentation algorithm based on watershed algorithm. In Xi ‘an Univ. Posts Telecommunications (2020).
Gan, Z. Z. et al. Improving the watershed algorithm for TBM rock cuttings recognition and measurement. Sens. Microsyst. 39 (11), 155–157 (2020).
Zhang, X. L. et al. Cotton image segmentation based on K-means clustering and marked watershed. Sens. Microsyst. 39 (03), 147–149 (2020).
Huang, X. et al. Two-stage segmentation framework based on distance transformation. Sensors 22, 250 (2022).
Zhang, S. B. et al. Research on image segmentation based on distance transformation and watershed algorithm. Mod. Inform. Technol. 6 (05), 101–103 (2022).
Kudryavtsev, A. 3D Reconstruction in Scanning Electron Microscope: From Image Acquisition to Dense Point Cloud (Université Bourgogne Franche-Comté, 2017).
Acknowledgements
We declare that no part of the manuscript (text, figures, data analysis or raw data) was entirely generated or altered by an AI tool. The output was read sentence-by-sentence by all co-authors (native and non-native speakers) and cross-checked against the original Chinese draft. DeepSeek was used only to brainstorm the flow of the Discussion section. The suggestions were evaluated against the cited references and 40% of them were discarded; the remaining points were re-phrased by the authors and referenced. No AI tool had access to the raw data or was used for statistical analysis, figure preparation, or literature screening. All authors take full responsibility for the final content.
Funding
The authors gratefully acknowledge the financial support from the Henan Province’s new round of key disciplines-Mechanical Engineering, Zhengzhou local university’s fourth batch of technical and skilled master studios-Mechatronic Engineering (Zheng Jiao Gao Han [2023] No.864) and National College Students’ Innovation Training Program project (202411834024).
Author information
Authors and Affiliations
Contributions
Wei Xiong: Writing – original draft, Investigation, Funding acqui-ition. Na Xiao: Methodology, Inves-tigation, Data curation. Ruili Wang: Writing – review & editing, Funding acquisition, Conceptualization.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher’s note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License, which permits any non-commercial use, sharing, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if you modified the licensed material. You do not have permission under this licence to share adapted material derived from this article or parts of it. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by-nc-nd/4.0/.
About this article
Cite this article
Xiong, W., Xiao, N. & Wang, R. A SMT pin soldering defect detection system based on improved connectivity domain algorithm. Sci Rep (2026). https://doi.org/10.1038/s41598-026-44847-0
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-026-44847-0