Reputation: 45
In an assignment, I have to add salt and pepper noise of specific SNR values to an image. How to achieve this using MATLAB ?
I know how to add salt and pepper noise with given noise density to an image (using imnoise)
Upvotes: 1
Views: 277
Reputation: 60564
"SNR" is not a well-defined term, there are many, many ways in which you can define SNR for a specific application.
So if we define SNR as the number of signal pixels divided by the number of noise pixels (which is not a weird definition in the case of salt and pepper noise, where there is no noise on some pixels, and no signal on other pixels), then it is quite straightforward to translate that SNR to noise density.
On the other hand, if you have a specific definition of SNR that you need to abide by, then you could use an iterative process as follows:
This is obviously an expensive procedure...
Upvotes: 0