-1

Just as we can make a noisy image with imnoise :imnoise (A, 'salt & pepper', [density]). How to add random noise with a particular density?

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
sujaya
  • 11

2 Answers2

0

Thread your pixels as a List, where 100% equals all pixels. Simple fill the list 1,2,3,4,5,6,7 Wanted is the ratio amount of pixels

For x to your wanted-number substract list element at position [x]

the list[x] nr should then be filled with white or be inverted.

Peter
  • 2,043
  • 1
  • 21
  • 45
0

Additive white Gaussian noise (AWGN)?

z = mu + randn(size(im)).*sigma;
im = im + z;
Maurits
  • 2,082
  • 3
  • 28
  • 32