Non-Local Means for Image Denoising using CUDA
- Octave/Matlab
- NVIDIA GPU and CUDA
$ make <version>
If requirements are fulfilled then in the root directory:
$ octave src/octave/pipeline.m <version name: v0 or v1 or v2> <args>
$ octave src/octave/pipeline.m v0 data/<image_file.jpg> <patch size>
$ octave src/octave/pipeline.m <v1 or v2> data/<image_file.jpg> <patch size> <grid size> <block size>
If requirements are not fulfilled, for CUDA versions v1, v2 we can break the execution in three steps:
octave src/octave/jpg2array.m <image_file.jpg> # create a noised image represented in a 2d array
In a compatible CUDA system (e.g. Google Colab):
$ make <version: v1 or v2>
$ ./bin/<version> data/noise_image.txt <patch size> <grid size> <block size>
Rendering the filtered image:
$ octave src/octave/rendering.m <version>
In early stages of development, we need to be sure that our CPU implementation in C is working in the same way with a given tested Matlab implementation. So we had the following validation pipeline:
In the current state, we check only for CUDA versions, the filtered values with respect to CPU version. If requirements are fulfilled then for validation check, run the pipeline.m
script, passing as a last argument: --debug
.
Due to floating point arithmetic and the usage of -use_fast_math compiler flag, different values have been spotted. We assume valid a difference less than 1e-4.