Defocused Image Restoration with Local Polynomial Regression and IWF

Shooting a real world image with a camera through an optical device gives a 2-D image where at least some parts are affected by a blur and noise. Images can be blurred by atmospheric turbulence, relative motion between sensors and objects, longer exposures, and so on, but the exact cause of blurring may be unknown. Restoration of blurred noisy images (Spiros et al., 2009; 2010; Su et al., 2007) is one of the main topics in many processing. The literatures Alonso et al. (2008; 2005); Bar et al. (2006) have given good methods to improve image qualities. The purpose of image restoration is to reconstruct an unobservable true image from a degraded observation. An observed image can be written, ignoring additive noise, as the two-dimensional (2-D) convolution of the true image with a linear space-invariant (LSI) blur, known as the PSF. Restoration in the case of known blur, assuming the linear degradation model, is called linear image restoration and it has been presented extensively in the last three decades giving rise to a variety of solutions Chen et al. (2000); Suyash et al. (2006); Gu et al. (2009); Lu et al. (2009) . In many practical situations, however, the blur is unknown. Hence, both blur identification and image restoration must be performed from the degraded image. Restoration in the case of unknown blur is called blind image restoration Filip et al. (2003); Mario et al. (2003); Liao et al. (2005) . Existing blind restoration methods can be categorized into two main groups: (i) those which estimate the PSF a priori independent of the true image so as to use it later with one of the linear image restoration methods, such as zero sheet separation, generalized cross validation, and maximum likelihood and expectation maximization based on the ARMA image model Chang et al., (1991); Reeves et al. (1992); Lagendijk et al. (1990) , and (ii) those which estimate the PSF and the true image simultaneously, such as nonnegative sand support constraints recursive inverse filtering, maximum likelihood and conjugate gradient minimization, and simulated annealing Kundur et al. (1998); Katsaggelos et al. (1991) . Algorithms belonging to the first class are computationally simple, but they are limited to situations in which the PSF has a special form, and the true image has certain features. Algorithms belonging to the second class, which are computationally more complex, must be used for more general situations. In this paper, a kind of semi-blind image restoration algorithm is proposed in case of known the blur type (defocused blurring).


Introduction
Shooting a real world image with a camera through an optical device gives a 2-D image where at least some parts are affected by a blur and noise.Images can be blurred by atmospheric turbulence, relative motion between sensors and objects, longer exposures, and so on, but the exact cause of blurring may be unknown.Restoration of blurred noisy images (Spiros et al., 2009;2010;Su et al., 2007) is one of the main topics in many processing.The literatures Alonso et al. (2008;2005); Bar et al. (2006) have given good methods to improve image qualities.The purpose of image restoration is to reconstruct an unobservable true image from a degraded observation.An observed image can be written, ignoring additive noise, as the two-dimensional (2-D) convolution of the true image with a linear space-invariant (LSI) blur, known as the PSF.Restoration in the case of known blur, assuming the linear degradation model, is called linear image restoration and it has been presented extensively in the last three decades giving rise to a variety of solutions Chen et al. (2000); Suyash et al. (2006); Gu et al. (2009); Lu et al. (2009) .In many practical situations, however, the blur is unknown.Hence, both blur identification and image restoration must be performed from the degraded image.Restoration in the case of unknown blur is called blind image restoration Filip et al. (2003); Mario et al. (2003); Liao et al. (2005) .Existing blind restoration methods can be categorized into two main groups: (i) those which estimate the PSF a priori independent of the true image so as to use it later with one of the linear image restoration methods, such as zero sheet separation, generalized cross validation, and maximum likelihood and expectation maximization based on the ARMA image model Chang et al., (1991); Reeves et al. (1992); Lagendijk et al. (1990) , and (ii) those which estimate the PSF and the true image simultaneously, such as nonnegative sand support constraints recursive inverse filtering, maximum likelihood and conjugate gradient minimization, and simulated annealing Kundur et al. (1998); Katsaggelos et al. (1991) .Algorithms belonging to the first class are computationally simple, but they are limited to situations in which the PSF has a special form, and the true image has certain features.Algorithms belonging to the second class, which are computationally more complex, must be used for more general situations.In this paper, a kind of semi-blind image restoration algorithm is proposed in case of known the blur type (defocused blurring).
In general, discrete model for a linear degradation caused by blurring can be given by the following equation y(i, j)=h(i, j) * f (i, j)+n(i, j) where * indicates two-dimensional convolution, f (i, j) represents on original image, y(i, j) is the degraded image, h(i, j) represents the two-dimensional PSF, and n(i, j) is the additive noise.In this article, we deal only with additive Gaussian noise, as it effectively models the noise in many different imaging scenarios.The difficulty in solving the restoration problem with a spatially varying blur commonly motivates the use of a stationary model for the blur.This leads to the following expression for the degradation system, The use of linear techniques for solving the restoration problem is facilitated by using space-invariant model.Models that utilize space-variant degradations are also common, but lead to more complex solutions.As for defocused blur, PSF is modeled as a uniform intensity distribution within a circular disk, where disk radius R is the only unknown parameter for this type of blur.
Many existing image restoration algorithms assume that the PSF is known, but in practical it is not always the case.The restoration without knowing of the PSF is called blind image restoration.Fourier methods can be used to estimate the defocused parameter R through calculating a ratio of power of high frequencies portion to that of low frequencies portion.However, a main drawback of the method is its bad noise immunity.To solve this problem, a novel algorithm is proposed to overcome this shortcoming based on RBF neural network and iterative Wiener filtering.The RBF neural network is applied to fit R.This scheme has good fitting, but bad prediction.To avoid the weak generalization ability, a more efficient method for estimating parameter R is also proposed.The prediction ability of these two methods is compared with the trained five images.The steps of the presented algorithm in this chapter is as follows: Firstly we construct feature vectors of several blurred images with known defocused radius R in wavelet domain, then a RBF neural network or a multivariate local polynomial estimation model is trained using the vectors as inputs and defocused parameters as outputs.After the model is trained, the new defocused images are applied to the trained model for predicting the parameter R. For a semi-blind defocused image, R can be estimated through calculating the feature vectors and using it as input of the trained model.With known radius R, many traditional algorithm could be applied to restore the degraded image.In this chapter, iterative Wiener filtering(IWF) is adopted to image restoration.

Relationship between wavelet coefficients and R
The wavelet transform provides a powerful and versatile framework for image processing.The two-dimensional discrete wavelet transform (DWT) Li et al. (2009;2010) hierarchically decompose an input image into a series of successively lower resolution images and their associated detail images.DWT is implemented by a set of filters, which are convolved with the image rows and columns.An image is convolved with low-pass and high-pass filters and the odd samples of the filtered outputs are discarded resulting in down sampling the image by a factor of 2. The l level wavelet decomposition of an image I results in an approximation image X l and three detail images H l , V l , and D l in horizontal, vertical, and diagonal directions respectively.Decomposition into l levels of an original image results in a down sampled image of resolution 2 l with respect to the image as well as detail images.
When an image is defocused, edged in it are smoothed and widened.The amount of high frequency band decreased, and that corresponding to low frequency band increases.
In order to denote the relationship between wavelet coefficients and defocused radius R,we define five variables named v 1 , v 2 , v 3 , v 4 , and v 5 as: where |•| s represents the summation of all coefficients' absolute value, num{•} is total number of coefficients.
An original image is blurred artificially by a uniform defocus PSF with R whose value ranging from 1 to 20.The relationship between v 1 , v 2 , v 3 , v 4 , v 5 and R are shown in Fig. 1, where the curves are normalized in [0,1] interval.When R increases, v 2 , v 3 , v 4 and v 5 decrease monotonously.In order to estimate defocus parameter R, only known the roughly similar relationship is not enough.As shown in Fig. 2, every image has monotonous curve between v 2 , v 5 and R, but they are not superposition.For a degraded unknown PSF image, R can not be calculated Fig. 2. Curve v 2 , and v 5 of Different Images because the curve of the given image is not known.For example, if v 2 of image "rice" has been calculated, and then we estimate R according curve if "ic" in Fig. 2, wrong results are obtained obviously.To solve this problem, one of the methods is to choose neural networks.
Computational artificial neural networks are known to have the capability for performing complex mappings between input and output data, but neural network method has bad generalization ability.Here we also propose another multivariate local polynomial regression model to estimate R. The variables v 1−5 are chosen to train the RBF neural network and multivariate local polynomial estimation model.Prediction Comparisons are made to verify the advantages of multivariate local polynomial fitting.

RBF neural network for defocused parameter
We propose and implement a parameter estimation technique in this section.Fig. 3 shows the description of this technique.In the first phase a RBF neural network is designed and trained.
In the second phase R can be estimated using the trained neural network.A brief description of this technique is given in the following paragraphs.
RBF neural network is a most commonly-used feed-forward network.It usually has one hidden layer, and the basis function is radial symmetry.The output of the network looks like: where χ is a put vector, w k0 is a set of bias constants, ϕ 0 ( χ − µ j ) ≡ 1, α is the number of RBF hidden neurons and W holds both weights and bias.In the experiments, the radial basis where µ j is the center and γ j is the standard deviation of the Gaussian function, respectively.
Sixteen original images are chosen to train the RBF net.The images are defocused artificially with R whose value ranging from 2 to 7. So the total number of training samples are 96.Then feature vectors are constructed using variables p 1−5 of each image: For the network output vector, we use one-of-k encoding method, that is, for R =2, t = (0, 0, 0, 0, 0, 1) T ; for R = 3, t =(0, 0, 0, 0, 1, 0) T , and so on.
When training samples {χ i , t i } 96 i=1 are given, the weights matrix W can be obtained as W = TΦ † , Φ † is pseudo-inverse of Φ, where Φ is a matrix: After obtaining weights matrix W, the defocused parameter R can be calculated using the trained RBF network.

Multivariate local polynomial regression for defocused parameter
Multivariate local polynomial fitting is an attractive method both from theoretical and practical point of view.Multivariate local polynomial method has a small mean squared error compared with the Nadaraya − Watson estimator which leads to an undesirable form of the bias and the Gasser − Muller estimator which has to pay a price in variance when dealing with a random design model.Multivariate local polynomial fitting also has other advantages.
The method adapts to various types of designs such as random and fixed designs, highly clustered and nearly uniform designs.Furthermore, there is an absence of boundary effects: the bias at the boundary stays automatically of the same order as the interior, without use of specific boundary kernels.The local polynomial approximation approach is appealing on general scientific grounds: the least squares principle to be applied opens the way to a wealth of statistical knowledge and thus easy generalizations.In this Section, we briefly outline and review the idea of the extension of multivariate local polynomial fitting Kantz et al. (1997); Fan et al. (1996); Su (2010) to the parameter R of defoused PSF.

Multivariate kernel function
To localize data in the m-dimension, we need a multi kernel function.Generally speaking, a multivariate kernel function refers to a m-variate function satisfying Here and hereafter, we use to indicate multivariate integration over the m-dimensional Euclidean space.
There are two common methods for constructing multivariate kernel functions.For a univariate kernel k(x), the product kernel is given by and the spherically symmetric kernel is defined as where c K,m = { K( x )dx} −1 is a normalization constant and x =( and the spherical Epanechnikov kernel The latter is the optimal kernel, according to Fan et al Fan et al. (1996); Su (2010).
The localization in multivariate nonparametric regression is frequently carried out by the kernel weighting.Let H be a symmetric positive-definite matrix called a bandwidth matrix.

176
Image Restoration -Recent Advances and Applications

www.intechopen.com
The localization scheme at a point x assigns the weight where |H| is the determinant of the matrix H.The bandwidth matrix is introduced to accommodate the dependent structure in the independent variables.For practical problems, the bandwidth matrix H is taken to be a diagonal matrix.The different independent variables will be accommodated into different scales.For simplification, the bandwidth matrix is designed into H = hI m (I m denoting the identity matrix of order m).

Multivariate predictor with local polynomial fitting
Suppose that the input vector is The model is fitted by the function Our purpose is to obtain the estimation R = f (V) of function f .This paper, we use the dth order multivariate local polynomial f (V) to predict the defocused parameter R T value based on the point V T of the test image.The polynomial function can be described as where ) In the multivariate prediction method, V T a (a = 1, 2, ••• , A) denoting the trained image feature vectors.Using A pairs of (V T a , R a ), for which the values are already known, the coefficients of f i is determined by minimizing For the weighted least squared problem, a matrix form can be described by and X is the We then have the least squared solution with multivariate local polynomial fitting.
or, when X T WX is inverse, the estimation can be written by then, we can get the estimation RT = f (V T ) where Computing the B will suffer from large computational cost.we can use the recursive least squared method to reduce the computation complexity, and it is very powerful especially in the real time prediction problems.There are several important issues about the bandwidth, the order of multivariate local polynomial function and the kernel function which have to be discussed.The three problems will be presented in Section 3.2.3.

Parameters selections
For the multivariate local polynomial predictor, there are three important problems which have significant influence to the prediction accuracy and computational complexity.First of all, there is the choice of the bandwidth matrix, which plays a rather crucial role.The bandwidth matrix H is taken to be a diagonal matrix.For simplification, the bandwidth matrix is designed into H = hI m .So the most important thing is to find the bandwidth h.
A too big bandwidth under-parameterizes the regression function, causing a large modeling bias, while a too small bandwidth over-parameterizes the unknown function and results in noisy estimates.In theory, there exists a optimal bandwidth h opt in the meaning of mean squared error, such that But the optimal bandwidth can not be solved directly.So we discuss how to get the asymptotically optimal bandwidth.There are quite a few important techniques for selecting the bandwidth.such as cross-validation and plug-in bandwidth selectors.a conceptually simple technique, with theoretical justification and good empirical performance , is the plug-in technique.

178
Image Restoration -Recent Advances and Applications

www.intechopen.com
Another issue in multivariate local polynomial fitting is the choice of the order of the polynomial.Since the modeling bias is primarily controlled by the bandwidth, this issue is less crucial however.For a given bandwidth h, a large value of d would expectedly reduce the modeling bias, but would cause a large variance and a considerable computational cost.Since the bandwidth is used to control the modeling complexity, and due to the sparsity of local data in multi-dimensional space, a higher-order polynomial is rarely used.We use the local quadratic regression to indicate the flavor of the multivariate local polynomial fitting, that is to say, d = 2.
The third issue is the selection of the kernel function.In this paper, of course, we choose the optimal spherical Epanechnikov kernel function, which minimizes the asymptotic MSE of the resulting multivariate local polynomial estimators, as our kernel function.

Estimating the defocused parameter
Twenty original images are chosen to train the model.The images are defocused artificially with R whose value ranging from 2 to 7. So the total number of training samples are 120.Then feature vectors are constructed using variables v 1−5 of each image: The defocused parameters R is the model output.
When training samples {V T a , R a } 120 a=1 are given, obtaining weights matrix B, according to the relationship between the V and R, then the defocused parameter R can be calculated using the trained model.

Iterative Wiener filter
Wiener filtering (minimizing mean square error ) is commonly used to restore linearly-degraded images.To obtain optimal results,there must be accurate knowledge of the covariance of the ideal image.In this section, the so-called iterative Wiener filter Su et al. (2008);Allen et al. (1990)is used to restore the original image.
The imaging system H is assumed to be linear shift invariant with additive, independent, white noise processes of known variance.the model for the observed image y is given in matrix notation by where f is the ideal image.The optimal linear minimum mean-squared error, or Wiener restoration filter given by f = By (32) where B = R ff H T [HR ff H T + R nn ] −1 , requires accurate knowledge of R ff , the autocorrelation of ideal image f .However, in practical situations f is usually not available and only a single copy of the blurred image to be restored, y, is provided.In the absence of a more accurate knowledge of the ideal image f , the blurred image y is often used in its place simply because there is no other information about f readily available.The signal y is subsequently used to compute an estimate of R ff and this estimate is used in place of R ff in Equation (32).
The following summarizes the iterative Wiener filtering procedure.Step 2 Filter construction: Use R ff (i), the i th estimate of R ff to construct the (i + 1) th restoration filter B(i + 1) given by Step 3 Restoration: Restore y by the B(i + 1) filter to obtain f (i + 1), the (i + 1) th estimate of f Step 4 Update: Use f (i + 1) to compute an improved estimate of R ff , given by Step 5 Iteration: Increment i and repeat steps 2,3,4, and 5.

Experimental results and analysis
The experiments are carried out by using the Matlab image processing toolbox.The performance of the proposed image restoration algorithm has been evaluated using the classical gray-scale Moon image, Coins image, Saturn image, and Tire image in Matlab toolbox.To verify the good ability of restoration of the proposed algorithm, one real blurred image is used for the deconvolution procedure.The results show our method is very successful for this kind of blurred image.
In image restoration studies, the degradation modelled by blurring and additive noise is referred to in terms of the metric blurred signal-to-noise ratio (BSNR).This metric for a zero-mean M × N image is given by where z(m, n) is the noise free blurred image and σ 2 v is the additive noise variance.For the purpose of objectively testing the performance of linear image restoration algorithms, the improvement in signal-to-noise ratio (ISNR) is often used.ISNR is defined as where f (m, n) and y(m, n) are the original and degraded image pixel intensity values and f (m, n) is the restored true image pixel intensity value.ISNR cannot be used when the true image is unknown, but it can be used to compare different methods in simulations when the true image is known.
In order to find the good performance of the proposed multivariate local polynomial Regression method (MLPR) compared with the RBF neural network algorithm (RBFNN)

174
Image Restoration -Recent Advances and Applications www.intechopen.com

Fig. 3 .
Fig. 3. Defocus Parameter Estimation Process functions are chosen as of Gaussian type:

179
Defocused Image Restoration with Local Polynomial Regression and IWF www.intechopen.comstep 1 Initialization: Use y to compute an initial (i=0) estimate of R ff by R ff (0)=R yy = E{yy T }(33)

Table 1 .
Su et al. (2008), the same defocused blurred images are used for the experiments.Mean squared prediction errors are shown in Table1.From Table1, we can conclude that the prediction results of MLPR predictor are significantly better than the RBF neural network method in the same simulated data.MSE using both methods Two new methods that are based on RBF neural network, multivariate local polynomial regression model and iterative Wiener filtering for semi-blind restoration of blurred noisy images were proposed in this chapter.Defocused parameter was estimated by a RBF neural network or multivariate local polynomial regression model trained in wavelet domain.The main advantages of the proposed techniques are that they are not only robust to noise because wavelet transform have an excellent de-noising ability, but also effective to artificially and practically defocused blurred image.Restoration is successfully realized by the iterative Wiener filter, resulting in improved the image quality.The algorithm was justified via 182 Image Restoration -Recent Advances and Applications www.intechopen.comsimulation and real image.Defocused image parameter can be successfully estimated by using trained model.Experimental results show the proposed schemes are reliable and robust for defocused blurred image restoration.Comparisons are made to verify the advantages of multivariate local polynomial regression based method.