# Signal-to-noise ratio (imaging)

Signal-to-noise ratio (SNR) is used in imaging to characterize image quality. The sensitivity of a (digital or film) imaging system is typically described in the terms of the signal level that yields a threshold level of SNR.

Industry standards define sensitivity in terms of the ISO film speed equivalent, using SNR thresholds (at average scene luminance) of 40:1 for "excellent" image quality and 10:1 for "acceptable" image quality.

SNR is sometimes quantified in decibels (dB) of signal power relative to noise power, though in the imaging field the concept of "power" is sometimes taken to be the power of a voltage signal proportional to optical power; so a 20 dB SNR may mean either 10:1 or 100:1 optical power, depending on which definition is in use.

## Definition of SNR An operator arbitrarily defines a box area in the signal and background regions of a back-illuminated half moon or knife-edge test target. The data, (such as pixel intensity), is used to determine the average signal and background values.

Traditionally, SNR is defined to be the ratio of the average signal value $\mu _{\mathrm {sig} }$ to the standard deviation $\sigma _{\mathrm {bg} }$ of the background:

$\mathrm {SNR} ={\frac {\mu _{\mathrm {sig} }}{\sigma _{\mathrm {bg} }}}$ However, when presented with a high-contrast scene, many imaging systems clamp the background to uniform black, forcing $\sigma _{\mathrm {bg} }$ to zero, artificially making the SNR infinite. In this case a better definition of SNR is the ratio of the average signal value $\mu _{\mathrm {sig} }$ to the standard deviation of the signal $\sigma _{\mathrm {sig} }$ :

$\mathrm {SNR} ={\frac {\mu _{\mathrm {sig} }}{\sigma _{\mathrm {sig} }}}$ which gives a meaningful result in the presence of clamping.

## Calculations

### Explanation

The line data is gathered from the arbitrarily defined signal and background regions and input into an array (refer to image to the right). To calculate the average signal and background values, a second order polynomial is fitted to the array of line data and subtracted from the original array line data. This is done to remove any trends. Finding the mean of this data yields the average signal and background values. The net signal is calculated from the difference of the average signal and background values. The RMS or root mean square noise is defined from the background region. Finally, SNR is determined as the ratio of the net signal to the RMS noise.

### Polynomial and coefficients

• The second order polynomial is calculated by the following double summation.

$f_{i}=\sum _{j=0}^{m}\sum _{i=1}^{n}a_{j}x_{i}^{j}$ • $f\,$ = output sequence
• $m\,$ = the polynomial order
• $x\,$ = the input sequence (array/line values) from the signal region or background region, respectively.
• $n\,$ = the number of lines
• $a_{j}\,$ = the polynomial fit coefficients
• The polynomial fit coefficients can thus be calculated by a system of equations.

${\begin{bmatrix}1&x_{1}&x_{1}^{2}\\1&x_{2}&x_{2}^{2}\\\vdots &\vdots &\vdots \\1&x_{n}&x_{n}^{2}\end{bmatrix}}{\begin{bmatrix}a_{2}\\a_{1}\\a_{0}\\\end{bmatrix}}={\begin{bmatrix}f_{1}\\f_{2}\\\vdots \\f_{n}\end{bmatrix}}$ • Which can be written...

${\begin{bmatrix}n&\sum x_{i}&\sum x_{i}^{2}\\\sum x_{i}&\sum x_{i}^{2}&\sum x_{i}^{3}\\\sum x_{i}^{2}&\sum x_{i}^{3}&\sum x_{i}^{4}\end{bmatrix}}{\begin{bmatrix}a_{2}\\a_{1}\\a_{0}\end{bmatrix}}={\begin{bmatrix}\sum f_{i}\\\sum f_{i}x_{i}\\\sum f_{i}x_{i}^{2}\end{bmatrix}}$ • Computer software or rigorous row operations will solve for the coefficients.

### Net signal, signal, and background

The second-order polynomial is subtracted from the original data to remove any trends and then averaged. This yields the signal and background values[clarification needed]:

$\mu _{\text{sig}}={\frac {\sum _{i=1}^{n}(X_{i}-f_{i})}{n}}\qquad \qquad \mu _{\text{bkg}}={\frac {\sum _{i=1}^{n}(X_{i}-f_{i})}{n}}$ where

• $\mu _{\text{sig}}$ = average signal value
• $\mu _{\text{bkg}}$ = average background value
• $n\,$ = number of lines in background or signal region
• $X_{i}\,$ = value of the ith line in the signal region or background region, respectively.
• $f_{i}\,$ = value of the ith output of the second order polynomial.

Hence, the net signal value is determined by[citation needed]:

${\text{signal}}=\mu _{\text{sig}}-\mu _{\text{bkg}}$ .

### RMS noise and SNR

${\text{RMS noise}}={\sqrt {\frac {\sum _{i=1}^{n}(X_{i}-{\frac {\sum _{i=1}^{n}X_{i}}{n}})^{2}}{n}}}$ The SNR is thus given by

${\text{SNR}}={\frac {\text{signal}}{\text{RMS noise}}}$ Using the industry standard 20 log rule...

${\text{SNR}}=20\log _{10}{\frac {\text{signal}}{\text{RMS noise}}}\,{\mbox{dB}}$ 