Application of the Least Squares Solutions in Image Deblurring

A new method for the reconstruction of blurred digital images damaged by separable motion blur is established. The main attribute of the method is based on multiple applications of the least squares solutions of certain matrix equations which define the separable motion blur in conjunction with known image deconvolution techniques. The key feature of the proposed algorithms is reflected in the fact that they can be used only in symbiosis with other image restoration algorithms.


Introduction
In practice, the recorded image unavoidably represents a degraded version of the original scene because of inevitable imperfections in the imaging and capturing process.Medical images, satellite images, astronomical images, or poor-quality family portraits are often blurred.A wide range of different degradations need to be taken into account, covering, for instance, noise, blur, illumination, and color imperfections, and geometrical degradations.The elimination of these imperfections is crucial in various tasks of image processing and image analysis.Image restoration methods are used for reconstructing the original image from a degraded model.The problem of image restoration has been studied in many articles and books [1][2][3][4][5][6][7].
The application of the least squares solutions in image processing (and in image restoration particularly) is not frequently investigated so far.An application of the least square techniques in image processing is presented in [8].Removal of blur in images based on the least squares solutions is investigated in [9,10].Particularly, an application of the least squares solution of minimal norm in image deblurring is investigated in [11][12][13].Our main intention in this paper is further investigation and extension of the algorithms introduced in [9,10] that allows us to remove a linear or separable motion blur from images.The algorithms presented in these papers are based on the least squares solution of a matrix equation which represents the mathematical model of the linear or separable motion blur.The least squares solution, denoted by  1 , includes the Moore-Penrose inverse of the blurring matrix as well as an arbitrary matrix .The particular least squares solution, based on the Moore-Penrose inverse, was investigated in [11][12][13].
The main goal of this paper is the development of an algorithm that allows us to remove a motion blur from images by means of the consecutive applications of the least squares solutions of a matrix equation which models the separable two-dimensional blurring process.The least squares solutions are matrix expressions that include the Moore-Penrose inverse of the blurring matrix as well as an appropriately chosen arbitrary matrix.The matrix transformation defined in this way is idempotent (see [9,10]).This difficulty forces us to find the way to manage consecutive applications of the least squares solutions from [9,10].Significant improvements in ISNR and PSNR values are attained applying such an approach with respect to the classical approach based on the Moore-Penrose solution of certain matrix equations, which is investigated in [11,12], as well as with respect to a single application of the least squares solutions, used in [9,10].
The paper is organized as follows.Motivation and description of the method are presented in the second section.The main algorithm which enables the iterative application of the least squares solution  1 on images damaged by a separable motion blur is also presented in the second section, as well as the application of the method on blurred and noisy images.Results generated by performed numerical experiments are investigated in Section 3.

Motivation and Description of the Method
The process of the separable blurring assumes that the blurring of the columns in the image is independent of the blurring of the rows.The separable blurring is modeled by two blurring matrices,   and   , both of the general form where ℎ  ,  = 1, . . ., , are real numbers and the positive integer  indicates the length of linear motion blur in pixels.
Our approach provides a new method for restoration of a blurred image which is based on multiple applications of the least squares solutions of the matrix equations (2) in symbiosis with other well-known image deblurring techniques.In general, the proposed algorithm is aimed at solving the matrix equation (2).
The least squares solution of (2) has the general form (used in [10]) where  is an arbitrary matrix of appropriate dimensions.The transformation  1 () can be used as a deconvolution of a blurred image .The blurred image  ∈ R × , used in (3), can be determined in different ways.There are no specific conditions for that; any random matrix  can be transformed into  1 ().Continuing investigations from [9,10], appropriate choices for  are chosen as the results of particular image deblurring processes; that is,  is an arbitrary restoration of the degraded image.In that case,  1 () is an attempt to derive further improvements in the restoration of .
In the case  = , where  is the zero matrix of appropriate dimensions,  1 () produces the next approximation F of the original image : The approach which assumes the condition  =  in (3) exploits the Moore-Penrose solution of the matrix equation (2), that is, the least squares solution of minimal norm.About the least squares and minimal norm properties of the Moore-Penrose solution, see main references [14,15].But the minimal norm attribute associated with the Moore-Penrose solution may be, in most of cases, only the redundant property.Indeed, our experience from [9,10] confirms that only when the matrix  is selected to be "far" from the original image, the improvement of  is still worse with respect to the Moore-Penrose reconstruction (corresponding to the case  = ).Some of the examples that confirm this expectation are studied in [9,10].We follow the main goal of the papers [9,10]; that is, we will determine  in such a way that the approximation F produces better values for ISNR and PSNR with respect to the solution F which is used in [11,12].Except the election  = , the results generated by applying the Wiener filter (WF) and the constrained leastsquares (CLS) filter are used as two appropriate choices of the matrix  in [9,10].A description of the WF and CLS filters can be found in [2].A more advanced approach for the selection of the matrix  is based on the moment based methods.The Haar basis and the Fourier basis mentioned above are usually referred to as the most popular moment based methods.This approach is considered in [10].For more details on the Fourier and the Haar basis, see [9,12].An algorithm for image deconvolution from the geometric moments of an image which is degraded by a circular or elliptical Gaussian point-spread function is considered in [16].For additional information on the moment based image reconstruction methods, the reader is referred to [16][17][18][19][20].A short preview of main image restoration methods, used for obtaining possible reconstructions , is presented in [10].A detailed description of these methods can be found in [13].A recent survey book presenting all the modern image reconstruction methods is given in [21].
Our improvement of the methods defined in [9, 10] arises from our intention to apply the operator  1 repeatedly.But the authors in [9] showed that the operator  1 () is idempotent, which implies  1 ( 1 ()) =  1 ().This property of the operator  1 makes its application on  1 () redundant.In the present paper, we find a possibility for multiple applications of the operator  1 .The main idea is to use  1 (  ( 1 ())) instead of  1 ( 1 ()), where   denotes the application of a previously defined image deconvolution algorithm in the th iteration.
Let us denote by F  the reconstructed image after  steps.The following approximations   for further restorations are considered: (a)   =  , (F  ) is derived applying the Haar based reconstructed image for selected , ; (b)   = Fourier , (F  ) is derived applying the Fourier based reconstructed image for selected , ; (c)   = CLS(F  ) is derived applying the constrained least-squares filter; (d)   = WF(F  ), derived applying the Wiener filter; (e)   = LR(F  ), derived applying the Lucy-Richardson algorithm.
On the other hand, an improper and unpredictable behavior of  1 is observed in [9,10].Namely, to some extent, a better improvement  implies better restoration  1 (), which is confirmed by the inequality ISNR( 1 ()) > ISNR().But, after the occurrence of a limit, which is not known in advance, the opposite situation (ISNR( 1 ()) < ISNR()) is observed.
One of the possible ways to achieve multiple applications of the operator  1 is its alternating application with another image restoration method, as it is described in Algorithm 1.
Algorithm 1 (iterative application of the operator  1 ).Consider the following.
Require  0 = , where  denotes a blurred image.
(1) Initial step is (2) Set the number of the iterative steps to initial value  = 1.
(4) If a selected stopping criterion is fulfilled set  =  + 1 and go to Step (3).
(5) If the stopping criterion is fulfilled return the output F  .
Remark 2. Iterations (6) should provide two improvements in the reconstruction, in each iteration, as follows: (i) the first improvement is   =   (F  ), which gives a restoration   of the previous iteration F  by means of an image restoration method   ; (ii) the second improvement arises from F +1 =  1 (  ), which gives further reconstruction F +1 of   by means of the least squares solution  1 .
Remark 3. The choice of the stopping criterion in Step (4) of Algorithm 1 is, at this moment, an undeterminable problem.
(i) One possible choice is to stop the cycle when the inequality ISNR(F +1 ) < ISNR(F  ) is satisfied.
(ii) But this choice may cause blocking of (possible) improvements in further steps.
For this purpose, it seems that the terminating criterion defined by an in advance defined number of iterative steps is a better choice.In our numerical experiments, we will use this stopping criterion.
(iii) Also, it is reasonable to stop the cycle in Step (4) when the inequality ISNR(F +1 ) < ISNR(F  ) is satisfied several times consecutively.
Remark 4. Essentially, iterations in ( 6) are based on the least squares solution of the dynamical matrix equation The model (7) essentially means that the iteration F  is considered as a "blurred image" of the next (unknown) iteration F +1 .After resolving (7) with respect to the unknown matrix F +1 , we derive the next iteration F +1 in terms of the current iteration F  and the pseudoinverses of the blurring matrices   and   .
Remark 5.The authors of the papers [9,10] have computed  = (), where  is an image restoration method, and simply compared ISNR() with ISNR( 1 ()).The main advantage of the proposed Algorithm 1 is that it makes repetitive use of the operator  1 in symbiosis with selected deblurring methods on the blurred image and its reconstructions.Since the operator  1 is idempotent, Algorithm 1 defines an approach to improve the results obtained in [9,10] by the multiple application of the (deblurring) transformation  1 .

Repetitive Least Squares Image Deblurring and Denoising.
Noise is unavoidable in most of applications, so that a real observation is thus often modeled by the following mathematical model: where  is additive noise and   is the blurred noisy image.Algorithm 6 can be adopted to restore the original image from a blurred and noisy image, using the least squares solution of the mathematical model (8).
Algorithm 6 (iterative application of the operator  1 on blurred and noisy image).Consider the following.
Require  0 =   , where   denotes a blurred noisy image.
(7) If the stopping criterion is fulfilled then return the output F  .

Experimental Results
In this section, we investigate the numerical results generated by applying the two proposed algorithms.The experiments are performed using Matlab programming language on an Intel Core i5 CPU M430 @ 2.27 GHz 64/32-bit system with 4 GB of RAM memory running on Windows 7 Ultimate Operating System.

Application of the Method on Blurred Images
Example 7. In order to emphasize the importance of the number of iterative steps in Algorithm 1, the number of moments in Figures 1(a Both the graphs represented in Figures 1(a) and 1(b) show a similar behavior.In fact, the ISNR and PSNR values increase initially and then converge, slowly growing, to a constant value.Also, both ISNR and PSNR values generated by applying  1 on Fourier basis are greater (better) with respect to the corresponding values generated by applying  1 on the Haar basis.
Also, the graphs in Figures 1(a) and 1(b) show that in advance the predefined number of iterative steps is a suitable termination criterion of Algorithm 1. Example 8.This example shows the behavior of Algorithm 1 with respect to the length of blurring.Therefore, the number of iterative steps remains constant while the length of blurring in Step (1) increases in the range [10,100].In order to compare generated results, we tested Algorithm 1 on several standard Matlab images: Lena, Barbara, Man, Boat, and Cameraman.The best ISNR (resp., PSNR) values versus the length of the blurring process for Lena image, generated after 40 steps of Algorithm 1, are illustrated in Figure 2(a) (resp., Figure 2(b)).In general, both ISNR and PSNR values stepwise decrease with increasing the length of blurring.Let us mention that the values corresponding to the constrained least-squares (CLS) filter are not included in these graphs, since they are almost identical with the values corresponding to Wiener filter (WF).Notations  1 (40 = 195) (resp.,  1 (40 = 195)) in Figure 2  Figure 2(a) (resp., Figure 2(b)) shows that  1 (40 = 195) and  1 (40 = 195) achieve the greatest ISNR (resp., PSNR) values for the length of blurring satisfying  > 20.Notation  1 (0) denotes the result derived after a single application of the least squares operator  1 , that is, the restoration given by applying only Step (1) of Algorithm 1.It can be observed that both ISNR and PSNR values corresponding to  1 (0) behave in a similar way as the corresponding restorations derived by applying the Moore-Penrose solution (4).The results of ISNR and PSNR values corresponding to Barbara and Cameraman images are presented in Figures 3  and 4. The graphs presented in these figures are similar with the graphs presented in Figures 2(a Generally, an insignificant and stepwise increase of ISNR and PSNR values can be observed.The graphs included in Figure 5 confirm that the improvement of the restoration which is based on increasing the number of moments is insignificant compared to the increase in numerical demands, and, therefore, it is not cost-effective. Example 10.The tested image Lena is shown in Figure 6(a).The blurred image that has been degraded by a uniform linear motion in the horizontal direction is presented in Figure 6(b).Figure 6(c) illustrates the restoration based on (4) (introduced in [11,12]) and Figure 6(d) illustrates the restoration based on a single application of the operator  1 (the number of iterations is  = 1).Differences in Figures 6(c) and 6(d) are not observable by a human eye.This observation exactly means that a single application of the least squares solution does not produce significantly better results compared with the corresponding results obtained by the Moore-Penrose inverse solution.
Figures 7(a From Figure 7, one can observe that better restorations are derived applying a greater number of iterations, in both cases (Haar and Fourier basis).
Figures 8 and 9 show the restorations corresponding to the Barbara image.Observation is the same as in the case of Figure 7.

Application of the Method on Blurred and Noisy Images.
The next examples refer to the case when the image is degraded by including image noise which is later followed by a separable motion blur, as it is presented in Section 2.1.
Example 11.The behavior of Algorithm 6 with respect to length of blurring and different types of noise is presented in this example.The changes of the ISNR and PSNR values corresponding to the degraded image of Lena are graphically presented in Figures 10(a    with the Haar and Fourier basis restoration with the basis 195, respectively.The length of blurring is again equal to 73.The conclusion in this example is that the better restoration is gained by using the Haar and Fourier basis (Figure 17) compared to the methods used in Figure 16 and that the improvement is observable by the human eye.
Visual confirmation of the previous conclusion is also observable from Figures 18,19,20,and 21.Example 13.In this example, the previously exploited methods are tested on images degraded by different types of noise.The tested image Lena with added Gaussian white noise of mean 0 and variance 0.01 is presented in Figure 22(a) and blurred noisy image that has been degraded by a uniform linear horizontal motion of length 86 is presented in Figure 22(b).
Accordingly, a rotationally symmetric Gaussian low-pass filter of size 3 with standard deviation 45 is used for filtering.

Application of the Method on Gaussian Blurred and Noisy
Images.We also paid consideration to Gaussian blurring function, because it models the blurring that is caused by where () =  − 2 /(2 2 ) ,  = ⌊/2⌋,  = ⌈/2⌉, and the parameter  represents the width of the blurring function.
Example 14.In this example, we illustrate the results for different images when the Gaussian blur is present.The ISNR

Conclusion
In [9,10], it was shown that the application of the least squares solutions of matrix equations is a very useful tool in the image deblurring process.Our tendency in the present paper is to ensure an iterative application of these least squares solutions.The presented numerical examples and figures illustrate that both the ISNR and PSNR values increase using successive applications of the proposed operator  1 .It is clear that the proposed application of the least squares solutions of the matrix equation which models the blurring process is applicable only in symbiosis with other methods of image deconvolution.The least squares solution can be used as an improvement of other image deconvolution methods.This symbiosis is exploited in Step (3) of Algorithm 1. Iterative application of the least squares solution  1 on blurred and noisy images is achieved in Algorithm 6 in symbiosis with other well-known methods for image deconvolution and a selected filtering process.

Figure 1 :
Figure 1: (a) ISNR versus the number of steps of Algorithm 1; (b) PSNR versus the number of steps of Algorithm 1.
) and 2(b).Example 9. Figure 5 shows maximal ISNR and the PSNR values for various moments indices , , from the values  =  = 10 to  =  = 400 with the incremental Step (5), keeping the blurring process constant with the length  = 40 and applying  = 40 steps of Algorithm 1.
Figure 6(c) illustrates the restoration based on (4) (introduced in[11,12]) and Figure6(d) illustrates the restoration based on a single application of the operator  1 (the number of iterations is  = 1).Differences in Figures6(c) and 6(d) are not observable by a human eye.This observation exactly means that a single application of the least squares solution does not produce significantly better results compared with the corresponding results obtained by the Moore-Penrose inverse solution.Figures7(a) and 7(b) present restorations derived applying, respectively,  = 10 and  = 40 times the least squares operator  1 in conjunction with the Haar basis restoration determined by the basis  =  = 195.The length of blurring is equal to 64.Figures 7(c) and 7(d) show restorations derived after  = 10 and  = 40 applications of the least squares operator  1 in conjunction with the Fourier basis restoration with basis  =  = 195.The length of blurring is 64.From Figure7, one can observe that better restorations are derived applying a greater number of iterations, in both cases (Haar and Fourier basis).Figures8 and 9show the restorations corresponding to the Barbara image.Observation is the same as in the case of Figure7.
) and 10(b).It is possible to use different types of filters, subject to different types of noise.A Gaussian low-pass filter is imposed in this example.Maximal ISNR values generated after  = 40 steps of Algorithm 6 versus length of blurring for Lena image are presented in Figure 10(a).The "salt and paper" noise of density 0.03 is imposed in addition to the separable motion blur.Maximal PSNR values versus length of blurring after 40 steps of Algorithm 6 for Lena image are illustrated in Figure 10(b).The Gaussian white noise of mean 0 and variance 0.01 is assumed.All graphs included in Figure 10(a) (resp., Figure 10(b)) show similar behavior with respect to the graphs included in Figure 2(a) (resp., Figure 2(b)).The graphs corresponding to  1 (40 = 195) and  1 (40 = 195) both achieve the greatest ISNR (resp., PSNR) values for the length of blurring satisfying  > 45.It can be, again, observed that both ISNR and PSNR values derived applying  1 (0) behave in a similar way as the corresponding restorations generated by the Moore-Penrose inverse solution.Clearly, WF and LR algorithms show the worst performances in symbiosis with Algorithm 6. Confirmation of our results is presented in Figures 11 and 12 for the "salt and paper" noise of density 0.03, as well as in Figures 13 and 14 for the Gaussian white noise of mean 0 and the variance 0.01.Example 12.The tested image Lena with added "salt and paper" noise with noise density of 0.03 is shown in Figure 15(a).The image that has been additionally degraded by a uniform horizontal linear motion of length 73 is presented in Figure 15(b).

Figure 18 :
Figure 18: (a) Image of Boat; (b) noisy image with "salt and paper" noise with noise density of 0.03; (c) blurred noisy image degraded by a uniform horizontal linear motion of length 85.

Figure 20 :Figure 21 :
Figure 20: (a) Image of cameraman; (b) noisy image with "salt and paper" noise with noise density of 0.03; (c) blurred noisy image degraded by a uniform horizontal linear motion of length 64.

Figure 22 :
Figure 22: (a) Noisy image of Lena; (b) blurred and noisy image of Lena.

Figure 25 :
Figure 25: (a) Image of Barbara; (b) noisy image with Gaussian white noise of mean 0 and variance 0.01; (c) blurred noisy image degraded by a uniform horizontal linear motion of length 70.

Figure 27 :
Figure 27: (a) Image of Barbara; (b) noisy image with Gaussian white noise of mean 0 and variance 0.01; (c) blurred noisy image degraded by a uniform horizontal linear motion of length 95.

Figure 33 :
Figure 33: (a) Blurred image by uniform linear motion of length 76.Restoration of Man for (b) LR algorithm and (c) WF.