xavigibert / ShearCuda

Implementation of Discrete Shearlet Transform on GPU with applications in anomaly detection and denoising
GNU General Public License v3.0
7 stars 2 forks source link

ShearCuda

This package contains ShearCuda, a CUDA port of the 2D and 3D Shearlet transforms. If you use our code, please cite the following paper:

Available at http://link.springer.com/article/10.1186%2F1687-6180-2014-64

Prerequisites

This library is based on NVIDIA CUDA and MATLAB. To use this library it is necessary to have a device that supports CUDA. The development has been done in Linux (specifically RHEL 6), but the code should compile without changes on Windows and Mac OS X.

Environment settings

CUDA environment needs to be set up before starting MATLAB. In addition, you need to define CUDA_PATH to the base path where CUDA is installed. For example, a script to launch MATLAB in Linux could be: relies on CUDA_PATH to determine the

export PATH=/opt/common/cuda/cuda-5.0.35/bin:$PATH
export LD_LIBRARY_PATH=/opt/common/cuda/cuda-5.0.35/lib64:/usr/lib64/nvidia
export LIBRARY_PATH=/usr/lib64/nvidia
export CUDA_PATH=/opt/common/cuda/cuda-5.0.35
/opt/common/matlab-r2013a/bin/matlab -desktop

Directory structure

The code is organized into the following subdirectories:

Compilation instructions

ShearCuda relies on GPUmat. The instructions below allow compilation of both GPUmat and ShearCuda. We first need to tell GPUmat what version of CUDA it will target:

edit gpumat-code/compile.m

Select CUDA version by changing code(CUDAver = '5.0';) to whatever version of CUDA is installed. Then, type the following command to build the whole thing:

makeall

To avoid error in moduleinit, remove execution flag from NumericsModuleManager

!chmod -x GPUmat/modules/numerics/NumericsModuleManager.mexa64

To verify that module works, run

init

Instructions to generate results from EURASIP paper

The following scripts and project files reproduce the experiments reported in the paper:

Before running any of the MATLAB scripts it is necessary to set up the GPU by running

init