Re: Noise generation - salt and pepper
- From: Bob <ralvarez@xxxxxxxxxxx>
- Date: Tue, 24 Jul 2007 10:06:28 -0700
Can you please tell me , How i could generate salt and pepper noise.
Here is some matlab code that will do the job. Let
N = 256; % side of the noise image in pixels
thresh = 0.33; % fraction of black pixels
img_f = rand(N); % an image of samples of a uniform (0,1) random
distribution
img_bw = img_f > thresh;
img_bw is the result. It is binary image i.e. 0s and 1s, with a
fraction thresh of 0 (black) values.
For more on this, look at the book "Digital Image Processing using
Matlab." It has a section on image noise generation.
Bob
.
- References:
- Noise generation - salt and pepper
- From: Raj
- Noise generation - salt and pepper
- Prev by Date: Re: Noise generation - salt and pepper
- Next by Date: Re: Noise generation - salt and pepper
- Previous by thread: Re: Noise generation - salt and pepper
- Next by thread: Re: Noise generation - salt and pepper
- Index(es):