Skip to main content

Advertisement

Log in

Image Sobel edge extraction algorithm accelerated by OpenCL

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

Abstract

Aiming at the low processing speed of the Sobel edge detection algorithm and the equipment limitations of Compute Unified Device Architecture (CUDA) implementation algorithm acceleration, a Sobel edge detection parallel algorithm based on Open Computing Language (OpenCL) architecture is proposed. The algorithm uses the heterogeneous mode of CPU + GPU to achieve algorithm acceleration. According to the parallel structure and hardware characteristics of Graphics Processing Unit (GPU), the parallel algorithm adopts two acceleration technologies, multi-level storage technology, and vector access technology, which optimizes the data storage structure, improves the data access efficiency, and reduces the complexity of the algorithm. Unlike the CUDA implementation algorithm acceleration for NVIDIA graphics card devices, the OpenCL parallel improved algorithm has no device limitations. Experimental results show that compared with the CPU serial algorithm, the OpenMP parallel algorithm, and the CUDA parallel algorithm, the parallel algorithm has obtained 9.55 times, 2.23 times, and 1.17 times speedup, respectively. The parallel algorithm in this paper shows good data expansibility and platform portability and can provide technical support for the deep application of massive image data.

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

Similar content being viewed by others

References

  1. Reichenbach M, Holzinger P, Haublein K et al (2019) Heterogeneous computing utilizing FPGAs: a new and flexible approach integrating dedicated hardware accelerators into common computing platforms. J Signal Process Sys 91(7):745–757

    Article  Google Scholar 

  2. Lee J, Tang H, Park J (2018) Energy efficient Canny edge detector for advanced mobile vision applications. IEEE T Circ Syst Vid 28(4):1037–1046

    Article  Google Scholar 

  3. Bonny T and Henno S (2018) Image edge detectors under different noise levels with FPGA implementations. J Circuit Syst Comp 27(13):1850209.1–1850209.22

  4. Wang P, McAllister J (2016) Streaming elements for FPGA signal and image processing accelerators. IEEE T Vlsi Syst 24(6):2262–2274

    Article  Google Scholar 

  5. Dhivya R, Prakash R (2019) Edge detection of satellite image using fuzzy logic. Cluster Comput 22(5):11891–11898

    Article  Google Scholar 

  6. Zhang YS, Huang H, Xiang Y et al (2017) Harnessing the hybrid cloud for secure big image data service. IEEE Internet Things 4(5):1380–1388

    Article  Google Scholar 

  7. Kumar V, Asati A, Gupta A (2017) Hardware implementation of a novel edge-map generation technique for pupil detection in NIR images. Eng Sci Technol 20(2):694–704

    Google Scholar 

  8. Dai LF, Deng HM (2018) Real-time edge detection based on improved Sobel operator and its FPGA implementation. Electron World 25(22):118–120

    Google Scholar 

  9. Du JB,Dong EZ and Zhang ZF (2018) Design of real-time edge detection system based on the improved Sobel operator and its FPGA implementation. J Tianjin Univ Technol 34(04):26–29, 39

  10. Li XK, Gao C, Guo YC et al (2013) The inspection method based on distributed machine vision for surface defects of bridge cable. Opt Tech 39(05):424–428

    Google Scholar 

  11. Lin YJ, Li DJ, Liang GJ et al (2016) Verilog HDL implementation of a lane departure warning system based on FPGA. Electron Sci Technol 29(05):135–138

    Google Scholar 

  12. Sangeetha D, Deepa P (2019) FPGA implementation of cost-effective robust Canny edge detection algorithm. J Real-Time Image Pr 16(4):957–970

    Article  Google Scholar 

  13. Lan GW, Shen YZ, Chen TW et al (2017) Parallel implementations of structural similarity based no-reference image quality assessment. Adv Eng Softw 114(10):372–379

    Article  Google Scholar 

  14. Cui ZY, Quan HB, Cao Z et al (2018) SAR target CFAR detection Via GPU parallel operation. IEEE J-Stars 11(12):4884–4894

    Google Scholar 

  15. Wang XD, Zhao RH, Ji C et al (2017) DSP programming and implementation of edge extraction algorithm in medical image base on Sobel operator. Chinese J Med Phys 34(7):690–692

    Google Scholar 

  16. Zhou GY, Liu HZ (2015) Implementation of edge detection algorithm in FPGA. Comput Syst Appl 24(10):271–275

    Google Scholar 

  17. Yang S, Yuan TT, Tong ZB (2019) FPGA graphic programming design in digital image processing. Comput Syst Appl 28(2):259–263

    Google Scholar 

  18. Xie XY, Zhang YT, Liu ZT (2018) FPGA implementation of feature detection algorithm based on high level synthesis. Res Explor Lab 37(01):93–97,117

  19. Sun JC, Wang ZY, Zhang B et al (2019) Sobel edge detection algorithm and VGA display based on FPGA. J Qingdao Univ 34(02):21–26

    Google Scholar 

  20. Zekri AS (2018) Optimizing image spatial filtering on single CPU core. Multimed Tools Appl 77(1):251–281

    Article  Google Scholar 

  21. Knap M, Czarnul P (2019) Performance evaluation of unified memory with prefetching and oversubscription for selected parallel CUDA applications on NVIDIA Pascal and Volta GPUs. J Supercomput 75(11):7625–7645

    Article  Google Scholar 

  22. Fredj HB, Ltaif M, Ammar A et al (2017) Parallel implementation of Sobel filter using CUDA. In: Proceedings of International Conference on Control, Automation and Diagnosis, pp 209–212

  23. Filatov VI (2012) Image-processing methods on general-purpose graphics processors with parallel architecture. J Opt Technol 79(11):716–720

    Article  Google Scholar 

  24. Xu CR, Wang CY, Yuan XH (2014) Sobel filtering technology based on MapReduce model. Sci Surv Map 39(10):85–88

    Google Scholar 

  25. Fernández-Fabeiro J, Andrade D, Fraguela BB et al (2020) An automatic optimizer for heterogeneous devices. Future Gener Comp Sy 106(5):572–584

    Article  Google Scholar 

  26. Al-Shorman MY, Al-Kofahi MM (2019) Ultrasonic pulse propagation simulation using OpenCL for environment mapping and discovery. J Central South Univ 33(5):1019–1029

    Google Scholar 

  27. Hoozemans J, Straten JV, Viitanen T et al (2019) Almarvi execution platform: heterogeneous video processing SoC platform on FPGA. J Signal Process Sys 91(1):61–73

    Article  Google Scholar 

  28. Purkayastha AA, Samuel R, Shiddibhavi SA et al (2020) LLVM-based automation of memory decoupling for OpenCL applications on FPGAs. Microprocess Microsy 72(2):1–14

    Google Scholar 

  29. Andrew L, Christopher E (2019) Analysis of heterogeneous computing approaches to simulating heat transfer in heterogeneous material. J Parallel Distr Com 133(11):1–17

    Google Scholar 

  30. Malmir S, Shalchian M (2019) Design and FPGA implementation of dual-stage lane detection, based on Hough transform and localized stripe features. Microprocess Microsy 64(10):12–22

    Article  Google Scholar 

  31. Lu ZY, Wang XM, Shang JZ et al (2019) A multimedia image edge extraction algorithm based on flexible representation of quantum. Multimed Tools Appl 78(17):24067–24082

    Article  Google Scholar 

  32. Kho Daniel CK, Fauzi FMFA et al (2019) Hardware-based Sobel gradient computations for sharpness enhancement. Int J Technol Des Ed 10(7):1315–1325

    Article  Google Scholar 

  33. Shi T, Kong JY, Wang XD et al (2016) Improved Sobel algorithm for defect detection of rail surfaces with enhanced efficiency and accuracy. J Central South Univ 23(11):2867–2875

    Article  Google Scholar 

  34. Fan P, Zhou RG, Hu WW et al (2019) Quantum image edge extraction based on classical Sobel operator for NEQR. Quantum Inf Process 18(1):1–23

    Article  Google Scholar 

Download references

Acknowledgements

The author(s) disclosed receipt of the following financial support for the research, authorship, and/or publication of this article: This work was supported in part by the Key Scientific Research Projects of Henan Province Colleges and Universities of China under Grant 22A520049, in part by the Key Laboratory Open Foundation for Geo-Environmental Monitoring of Great Bay Area (Shen-zhen University) through the Ministry of Natural Resources of the People's Republic of China under Grant SZU51029202003, in part by the National Natural Science Foundation of China under Grant 41601496, and in part by the Key project of Art Science in Shandong Province under Grant ZD202008267 and Grant 201806353.

Funding

Ministry of Water Resources, SZU51029202003, Cailin Li; National Natural Science Foundation of China, 41601496, Cailin Li; Chinese Academy of Sciences Key Project, ZD202008267, Cailin Li; Shandong Provincial Key Laboratory of Software Engineering, 201806353, Cailin Li; Key Scientific Research Project of Colleges and Universities in Henan Province, 22A520049, Han Xiao.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Cailin Li.

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

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Xiao, H., Xiao, S., Ma, G. et al. Image Sobel edge extraction algorithm accelerated by OpenCL. J Supercomput 78, 16236–16265 (2022). https://doi.org/10.1007/s11227-022-04404-8

Download citation

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11227-022-04404-8

Keywords

Navigation