Real-time gradient vector flow on GPUs using OpenCL
- 1k Downloads
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.
KeywordsGradient Vector Flow GPU OpenCL
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.
- 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)Google Scholar
- 3.Bauer, C., Bischof, H.: Extracting curve skeletons from gray value images for virtual endoscopy. Medical Imaging and Augmented Reality, pp. 393–402 (2008)Google Scholar
- 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)Google Scholar
- 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)Google Scholar
- 7.He, Z., Kuester, F.: GPU-based active contour segmentation using gradient vector flow. In: Advances in Visual Computing, pp. 191–201 (2006)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