How does imnoise work with poisson option?
7 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
KALYAN ACHARJYA
2020-10-2
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 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!