# How to remove gaussian noise?

44 Ansichten (letzte 30 Tage)
Abirami am 1 Nov. 2014
Kommentiert: Image Analyst am 28 Dez. 2020
Hello, I'm working on image encryption. I need to see how well my encryption is so i thght of adding noise and testing it.I added gaussian noise with the following code.My problem is i dont know how to remove it before applying decryption algorithm.i get decimal values, I want to get whole numbers in the resulting matrix.
M =0;
V=0.01;
imshow(I);
title('Original Image');
J = imnoise(I,'gaussian',M,V);
gure,imshow(J);
title('Gaussian Noise');
i'm planning to add other noises as well like poisson noise, speckle noise and salt and pepper noise. Is there any possibility that a code exists for removing all these noises separately? please help..thanks in advance
##### 2 KommentareKeine anzeigenKeine ausblenden
agung pratama am 22 Jul. 2020
What is M and V mean?
Image Analyst am 13 Aug. 2020
Did you look up imnoise() in the help? M is the mean and V is the variance. From the help:
J = imnoise(I,'gaussian',m,var_gauss) adds Gaussian white noise with mean m and variance var_gauss.

Melden Sie sich an, um zu kommentieren.

### Akzeptierte Antwort

Image Analyst am 1 Nov. 2014
For Gaussian noise, the maximum likelihood de-noised answer would just be a local mean, which you can do with conv2():
denoisedImage = conv2(double(noisyImage), ones(3)/9, 'same');
If you want to do Salt and Pepper noise, then see my attached demos where I use a modified median filter.
##### 12 Kommentare10 ältere Kommentare anzeigen10 ältere Kommentare ausblenden
Image Analyst am 13 Aug. 2020
If you check the documentation you'll see that it's the window size of the window that scans across the image.
agung pratama am 13 Aug. 2020
Thanks Image Analyst, have a good day

Melden Sie sich an, um zu kommentieren.

### Weitere Antworten (1)

lakpa tamang am 15 Dez. 2019
Image Analyst.. can you explain how does the denoising works actually.. mathamatically?
##### 3 Kommentare1 älteren Kommentar anzeigen1 älteren Kommentar ausblenden
RAJSHREE SRIVASTAVA am 28 Dez. 2020
Image analyst , I am trying to excute the last file of
But I am getting error : salt_and_pepper_noise_removal_grayscale
Undefined function or variable 'salt_and_pepper_noise_removal_grayscale'.
Image Analyst am 28 Dez. 2020
How are you trying to run it? Is it open in the editor window? Did you click the green run triangle? Then it will run. I just ran it again to make sure everything works fine, and it does.

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Image Category Classification finden Sie in Help Center und File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by