MATLAB Answers

How does imnoise work with poisson option?

14 views (last 30 days)
Prithiviraj Shanmugam
Prithiviraj Shanmugam on 1 Oct 2020
Answered: KALYAN ACHARJYA on 2 Oct 2020
I am trying to understand how to use imnoise function for adding poissonion noise to a data. The following is a simple version of the code that I am using to understand the imnoise function.
x = 2 + 2*cos(linspace(-pi,pi,100));
[X,~] = meshgrid(x);
figure()
subplot(121)
plot(x)
title('No noise');
ylim([0 5]);
subplot(122)
plot(imnoise(x,'poisson'));
title('Poisson noise added');
ylim([0 5]);
The above code produces the following figure.
These are my questions:
If the original data has a maximum height value of 4, why is the data after adding noise being clipped at 1? It appears like the shape of the curve is changing after the imnoise function because of the clipping. Is my method of using the imnoise function incorrect if I just want to add poissonion noise to the data? If yes, could you please help me understand how the function imnoise is working and how to use it to add noise to a data?
Note: I have already read the description of the imnoise function in MATLAB help. It is still not clear to me as to how the function is working.

  0 Comments

Sign in to comment.

Answers (1)

KALYAN ACHARJYA
KALYAN ACHARJYA on 2 Oct 2020
No sir, the noise is not added yet, just you generated noise based on x data
x = 2 + 2*cos(linspace(-pi,pi,100));
subplot(121)
plot(x)
title('No noise');
ylim([0 5]);
subplot(122);
plot(x+imnoise(x,'poisson'));
title('Poisson noise added');
ylim([0 5]);

  0 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!