Skip to content

condesancho/pds_project_3

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

88 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pds_project_3

Students involved :
Arailopoulos Vasilis github_profile email : [email protected]
Filis Charis github_profile email : [email protected]

License: MIT

Non-Local Means Filter – Accelerated with CUDA.

Usage

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

Abstract

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.

equation

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

equation2

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.

equation3

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).

Results

lena umbrella

The perfect application for this filter though is in biomedical pictures for example magnetic resonance picture mag

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published