Adding Noise to RGB Image

I am trying to add salt and pepper noise to an RGB Image WHERE the noise density of pepper is 0.1 and the noise density of salt is 0.2. How can I do it?

Answers (2)

Refer the following File Exchange link, to add Salt or Pepper noise with certain densities.
Fore the color image, might be apply to all individual image planes, later do the concatenation
niseyIm=cat(3,NoisyR,NoisyG,NoisyB)
Disclosure: I have not tested the above suggestion.
Image Analyst
Image Analyst on 3 Jan 2021
See attached demos where I add salt and pepper noise, then remove them with a modified median filter.

Asked:

on 3 Jan 2021

Answered:

on 3 Jan 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!