An APF-ACO algorithm for automatic defect detection on vehicle paint


As a popular technology in the field of artificial intelligence, computer vision is gradually adapting to the needs of convenience for human beings, improving production efficiency and reducing production costs. Therefore, this study proposes a computer vision algorithm to locate and identify the location of defects. For the traditional edge detection algorithm Sobel, LoG, Canny, the decisive factor for the detection effect of paint defect image is the adjustment of parameters, which can’t achieve an adaptive edge detection algorithm for paint defects, so it is thought that the evolution idea of ant colony algorithm can be used to achieve accurate detection of defects. This paper proposes an automatic detection method for vehicle body paint film defects based on computer vision. An ant colony optimization edge detection algorithm based on automotive paint features (APF-ACO) is proposed. By combining global update and local update, the convergence speed of ant colony algorithm is improved and a new pheromone calculation and update method is proposed to effectively preserve the edge details of the detected image. A reflection area detection algorithm based on HSV color space is designed to detect the reflective area and eliminate interference. Establish defect classification identification rules, identify and mark five types of defects, and determine defect categories. Experiments show that the method can effectively detect the defect area and the recognition accuracy is 97.76%.

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

Fig. 1.
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8


  1. 1.

    Zhang J, Yin X, Luan J, Liu T (2019) An improved vehicle panoramic image generation algorithm. Multimed tools Appl 27663–27682.

  2. 2.

    Yin X, Zhang J, Wu X, Huang J, Xu Y, Zhu L (2019) An improved lane departure warning algorithm based on fusion of F-Kalman filter and F-TLC. Multimed Tools Appl 78:12203–12222.

    Article  Google Scholar 

  3. 3.

    Eichhorn A, Girimonte D, Klose A, Kruse R (2005) Soft computing for automated surface quality analysis of exterior car body panels. Appl Soft Comput J 5:301–313.

    Article  Google Scholar 

  4. 4.

    Chung YC, Chang M (2006) Visualization of subtle defects of car body outer panels. SICE-ICASE Int Jt Conf 2006:4639–4642.

    Article  Google Scholar 

  5. 5.

    Puente León F, Kammel S (2006) Inspection of specular and painted surfaces with centralized fusion techniques. Meas J Int Meas Confed 39:536–546.

    Article  Google Scholar 

  6. 6.

    Borsu V, Yogeswaran A (2010) Payeur P (2010) automated surface deformations detection and marking on automotive body panels. IEEE Int Conf Autom Sci Eng CASE 2010:551–556.

    Article  Google Scholar 

  7. 7.

    Kamani P, Afshar A, Towhidkhah F, Roghani E (2011) Car body paint defect inspection using rotation invariant measure of the local variance and one-against-all support vector machine. Proc - 1st Int Conf informatics Comput Intell ICI 2011 244–249 .

  8. 8.

    Cheng P, Cui A, Yang Y, Luo Y, Sun W (2018) Recognition and classification of coating film defects on automobile body based on image processing. Proc - 2017 10th Int Congr Image Signal Process Biomed Eng Informatics, CISP-BMEI 2017 2018-Janua:1–5 .

  9. 9.

    Edris MZB, Jawad MS, Zakaria Z (2016) Surface defect detection and neural network recognition of automotive body panels. Proc - 5th IEEE Int Conf control Syst Comput Eng ICCSCE 2015 117–122 .

  10. 10.

    Jeyaraj PR, Samuel Nadar ER (2019) Computer vision for automatic detection and classification of fabric defect employing deep learning algorithm. Int J Cloth Sci Technol 31:510–521.

    Article  Google Scholar 

  11. 11.

    Zhao L, Li F, Zhang Y, Xu X, Xiao H, Feng Y (2020) A deep-learning-based 3D defect quantitative inspection system in CC products surface. Sensors (Switzerland) 20: .

  12. 12.

    Wei X, Jiang S, Li Y, Li C, Jia L, Li Y (2020) Defect detection of pantograph slide based on deep learning and image processing technology. IEEE Trans Intell Transp Syst 21:947–958.

    Article  Google Scholar 

  13. 13.

    Palanikkumar D, Priya S (2018) Ant colony based graph theory (ACGT) and resource virtual network mapping (RVNM) algorithm for home healthcare system in cloud environment. Multimed Tools Appl 79:3743–3760.

    Article  Google Scholar 

  14. 14.

    Xu P (2019) Research on optimized model of travel route selection based on intelligent image information and ant Colony algorithm. Multimed Tools Appl.

  15. 15.

    Liantoni F, Perwira RI, Bataona DS (2018) Comparison of Adaptive Ant Colony Optimization for Image Edge Detection of Leaves Bone Structure. Emit Int J Eng Technol 6:328.

    Article  Google Scholar 

  16. 16.

    Giudice O, Allegra D, Stanco F, Grasso G, Battiato S (2018) A fast palette reordering technique based on GPU-optimized genetic algorithms. In: Proceedings - International Conference on Image Processing, ICIP. pp 1138–1142

  17. 17.

    Sun L, Kong X, Xu J, Xue Z, Zhai R, Zhang S (2019) A hybrid gene selection method based on ReliefF and ant Colony optimization algorithm for tumor classification. Sci Rep 9:1–14.

    Article  Google Scholar 

  18. 18.

    Yue L, Chen H (2019, 2019) unmanned vehicle path planning using a novel ant colony algorithm. EURASIP J Wirel Commun Netw 2019.

  19. 19.

    Jing L (2019) Defect detection and three dimensional reconstruction of castings. MATEC Web Conf 256:05001.

    Article  Google Scholar 

  20. 20.

    Jiang J, Jin Z, Wang B, Ma L, Cui Y (2020) A sobel operator combined with patch statistics algorithm for fabric defect detection. KSII Trans Internet Inf Syst 14:687–701.

    Article  Google Scholar 

  21. 21.

    Li C, Gao G, Liu Z, Yu M, Huang D (2018) Fabric defect detection based on biological vision modeling. IEEE Access 6:27659–27670.

    Article  Google Scholar 

  22. 22.

    Σαλίχου Α (2012) Προηγμένες μέθοδοι βελτιστοποίσησης στη Διοίκηση Έργων. Η περίπτωση της βελτιστοποίησης με αποκίες μυρμηγκιών (Ant Colony Optimization) 1–96

  23. 23.

    Dorigo M, Maniezzo V, Colorni A (1999) Dorigo-Maniezzo-Colomi_the-ant-system-optimization-by-a-Colony-of-cooperating-agents. 26:1–26

  24. 24.

    Dorigo M, Gambardella LM (1997) Ant colony system: a cooperative learning approach to the traveling salesman problem. IEEE Trans Evol Comput 1:53–66.

    Article  Google Scholar 

  25. 25.

    Jeleń Ł, Fevens T, Krzyzak A (2008) Classification of breast cancer malignancy using cytological images of fine needle aspiration biopsies. Int J Appl Math Comput Sci 18:75–83.

    Article  Google Scholar 

  26. 26.

    Zhang J, He K, Zheng X, Zhou J (2010) An ant colony optimization algorithm for image edge detection. Proc - Int Conf Artif Intell Comput Intell AICI 2:215–219.

    Article  Google Scholar 

  27. 27.

    Liu X, Fang S (2015) A convenient and robust edge detection method based on ant colony optimization. Opt Commun 353:147–157.

    Article  Google Scholar 

  28. 28.

    Kheirinejad S (2018) Max-min ant Colony optimization method for edge detection exploiting a new heuristic information function. 2018 8th Int Conf Comput Knowl Eng 12–15

  29. 29.

    Lin H, Shu N, Zhao CS (2003) A new edge evaluation method based on connection components. Mod Surv Mapp 26:8–11

    Google Scholar 

  30. 30.

    Tao C, Xiankun S, Hua H, Xiaoming Y (2015) Image Edge Detection based on ACO-PSO Algorithm. Int J Adv Comput Sci Appl 6:47–54.

    Article  Google Scholar 

  31. 31.

    Molina J, Solanes JE, Arnal L, Tornero J (2017) On the detection of defects on specular car body surfaces. Robot Comput Integr Manuf 48:263–278.

    Article  Google Scholar 

  32. 32.

    Tandiya A, Akthar S, Moussa M, Tarray C (2018) Automotive semi-specular surface defect detection system. In: proceedings - 2018 15th conference on computer and robot vision, CRV 2018. Pp 285–291

Download references


This work is supported by National Key Research and Development Program of China (2017YFB0102500), Natural Science Foundation of Jilin province (20170101133JC), Korea Foundation for Advanced Studies’ International Scholar Exchange Fellowship for the academic year of 2017-2018, the National Natural Science Foundation of China (61872158), Science and Technology Development Plan Project of Jilin Province (20190701019GH), the Fundamental Research Funds for the Central Universities, and Jilin University (5157050847, 2017XYB252).

Author information



Corresponding author

Correspondence to Jindong Zhang.

Additional information

Publisher’s note

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

Rights and permissions

Reprints and Permissions

About this article

Verify currency and authenticity via CrossMark

Cite this article

Xu, J., Zhang, J., Zhang, K. et al. An APF-ACO algorithm for automatic defect detection on vehicle paint. Multimed Tools Appl (2020).

Download citation


  • Ant colony algorithm
  • Defect detection
  • Image edge detection
  • Computer vision