# How to create a noise model with a constant PSNR?

My goal is to create a noise model so that the PSNR of the noisy image compared to the original is some pre-defined constant $\alpha$. This means the mean squared-error will also be a constant.

My model is as follows:

The additive noise is a random normally distributed variable with $\mu = 0$ and unknown $\sigma$.

$K(i,j) = I(i,j) + f(x; 0, \sigma)$

So,

$$MSE = \frac{1}{mn}\sum_{i = 0}^{m - 1}\sum_{j = 0}^{n - 1}\ [K(i,\ j) - I(i,\ j)]^2 = \frac{1}{mn}\sum_{i = 0}^{m - 1}\sum_{j = 0}^{n - 1}\ [\ f(x;\ 0,\ \sigma)]^2$$

where $$f(x;\ 0,\ \sigma) = \frac{1}{\sqrt{2\pi}\sigma}e^{\frac{-x^2}{2\sigma^2}}$$ i.e. the Gaussian pdf with unknown variance.

What I'm confused about is how to solve for sigma when the values of the pdf are supposed to be independent samples from the distribution. If I'm understanding correctly, this means that the MSE itself becomes a random variable and cannot be a constant.

If we were to make it a constant, wouldn't the values of $f(x)$ for each pixel have to already be known for the equation to be solvable? In which case the distribution would need to be already known to randomly sample the distribution to produce the values of $f(x)$...

Anyhow, if anyone has advice on how to construct noisy images with a pre-defined PSNR, that would be appreciated.

• The MSE will be a random variable. You can solve for $\sigma$ by pre-defining the expected value of the PSNR rather than it's exact value. Of course, there are things you can do if you want to prescribe MSE on the nose, for example you can add a constant, but how you do it depends on what properties you need for the noise. Jun 22 '17 at 22:43
• I realized that because the expected value of the random noise is 0, I can estimate the sum of the squares of the noise values for each pixel as the sum of $\sigma^2$ itself. That makes the whole thing a lot easier to solve when I have a predefined PSNR
– Ali
Jun 23 '17 at 15:01