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.
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
Detects the edges of an image.
Usage:
./main <image_path> edge_detect
Removes the grain of an image.
Benchmark:
- Cpu:
- Gpu:
Usage:
./main <image_path> nlm <conv_size> <hyper_param>
Removes the noise of an image using the KNN algorithm.
Benchmark:
- Cpu:
- Gpu:
Usage:
./main <image_path> nlm <conv_size> <block_radius> <weight_decay>
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.
./main <image_path> pixelize <conv_size>