Add noise to image.
Additive gaussian noise with mean and variance defaulting to 0 and 0.01.
Creates poisson noise in the image using the intensity value of each pixel as mean.
Create "salt and pepper"/"lost pixels" in density*100 percent of the image. density defaults to 0.05.
Multiplicative gaussian noise with B = A + A * noise with mean 0 and variance defaulting to 0.04.
See also: rand, randn, randp.
The following code
A = imnoise (2^7 * ones (100, 'uint8'), 'poisson'); subplot (2, 2, 1) imshow (A) title ('uint8 image with poisson noise') A = imnoise (2^15 * ones (100, 'uint16'), 'poisson'); subplot (2, 2, 2) imshow (A) title ('uint16 image with poisson noise') A = imnoise (.5 * ones (100), 'poisson'); subplot (2, 2, 3) imshow (A) title ('double image with poisson noise') A = imnoise (.5 * ones (100, 'single'), 'poisson'); subplot (2, 2, 4) imshow (A) title ('single image with poisson noise')
Produces the following figure
Figure 1 |
---|
Package: image