Skip to main content
Log in

Precise Z-Block positioning and dimension measurement using improved Canny edge detection and sub-pixel contour fitting

  • Published:
The Journal of Supercomputing Aims and scope Submit manuscript

Abstract

Z-Block-type optical combining device based on Lan-WDM technology are widely used in the transmitter end of optical communication in data centers, and with the wide range of applications, higher requirements are put forward for their production efficiency and dimensional accuracy. In order to solve the problems of low efficiency, susceptibility to human factor interference and low measurement accuracy in the traditional manual method of sorting and dimensioning measurement in the Z-Block production process, this study proposes a Z-Block centroid positioning and dimensioning scheme based on a machine vision method. Firstly, the Z-Block visual automatic sorting and dimensioning measurement system scheme and optical imaging scheme were designed to achieve high-quality imaging of Z-Block. Then, according to the problems of image edge noise, poor contrast, and weak edge caused by the complex production environment in the process of Z-Block visual imaging, an improved Canny edge detection algorithm was proposed, which used Blob analysis for denoising and ROI positioning, optimized gradient strength and direction calculation method and local dynamic threshold selection method, and realized high-accuracy edge detection. Finally, in order to solve the problems of inaccurate measurement point division and unsmooth overall contour in the edge detection results, a contour fitting method based on sub-pixel accuracy was proposed to achieve high-precision dimensional measurement. Experimental results show that the proposed method, on the basis of high-accuracy edge detection and high-precision contour fitting method, achieves the average error of center point positioning of (5, 5) pixel, the average error of dimensional measurement (0.03, 0.03) mm, and the average execution time of the algorithm is 143.34 ms, which can meet the automatic production of Z-Block.

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

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

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
Fig. 15

Similar content being viewed by others

Data availability

No datasets were generated or analyzed during the current study.

References

  1. Kong YL (2023) Multi-material 3D printing guided by machine vision. Nature 623(7987):488–490. https://doi.org/10.1038/d41586-023-03420-9

    Article  Google Scholar 

  2. Tomar B, Kumar N, Sreejeth M (2023) Real time automation and ratio control using PLC & SCADA in industry 4.0. Comput Syst Sci Eng. https://doi.org/10.32604/csse.2023.030635

    Article  Google Scholar 

  3. Lin S, Feng Y (2022) Procedure control and interface design of automobile connector automatic assembly device. Acad J Eng Technol Sci 5(13):62–68. https://doi.org/10.25236/AJETS.2022.051310

    Article  Google Scholar 

  4. Zhang F, Wu T, Liu S et al (2024) Real-time defect detection of saw chains on automatic assembly lines based on residual networks and knowledge coding. Eng Appl Artif Intell 128:107507. https://doi.org/10.1016/j.engappai.2023.107507

    Article  Google Scholar 

  5. Xiong J, He Z, Zhou Q et al (2024) Photovoltaic glass edge defect detection based on improved SqueezeNet. SIViP 18:2841–2856. https://doi.org/10.1007/s11760-023-02954-9

    Article  Google Scholar 

  6. Brion Douglas AJ, Matthew S, Pattinson Sebastian W et al (2022) Automated recognition and correction of warp deformation in extrusion additive manufacturing. Addit Manuf 56:102838. https://doi.org/10.1016/j.addma.2022.102838

    Article  Google Scholar 

  7. HYC integrated Z-block subassemblies for 400G transceivers. Fibre systems (2023)(39):30. Accessed 29 May, 2024. https://search.ebscohost.com/login.aspx?direct=true&db=aci&AN=162905364&lang=zh-cn&site=ehost-live.

  8. II-VI Incorporated Unveils Miniature Z-block Optics for 100 Gb/s Datacenter Transceivers. Fiber Optics & Communications. (2017) 40(1):10. Accessed 29 May, 2024. https://search.ebscohost.com/login.aspx?direct=true&db=aci&AN=122701345&lang=zh-cn&site=ehost-live.

  9. Liu J, Li C, Pan J, Guo J (2024) Visual communication of moving images based on AI recognition and light sensing image edge detection algorithm. Opt Quant Electron 56(4):1–22. https://doi.org/10.1007/s11082-024-06542-0

    Article  Google Scholar 

  10. Guo J, Chen H, Liu B, Xu F (2023) A system and method for person identification and positioning incorporating object edge detection and scale-invariant feature transformation. Measurement 223:113759. https://doi.org/10.1016/j.measurement.2023.113759

    Article  Google Scholar 

  11. Yang W, Meng W, Shi D et al (2023) Single-pixel edge imaging with gradient Radon spectrum. Opt Commun 529:129064. https://doi.org/10.1016/j.optcom.2022.129064

    Article  Google Scholar 

  12. Yang G, Wang Y, Zhou N (2021) Detection of weld groove edge based on multilayer convolution neural network. Measurement 186:110129. https://doi.org/10.1016/j.measurement.2021.110129

    Article  Google Scholar 

  13. Tanriover I, Dereshgi SA, Aydin K (2023) Metasurface enabled broadband all optical edge detection in visible frequencies. Nat Commun 14(1):6484. https://doi.org/10.1038/s41467-023-42271-w

    Article  Google Scholar 

  14. Ma C, Kim S, Fang NX (2019) Far-field acoustic subwavelength imaging and edge detection based on spatial filtering and wave vector conversion. Nature Commun 10(1):204. https://doi.org/10.1038/s41467-018-08221-7

    Article  Google Scholar 

  15. Karakuş P (2024) Machine whell edge detection morphological operations. Konya J Eng Sci/Konya Mühendislik Bilimleri Dergisi. 12(1):251–262. https://doi.org/10.36306/konjes.1418523

    Article  MathSciNet  Google Scholar 

  16. Tong ZS, Liu ZT, Hu CY et al (2021) Preconditioned deconvolution method for high-resolution ghost imaging. Photonics Res 9(6):2327–9125. https://doi.org/10.1364/PRJ.420326

    Article  Google Scholar 

  17. Yang D, Peng B, Al-Huda Z, Malik A, Zhai D (2022) An overview of edge and object contour detection. Neurocomputing 488:470–493. https://doi.org/10.1016/j.neucom.2022.02.079

    Article  Google Scholar 

  18. Canny J (1986) A computational approach to edge detection. IEEE Transact Pattern Anal Mach Intell 8(6):679–698

    Article  Google Scholar 

  19. Benhamza K, Seridi H (2021) Canny edge detector improvement using an intelligent ants routing. Evolv Syst 12(2):397–406. https://doi.org/10.1007/s12530-019-09299-0

    Article  Google Scholar 

  20. Yu X, Wang Z, Wang Y, Zhang C (2021) Edge detection of agricultural products based on morphologically improved Canny algorithm. Math Probl Eng. https://doi.org/10.1155/2021/6664970

    Article  Google Scholar 

  21. Baloch A, Memon TD, Memon F et al (2021) Hardware synthesize and performance analysis of intelligent transportation using Canny edge detection algorithm. Int J Eng Manuf (IJEM). 11(4):22–32. https://doi.org/10.5815/ijem.2021.04.03

    Article  Google Scholar 

  22. Wang X, Liu S, Zhang H, Li Y, Ren H (2024) Defects detection of lithium-ion battery electrode coatings based on background reconstruction and improved Canny algorithm. Coatings 14(4):392. https://doi.org/10.3390/coatings14040392

    Article  Google Scholar 

  23. Awalludin EA , Yaziz MYM , Rahman NRA et al. (2019) Combination of Canny Edge Detection and Blob Processing Techniques for Shrimp Larvae Counting. In: 2019 IEEE International Conference on Signal and Image Processing Applications (ICSIPA) IEEE. https://doi.org/10.1109/ICSIPA45851.2019.8977746.

  24. Lynn ND, Sourav AI, Santoso AJ (2021) Implementation of Real-Time Edge Detection Using Canny and Sobel Algorithms. In: IOP Conference Series: Materials Science and Engineering. 1096(1):012079 (8pp).https://doi.org/10.1088/1757-899X/1096/1/012079.

  25. Wang J, Chen J (2022) Subpixel edge detection algorithm based on improved Gaussian fitting and Canny operator. Acad J Comput Inf Sci 5(7):33–39. https://doi.org/10.25236/AJCIS.2022.050706

    Article  Google Scholar 

  26. Monicka SG, Manimegalai D, Karthikeyan M (2022) Detection of microcracks in silicon solar cells using Otsu-Canny edge detection algorithm. Renew En Focus 43:183–190. https://doi.org/10.1016/j.ref.2022.09.002

    Article  Google Scholar 

  27. Mishra S, Thanh LT (2022) SATMeas-object detection and measurement: canny edge detection algorithm. In: International Conference on AI and Mobile Services, Cham: Springer International Publishing, pp 91–101 https://doi.org/10.1007/978-3-031-23504-7_7.

  28. Dai W, Na J, Huang N et al (2019) Integrated edge detection and terrain analysis for agricultural terrace delineation from remote sensing images. Int J Geogr Inf Sci 6:1–20. https://doi.org/10.1080/13658816.2019.1650363

    Article  Google Scholar 

  29. Wang L, Gu X, Liu Z et al (2022) Automatic detection of asphalt pavement thickness: a method combining GPR images and improved Canny algorithm. Measurement. https://doi.org/10.1016/j.measurement.2022.111248

    Article  Google Scholar 

  30. Hu T, Yuan J, Zhou X et al (2022) A two-dimensional entropy-based method for detecting the degree of segregation in asphalt mixture. Constr Build Mater 347:128450. https://doi.org/10.1016/j.conbuildmat.2022.128450

    Article  Google Scholar 

  31. Lijun Y, Mengbo L, Tongxin W, Youfeng B, Junhui L, Yi J (2023) Geo-information mapping improves Canny edge detection method. IET Image Process 17(6):1893–1904. https://doi.org/10.1049/ipr2.12764

    Article  Google Scholar 

  32. Lu Y, Duanmu L, Zhai ZJ, Wang Z (2022) Application and improvement of Canny edge-detection algorithm for exterior wall hollowing detection using infrared thermal images. Energy Build 274:112421. https://doi.org/10.1016/j.enbuild.2022.112421

    Article  Google Scholar 

  33. Naji OAAM, Shah HNM, Anwar NSN, Johan NF (2023) Square groove detection based on Förstner with Canny edge operator using laser vision sensor. Int J Adv Manuf Technol 125(5/6):2885–2894. https://doi.org/10.1007/s00170-023-10862-y

    Article  Google Scholar 

  34. Piao J, Shin H (2017) Robust hypothesis generation method using binary blob analysis for multi-lane detection. IET Image Proc 11(12):1210–1218. https://doi.org/10.1049/iet-ipr.2016.0506

    Article  Google Scholar 

  35. Yusuf MD, Kusumanto RD, Oktarina Y, Dewi T, Risma P (2018) BLOB Analysis for Fruit Recognition and Detection. Comput Eng Appl J 7(1):25–35. https://doi.org/10.18495/comengapp.v7i1.237

    Article  Google Scholar 

  36. Di Ruberto C, Loddo A, Puglisi G (2020) Blob detection and deep learning for leukemic blood image analysis. Appl Sci 10(3):1176. https://doi.org/10.3390/app10031176

    Article  Google Scholar 

  37. Wenda A, Permana I, Yusmar Y, Kurniawati NN (2020) Identification of paddy leaf diseases based on texture analysis of blobs and color segmentation. Telkomnika. 18(4):2018–2026. https://doi.org/10.12928/TELKOMNIKA.v18i4.14614

    Article  Google Scholar 

  38. Pan RZ, Li C, Hu B et al (2024) Research on the examination technology of connector pin skewing according to blob analysis. Meas Sci Technol 3:35. https://doi.org/10.1088/1361-6501/ad10df

    Article  Google Scholar 

  39. Bharodiya AK, Gonsai AM (2020) An intelligent assistive algorithm for bone tumor detection from human X-Ray images based on binary Blob analysis. Int J Inf Technol. https://doi.org/10.1007/s41870-020-00539-0

    Article  Google Scholar 

  40. Dewi T, Mulya Z, Risma P et al (2021) BLOB analysis of an automatic vision guided system for a fruit picking and placing robot. Int J Comput V Robot 11(3):315–327. https://doi.org/10.1504/IJCVR.2021.115161

    Article  Google Scholar 

  41. Sobel I, Feldman G (1968) A 3x3 isotropic gradient operator for image processing. In: A Talk at the Stanford Artificial Project, vol 1968, pp 271–272

  42. Roberts LG (1965) Machine perception of three-dimensional solids. Mass Inst Technol. https://doi.org/10.1016/0045-7949(85)90050-1

    Article  Google Scholar 

  43. Weickert J, Scharr H (2002) A scheme for coherence-enhancing diffusion filtering with optimized rotation invariance. J Vis Commun Image Represent 13(1–2):103–118. https://doi.org/10.1006/jvci.2001.0495

    Article  Google Scholar 

  44. Liu Y, Cheng MM, Hu X et al (2016) Richer convolutional features for edge detection. IEEE Comput Soc. https://doi.org/10.1109/CVPR.2017.622

    Article  Google Scholar 

  45. Wang Z, Bovik AC, Sheikh HR, Simoncelli EP (2004) Image quality assessment: from error visibility to structural similarity. IEEE Trans Image Process 13(4):600–612. https://doi.org/10.1109/TIP.2003.819861

    Article  Google Scholar 

Download references

Acknowledgements

This work was supported by the Natural Science Research Project of Anhui Provincial Universities (2023AH051663), the University-level Scientific Research Project of Tongling University (2023TLXY11), Outstanding Young Teachers Cultivation Key Project (YQZD2024044), and the Industry-University-Research Horizontal Research Project (2023TLXYXDZ019).

Author information

Authors and Affiliations

Authors

Contributions

J.X.Ideas, presented creation of models, most algorithm simulations, Writing-original draft, software, Z-Block sample surface characterization, optical imaging scheme design and experiments. D.S.W. performed formulation or evolution of overarching research goals and aims, provision of study materials, reviewing and editing. J.Y. did program architecture design, modeling and data validation. R.F.W.conducted optical imaging experiments.

Corresponding author

Correspondence to Jie Xiong.

Ethics declarations

Conflict of interest

The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.

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

Xiong, J., Wang, D., Yin, J. et al. Precise Z-Block positioning and dimension measurement using improved Canny edge detection and sub-pixel contour fitting. J Supercomput 81, 230 (2025). https://doi.org/10.1007/s11227-024-06769-4

Download citation

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s11227-024-06769-4

Keywords