Skip to content

Implementation from scratch in CUDA C++ of image processing algorithms.

Notifications You must be signed in to change notification settings

KhaledSharif/img-processing-cuda

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Image Processing with CUDA C++

Objective

The objective of this project is to implement from scratch in CUDA C++ various image processing algorithms. A Cpu and a Gpu version of the following algorithms is implemented and commented:

  • Canny Edge Detection
  • Non Local-Means De-Noising
  • K-Nearest Neighbors De-Noising
  • Convolution Blurring
  • Pixelize

We benchmarked the Gpu and Cpu version.

Setup:

Make sure you have a CUDA capable GPU and install cudatoolkit for your OS. Then run:

    cd src/gpu
    mkdir build && cd build
    cmake ..
    make

Algorithms :

Canny Edge Detection

nlm
Detects the edges of an image.

Usage:

    ./main <image_path> edge_detect

Non Local-Means De-noising

nlm
Removes the grain of an image.
Benchmark:

  • Cpu:

  • Gpu:

Usage:

    ./main <image_path> nlm <conv_size> <hyper_param>

K-Nearest Neighbors De-noising

nlm
Removes the noise of an image using the KNN algorithm.
Benchmark:

  • Cpu:

  • Gpu:

Usage:

    ./main <image_path> nlm <conv_size> <block_radius> <weight_decay>

Convolution Blurring

conv_res
Blurs an image using the convolution operator.
Usage:

    ./main <image_path> conv <conv_size>
    ./main <image_path> shared_conv <conv_size>

Use shared_conv for an optimized version using shared memory.

Pixelize

conv_res
Pixelizes an image.
Usage

    ./main <image_path> pixelize <conv_size>

About

Implementation from scratch in CUDA C++ of image processing algorithms.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Cuda 54.0%
  • C++ 42.4%
  • Makefile 1.9%
  • CMake 1.7%