Skip to main content

Systematic Optimization of Image Processing Pipelines Using GPUs

  • Conference paper
  • First Online:
Advances in Visual Computing (ISVC 2020)

Part of the book series: Lecture Notes in Computer Science ((LNIP,volume 12510))

Included in the following conference series:

Abstract

Real-time computer vision systems require fast and efficient image processing pipelines. Experiments have shown that GPUs are highly suited for image processing operations, since many tasks can be processed in parallel. However, calling GPU-accelerated functions requires uploading the input parameters to the GPU’s memory, calling the function itself, and downloading the result afterwards. In addition, since not all functions benefit from an increase in parallelism, many pipelines cannot be implemented exclusively using GPU functions. As a result, the optimization of pipelines requires a careful analysis of the achievable function speedup and the cost of copying data. In this paper, we first define a mathematical model to estimate the performance of an image processing pipeline. Thereafter, we present a number of micro-benchmarks gathered using OpenCV which we use to validate the model and which quantify the cost and benefits for different classes of functions. Our experiments show that comparing the function speedup without considering the time for copying can overestimate the achievable performance gain of GPU acceleration by a factor of two. Finally, we present a tool that analyzes the possible combinations of CPU and GPU function implementations for a given pipeline and computes the most efficient composition. By using the tool on their target hardware, developers can easily apply our model to optimize their application performance systematically.

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

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Asano, S., Maruyama, T., Yamaguchi, Y.: Performance comparison of FPGA, GPU and CPU in image processing. In: 2009 FPL, pp. 126–131, August 2009

    Google Scholar 

  2. Beymer, D., McLauchlan, P., Coifman, B., Malik, J.: A real-time computer vision system for measuring traffic parameters. In: Proceedings of IEEE CVPR, pp. 495–501, June 1997

    Google Scholar 

  3. Coifman, B., Beymer, D., McLauchlan, P., Malik, J.: A real-time computer vision system for vehicle tracking and traffic surveillance. Transp. Res. Part C Emerg. Technol. 6(4), 271–288 (1998)

    Article  Google Scholar 

  4. Gil, J., Werman, M.: Computing 2-d min, median, and max filters. IEEE PAMI 15(5), 504–507 (1993)

    Article  Google Scholar 

  5. Griffin, G., Holub, A., Perona, P.: Caltech-256 object category dataset (2007, unpublished). https://resolver.caltech.edu/CaltechAUTHORS:CNS-TR-2007-001

  6. Hangün, B., Eyecioğlu, Ö.: Performance comparison between OpenCV built in CPU and GPU functions on image processing operations. IJESA 1, 34–41 (2017)

    Google Scholar 

  7. van Herk, M.: A fast algorithm for local minimum and maximum filters on rectangular and octagonal kernels. Pattern Recognit. Lett. 13(7), 517–521 (1992)

    Article  Google Scholar 

  8. Kurzyniec, D., Sunderam, V.: Efficient cooperation between Java and native codes - JNI performance benchmark. In: 2001 PDPTA (2001)

    Google Scholar 

  9. Marengoni, M., Stringhini, D.: High level computer vision using OpenCV. In: 2011 24th SIBGRAPI Conference on Graphics, Patterns, and Images Tutorials, pp. 11–24, August 2011

    Google Scholar 

  10. NVIDIA Corporation: CUDA C++ programming guide (2020). https://docs.nvidia.com/cuda/cuda-c-programming-guide/index.html. Accessed 22 Sept 2020

  11. Oliver, N.M., Rosario, B., Pentland, A.P.: A Bayesian computer vision system for modeling human interactions. IEEE PAMI 22(8), 831–843 (2000)

    Article  Google Scholar 

  12. OpenCV team: OpenCV (2020). https://opencv.org/. Accessed 28 Feb 2020

  13. Park, S.I., Ponce, S.P., Huang, J., Cao, Y., Quek, F.: Low-cost, high-speed computer vision using NVIDIA’s CUDA architecture. In: 2008 37th IEEE AIPR Workshop, pp. 1–7, October 2008

    Google Scholar 

  14. Park, S.I., Ponce, S.P., Huang, J., Cao, Y., Quek, F.: Low-cost, high-speed computer vision using NVIDIA’s CUDA architecture. In: 2008 37th IEEE AIPR Workshop, pp. 1–7, October 2008

    Google Scholar 

  15. Phipps, G.: Comparing observed bug and productivity rates for Java and C++. Softw. Pract. Exper. 29(4), 345–358 (1999)

    Article  Google Scholar 

  16. Pulli, K., Baksheev, A., Kornyakov, K., Eruhimov, V.: Real-time computer vision with OpenCV. Commun. ACM 55(6), 61–69 (2012)

    Article  Google Scholar 

  17. Samuel Audet: Java interface to OpenCV, FFmpeg, and more (2020). https://github.com/bytedeco/javacv. Accessed 28 Feb 2020

  18. Scharstein, D., et al.: High-resolution stereo datasets with subpixel-accurate ground truth. In: Jiang, X., Hornegger, J., Koch, R. (eds.) GCPR 2014. LNCS, vol. 8753, pp. 31–42. Springer, Cham (2014). https://doi.org/10.1007/978-3-319-11752-2_3

    Chapter  Google Scholar 

  19. Shehu, V., Dika, A.: Using real time computer vision algorithms in automatic attendance management systems. Proc. ITI 2010, 397–402 (2010)

    Google Scholar 

  20. Thomas, D.B., Howes, L., Luk, W.: A comparison of CPUs, GPUs, FPGAs, and massively parallel processor arrays for random number generation. In: Proceedings of the ACM/SIGDA FPGA, FPGA 2009, pp. 63–72. Association for Computing Machinery, New York (2009)

    Google Scholar 

  21. Thurley, M.J., Danell, V.: Fast morphological image processing open-source extensions for GPU processing with CUDA. IEEE JSTSP 6(7), 849–855 (2012)

    Google Scholar 

  22. Yan, X., Shi, X., Wang, L., Yang, H.: An OpenCL micro-benchmark suite for GPUs and CPUs. J. Supercomput. 69(2), 693–713 (2014)

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Peter Roch .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2020 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Roch, P., Shahbaz Nejad, B., Handte, M., Marrón, P.J. (2020). Systematic Optimization of Image Processing Pipelines Using GPUs. In: Bebis, G., et al. Advances in Visual Computing. ISVC 2020. Lecture Notes in Computer Science(), vol 12510. Springer, Cham. https://doi.org/10.1007/978-3-030-64559-5_50

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-64559-5_50

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-64558-8

  • Online ISBN: 978-3-030-64559-5

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics