Skip to main content

FPGA Implementation of a Dense Optical Flow Algorithm Using Altera OpenCL SDK

  • 1212 Accesses

Part of the Communications in Computer and Information Science book series (CCIS,volume 778)


FPGA acceleration of compute-intensive algorithms is usually not regarded feasible because of the long Verilog or VHDL RTL design efforts they require. Data-parallel algorithms have an alternative platform for acceleration, namely, GPU. Two languages are widely used for GPU programming, CUDA and OpenCL. OpenCL is the choice of many coders due to its portability to most multi-core CPUs and most GPUs. OpenCL SDK for FPGAs and High-Level Synthesis (HLS) in general make FPGA acceleration truly feasible. In data-parallel applications, OpenCL based synthesis is preferred over traditional HLS as it can be seamlessly targeted to both GPUs and FPGAs. This paper shares our experiences in targeting a demanding optical flow algorithm to a high-end FPGA as well as a high-end GPU using OpenCL. We offer throughput and power consumption results on both platforms.


  • Altera SDK for OpenCL
  • FPGA
  • High-Level Synthesis
  • Dense optical flow

This is a preview of subscription content, access via your institution.

Buying options

USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
USD   39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   54.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

Learn about institutional subscriptions


  1. Pauwels, K., Tomasi, M., Diaz, J., Ros, E., Van Hulle, M.M.: A comparison of FPGA and GPU for real-time phase-based optical flow, stereo, and local image features. IEEE Trans. Comput. 61(7), 999–1012 (2012)

    CrossRef  MathSciNet  MATH  Google Scholar 

  2. Bodily, J., Nelson, B., Wei, Z., Lee, D.-J., Chase, J.: A comparison study on implementing optical flow and digital communications on FPGAs and GPUs. ACM Trans. Reconfigurable Technol. Syst. 3(2), Article 6 (2010)

    Google Scholar 

  3. Muslim, F.B., Ma, L., Roozmeh, M., Lavagno, L.: Efficient FPGA implementation of OpenCL high-performance computing applications via high-level synthesis. IEEE Access 5, 2747–2762 (2017)

    CrossRef  Google Scholar 

  4. Hoffman, H.N.: Program acceleration in a heterogeneous computing environment using OpenCL, FPGA, and CPU. University of Rhode Island DigitalCommons@URI, Open Access Master’s thesis (2017)

    Google Scholar 

  5. Lucas, B.D., Kanade, T.: An iterative image registration technique with an application to stereo vision. In: Proceedings of International Joint Conference on Artificial intelligence (IJCAI), San Francisco, CA, USA, vol. 2, pp. 674–679 (1981)

    Google Scholar 

  6. Horn, B.K.P., Schunck, B.G.: Determining optical flow. Technical report, Massachusetts Institute of Technology, Cambridge, MA, USA (1980)

    Google Scholar 

  7. Büyükaydın, D., Akgün, T.: GPU implementation of an anisotropic Huber-L1 dense optical flow algorithm using OpenCL. In: Proceedings of International Conference on Embedded Computer Systems: Architectures, Modeling, and Simulation (SAMOS), Samos, Greece, pp. 326–331 (2015)

    Google Scholar 

  8. Shiralkar, M.: A self organization-based optical flow estimator with GPU implementation. All dissertations, p. 630 (2010)

    Google Scholar 

  9. Wedel, A., Pock, T., Zach, C., Bischof, H., Cremers, D.: An improved algorithm for TV-L 1 optical flow. In: Cremers, D., Rosenhahn, B., Yuille, A.L., Schmidt, F.R. (eds.) Statistical and Geometrical Approaches to Visual Motion Analysis. LNCS, vol. 5604, pp. 23–45. Springer, Heidelberg (2009). doi:10.1007/978-3-642-03061-1_2

    CrossRef  Google Scholar 

  10. Janik, I., Tang, Q., Khalid, M.: An overview of Altera SDK for OpenCL: a user perspective. In: Proceedings of IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), Halifax, NS, Canada, pp. 559–564 (2015)

    Google Scholar 

  11. Zohouri, H.R., Maruyamay, N., Smith, A., Matsuda, M., Matsuoka, S.: Evaluating and optimizing OpenCL kernels for high performance computing with FPGAs. In: Proceedings of International Conference for High Performance Computing, Networking, Storage and Analysis, Salt Lake City, UT, USA, pp. 409–420 (2016)

    Google Scholar 

  12. Middlebury Optical Flow webpage. Accessed June 2017

  13. Hill, K., Craciun, S., George, A., Lam, H.: Comparative analysis of OpenCL vs. HDL with image-processing kernels on Stratix-V FPGA. In: Proceedings of IEEE International Conference on Application-Specific Systems, Architectures, and Processors (ASAP), Toronto, ON, Canada, pp. 189–193 (2015)

    Google Scholar 

  14. Altera SDK for OpenCL Programming Guide. Accessed June 2017

  15. NALLATECH OpenCL A10 BSP Reference Guide. Accessed June 2017

  16. Altera product selection guide. Accessed June 2017

  17. Güzel, A.E., Levent, V.E., Tosun, M., Özkan, M.A., Akgün, T., Büyükaydın, D., Erbas, C., Ugurdag, H.F.: Using high-level synthesis for rapid design of video processing pipes. In: Proceedings of East-West Design & Test Symposium (EWDTS), Yerevan, Armenia (2016)

    Google Scholar 

  18. Özkan, M.A., Reiche, O., Hannig, F., Teich, J.: FPGA-based accelerator design from a domain-specific language. In: Proceedings of International Conference on Field-Programmable Logic and Applications (FPL), Lausanne, Switzerland (2016)

    Google Scholar 

  19. Artemis JU Project, ALMARVI: Algorithms, Design Methods, and Many-Core Execution Platform for Low-Power Massive Data-Rate Video and Image Processing, GA 621439.

Download references


This work has been at the crossroads of multiple projects, namely, European Union Artemis JU Project called ALMARVI (GA 621439) [19] and TÜBİTAK (The Scientific and Technological Research Council of Turkey) projects ARDEB-114E343, KAMAG-114G029, and TEYDEB-9140015. More specifically, U. Ulutas is supported by KAMAG; M. Tosun and V.E. Levent were supported by ARDEB; D. Büyükaydın and T. Akgün were supported by TEYDEB; and H.F. Ugurdag has assumed leadership roles in the above Artemis, KAMAG, and ARDEB projects.

Author information

Authors and Affiliations


Corresponding author

Correspondence to Umut Ulutas .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and Permissions

Copyright information

© 2017 Springer International Publishing AG

About this paper

Cite this paper

Ulutas, U., Tosun, M., Levent, V.E., Büyükaydın, D., Akgün, T., Ugurdag, H.F. (2017). FPGA Implementation of a Dense Optical Flow Algorithm Using Altera OpenCL SDK. In: Trajanov, D., Bakeva, V. (eds) ICT Innovations 2017. ICT Innovations 2017. Communications in Computer and Information Science, vol 778. Springer, Cham.

Download citation

  • DOI:

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-319-67596-1

  • Online ISBN: 978-3-319-67597-8

  • eBook Packages: Computer ScienceComputer Science (R0)