<p>My goal is to create a noise model so that the <a href="https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio" rel="nofollow noreferrer" title="Peak Signal to Noise Ratio">PSNR</a> 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.</p>

<p>My model is as follows:</p>

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

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

<p>So, </p>

<p>$$ 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$$</p>

<p>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.</p>

<p>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. </p>

<p>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)$...</p>

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

CC BY-SA 3.0
2017-06-22T22:43:57.977Z
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.
user81327
CC BY-SA 3.0
2017-06-23T15:01:41.913Z
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
<noise><model>
How to create a noise model with a constant PSNR?
Ali
# How to create a noise model with a constant PSNR?

(Asked by: username_0 on 2017-06-21)

My goal is to create a noise model so that the [PSNR](https://en.wikipedia.org/wiki/Peak_signal-to-noise_ratio "Peak Signal to Noise Ratio") 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.

**Tags:** noise, model

> **Comments:**
> **username_1**: 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.  
> **username_0**: 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  

---

## 0 answers

