addnoise(M, p, n) Returns matrix
M with added noise, with probability
p/2 to add or subtract n to or from the pixel intensity.
Arguments:
- M is an image
matrix.
- p is a real
number between 0 and 1, inclusive.
- n is a real
number with absolute value between 0 and 255, inclusive.
Notes:
- The function will clip the
resulting pixel values to the range 0 to 255.