**5. Deblurring in the spatial and spectral domain: Application of the Haar and Fourier moments on image reconstruction.**

As mentioned before, images can be viewed as non-stationary two-dimensional signals with edges, textures, and deterministic objects at different locations. Although non-stationary signals are, in general, characterized by their local features rather than their global ones, it is possible to recover images by introducing global constrains on either its spatial or spectral resolution. The objective is to calculate the inverse matrix of the blurring kernel H and then applied back (simple multiplication in the spectral domain) to the degraded blurred image xout. Figure 5 shows the spectral representation of the degraded image obtained using Equation (11).

In order to obtain back the original image, Equation (13) is solved in the Fourier space

$$\mathfrak{x}\_{in} = \mathfrak{x}\_{out}\vec{H}^{\dagger}$$

The reconstructed image is the inverse Fourier transform of *x*˜*in*. By using our method not only we have the advantage of fast recovery but also provide us with an operator *H*˜ † that exists even for not full rank non square matrices. In this section the whole process of deblurring and restoring the original image is done in the spatial domain by using the Haar basis moments and in the spectral domain by applied the Fourier basis moments on the image. It provides us the ability of fast recovering and algorithmic simplicity. The former, obtained by using directly the original image and analysed that on its moments. The method is robust in the presence of noise, as can be seen on the results. In the latter, From the reconstruction point of view the basis matrix is applied to both original image and blurring kernel transforming these into spectral domain. After the inversion of the blurring kernel, its product with the degraded image is applied to inverted basis functions for the reconstruction of the original image. The method provides almost the same robustness for the case of degradation and noise presence as for the spatial moment analysis case.

**Figure 5.** Spectral representations of the degraded image for n=30.

12 Will-be-set-by-IN-TECH

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> <sup>25</sup> <sup>30</sup> <sup>35</sup> <sup>40</sup> <sup>45</sup> <sup>50</sup> <sup>55</sup> <sup>60</sup> <sup>0</sup>

(a) number of pixels

0 10 20 30 40 50 60

(b) number of pixels

**Figure 4.** (a) ISNR and (b) Reconstruction Error calculations for a noisy and blurred image vs number of

**5. Deblurring in the spatial and spectral domain: Application of the Haar**

As mentioned before, images can be viewed as non-stationary two-dimensional signals with edges, textures, and deterministic objects at different locations. Although non-stationary signals are, in general, characterized by their local features rather than their global ones, it is possible to recover images by introducing global constrains on either its spatial or spectral resolution. The objective is to calculate the inverse matrix of the blurring kernel H and then applied back (simple multiplication in the spectral domain) to the degraded blurred image xout. Figure 5 shows the spectral representation of the degraded image obtained using

In order to obtain back the original image, Equation (13) is solved in the Fourier space

*x*˜*in* = *x*˜*outH*˜ †

The reconstructed image is the inverse Fourier transform of *x*˜*in*. By using our method not only we have the advantage of fast recovery but also provide us with an operator *H*˜ † that exists even for not full rank non square matrices. In this section the whole process of deblurring and restoring the original image is done in the spatial domain by using the Haar basis moments and in the spectral domain by applied the Fourier basis moments on the image. It provides us the ability of fast recovering and algorithmic simplicity. The former, obtained by using

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

0.145 0.15 0.155 0.16 0.165 0.17 0.175 0.18 0.185 0.19

**and Fourier moments on image reconstruction.**

pixels in the blurring process (*n* = 1, . . . , 60).

Equation (11).

Reconstruction Error

ISNR(dB)

Figures 6(*a*), 6(*b*) and 6(*c*) present the reconstructed image using the Fourier basis,for the cases of *k* = *l* = 30, *k* = *l* = 100 and *k* = *l* = 450, respectively.

**Figure 6.** Fourier based moment reconstructed images for (a) k = l = 30 (b) k = l = 100 and (c) k = l = 450.

From the reconstruction point of view the basis matrix is applied to both original image and blurring kernel transforming these into spectral domain. After the inversion of the blurring kernel, its product with the degraded image is applied to inverted basis functions for the reconstruction of the original image.

Figures 7(*a*), 7(*b*) and 7(*c*) present the reconstructed image using the Haar basis,for the cases of *k* = *l* = 30, *k* = *l* = 100 and *k* = *l* = 450, respectively.

14 Will-be-set-by-IN-TECH 358 MATLAB – A Fundamental Tool for Scienti c Computing and Engineering Applications – Volume 1

**Figure 7.** Haar based moment reconstructed images for (a) k = l = 30 (b) k = l = 100 and (c) k = l = 450.

Figures 8(a) and 8(b) show the ISNR and the Reconstruction Error accordingly, for various lengths of the blurring processes. Graphical representations on these Figures correspond to

**Figure 8.** (a) ISNR and (b) Reconstruction Error calculations for a noisy and blurred image vs number of pixels in the blurring process (*n* = 1, . . . , 60). The blue and red lines indicate the usage of Fourier and Haar based moment analysis of the image, respectively.

**Figure 9.** (a) ISNR and (b) Reconstruction Error calculations for a noisy and blurred image vs number of moments (*k* = *l* = 1, . . . , 200). The blue and red lines indicate the usage of Fourier and Haar based moment analysis of the image, respectively.

moment values *k* = *l* = 450 (blue line for the Fourier moment and red line for the Haar moment case). The image is corrupted with white and black (salt and pepper) noise with noise density equal to 0.02. After the moment analysis took place a low pass rotationally symmetric Gaussian filter of standard deviation equal to 45 were applied. Finally, on Figures 9(a) and 9(b) we present the ISNR and the Reconstruction Error respectively, for a number of moments, *k* = *l* = 1, . . . , 200 and keeping the number of blurring process at a high level equal to *n* = 60. Similarly, to the previous cases the value of the black and white noise density is equal to the 0.02 and a low-pass Gaussian filter was used for the filtering process.

#### **6. Conclusions**

14 Will-be-set-by-IN-TECH

**Figure 7.** Haar based moment reconstructed images for (a) k = l = 30 (b) k = l = 100 and (c) k = l = 450. Figures 8(a) and 8(b) show the ISNR and the Reconstruction Error accordingly, for various lengths of the blurring processes. Graphical representations on these Figures correspond to

<sup>5</sup> <sup>10</sup> <sup>15</sup> <sup>20</sup> <sup>25</sup> <sup>30</sup> <sup>35</sup> <sup>40</sup> <sup>45</sup> <sup>50</sup> <sup>55</sup> <sup>60</sup> <sup>0</sup>

(a) number of pixels

0 10 20 30 40 50 60

(b) number of pixels

**Figure 8.** (a) ISNR and (b) Reconstruction Error calculations for a noisy and blurred image vs number of pixels in the blurring process (*n* = 1, . . . , 60). The blue and red lines indicate the usage of Fourier and

0.5 1 1.5 2 2.5 3 3.5 4 4.5 5

0.15

Haar based moment analysis of the image, respectively.

0.16

0.17

Reconstruction Error

0.18

0.19

0.2

ISNR(dB)

In this study, we introduced a novel computational method based on the calculation of the Moore-Penrose inverse of full rank *r* × *m* matrix, with particular focus on problems arising in image processing. We are motivated by the problem of restoring blurry and noisy images via well developed mathematical methods and techniques based on the inverse procedures in order to obtain an approximation of the original image. By using the proposed algorithm, the resolution of the reconstructed image remains at a very high level, although the main advantage of the method was found on the computational load that has been decreased considerably compared to the other methods and techniques. The efficiency of the generalized inverse is evidenced by the presented simulation results. In this chapter the results presented were demonstrated in the spatial and spectral domain of the image. Orthogonal moments have demonstrated significant energy compaction properties that are desirable in the field of image processing, especially in feature and object recognition. The advantage of representing and recovered any image by choosing a few Haar coefficients (spatial domain) or Fourier coefficients (spectral domain), is the faster transmission of the image as well as the increased robustness when the image is subject to various attacks that can be introduced during the transmission of the data, including additive noise. The results of this work are well established by simulating data. Besides digital image restoration, our work on generalized inverse matrices may also find applications in other scientific fields where a fast computation of the inverse data is needed.

The proposed method can be used in any kind of matrix so the dimensions and the nature of the image do not play any role in this application
