Skip to main content
Log in

Real-time gradient vector flow on GPUs using OpenCL

  • Original Research Paper
  • Published:
Journal of Real-Time Image Processing Aims and scope Submit manuscript

Abstract

The Gradient Vector Flow (GVF) is a feature-preserving spatial diffusion of gradients. It is used extensively in several image segmentation and skeletonization algorithms. Calculating the GVF is slow as many iterations are needed to reach convergence. However, each pixel or voxel can be processed in parallel for each iteration. This makes GVF ideal for execution on Graphic Processing Units (GPUs). In this paper, we present a highly optimized parallel GPU implementation of GVF written in OpenCL. We have investigated memory access optimization for GPUs, such as using texture memory, shared memory and a compressed storage format. Our results show that this algorithm really benefits from using the texture memory and the compressed storage format on the GPU. Shared memory, on the other hand, makes the calculations slower with or without the other optimizations because of an increased kernel complexity and synchronization. With these optimizations our implementation can process 2D images of large sizes (5122) in real-time and 3D images (2563) using only a few seconds on modern GPUs.

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.

Institutional subscriptions

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

Notes

  1. The source code of this implementation is available online at http://www.github.com/smistad/OpenCL-GVF/.

References

  1. AMD: AMD APP OpenCL programming guide. Technical report, AMD (2011) (http://developer.amd.com/sdks/amdappsdk/assets/AMD_Accelerated_Parallel_Processing_OpenCL_Programming_Guide.pdf). Last accessed December 2011

  2. Bauer, C., Bischof H.: A novel approach for detection of tubular objects and its application to medical image analysis. Pattern Recognit. pp. 163–172 (2008)

  3. Bauer, C., Bischof, H.: Extracting curve skeletons from gray value images for virtual endoscopy. Medical Imaging and Augmented Reality, pp. 393–402 (2008)

  4. Guo, Y., Lu, C.-C.: Multi-modality image registration using mutual information based on gradient vector flow. In: 18th International Conference on Pattern Recognition (ICPR’06), pp. 697–700 (2006)

  5. Han, X., Xu C., Prince, J.L.: Fast numerical scheme for gradient vector flow computation using a multigrid method. IET Image Process. 1(1), 48–55 (2007)

    Google Scholar 

  6. Hassouna, M.S., Farag A.A.: On the extraction of curve skeletons using gradient vector flow. In: 2007 IEEE 11th International Conference on Computer Vision, pp. 1–8 (2007)

  7. He, Z., Kuester, F.: GPU-based active contour segmentation using gradient vector flow. In: Advances in Visual Computing, pp. 191–201 (2006)

  8. Kass, M., Witkin, A., Terzopoulos, D.: Snakes: Active contour models. Int. J. Comput. Vis. 1(4), 321–331 (1988)

    Article  Google Scholar 

  9. NVIDIA: OpenCL best practices guide. technical report, 2009. http://www.nvidia.com/content/cudazone/CUDABrowser/downloads/papers/NVIDIA_OpenCL_BestPracticesGuide.pdf. Last accessed December 2011

  10. Ray, N., Acton, S.T.: Motion gradient vector flow: An external force for tracking rolling leukocytes with shape and size constrained active contours. IEEE Trans. Med. Imaging 23(12):1466–1478 (2004)

    Google Scholar 

  11. Chenyang, X.u., Prince, J.L.: Snakes, shapes, and gradient vector flow. IEEE Trans. Image Process. 7(3), 359–369 (1998)

    Article  MATH  MathSciNet  Google Scholar 

Download references

Acknowledgments

Great thanks goes to the people of the High Performance Computing Lab at NTNU for all their assistance and to Mai Britt Engeness Mørk for her comments on the manuscript. The authors would also like to convey thanks to NTNU, NVIDIA and AMD. Without their hardware contributions to the HPC Lab, this project would not have been possible.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Erik Smistad.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Smistad, E., Elster, A.C. & Lindseth, F. Real-time gradient vector flow on GPUs using OpenCL. J Real-Time Image Proc 10, 67–74 (2015). https://doi.org/10.1007/s11554-012-0257-6

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11554-012-0257-6

Keywords

Navigation