Object Motion Deblurring in Single Image Under Static Background

When shooting a moving object, as the object moves too fast or the camera’s exposure time is too long, smears may occur in the image, which would result in motion blur. The blind restoration of object motion blur is a challenging inversive problem. To effectively extract useful information from blurred images, this paper proposes a new method to remove motion blur, which is based on the maximum a posterior (MAP) framework. Firstly, the framework combines guided filtering and automatic GrabCut image segmentation algorithm in order to divide the image into different layers. Afterwards, it uses the image gradient to estimate the blur kernel through an alternating iterative optimization strategy. The iteratively reweighted least squares algorithm (IRLS) is used to optimize the solution of the model. Finally, we use the unsharp masking algorithm to improve the high-frequency components of the image and enhance the edge and details of the image. Therefore, the algorithm can effectively remove the blur caused by the motion of the object, suppress the noise and ringing effect, and recover a higher quality clear image, which can be demonstrated on benchmark problems.


I. INTRODUCTION
Motion blurred images are caused by the relative motion of the camera and the moving objects in the exposure time. Sharp edges in the image are degraded to form a smear, which affects the acquisition of the key information. Motion blur image restoration technology has important theoretical and practical significance as one of the major research hot spots in the field of computer vision [1]. Image restoration technology is divided into blind image restoration and non-blind image restoration [2], [3]. The blur kernel of blind image restoration is unknown, which is more difficult than non-blind image restoration. Most of the existing motion deblurring algorithms focus on the motion blur caused by camera shake [4]- [7]. Considerably, fewer methods have been proposed to remove image blur of moving object. The blind image deblurring algorithms, according to the solution The associate editor coordinating the review of this manuscript and approving it for publication was Long Xu . methods, can be basically categorized into three aspects: methods based on maximum a posterior estimation, methods based on saliency edges, methods based on maximum marginal distribution estimation.
Many image deblurring methods have been proposed in recent years. Generally, in order to obtain a better blind deblurring effect, some methods, such as total variation regularization, Laplace prior, and image gradient distribution, have been adopted to restore the blurred image [8], [9]. The early methods have achieved some efficacies. However, their results are not adaptable to images with complex structures. For better recovery results, more accurate estimation of blur kernels is acquired. Accordingly, part of the adopted methods relies on the study of adaptive dictionary learning so as to estimate blur kernels [10]. On the other hand, others attempt to obtain accurate blur kernels from local maximum gradient prior [11]. Nevertheless, for severe motion blurring and non-uniform motion blurring, a simple blur kernel estimation cannot effectively reach the result. Recently, the proceeding VOLUME 8, 2020 This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ methods often add a prior to the blur kernel and latent clear images. Images' sparse gradient priors are widely used in pixel-level vision fields [12]- [14]. But insufficient methods have been applied to remove image blur caused by moving object. In addition, it is very difficult to extract moving objects from the blurred image. Some methods approached that object segmentation and motion blur could be resolved in the same frame. Therefore, moving object segmentation plays a central role in the blur estimation of object motion and most of the existing methods need manual marks to segment the moving object. As such, for the severe blur caused by object motion, the effect of edge detail restoration is not very approved.
The above discussion shows that many existing image deblurring algorithms cannot eliminate the local motion blur problems which are caused by object motion. And for more severe blurred images, the edge details of deblurred images could not be recovered easily. In order to obtain high qualified clear image, a novel object motion deblurring algorithm is requested. Its advantage should be manifested in the function of automatic division between blurred moving object and the background as to make them into different layers which may estimate the blur kernel separately. Within that, the sharp enhancing algorithm could be utilized to strengthen the edge and detail of the deblurred image, for which the issued object motion blur may be more effectively removed.
Compared to previous works in motion deblurring, our method offers the following contributions. 1) For the first time, we applied automatic GrabCut segmentation algorithm combined with guided filter to object motion deblurring. Our proposed algorithm used saliency map to determine the initialization region of GrabCut algorithm, and automatically divided the blurred moving object and background into different layers, which improved the accuracy of blur kernel estimation for different layers in the image. 2) We used an optimized maximum a posterior deblurring framework. In this framework, the segmentation algorithm could effectively guide the motion blur estimation, and the applied algorithm of iteratively reweighted least square could largely optimize the model solution for the purpose of motion blur elimination in different regions. 3) In order to obtain a clearer image, we used the unsharp masking algorithm to enhance the restoration effect.
In areas with severe blurs, edge details could not be recovered well. For that, the proposed algorithm would improve the clarity of the deblurred image and effectually preserve the edge details of the image.

II. RELATED WORK
In this section we briefly review the related works of motion deblurring.
For motion deblurring problems, many methods have been proposed in recent years [15], [16]. Fergus et al.
proposed a novel approach named Variational Bayesian Motion Blur Estimation [17]. It used a hybrid Gaussian model to learn natural image's gradient on variational Bayesian inference. Due to the high computational load of the variational Bayesian inference, some methods could improve the MAP based approach by careful design of image priors and other similar functions. Levin et al. proposed a method of maximizing the marginal distribution approximation which noted that some gradient priors might be more conducive to blurring images [18]. Ren et al. presented a low-rank prior deblurring method [19], the method based on low-rank prior and was able to effectively offset the shortcomings of classic maximum a posteriori estimation. Zuo et al. proposed an iterative norm regularization and data-driven strategy under MAP framework which aimed to facilitate salient edges and obtain accurate blur kernels [20]. In order to improve the performance of blur kernel estimation, many regularization and image prior deblurring methods have been investigated [21]- [27]. Liu et al. [21] proposed a L0 norm of first-order and second-order image gradients in order to standardize the final estimation results. Furthermore, Whyte et al. [23] found a new parametrization geometric model of the blurring process in concern of the rotational motion of camera in exposure. In addition, Liu et al. [25] exploited a new blind deblurring method based on surface-aware strategy from the intrinsic geometrical viewpoint. Bai et al. [26] introduced a reweighted graph total variation model which focused on obtaining the accurate blur kernels.
However, due to the non-uniform blur problem caused by the motion of the object, the above method cannot be well solved. In view of the above problems, some methods divide the blurred image into several regions and blur each region separately [28]- [32]. Levin [28] proposed this approach firstly by segmenting the blurred regions, and then using the traditional Richardson-Lucy deconvolution technique to estimate each part of the blur kernel. Nevertheless, the above algorithms based on image segmentation largely depend on the actual segmentation quality. If refined blur segmentation could not be obtained, a good image restoration effect would not be obtained. Therefore, Gong et al. [31] proposed the capability of estimating the motion flow directly from the blurred image through a fully deep Convolutional Neural Network (FCN) and attempted the recovery of the clear image from the estimated motion flow. However, it may not segment the objects' undergoing large blurs and may negatively affect the recovery results. For that, Pan et al. proposed object motion deblurring algorithm [32], which resolved image segmentation and the deblurring issue by maximum a posterior framework while optimized it. But it also had deficiency. For instance, the image detail restoration has not shown good results, and the experimental data proved that it still brought noise to the static background. In view of the above problems, our method is different from the previous methods in the following aspects.
1) The combination of the automatic GrabCut segmentation algorithm and guided filtering was first applied to the maximum a posterior deblurring framework. Different from the existing method [32], our algorithm could automatically segment the foreground and background through the moving target out of the frame, without manually marking the blurred target edge. 2) When motion blur is more serious, the edge of the image after deblur cannot be well preserved [32]. We used the unsharp masking algorithm to enhance the deblurred moving target area, and the image clarity and quality were further improved.

III. THE PROPOSED METHOD
The non-uniform deblurring problem discussed is caused by moving object. Our goal is to segment the blur image of the object motion into different layers by the image segmentation algorithm, and to deblurring each layer by the blur kernel estimation.

A. GUIDED FILTERING
Guided image filtering is a kind of edge smoothing filter that can realize the functions of image edge smoothing, detail enhancement and image denoising [33], [34]. Its idea is derived from a local linear model. The final filtering output is obtained by calculating the characteristic information of the guiding image, so we use guided filtering to optimize the image segmentation algorithm. It first defines a filtering process for a linear translation variable, and use the segmentation result as the guiding image represented by I , the input blurred image is represented by p, and the output image is denoted by q. Assuming that the pixel k is the center of window ω k . As shown in the following formula, there is a linear relationship: where i and k are pixel indices, a k and b k are a series of linear coefficients in the window ω k . In order to determine the linear coefficients a k , b k , and minimize the difference between the input image p and the output image q under the guidance of image I , linear regression is used to obtain the lowest window cost of the window coefficient. The cost function can be expressed as follows: where ε is a regularization parameter and its role is to prevent a k from becoming too large. The linear coefficient solution is shown in the following equation: where µ k and σ 2 k are the mean and variance of the guidance image I in the window ω k , and |ω| is the number of pixels in ω k .p k is the average gray value of the input image p within the window ω k . In different windows ω k , the q i values involved in pixel i are different, so the final expression of the guided filter is obtained by taking the average possible values of all q i of pixel i.
whereā i andb i are the average coefficients in the i-th center window.

B. AUTOMATIC GRABCUT SEGMENTATION ALGORITHM COMBINED WITH GUIDED FILTERING
The GrabCut algorithm is an image segmentation algorithm based on graph theory [35]- [37]. It is based on GraphCut to establish a Gaussian mixture model for the target and background area through user interaction. And use an evolvable iterative algorithm in the estimation process to replace a minimum estimation in the GraphCut algorithm to complete the energy minimization and achieve the target segmentation. First, the GrabCut algorithm requires users to mark rectangular box on input image. Then, a full covariance Gaussian mixture model containing g Gaussian components is used to model the target and background respectively, to represent the distribution of the target and background pixels. Thus, a vector g = {g 1, · · · , g n , · · · }, g n {1, · · · g} is introduced, where g n is the Gaussian component corresponding to the n-th pixel, which comes from a Gaussian component in the target or background Gaussian mixture model. The energy function formula in the GrabCut algorithm is calculated as follows: where E is the total energy of the image, U is the region term, which means that a pixel belongs to the negative logarithm of the target background probability. V is the boundary energy term, representing the Euclidean distance between the colors of two adjacent pixels. α is opacity, belonging to [0, 1]. z is the image grayscale value array; θ is the parameter of GMM, therefore, the parameter model of GMM is: where ω(a, g) is the weight of the number of samples of each Gaussian probability distribution in the total number of samples; µ(a, g) is the mean of the Gaussian model. Through the iteration of the GMM model parameters, the energy in GrabCut is minimized to obtain the segmentation result. The GrabCut segmentation is a fast and accurate interactive image segmentation algorithm. However, when the image is complicated, it is difficult for the user to effectively mark the rectangular frame. In order to solve the above problems, we use saliency detection algorithm to optimize. The proposed RCRR-GrabCut algorithm first uses the Reversion Correction and Regularized Random Walk Ranking [38] to obtain the saliency map. After generating the final saliency map, we need to select the appropriate threshold to segment the saliency map to get a binary image. By calculating the threshold, the image can be roughly divided into a target and a background, where the pixel value of the background is 0 and the pixel value of the target is 1. Scan pixels from top to bottom, from left to right, and store the coordinates of the first pixel value, namely A (x1, y1), B (x2, y2), C (x3, y3) and D (x4, y4), using the saliency map to automatically extract the rectangular frame between the foreground and the background. Its purpose is to replace the traditional GrabCut algorithm, which requires manual interaction to select the location of the rectangular box, and then automatically segment the target area in the image. When the image does not meet the segmentation requirements, we can continue to improve the accuracy of the segmentation through simple foreground and background markings to meet the segmentation requirements.
Aiming at the edge area of the target container segmented by the RCRR-GrabCut algorithm, there are a lot of depressions and spurs. Combined with the guiding filter algorithm, the binary image segmented by the RCRR-GrabCut algorithm is used as the guiding image of the guiding filter algorithm, combined with the original image, the segmentation result is obtained through optimization of the guiding filter.
As shown in Fig. 1, we first needed to obtain the saliency map through the saliency detection algorithm of Reversion Correction and Regularized Random Walk Ranking, and selected a suitable threshold to segment the saliency map to obtain a binary image. On this basis, we obtained a rectangular frame for object segmentation. Then we brought the rectangular frame into the GrabCut segmentation algorithm, and iteratively updated and modified GMM parameters, so that the segmentation energy gradually decreased and converged to the minimum value. Finally, combined with guided filtering algorithm to further optimize the segmented image. The resulting segmented image was shown in Fig. 1(d).
In addition, we also compared with five image segmentation algorithms, namely k-means clustering segmentation, maximum entropy threshold segmentation, image segmentation based on region growth, saliency segmentation based on graph-based manifold ranking, saliency segmentation from robust background detection, the results as shown in Fig. 1 (e)-(i). Therefore, for complex and blurred natural images, our proposed RCRR-GrabCut segmentation algorithm combined with guided filtering could achieve good segmentation results. The rectangular frame obtained by the saliency map was used to mark the target area and the background area, and the automatic segmentation of GrabCut was realized. Combined with guided filtering, the segmented image was further optimized, retaining as many image edges as possible.

C. DEBLURRING BASED ON MAXIMUM A POSTERIOR PROBABILITY
Different from the previous manual marking algorithm, this algorithm is the first to introduce the combination of automatic RCRR-GrabCut segmentation and guided filtering into the maximum a posterior probability framework. The core idea of the image deblurring algorithm based on the maximum a posterior probability framework is to find a solution so that the posterior probability value is the largest. That is, we find a set of clear images where p (k, I |B) is the likelihood term of the probability distribution, and p(I ) and p(k) are the prior probabilities of the clear image and blur kernel respectively. According to the algorithm [29], the image deblurring model based on the MAP framework is optimized, the image segmentation item l i is introduced to divide the image into different layers, and the blur kernel k estimation and latent image I restoration are carried out for each layer. Given a blurred image B, as shown in the following mathematical model: where N is the number of divided layers, l i is the binary mask of the i-th layer and has the same size as the input image, and k i is the blur core corresponding to the i-th layer. For the likelihood probability p (B|l i , k i , I ), it is assumed that the pixels in the image are all independent, so there are p (B|l i , k i , I ) = u p (B u |l iu , k iu , I u ), where u represents the spatial position of each pixel. The probability p (B u |l iu , k iu , I u ) represents the data fitting error, and p (B|l i , k i , I ) can be obtained.
where Z d is the normalized term, ⊗ is the convolution operator, and the Laplace distribution is used to deal with large noise [28]. For the prior probability p (l i |k i , I ), this section introduces the auxiliary segmentation confidence graph s i about the latent image I . s i and l i have similar properties, In the continuous iterative deblurring process, s i and l i are constantly updated and optimized to obtain more accurate blur kernels and latent clear images I . The solution formula is as follows: where S i represents the space composed of all possible structures of s i . Next, the alternating iterative method is used to solve the image segmentation term l i , the blur kernel k, the latent clear image I , and the iteratively reweighted least squares algorithm is introduced to solve the model optimally [39]. Based on above discussions, the remaining task is to define the priors p(I ) and p(k i ) of the latent image I and the blur kernel k i . We use the sparsity image gradient prior for the latent image and Laplacian prior for the blur kernel k i , which are defined by where ϕ I (I ) = u (|∂ x I u | 0.8 + ∂ y I u 0.8 ), ϕ k (k i ) = u |k iu |, ∂ x and ∂ y represent differential operators in the x and y directions; λ and γ is a weight parameter; and Z I as well as Z k are normalization terms.

D. OPTIMIZATION
Given the estimation of latent image I , blur kernel k i and segmentation label term l i , the image segmentation term problem can be solved by the following model: therefore, the closed form solution of l i is as follows: where u and v represent the spatial position of image pixels, D u is the weight parameter, and W is the affinity matrix.
In [40], it was explained that the affinity matrix used in the algorithm can produce better image segmentation results. In the blur kernel estimation, better results can be obtained by using the gradient of the image [12], [15], [41]. Therefore, the algorithm in this paper first introduces an automatic segmentation algorithm to segment the image into different layers, and uses the image gradient to estimate the motion blur kernel for each layer, and removes small gradient values according to the algorithm [41]. The blur kernel can be estimated by: We employ the IRLS method to solve it.
where ω k With the estimates of k i and l i , the potentially clear image I can be obtained by solving the following model: Since the above formula is non-convex, this section uses the IRLS method to solve it. In the IRLS algorithm, each iteration needs to solve the following weighted least squares problem:

E. UNSHARP MASKING
The unsharp masking algorithm is a commonly used method in image sharpening enhancement technology [42], [43]. This technology is mainly to obtain high frequency components, and then superimposed with the original image for sharpening. However, in view of the shortcomings of the traditional unsharp masking algorithm that is prone to noise, the improved unsharp masking algorithm adds Gaussian blur, and three parameters, namely, the amount A represents the sharpening intensity, and the radius R represents the radius of the Gaussian blur, which is used to control the smoothness, variable threshold T to determine the sharpened edge. Gaussian blur is widely used to reduce image noise and detail levels. The process is the convolution of the image with the normal distribution. Equation (16) is expressed as the Gaussian calculation corresponding to the elements (x, y) on the two-dimensional template.  where σ is the standard deviation of the normal distribution, and the larger the value of σ , the smoother the image.
As shown in Fig. 2, the algorithm first extracts low frequency components through Gaussian blur. Then, the low frequency component is subtracted from the original image to obtain the high frequency component; then the high frequency component is compared with the threshold value, and the larger one is enhanced; finally, the enhanced details are superimposed on the original image. The sharpening algorithm can remove some small interference details and noise, enhance the contrast of image edge, and make the image clearer visually.
Image sharpening can make the edges of the image and the details of the image clearer. In this algorithm, the unsharp masking algorithm is first introduced into the enhancement process of motion deblurring. As shown in Table 1, we conducted a comparative test on the deblurred image and the deblurred image added with the unsharp masking enhancement algorithm, and tested two sets of indicators: entropy and contrast. The greater the information entropy of the image, the richer the information, the better the image quality. The larger the contrast value, the richer the details of the image and the sharper the edges of the image. From this we can see that the unsharp masking algorithm improves the clarity of the picture, enriches the details of the image edges, and improves the quality of the image.
In this paper, the RCRR-GrabCut algorithm, guided filtering, unsharp masking is first combined with the maximum a posterior framework to remove motion blur. The specific flowchart is shown in Fig. 3, and the detailed steps are as follows: Step 1: Use RCRR-GrabCut segmentation algorithm to automatically segment the blurred image, roughly divide the foreground and background, and binarize the segmentation result to obtain the rough segmentation of the mask.
Step 2: Combine guided filtering to perform segmentation processing on the input blurred image and the segmented image obtained in Step 1. Step 3: The binary segmented image obtained in Step 2 is introduced into the deblurring frame, the blurred image is segmented into the foreground mask image and the background mask image, the blur kernel is solved for different layers, and the model is optimized by the IRLS algorithm to obtain the clear image.
Step 4: Finally, the foreground target of the restored clear image is sharpened and enhanced with the unsharp masking algorithm.

IV. EXPERIMENTAL RESULTS
In order to prove the effectiveness of the algorithm, this section discusses the subjective and objective assessments to compare the proposed method with other methods. Other methods include Zuo et al. [20], Bai et al. [26], Zhang et al. [27], Gong et al. [31], Pan et al. [32]. In all experiments, we referred to the above algorithm, through a large number of experiments to verify, the final parameters were set to α = 2, λ = 0.5, γ = 0.001. The evaluations are achieved synthetic images and natural blurred images with different degrees of blur, including benchmark datasets [32], [44], [45], for a total sample set of 150 images. In order to further prove the reliability of the algorithm, we also conducted an evaluation experiment on the images in GOPRO [46]. Experimental analysis was performed from two aspects: subjective evaluation and objective evaluation: Part A subjectively evaluates the results of object motion deblurring with different degrees of blur. Part B uses six evaluation indicators: peak signal-to-noise ratio, structural similarity, visual information fidelity, average gradient, image contrast, and edge intensity to objectively evaluate the recovery results of the proposed method and other methods.

A. SUBJECTIVE EVALUATION
As shown in Figs. 4-9, images restored via the methods of Zuo et al. [20], Bai et al. [26], Zhang et al. [27], Gong et al. [31], Pan et al. [32] and the proposed method were measured through visual evaluation of six motion blur images titled ''License Plate,'' ''Car Logo,'' ''Wagon Advertisement,'' ''Buddha Statue,'' ''Parking Lot,'' and ''Two Cars''. To verify the authenticity of the proposed algorithm, the experimental images are motion blur of objects with different degrees of blur, including text blur, single-target and multi-target motion blur. By observing the experimental image, it could be found that the original sharp edges in the image degenerated and formed motion blur, which directly affected the acquisition of key information in the image and reduces the quality of the image.
As shown in Figs. 4(b)(c)-9(b)(c), the image processed by the algorithms in [20], [26], [27] did not recover the information of the blurred area of the object, the information in the background of the clean region was degraded. This was because the above algorithms cannot effectively estimate the blur kernels of different regions in the image and deblur the different regions of the image during the restoration of the motion blurred image of the object. Therefore, when the above algorithm processes the motion blurred image of the object, the deblurring effect was not obvious, and the background damage was more serious, and the noise was obvious. Compared with the algorithms in [20], [26], [27], the method proposed in this paper could recover the information of the blurred area in the image very well, as shown in Figs.4 (f)-9(f), The texture of the processed image edges was relatively clear, the noise in the smooth area was well suppressed. In this study, 30 subjects were selected for the subjective evaluation of non-reference quality. Among them, 28 subjects considered the (g) images to be superior to the other images.
As shown in Figs. 4(d)(e)-9(d)(e), the image processed by the algorithms in [31] and [32] effectively solved the local motion deblurring in the image. However, for images with severe motion blur or multiple motion targets, the overall deblurring effect was not very clear. As shown in Figs. 4(d)-9(d), the algorithm suppressed noise during the deblurring process, and the overall image was very smooth, but the detail restoration for the blurred area was not very clear, as shown in Fig. 6 (d), the text information in the blurred area did not have a good deblurring effect. As shown in Figs. 4(e)-9(e), the algorithm could estimate the blur kernels of different regions for deblurring, but the noise in the image was not well suppressed, and the restoration of the edge details of the blurred region was not very clear. Compared with the algorithms in [20], [26], [27], [31] and [32], the method proposed in this paper had stronger denoising performance for image restoration, better overall restoration effect, and the details could be well preserved, and the clarity of the image was improved to a certain extent.

B. OBJECTIVE EVALUATION
Objective evaluation indicators are usually divided into two categories, reference methods and non-reference methods. In order to prove the effectiveness and reliability of the algorithm, we conducted experiments on 150 synthetic blurred images and natural blurred images. For synthetic images, we added motion blur with different blur kernel through the target area selected by the user. In order to test the effect of each algorithm more comprehensively, we select the peak signal-to-noise ratio PSNR, the structural similarity SSIM, and the visual information fidelity VIF to evaluate and test our synthetic blurred images, such as Figs. 4 and 5. Since most of our experimental images do not have clear images that can be referred to, we mainly choose the non-reference evaluation index average gradient G, contrastr and edge intensity e to evaluate the processed image.
The average gradient G is the average of all points on the gradient map of an image. It reflects the small details contrast and texture changes in the image, the larger the average gradient, the richer the image hierarchy, and the clearer the image. Therefore, we could use the average gradient as a series of evaluation criteria for the degree of ambiguity.
where M × N represents the size of the image, ∂f ∂X represents the gradient in the horizontal direction, and ∂f ∂y represents the gradient in the vertical direction.
Ther metric reflects changes in the edges of the image. The greater the contrast, the better the quality of the restored image.r wherer represents the gradient ratio between the deblurred image and the original blurred image, and ℘ represents the visible edge composition in the restored blurred image.
In addition, we also used the edge intensity e to evaluate the quality of the deblurred picture. The larger the edge intensity value, the richer the details of the image and the sharper the edges of the image.
where ∇xf (i, j) and ∇yf (i, j) are the first-order difference in the x and y directions of the i-th row and the j-th column of the image. As shown in Table 2, we performed PSNR, SSIM and VIF index evaluations on the two synthetic motion blur images in Fig. 4 and Fig. 5. From the data, we could see that the value of FCN. [31] was higher than that of our algorithm. But subjectively it could be clearly seen that our algorithm had VOLUME 8, 2020    a better overall restoration effect, the details could be well preserved, and the deblurring effect was the clearest. In order to further prove the effectiveness of our algorithm, we conducted three non-reference image clarity metric evaluation tests of G,r and e in Figs. 4-9.
Tables 3-5 summarize the deblurring results for images with different degrees of blur using the algorithms of Zuo et al. [20], Bai et al. [26], Zhang et al. [27], Gong et al. [31], Pan et al. [32] and the proposed method. Observing the data, we found that according to the G,r and e metrics, the processing effect of our method was better than the other algorithms. Compared with other algorithms, our algorithm could effectively remove the blur caused by the motion of the object, and effectively restore the reduced edge information in the image, and restore a clear image with higher quality.    As shown in Table 6, in order to better illustrate the validity of the data, we adopted 150 motion blur images with different degrees of blur to compare the results of each deblurring method, and obtained the average value of the objective evaluation index of the image deblurring result. By analyzing the above data, compared with the other four algorithms, the G,r   and e values of our algorithm were larger, indicating that the restored image detail information has been well restored and enhanced, the details of the edge texture of the blurred area are clearer, and the image quality has been further improved. It can be seen that our algorithm effectively eliminates the blur caused by object motion, and is better than other algorithms in the recovery effect of motion blur.

V. CONCLUSION
At present, most blind motion restoration algorithms are not very effective in dealing with the blur caused by the motion of objects. Some existing methods divide the blurred image into several regions and deblur each region separately. However, the segmentation method relies heavily on the quality of the segmentation. Aiming at solving this problem, this paper is first to introduce the combination of automatic GrabCut segmentation algorithm and guided filtering into the maximum a posterior deblurring framework, optimizes the blur kernel estimation of each layer in the image. And use the unsharp masking algorithm to further enrich the edges and details of the image. The experimental results show that the overall deblurring effect of our proposed algorithm is better, the edge texture details of the image are clearer, and the noise is suppressed, and both subjective evaluation and objective evaluation better than other algorithms.