Students involved :
Arailopoulos Vasilis github_profile email : [email protected]
Filis Charis github_profile email : [email protected]
prerequisites:
--nvcc compiler with cl.exe
--gcc compiler
You can run the code in google colab as well and we applaud this.
To use the code first you need to compile it. We have made a Makefile so you can go to Makefile directory and type make in terminal.
Run:
./executable [Path to file] [No. image rows] [No. image cols] [Patch size]
(or for random image matrices)
./executable [Path to file] [No. image rows] [No. image cols] [Patch size]
Create csv for Image(if rgb if not just delete the line rgb2gray and do the same)
run on Matlab the funticion JpgToCSV("PATH")
put noise by running ΑpplyGaussianNoise.m
execute codes with the noisyfile
run ReadAndPrintImage.m
Non-Local Means is an algorithm applied to images in order to denoise them.
First of all the Filter demands to calculate some weights with which the calculation of the weighted average is done.
Where N_k is a neighborhood with the adjoined pixels to pixel k.This equitation gets the gaussian filtered patches of the image.
The parameter Z(i) is computed by the equation
Long story short the updated value of the pixel(assuming that we have a grayscale image and each pixel gets a value ex. 0-255) Is a result of the weighted average shown below.
Where Ω is the definition space of the picture f:Ω -> R the initial picture with noise and f_hat the approximation of the denoised image.
In this assignment the goal is to accelerate the algorithm using CUDA and turn the initial complexity of O(N^4) to O(N^2).
The perfect application for this filter though is in biomedical pictures for example magnetic resonance picture