Skip to main content
Log in

Fast segmentation algorithm of PCB image using 2D OTSU improved by adaptive genetic algorithm and integral image

  • Original Research Paper
  • Published:
Journal of Real-Time Image Processing Aims and scope Submit manuscript

Abstract

2D OTSU achieves good image segmentation performance in thresholding-based segmentation tasks. However, for the real-time detection of printed circuit board (PCB) defects, this method is complicated and cannot meet the real-time requirements. In view of the above phenomenon, this paper proposes an improved 2D OTSU combining adaptive genetic algorithm and integral image algorithm. The adaptive genetic algorithm transforms the threshold selection of 2D OTSU into the optimization of an inter-class variance measure. The integral image algorithm reduces a lot of repeated calculations in the optimization process of an inter-class variance measure. Experimental results show that the proposed algorithm greatly reduces the amount of computation and time on the basis of ensuring the performance of PCB image segmentation. Under the condition of low contrast between line and background and uneven illumination, the proposed algorithm has better segmentation performance on PCB images.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14

Similar content being viewed by others

Data availability statement

Data in this paper is available at the link https://pan.baidu.com/s/1grNWOUFwF-f23paNCw_zXQ) (file code:1234) given in paper.

References

  1. Tian, X., Zhao, L., Dong, H.: Application of image processing in the detection of printed circuit board. In: 2014 IEEE Workshop on Electronics, Computer and Applications, pp. 157–159 (2014)

  2. Wu, W.-Y., Wang, M.-J.J., Liu, C.-M.: Automated inspection of printed circuit boards through machine vision. Comput. Ind. 28, 103–111 (1996)

    Article  Google Scholar 

  3. Wallace, A.M.: Industrial applications of computer vision since 1982. IEE Proc. E Comput. Digit. Tech. 135, 117–136 (1988)

    Article  Google Scholar 

  4. Tönshoff, H.K., Janocha, H., Seidel, M.: Image processing in a production environment. CIRP Ann. Manuf. Technol. 37, 579–590 (1988)

    Article  Google Scholar 

  5. Ma, C., Mao, J., Mao, J.: Research and develop on PCB defect intelligent visual inspection robot. IEEE (2012)

  6. Baskauf, J., Brookman, G., Eidmann, T., et al.: A comparison of image segmentation algorithms. In: Carleton Computer Science Senior Comps Projects. 2019–20 (2019). https://cs.carleton.edu/cs_comps/1920/segmentation/final-results/Image_Segmentation_Comps_Paper.pdf

  7. Liang, H., Yuanmin, F., Xiaoqing, Z., et al.: Automatic change detection method of multitemporal remote sensing images based on 2D-Otsu algorithm improved by firefly algorithm. J. Sens. 2015, 1–8 (2015)

    Article  Google Scholar 

  8. Li, M., Wan, Y.: Research on the solder joint image segmentation based on the improved spatial fuzzy C means algorithm. In: International Conference on Natural Computation, Fuzzy Systems and Knowledge Discovery (ICNC-FSKD), pp. 1940–1944 (2016)

  9. Sezgin, M., Sankur, B.: Survey over image thresholding techniques and quantitative performance evaluation. J. Electron. Imaging 13, 146–168 (2004)

    Article  Google Scholar 

  10. Otsu, N.: A threshold selection method from gray level histograms. IEEE Trans. Syst. Man Cybern. 9, 62–66 (1979)

    Article  Google Scholar 

  11. Liu, J., Li, W.: Automatic thresholding of gray-level pictures via two-dimensional OTSU method. Acta Autom. Sin. 19, 101–105 (1993)

    Google Scholar 

  12. Fengjie, S., He, W., Jieqing, F.: 2D Otsu segmentation algorithm based on simulated annealing genetic algorithm for ICED-cable images. In: 2009 International Forum on Information Technology and Applications, pp. 600–602 (2009)

  13. Alaoui, N., Adamou-Mitiche, A.B.H., Mitiche, L.: Effective hybrid genetic algorithm for removing salt and pepper noise. IET Image Proc. 14, 289–296 (2020)

    Article  Google Scholar 

  14. Chinnasamy, S.: Performance improvement of fuzzy-based algorithms for medical image retrieval. IET Image Proc. 8, 319–326 (2014)

    Article  Google Scholar 

  15. Dhason, H.G.C.A., Muthaia, I., Sakthivel, S.P., et al.: Super-resolution mapping of hyperspectral satellite images using hybrid genetic algorithm. IET Image Proc. 14, 1281–1290 (2020)

    Article  Google Scholar 

  16. Crispin, A.J., Rankov, V.: Automated inspection of PCB components using a genetic algorithm template-matching approach. Int. J. Adv. Manuf. Technol. 35, 293–300 (2007)

    Article  Google Scholar 

  17. Lang, X., Zhu, F., Hao, Y., et al.: Integral image based fast algorithm for two-dimensional Otsu thresholding. In: 2008 Congress on Image and Signal Processing, pp. 677–681 (2008)

  18. Crow, F.: Summed-area tables for texture mapping. In: SIGGRAPH '84: Proceedings of the 11th Annual Conference on Computer Graphics and Interactive Techniques, pp. 207–212 (1984)

  19. Puchala, D., Stokfiszewski, K.: Numerical accuracy of integral images computation algorithms. IET Image Proc. 12, 31–41 (2012)

    Article  Google Scholar 

  20. Huang, J., Li, L., Wang, X., et al.: Recognition of distorted QR codes with one missing position detection pattern. IET Image Proc. 14, 3154–3160 (2020)

    Article  Google Scholar 

  21. Bay, H., Ess, A., Tuytelaars, T., et al.: Speeded-up robust features (SURF). Comput. Vis. Image Underst. 110, 346–359 (2008)

    Article  Google Scholar 

  22. Lowe, D.G.: Distinctive image features from scale-invariant keypoints. Int. J. Comput. Vis. 60, 91–110 (2004)

    Article  Google Scholar 

  23. Lowe, D.: Object recognition from local scale-invariant features. In: Proceedings of the International Conference on Computer Vision ICCV, Corfu., pp. 1150–1157 (1999)

  24. Zhi, L.S., Zhang, J.: Remote sensing image registration based on retrofitted SURF algorithm and trajectories generated from Lissajous figures. IEEE Geosci. Remote Sens. Lett. 7, 491–495 (2010)

    Article  Google Scholar 

  25. Zhang, Q., Sun, L., Chen, J., et al.: Speeded-up robust features-based image mosaic method for large-scale microscopic hyperspectral pathological imaging. Meas. Sci. Technol. 32, 035503 (2020)

    Article  Google Scholar 

  26. Xing, J., Yang, P., Qingge, L.: Robust 2D Otsu’s algorithm for uneven illumination image segmentation. Comput. Intell. Neurosci. 2020, 1–14 (2020)

    Article  Google Scholar 

  27. Chen, Q., Zhao, L., Lu, J., et al.: Modified two-dimensional Otsu image segmentation algorithm and fast realisation. IET Image Proc. 6, 426–433 (2012)

    Article  MathSciNet  Google Scholar 

  28. Cao, L., Ding, S., Fu, X., et al.: Application and comparison of three intelligent algorithms in 2D Otsu segmentation algorithm. In: International Conference in Swarm Intelligence, pp. 221–227. Springer (2014)

  29. Kasezawa, T., Tanaka, H., Ito, H.: Integral image word length reduction using overlapping rectangular regions. In: International Conference on Industrial Technology (ICIT), pp. 763–768 (2016)

  30. Lee, S., Jeong, Y.: A new integral image structure for memory size reduction. IEICE Trans. Inf. Syst. 97, 998–1000 (2014)

    Article  Google Scholar 

  31. Ehsan, S., Clark, A.F., Rehman, N.U., et al.: Integral images: efficient algorithms for their computation and storage in resource-constrained embedded vision systems. Sensors 15, 16804–16830 (2015)

    Article  Google Scholar 

  32. Sheta, A., Braik, M.S., Aljahdali, S.: Genetic algorithms: a tool for image segmentation. In: International Conference on Multimedia Computing and Systems, pp. 84–90 (2012)

  33. Zhang, Q., Chang, S.: An improved crossover operator of genetic algorithm. In: International Symposium on Computational Intelligence and Design, vol. 2, pp. 82–86 (2009)

  34. Zhang, Z., Liu, Y., Bo, L., et al.: Economic optimal allocation of mine water based on two-stage adaptive genetic algorithm and particle swarm optimization. Sensors 22, 883 (2022)

    Article  Google Scholar 

  35. Gabriela, C., Diane Larlus, F.P.: What is a good evaluation measure for semantic segmentation? (2013)

  36. Wang, X.: Graph based approaches for image segmentation and object tracking (2015)

Download references

Acknowledgements

Authors are thankful to Livelihood Science and Technology Project of Liaoning Province for supporting this work under Project No. 2021JH2/10100002.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Xiaodong Cheng.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ma, J., Cheng, X. Fast segmentation algorithm of PCB image using 2D OTSU improved by adaptive genetic algorithm and integral image. J Real-Time Image Proc 20, 10 (2023). https://doi.org/10.1007/s11554-023-01272-0

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11554-023-01272-0

Keywords

Navigation