In this tutorial, we estimate the original from a noisy image using Fixstars Amplify.
We will use black-and-white images here as a simple example. We can make the following assumptions
about
the relationship between the noisy and denoised images.
- The noisy and denoised images have relatively large overlaps.
- In the denoised image, neighboring pixels are likely to have the same color.
Noise reduction is performed by optimizing these conditions.
Constants and Variables¶
Since the color of a pixel is black or white, the value of each pixel can be expressed by a variable
that
takes value $-1$ or $1$.
In the following, the black pixel corresponds to $-1$ and the white pixel to $1$.
Let $y_{ij}$ denote the value corresponding to the color of each pixel in the noisy image.
$$
y_{ij} = \begin{cases}
-1 \quad \text{(if the corresponding pixel is black)} \\
+1 \quad \text{(if the corresponding pixel is white)}
\end{cases}
$$
Let $s_{ij}$ denote the Ising variable corresponding to the color of each pixel in the denoised
image.
The denoised image can be obtained by optimizing these Ising variables.
$$
s_{ij} = \begin{cases}
-1 \quad \text{(if the corresponding pixel is black)} \\
+1 \quad \text{(if the corresponding pixel is white)}
\end{cases}
$$
Objective Function¶
The following two conditions about the denoised image are assumed:
- The noisy and denoised images have relatively large overlaps.
- In the denoised image, neighboring pixels are likely to have the same color.
Let us write down these conditions as a polynomial minimization problem.
First, consider the first assumption that the the noisy and denoised images have relatively large
overlaps. $-y_{ij}s_{ij} = -1$ if the pixels at the same position (i, j) in the two images match and
$-y{ij}s_{ij} = 1$ otherwise. Therefore, the following polynomial $f_1$, which is the summation of the
expression by each pixel, takes smaller value if the two images have larger overlaps.
$$
f_1 = \sum_{i, j} -y_{ij} s_{ij}
$$
Next, consider the second assumption that neighboring pixels tend to be the same color.
$-s_{ij}s_{i'j'}
= -1$ if the pixels at the position (i, j) and (i', j') in the denoised image have the same color and
$-s_{ij}s_{i'j'} = 1$ otherwise. Therefore, the following polynomial $f_2$, which is the summation of
the
expression by each pair of neighboring pixels, takes smaller value if the larger number of neighboring
pixels have the same color.
$$
f_2 = \sum_{s_{i, j} \text{and} s_{i', j'} \text{are adjacent}} -s_{i, j} s_{i', j'}
$$
By adding these expressions $f_1$ and $f_2$ together with an appropriate weight, the objective
function
is created, which takes smaller value if the two conditions are satisfied.
$$
\begin{align}
f & = f_1 + \eta f_2\\
f_1 &= \sum_{i, j} -y_{ij} s_{ij}, \\
f_2 &= \sum_{s_{i, j} \text{and} s_{i', j'} \text{are adjacent}} -s_{i, j} s_{i', j'}
\end{align}
$$
Here, we have introduced the parameter $\eta>0$. This allows us to adjust the relative strength of
$f_1$ and $f_2$. The larger the value of $\eta$ is, the stronger the effect of the noise reduction
term
is.
By minimizing this objective function and interpreting the values of the Ising variables $s$ as the
values of the pixels, we can obtain an image with reduced noise.
Reference¶