Multi-focusing algorithm for microscopy imagery in assembly line using low-cost camera

  • Lukas Juočas
  • Vidas Raudonis
  • Rytis Maskeliūnas
  • Robertas DamaševičiusEmail author
  • Marcin Woźniak


We propose an algorithm to perform multi-focus image fusion and integrate a set of images acquired at different focus settings to a single uniformly focused image for visual inspection in assembly lines. The goal of image fusion is to integrate complementary image multi-view information from standard, low resolution assembly line camera into one new image, the quality of which could not be achieved using other methods such as direct digital photography. Our method is based on the image decomposition into Gaussian pyramids, generation of the Laplacian pyramids, and image reconstruction from the Laplacian pyramids. The main characteristics of the proposed method include good quality of integrated multi-focus image, and suitability for microscopy conveyor applications given movement of objects, different lighting conditions, and positional misalignments. We have evaluated our method using eight image quality metrics yielding good results (best results were obtained using the Tenengrad (TENG) method, reaching an accuracy of 0.982) with a low-cost camera and computationally efficient implementation.


Digital imaging Autofocusing Microscopy imagery Assembly line 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


Compliance with ethical standards

Conflict of interest

The authors declare that they have no conflict of interest.


  1. 1.
    Blake S (2017) Smart factory applications for integrated laser projection and automatic inspection. CAMX 2017 - Composites and Advanced Materials Expo, 2017-DecemberGoogle Scholar
  2. 2.
    Xu P, Mei H, Ren L, Chen W (2017) ViDX: visual diagnostics of assembly line performance in smart factories. IEEE Trans Vis Comput Graph 23(1):291–300. CrossRefGoogle Scholar
  3. 3.
    Soufhwee AR, Mahmood WHW, Abdullah MIHC (2018) Visual inspection as a screening method in assembly process for quality improvement. J Adv Manuf Technol 12(Special issue1):343–356Google Scholar
  4. 4.
    Glavin L, MacKinnon J, Varghese S (2017) Autofocus changes the paradigm for camera technology. In: Proc. SPIE 10098, Physics and Simulation of Optoelectronic Devices XXV, 100981O.
  5. 5.
    Liu CS, Jiang SH (2015) Precise autofocusing microscope with rapid response. In: OPTICS AND LASERS IN ENGINEERING, vol. 66, pp. 294–300.
  6. 6.
    Silvestri L, Müllenbroich MC, Costantini I, Di Giovanna AP, Sacconi L, Pavone FS (2017) Fast, image-based autofocus system for high-resolution optical microscopy of whole mouse brains. In: Optics in the Life Sciences Congress, OSA Technical Digest, paper JTu4A.8.
  7. 7.
    Mir H, Xu P, van Beek P (2014) An extensive empirical evaluation of focus measures for digital photography. In: Proc. SPIE 9023, Digital Photography X, 90230I.
  8. 8.
    Fu G, Cao Y, Lu MJ (2015) A fast auto-focusing method of microscopic imaging based on an improved MCS algorithm. Innov In: Opt Health Sci 08:1550020. Google Scholar
  9. 9.
    Castillo-Secilla JM, Saval-Calvo M, Medina-Valdès L, Cuenca-Asensi S, Martínez-Álvarez A, Sánchez C, Cristóbal G (2017) Autofocus method for automated microscopy using embedded GPUs. Biomed Opt Express 8:1731–1740. CrossRefGoogle Scholar
  10. 10.
    Liu Y, Yu M, Cui L, Jiang G, Wang G, Fan S (2016) Disparity serving based fast autofocusing method for stereomicroscope. Opt Appl 46(4):651–663. Google Scholar
  11. 11.
    Sha X, Wang P, Shan P, Li H, Li Z (2017) A fast autofocus sharpness function of microvision system based on the Robert function and Gauss fitting. Microsc Res Tech 80(10):1096–1102. CrossRefGoogle Scholar
  12. 12.
    Sun YS, Duthaler S, Nelson BJ (2005) Autofocusing algorithm selection in computer microscopy. In: IEEE/RSJ International Conference on Intelligent Robots and Systems, pp. 70–76.
  13. 13.
    Geusebroek J, Cornelissen F, Smeilders A, Geerts H (2000) Robust autofocusing in microscopy. Cytometry 39:1–9.<1::AID-CYTO2>3.0.CO;2-J CrossRefGoogle Scholar
  14. 14.
    Pech-Pacheco JL, Cristobal G, Chamorro Martinez J, Fernandez Valdivia J (2000) Diatom autofocusing in brightfield microscopy: a comparative study. In: Proceedings of the International Conference on Pattern Recognition, vol. 3, pp. 314–317.
  15. 15.
    Silvestri L, Muellenbroich MC, Costantini I, Di Giovanna AP, Sacconi L, Pavone FS (2017) RAPID: Real-time image-based autofocus for all wide-field optical microscopy systems. bioRxiv 170555;
  16. 16.
    Santos A, de Solorzano CO, Vaquero JJ, Pena JM, Mapica N, Pozo FD (1997) Evaluation of autofocus functions in molecular cytogenetic analysis. J Microsc 188:264–272. CrossRefGoogle Scholar
  17. 17.
    Yi Y, Besma A, Narjes D, Mongi A (2006) Evaluation of sharpness measures and search algorithms for the auto focusing of high-magnification images. In: Proc. SPIE 6246, Visual Information Processing XV, 62460G
  18. 18.
    Wei W, Yang X, Zhou, B, Feng J, Shen P (2012) Combined energy minimization for image reconstruction from few views. Mathematical Problems in Engineering, Article ID 154630, 1–15
  19. 19.
    Gabryel M, Korytkowski M, Scherer R, Rutkowski L (2013) Object detection by simple fuzzy classifiers generated by boosting. In: Rutkowski L, Korytkowski M, Scherer R, Tadeusiewicz R, Zadeh LA, Zurada JM (eds) Artificial intelligence and soft computing. ICAISC 2013, Lecture notes in computer science, vol 7894. Springer, Berlin, pp 540–547. Google Scholar
  20. 20.
    Said P, Domenec P, Miguel AG (2013) Analysis of focus measure operators for shape-from-focus. Pattern Recogn 46(5):1415–1432. CrossRefzbMATHGoogle Scholar
  21. 21.
    Wencheng W, Faliang C (2011) A multi-focus image fusion method based on Laplacian pyramid. J Comput 6(12):2559–2566. Google Scholar
  22. 22.
    Helmli F, Scherer S (2001) Adaptive shape from focus with an error estimation in light microscopy. In: Proceedings of the International Symposium on Image and Signal Processing and Analysis, pp. 188–193..
  23. 23.
    Minhas R, Mohammed AA, Wu QM, Sid Ahmed MA (2009) 3D shape from focus and depth map computation using steerable filters. In: International Conference on Image Analysis and Recognition, pp. 573–583.
  24. 24.
    Krotkov E, Martin JP (1986) Range from focus. In: International Conference on Robotics And Automation, vol. 3, pp. 1093–1098.
  25. 25.
    Lu Q, Xu N, Fang X (2016) Motion-compensated frame interpolation with multiframe-based occlusion handling. J Disp Technol 12(1):45–54. CrossRefGoogle Scholar

Copyright information

© Springer-Verlag London Ltd., part of Springer Nature 2019

Authors and Affiliations

  1. 1.Kaunas University of TechnologyKaunasLithuania
  2. 2.Institute of Mathematics, Silesian University of TechnologyGliwicePoland

Personalised recommendations