Luis Henrique Alves Lourenço, MSc, 2011

Parallelization of the Canny Edge Detector for the ITK library using CUDA

This research was contucted as a requirement for obtaining the Degree of Master of Science on Informatics on the Federal University of Paraná (UFPR).

Abstract

Image Processing applications might demand a high processing power that single-core computing is not able to deliver. A cheap alternative is the General Purpose computation on Graphics Processing Units (GPGPU). CUDA is the NVidia API implementation of the Graphics Processing Units programming model. Many applications reimplemented with CUDA are achieving significantly performance gains. This work aims to take advantage of the parallel processing capability of the GPU through CUDA computing model to provide better performance for Canny edge detection filter from ITK processing image library. To do so, we present a study on the CUDA and ITK architectures, pertinent concepts, and the approaches that have been used to implement ITK filters on GPU. Besides the Canny edge detection filter, Sobel gradient computation and Gaussian smoothing filter were implemented, as well as a CUDA configuration class for ITK. The performance of these filters was evaluated, showing a significant speedup on any NVidia GPU architecture. Furthermore, efficient programming techniques were proposed and evaluated on the NVidia Graphics architectures G80, GT200 and Fermi.

Key-words: GPU Programming; GPGPU; Graphics Processing Units; CUDA; Image Processing; Canny Edge Detection Filter; Gaussian Blur; Convolution; Sobel.

Related Topics

  • General Purpose computing on Graphics Processing Units(GPGPU) using CUDA
  • Image Processing using ITK
  • Parallel Image Processing
  • Canny Edge Detector
  • CITK

Files

Instructions

Step 1: Download the latest release of ITK from their website. Make a directory for CITK and extract the ITK foles into it.

Step 2: Download the latest release of CITK from here. Extract CITK into the same directory as above. You will be prompted to overwrite several files, ensure you do so to avoid future errors.

Step 3: Download the CudaCanny files from here the same way it was done for CITK. Extract CudaCanny files into the same directory as above.

Alternatively, step 3 could be replaced by the application of the CITK_CudaCanny.patch patch with the following command on the ITK build directory:
$ patch -p1 < CITK_CudaCanny.patch

Step 4: Run CMake as you would with any regular build of ITK. Your CUDA directories should be detected automatically using the FindCUDA CMake Module, assuming you have met the requirements above. Ensure the USE_CUDA_SDK flag is off unless you have the SDK installed and plan to use it. Standard CITK does not require the SDK, and if you wish to use it for your own filters it is better to include it separately as needed. You can also install it into a directory to use it.

Code License

The developed code was licensed by an open source BSD license. It is the same license of the Insight Toolkit 3.6 to 3.20 versions. The terms of the license can be found here.

Last Update: 08/10/2011
© 2011, Luis Lourenço < lhal07 (at) gmail (dot) com >