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);
title('Poisson noise added');
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.