No description, website, or topics provided.
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
build readme and master cmake file Jan 26, 2016
cmake mex interface, VS settings Jun 12, 2017
doc import old svn repo + history, delete unused files Jul 30, 2016
tests use Anaconda environment for python if available. Feb 5, 2018
.gitignore improved ndarray_io -- saving shape too Apr 3, 2017
.gitlab-ci.yml Update .gitlab-ci.yml to reflect removal of christianR's pc from the … May 8, 2017
CMakeLists.txt collected arch=sm* settings into one file Jun 8, 2017
ImageUtilitiesConfig.cmake collected arch=sm* settings into one file Jun 8, 2017
LICENSE added licence Jul 27, 2016 Update May 9, 2017
iu_settings.cmake.txt collected arch=sm* settings into one file Jun 8, 2017

ImageUtilities - Bridge the gap between CPU and GPU


  • Set up environment variable COMPUTE_CAPABILITY with the compute capability of your CUDA-enabled GPU (

  • Set up environment variable CUDA_SDK_ROOT_DIR to point to the NVidia CUDA examples

  • IMPORTANT: Set up environment variable IMAGEUTILITIES_ROOT to point to the path of this directory

  • To use the matlab wrapper, set up environment vaiable MATLAB_ROOT to point to matlab root directory

To build simply perform the following steps:

$ cd build
$ cmake ..
$ make
$ make install

The iugui module needs QT5 (>=5.6), the iuio module OpenCV 2.4 or 3.x.


A pre-built documentation is available here. To build the documentation on your own (requires doxygen), additionally do

$ make apidoc


In your cmake-based project include the following lines

find_package(ImageUtilities REQUIRED COMPONENTS iucore)

and link your application with



Image Utilities take away the hassle of memory management when dealing with CUDA code. The follwing code snippet shows a simple example of image manipulation using CUDA:

// read two images from files
iu::ImageGpu_32f_C1 *I1 = iu::imread_cu32f_C1(DATA_PATH("army_1.png"));
iu::ImageGpu_32f_C1 *I2 = iu::imread_cu32f_C1(DATA_PATH("army_2.png"));
// allocate memory for the output
iu::ImageGpu_32f_C1 result(I1->size());

// Add 0.5 to the first image and save the result

// Subtract one image from the other and save the result

They also make it easy to use images in CUDA kernels by providing additional information about the image that can be easily passed to kernels. Host code:

iu::ImageGpu_32f_C1 img(320,240);

dim3 dimBlock(16, 16);
dim3 dimGrid(iu::divUp(img.width(), dimBlock.x), img.height(), dimBlock.y);

test_kernel <<< dimGrid, dimBlock >>> (img);

and the device code:

__global__ void test_kernel(iu::ImageGpu_32f_C1::KernelData img)
    int x = blockIdx.x*blockDim.x + threadIdx.x;
    int y = blockIdx.y*blockDim.y + threadIdx.y;

    if (x < img.width_ && y < img.height_)
        img(x,y) = x+y;