4. Numerical Examples
This section presents three examples to show the application of Algorithms 2, 3 and 5 on the restoration of image and video. All calculations are performed in MATLAB R2018a on computers with intel core i7 and 16GB ram.
Suppose
is the
k-th approximate solution to the minimization problem (
9). The quality of the approximate solution
is defined by
the relative error
and
the signal-to-noise ratio (SNR)
where
denotes the uncontaminated data tensor and
is the average gray-level of
. The observed data
in (
9) is contaminated by a "noise" tensor
, i.e.,
.
is determined as follows. Let
be the
th transverse slice of
, whose entries are scaled and normally distributed with a mean of zero, i.e.,
where the data of
is generated according to N(0, 1).
Example 4.1 This example considers the restoration of the blurred and noised
cameraman image with the size of
. For the operator
, its front slices
are generated by using the MATLAB function
blur, i.e.,
with
,
and
. The condition numbers of
are
, while he condition numbers of the remaining slices are infinite. Let
denote the original undaminated
cameraman image. The operator
converts
into tensor column
for storage. The noised tensor
is generated by (
36) with different noise level
. The blurred and noisy images are generated by
.
The auto-tCG, auto-ttCG and auto-ttpCG methods are used to solve the tensor discrete linear ill-posed problems (
1). The discrepancy principle is employed to determine a suitable regularization parameter by using
with
and
. We set
in (
8).
Figure 3 shows the convergence of relative errors verus (a) the iteration number
k and (b) the CPU time for the auto-tCG, auto-ttCG and auto-ttpCG methods with the noise level
corresponding in the
Table 2. The iteration process is terminated when the discrepancy principle is satisfied. From
Figure 3 (a), we can see that the auto-ttCG and auto-ttpCG methods do not need to solve the normal equation for all
. This shows that the auto-ttCG and auto-ttpCG methods improve the auto-tCG method by the condition (
24).
Figure 3 (b) shows that the auto-ttpCG method converges fastest among three methods.
Table 2 lists the regularization parameter, the iteration number, the relative error, SNR and the CPU time of the optimal solution obtained by using the auto-tCG, auto-ttCG and auto-ttpCG methods with different noise levels
. It can be seen from
Table 2 that the auto-ttpCG method has the lowest relative error, highest SNR and the least CPU time for different noise level.
Figure 4 shows the reconstructed images obtained by using the auto-tCG, auto-ttCG and auto-ttpCG methods on the blurred and noised image with the noise level
in
Table 2. From
Figure 4 we can see that the restored image by the auto-ttpCG method looks a bit better than others but the least CPU time.
Example 4.2 This example shows the restoration of a blurred
color image by Algorithms 2, 3 and 5. The original
image
is stored as a tensor
through the MATLAB function
. We set
and band=12, and get
by
Then
, and the condition number of other tensor slices of
is infinite. The noise tensor
is defined by (
36). The blurred and noised tensor is derived by
, which is shown in Figure 6 (a).
We set the color image
to be divided into multiple lateral slices and independently process each slice through (
1) by using the auto-tCG, auto-ttCG and auto-ttpCG methods.
Figure 5 shows the convergence of relative errors verus (a) the iteration number
k and (b) the CPU time for the auto-tCG, auto-ttCG and auto-ttpCG methods when dealing with the first tensor lateral slice
of
with
. Similar results can be derived as that in Example 5.1 from
Figure 5. We can see that the auto-ttCG and auto-ttpCG methods need less iterations than the auto-tCG method from
Figure 5 (a) and the auto-ttpCG method converges fastest among all methods from
Figure 5 (b).
Table 3 lists the relative error, SNR and the CPU time of the optimal solution obtained by using the auto-tCG, auto-ttCG and auto-ttpCG methods with different noise levels
. The results are very similar to that in
Table 2 for different noise level.
Table 3.
Example 4.2: Comparison of relative error, SNR, and CPU time between the auto-tCG, auto-ttCG and auto-ttpCG methods with different noise level .
Table 3.
Example 4.2: Comparison of relative error, SNR, and CPU time between the auto-tCG, auto-ttCG and auto-ttpCG methods with different noise level .
| Noise level |
Method |
Relative error |
SNR |
time (secs) |
|
auto-tCG |
5.90e-02 |
14.62 |
314.73 |
| auto-ttCG |
5.90e-02 |
14.62 |
262.81 |
| auto-ttpCG |
5.43e-02 |
15.37 |
103.41 |
|
auto-tCG |
7.64e-02 |
12.37 |
117.48 |
| auto-ttCG |
7.48e-02 |
12.55 |
62.01 |
| auto-ttpCG |
7.01e-02 |
13.13 |
54.85 |
Figure 6 shows the recovered images by the auto-tCG, auto-ttCG and auto-ttpCG methods corresponding to the results with noise level
. The results are very similar to that in
Figure 6.
Figure 6.
Example 4.2: (a) The blurred and noised
Lena image and reconstructed images by (b) the auto-tCG method, (c) the auto-ttCG and (d) the auto-ttpCG method according to the noise level
in
Table 3.
Figure 6.
Example 4.2: (a) The blurred and noised
Lena image and reconstructed images by (b) the auto-tCG method, (c) the auto-ttCG and (d) the auto-ttpCG method according to the noise level
in
Table 3.
Example 4.3 (
Video) We recover the first 10 consecutive frames of blurred and noised
Rhinos video from MATLAB. Each frame has
pixels. We store 10 pollution- and noise-free frames of the original video in the tensor
. Let
z be defined by (
37) with
,
and
. The coefficient tensor
is defined as follows:
The condition number of the frontal slices of
is
, and the condition number of the remaining frontal sections of
is infinite. The suitable regularization parameter is determined by using the discrepancy principle with
. The blurred- and noised tensor
is generated by
with
being defined by (
36).
Figure 7 shows the convergence of relative errors verus the iteration number
k and relative errors verus the CPU time for the auto-tCG, auto-ttCG and auto-ttpCG methods when the second frame of the video with
is restored. Very similar results can be derived from
Figure 7 to that in Example 5.1.
Table 4 displays the relative error, SNR and the CPU time of the optimal solution obtained by using the auto-tCG, auto-ttCG and auto-ttpCG methods for the second frame with different noise levels
. We can see that the auto-ttpCG method has the largest SNR and the lowest CPU time for different noise level
.
Figure 8 shows the original video, blurred and noised video, and the recovered video of the second frame of the video for the auto-tCG, auto-ttCG and the auto-ttpCG methods with noise level
corresponding to the results in
Table 4. The recovered frame by the auto-ttpCG method looks best among all recovered frames.