So the formula for adding Gaussian noise to the image by "imnoise" is given by:
output = input + sqrt(v)*randn(size(input)) + mu;
output = max(0,min(output,1));
Now, in the first line, we are drawing 500*500 random values from a normal distribution with a mean of "mu" and variance "v". The mean and variance of the drawn sample will not exactly be "mu" and "v" because they are calculated from a sampling of the distribution. Also, the variance of the output is affected by the truncation step.
You can check the variance of the added noise multiple times to observe how it varies from the user - input variance to imnoise, by using the above formula instead.