An Image Blind Deblurring Method, System, Device and Medium Based on Edge Enhancement
By calculating the local second-order statistic HOS value of the original clear image, the blind defuzzing model is established, which solves the problem of inaccurate estimation of the fuzzy kernel in the prior art, and improves the image edge enhancement and restoration performance.
Patent Information
- Application Number
- CN202311063076.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-07-18
- Estimated Expiration
- 2043-08-23
AI Technical Summary
Existing blind defuzzing methods have artifacts when restoring significant edges, resulting in inaccurate estimation of the blur kernel and inability to recover clear images, especially because the image edge extension width is affected by neighborhood size.
By calculating the local second-order statistic HOS of each pixel point of the original clear image, a blind defuzzing model is established as a weight, the fuzzy kernel is solved and non-blind defuzzing processing is performed, and the local second-order statistic HOS value and gradient information optimization model is combined to improve the accuracy of fuzzy kernel estimation.
It realizes the enhancement of image edges while polishing noise, improves the accuracy of fuzzy core estimation and image restoration performance, and restores clearer images.
Smart Images

Figure CN117218016B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical fields of image processing and pattern recognition, and particularly relates to a blind image deblurring method, system, device and medium based on edge enhancement. Background Art
[0002] With the popularization of imaging devices such as digital cameras, smartphones and cameras, image acquisition has become increasingly easy. However, during the exposure time of the camera, factors such as the environment, out-of-focus of the camera, and relative movement between it and the target object will make the acquired image blurred. In practical applications, clear images are required. Therefore, image deblurring is an important research direction in image processing. The blurring process of an image can generally be described as: where represents a two-dimensional linear convolution operator, and B, k, I and n represent a blurred image, a blur kernel, a clear image, and independent and identically distributed Gaussian white noise respectively. The purpose of image deblurring is to recover the original clear image I from the observed blurred image B. If the blur kernel is known, it is called non-blind image deblurring, otherwise it is called blind image deblurring. In practical applications, it is usually difficult to obtain the information of the blur kernel.
[0003] Blind image deblurring is a highly ill-posed problem. The mainstream method for solving blind image deblurring is maximum a posteriori probability estimation. In 2009, Levin et al. pointed out that simultaneously estimating the blur kernel and the clean image cannot achieve ideal results, and proposed the idea of first estimating the blur kernel and then performing image restoration through non-blind deblurring methods. Among them, the estimation of the blur kernel is the key to solving the image deblurring problem; Cho and Lee et al. explicitly extracted sharp edges using bilateral filtering and shock filtering, estimated the blur kernel with the edges, and then obtained the clean image using the fast Fourier transform; Xu et al. believed that significant edges are not entirely conducive to the accurate estimation of the blur kernel, and an additional edge selection step is still required, and proposed an image edge selection method that can improve the performance of blur kernel estimation; for text image deblurring, Pan et al. proposed an L0 sparse regularization model of image gray level and its gradient; later, through the statistical feature analysis of natural images, Pan et al. proposed a new image prior - dark channel prior (denoted as DCP), and designed a blind image deblurring model based on DCP; in 2019, Chen et al. proposed another image prior - the modulus of the maximum gradient within the local neighborhood of the image (denoted as LMG), and established the LMG model.
[0004] The above method shows that restoring the prominent edges of the original clear image is the key to blur kernel estimation, and the accuracy of the blur kernel affects the clarity of the final restored image; in terms of restoring prominent edges, although the LMG model is effective, it will widen the image edges to a certain extent, resulting in artifacts near the edges in the original clear image, causing the estimated blur kernel to be far from the true blur kernel, and thus unable to restore a clear image. The width of the image edge expansion depends on the size of the neighborhood, which is a problem caused by the definition of LMG.
[0005] The patent application with publication number CN114998146A discloses an image semi-blind deblurring method based on deconvolution total least squares with bias correction, including selecting a regularization term based on the image blur imaging model; constructing an image semi-blind deblurring model based on deconvolution total least squares; solving the parameters of the image semi-blind deblurring model for the potential clear image; performing bias correction; if the parameters do not converge or the maximum number of iterations is not reached, then solve the parameters of the image semi-blind deblurring model for the potential clear image, otherwise output the finally restored clear image; however, due to the regularization term of the original clear image in the model bringing artifacts, the model cannot estimate the original clear image with clear prominent edges, resulting in the inability to effectively estimate the blur kernel and thus unable to restore a clear image. Summary of the Invention
[0006] To overcome the above-mentioned shortcomings of the prior art, the purpose of the present invention is to provide an edge-enhanced image blind deblurring method, system, device and medium. By calculating the local second-order statistics HOS of each pixel point of the original clear image to measure the edge strength, using HOS as the weight to obtain an optimization model for estimating the clear image and the blur kernel and solving the model to obtain the final blur kernel, and using a non-blind deblurring method for the blurred image to obtain the final clear image. The present invention has the advantages of high accuracy, strong restoration performance and clear restored image.
[0007] To achieve the above purpose, the technical solution adopted by the present invention is:
[0008] An edge-enhanced image blind deblurring method, comprising the following steps:
[0009] Step 1, collect the original blurred image. If the blurred image is a color image, convert it to a grayscale image, and perform pyramid layering through downsampling to construct an image pyramid; if the blurred image is a black-and-white image, directly perform pyramid layering on the blurred image through downsampling to construct an image pyramid;
[0010] Step 2: Collect the original clear image, calculate the local second-order statistic HOS value at each pixel of the original clear image, so as to obtain the weight matrix of the original clear image; use the weight matrix and the gradient of the original clear image to obtain the regularization term of the original clear image, and establish an image blind deblurring model;
[0011] Step 3: Take the blurred image at each scale in the image pyramid in Step 1 as the initial original clear image at this layer, calculate the initial weight matrix, and solve the original clear image at this layer according to the image blind deblurring model constructed in Step 2;
[0012] Step 4: According to the original clear image at this layer obtained by solving in Step 3, solve the blur kernel of this original clear image at the same scale;
[0013] Step 5: Upsample the blur kernel of the original clear image obtained in Step 4 and transfer it to the next scale in the image pyramid in Step 1 as the initial blur kernel of the next layer. Loop and alternately execute Step 3 and Step 4 according to the set number of times until the final blur kernel is obtained at the finest scale;
[0014] Step 6: Process the original blurred image with the final blur kernel estimated in Step 5 to obtain the final clear image.
[0015] The establishment of the image blind area blurring model in Step 2 specifically includes the following steps:
[0016] 2.1 The regularization term of the original clear image is shown in Equation (1):
[0017]
[0018] In Equation (1), I represents the original clear image, and H i,j represents the local second-order statistic HOS value at each pixel of the original clear image, and its definition is R i,j represents a rectangular area centered on the pixel point (i, j) with a size of m×n. The average pixel value in this area is: In the formula, 0 ≤ H i,j ≤ 1; when R i,j is located in the smooth area, the pixel changes in the area are small, and the corresponding H i,j is small; when R i,j contains the edge area, the pixel changes in R(p) are drastic, and the corresponding H i,j is large; therefore, when minimizing the objective function in Step 2, when (i, j) is located in the smooth area, H i,j → 0, 1 - H i,j → 1, making Smooth the noise in this area; when (i, j) is at the edge position, H i,j →1, 1 - H i,j →0, so that Enhance the image edge;
[0019] 2.2 Establish an image blind deblurring model according to the regularization term of the original clear image, as shown in Equation (2):
[0020]
[0021] In Equation (2), the regularization parameters γ, τ, λ, β > 0; represents a two-dimensional linear convolution operator; B, k, and I represent the blurred image, the blur kernel, and the original clear image respectively; H i,j represents the local second-order statistic HOS value at the position (i, j) in the original clear image I; represents the gradient of the pixel point (i, j) on the blur kernel I, then there is: Among them, and represent the partial derivatives of the image I in the horizontal and vertical directions respectively; the gradient of the modulus is defined as the sum of the absolute values of its two components: Then there is: of L 0 norm means the number of non-zero elements in:
[0022] In step 3, solving the original clear image is specifically as follows:
[0023] Initialize the regularization parameters and the blur kernel in Equation (2), as shown in Equation (3):
[0024]
[0025] In Equation (3), I t and k t represent the t-th iteration results of the original clear image I and the blur kernel k respectively, is the local second-order statistic HOS value of the pixel point (i, j) on I t Solve Equation (3) by using the semi-quadratic splitting method and the alternating minimization method, including the following steps:
[0026] 3.1 Introduce an auxiliary parameter η to replace g = (g h , g v ) to approximate As shown in Equation (4):
[0027]
[0028] In Equation (4), the parameters α1, α2 > 0, and η i,j is the (i, j) element of η, Λ represents the modulo operation: Therefore,
[0029] Equation (4) can be solved by alternately minimizing the following three equations:
[0030]
[0031]
[0032]
[0033] 3.2 Assume I t+1,s is known, update η t+1,s+1 , as shown in Equation (8):
[0034]
[0035] In Equation (8), 1 represents a matrix with all elements equal to 1, and its size is the same as that of I t+1,s is consistent, consists of the HOS values of I t (i, j);
[0036] 3.3 Introduce the parameter J to approximate I, and transform Equation (7) into Equation (9):
[0037]
[0038] In Equation (9), the parameter α3 > 0, and Equation (9) can be solved by alternately minimizing, resulting in two sub-problems as shown in Equations (10) and (11):
[0039]
[0040]
[0041] In Equations (10) and (11), the parameter α3 > 0;
[0042] 3.4 Based on the η t+1,s+1 obtained in Step 3.2, assume I t+1,s+1,d is known, update J t+1,s+1,d+1 , as shown in Equation (12):
[0043]
[0044] 3.5 Assume It+1,s+1,d+1,r It is known that g is updated t+1,s+1,d+1,r+1 , as shown in Equation (13):
[0045]
[0046] 3.6 Based on J obtained in Steps 3.4 and 3.5 t+1,s+1,d+1 and g t+1,s+1,d+1,r+1 , update I through fast Fourier transform t+1,s+1,d+1,r+1 , as shown in Equation (14):
[0047]
[0048] In Equation (14), F(·) and F -1 (·) respectively represent the fast Fourier transform and its inverse transform, represents the complex conjugate operator, and there is
[0049] In Step 4, the original clear image at this layer obtained according to Step 3 is used to solve the blur kernel of the original clear image at the same layer scale. The specific steps are as shown in Equation (15):
[0050]
[0051] In Equation (15), u t+1 represents the structural part of the original clear image I t+1 , and its expression is as shown in Equation (16):
[0052]
[0053] In Equation (16), the parameter ε > 0, p represents a pixel point in the image u; D h (p) and D v (p) respectively represent the total window variation in the horizontal and vertical directions: R(p) represents a variational region centered on the p pixel point, q represents a pixel point in this region, and g p,q represents a Gaussian weighting function with a standard deviation of σ, that is p i and p j respectively represent the horizontal and vertical position coordinates of the p point, q i and q j respectively represent the horizontal and vertical position coordinates of the q point; L h (p) and L v (p) represent the window intrinsic variation:
[0054] Equation (15) is solved by fast Fourier transform as shown in Equation (17):
[0055]
[0056] Estimate the blur kernel k t+1 After that, first set the negative elements of the blur kernel to 0, and then perform the next normalization process.
[0057] In step 6, the original image is processed using the final blur kernel estimated in step 5 to obtain the final clear image. The specific steps are as follows:
[0058] 6.1 According to the blurred image and the final blur kernel estimated in step 5, use the method of Laplacian prior to estimate the original clear image denoted as I L ;
[0059] 6.2 Estimate the clear image denoted as I0 using Equation (18):
[0060]
[0061] 6.3 Calculate the difference image between the original clear image I L and the clear image I0, and use bilateral filtering to remove artifacts;
[0062] 6.4 Subtract the filtered difference image from the original clear image I L to obtain the final clear image.
[0063] An image blind deblurring system based on edge enhancement includes:
[0064] An image acquisition and preprocessing module, which is used to acquire the original blurred image, convert the color image into a grayscale image, and perform pyramid layering on the blurred image through downsampling to construct an image pyramid; and acquire the original clear image, calculate the local second-order statistic HOS value at each pixel point of the original clear image, so as to obtain the weight matrix of the original clear image;
[0065] An image blind deblurring model construction module, which is used to utilize the weight matrix of the original clear image and the gradient of the original clear image obtained by the image acquisition and preprocessing module to obtain the regularization term of the original clear image, and establish an image blind deblurring model;
[0066] An image blind deblurring model solving module, which is used to solve the image blind deblurring model established by the image blind deblurring model construction module to obtain the original clear image;
[0067] A blur kernel solving module, which is used to solve according to the original clear image obtained by the image blind deblurring model solving module to obtain the estimated blur kernel;
[0068] A clear image generation module, which is configured to use a non-blind deblurring method to obtain a final clear image according to the blurred image and the blur kernel estimated by the blur kernel solving module.
[0069] An image blind deblurring device based on edge enhancement, comprising:
[0070] A memory for storing a computer program;
[0071] A processor for executing the image blind deblurring method based on edge enhancement in the computer program.
[0072] A computer-readable medium, the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it can perform blind deblurring on an image based on edge enhancement.
[0073] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0074] 1. By calculating the local second-order statistic HOS value at each pixel point of the original clear image in step 2, the present invention obtains a weight matrix, and uses the weight matrix to obtain the regularization term of the original clear image, realizing the enhancement of the image edge while smoothing noise interference and improving the image restoration performance.
[0075] 2. By solving the blur kernel of the original clear image in step 4 and step 5, and estimating the final blur kernel at the finest scale, the present invention improves the accuracy of blur kernel estimation.
[0076] 3. By using the final blur kernel estimated in step 5 to perform non-blind deblurring on the original blurred image in step 6, the present invention makes the restoration of the blurred image clearer.
[0077] In summary, the present invention calculates the local second-order statistic HOS value at each pixel point of the clear image, obtains a weight matrix, and uses the weight matrix to obtain the regularization term of the original clear image to establish an image blind deblurring model. After solving the model, the final blur kernel is obtained, and then the final blur kernel is used to perform non-blind deblurring on the blurred image to obtain a clear image. The present invention has the advantages of strong image restoration performance, high accuracy of blur kernel estimation, and clear restored image. Description of the Drawings
[0078] Figure 1 It is a flowchart of the method of the present invention.
[0079] Figure 2 It is a comparison chart of the average peak signal-to-noise ratio PSNR value results of the deblurred images obtained by the present invention and other methods provided in the embodiments of the present invention.
[0080] Figure 3 This is a comparison diagram of the visual effects of the embodiments of the present invention and other methods for restoring images, where: Figure 3 (a) is a blurred image. Figure 3 (b) For use of L 0 The image restored by the regularized model, Figure 3 (c) is the image restored using the DCP model. Figure 3 (d) is the image restored using the LMG model. Figure 3 (e) is an image restored using the method of the present invention, Figure 3 (f) is the real clear image. DETAILED DESCRIPTION
[0081] The present invention will be described in detail below in conjunction with the accompanying drawings.
[0082] The present invention provides an embodiment.
[0083] refer to Figure 1 , an image blind deblurring method based on edge enhancement, comprising the following steps:
[0084] Step 1, collect the original blurred image. In this embodiment, the size of the collected blurred image is 351×502. Downsampling is performed to perform pyramid layering to construct an image pyramid. The sizes of the images from coarse to fine layers are: 123×176, 174×249, 247×353, 351×502;
[0085] Step 2: Collect the original clear image, calculate the local second-order statistic HOS value at each pixel of the original clear image, and obtain the weight matrix of the original clear image; use the weight matrix and the gradient of the original clear image to obtain the regularization term of the original clear image, and establish an image blind deblurring model, which specifically includes the following steps:
[0086] 2.1 The regularization term of the original clear image is shown in formula (1):
[0087]
[0088] In formula (1), the HOS value H i,j The definition is R i,j Represents a rectangular area with a size of m×n and centered at pixel point (i, j). The average pixel value in the area is: Where, 0≤H i,j ≤1; when R i,j When it is in a smooth area, the pixels in the area do not change much, and the corresponding H i,j Smaller; when R i,j When the edge region is included, the pixels in R(p) change dramatically. At this time, the corresponding Hi,j is larger; therefore, when minimizing the objective function described in step 2, when (i, j) is located in the smooth region, H i,j → 0, 1 - H i,j → 1, such that polishes the noise in this region; when (i, j) is located at the edge position, H i,j → 1, 1 - H i,j → 0, such that enhances the image edge, and the regularization term regarding the original clear image realizes the effect of polishing the noise while enhancing the image edge;
[0089] 2.2 Establish an image blind deblurring model according to the regularization term of the original clear image, as shown in Equation (2):
[0090]
[0091] In Equation (2), the regularization parameters γ, τ, λ, β > 0; represents a two-dimensional linear convolution operator; B, k, and I represent the blurred image, the blur kernel, and the original clear image respectively; H i,j represents the local second-order statistic HOS value at the position (i, j) in the original clear image I; represents the gradient of the pixel point (i, j) on the blur kernel I, then there is: where and respectively represent the partial derivatives of the image I in the horizontal and vertical directions; the modulus of the gradient is defined as the sum of the absolute values of its two components: then there is: The L 0 norm refers to the number of non-zero elements in By calculating the HOS value of each pixel point of the original clear image in step 2, the weight matrix is obtained, and the regularization term of the original clear image is obtained by using the weight matrix, realizing the enhancement of the image edge while polishing the noise and improving the restoration performance of the image;
[0092] Step 3, initialize the regularization parameters of the objective function and the blur kernel, use the blurred image at each layer scale in the image pyramid as the initial original clear image at this layer, calculate the initial weight matrix, and solve the original clear image at this layer according to the constructed image blind deblurring model, as shown in Equation (3):
[0093]
[0094] where, I t and k trespectively represent the t-th iteration results of the original clear image I and the blur kernel k, for I t the local second-order statistic HOS value of the pixel point (i, j) on it. In this embodiment, the parameters are set as: λ = γ = 0.003, β = 0.5; the semi-quadratic splitting method and the alternating minimization method are used to solve Equation (3), and the specific steps are as follows:
[0095] 3.1 Introduce an auxiliary parameter η to replace g=(g h ,g v ) to approximate and change Equation (3) to:
[0096]
[0097] where the parameters α1, α2 > 0, and η i,j is the (i, j) element of η, Λ represents the modulo operation: Therefore,
[0098] The above Equation (4) can be solved by alternately minimizing the following three sub-problems:
[0099]
[0100]
[0101]
[0102] 3.2 Assume that I t+1,s is known, and update η t+1,s+1 , then there is Equation (8):
[0103]
[0104] In Equation (8), 1 represents a matrix with all elements being 1, and its size is the same as that of I t+1,s consistent, composed of the HOS values of I t (i, j);
[0105] 3.3 Introduce a parameter J to approximate I, and transform Equation (7) into Equation (9):
[0106]
[0107] where the parameter α3 > 0, and Equation (9) can be solved by the alternating minimization method. The two sub-problems are as follows:
[0108]
[0109]
[0110] In equations (10) and (11), the parameter α3 > 0;
[0111] 3.4 Based on η obtained in step 3.2 t+1,s+1 , assuming I t+1,s+1,d is known, update J t+1,s+1,d+1 :
[0112]
[0113] 3.5 Assuming I t+1,s+1,d+1,r is known, update g t+1,s+1,d+1,r+1 :
[0114]
[0115] 3.6 Based on J t+1,s+1,d+1 and g t+1,s+1,d+1,r+1 obtained in the above steps 3.4 and 3.5, update I t+1,s+1,d+1,r+1 by fast Fourier transform:
[0116]
[0117] In equation (14), F(·) and F -1 (·) represent the fast Fourier transform and its inverse transform respectively, denotes the complex conjugate operator,
[0118] Step 4, according to the original clear image at this layer obtained by solving in step 3, solve for the blur kernel of the original clear image at the same layer scale:
[0119]
[0120] In equation (15), u t+1 represents the structural part of the original clear image I t+1 , and the expression is as follows:
[0121]
[0122] In equation (16), the parameter ε > 0 to avoid a zero denominator, p represents a pixel point in the image u; D h (p) and D v (p) represent the total window variation in the horizontal and vertical directions respectively: R(p) is a variational region centered at the pixel point p, q is a pixel point in this region, and g p,q is a Gaussian weighting function with a standard deviation of σ, that is p i and p j are the horizontal and vertical position coordinates of point p, respectively. q i and q j are similar; L h (p) and L v (p) are called the window inherent variation: Equation (16) can be transformed into a linear equation system through some relaxation operations for solution;
[0123] Equation (15) can be solved through fast Fourier transform, and then there is Equation (17):
[0124]
[0125] After estimating the blur kernel k t+1 , first set the negative elements of the blur kernel to 0, and then perform the next normalization process;
[0126] Step 5: Upsample the blur kernel of the original clear image obtained in Step 4 and transfer it to the next layer scale in the image pyramid in Step 1 as the initial blur kernel of the next layer. Loop and alternately execute Step 3 and Step 4 according to the set number of times until the final blur kernel is estimated at the finest scale. In this embodiment, the number of loop times is set to 5 times; The present invention solves the blur kernel of the original clear image through Step 4 and Step 5, and estimates the final blur kernel at the finest scale, improving the accuracy of blur kernel estimation;
[0127] Step 6: According to the blurred image collected in Step 1 and the blur kernel estimated in Step 4, perform deblurring processing using the following non-blind deblurring method:
[0128] 6.1 First, according to the blurred image and the blur kernel estimated in Step 5, estimate an original clear image I l ;
[0129] 6.2 Estimate the clear image denoted as I0 using Equation (18):
[0130]
[0131] 6.3 Calculate the difference map between the two original clear images I l and I0, and use bilateral filtering to remove artifacts;
[0132] 6.4 Finally, subtract the filtered difference map from I l to obtain the final clear image.
[0133] Further test and verify the present invention:
[0134] On a Windows 10 system with a 2.30GHz Intel(R) Core TM i7-10875H CPU, version 9.9.0 (R2020b) Matlab software was used for test experiments. A grayscale image dataset was selected, which contains 80 grayscale blurred images. These images were obtained by convolving 8 blur kernels (with sizes of 13×13, 15×15, 17×17, 19×19, 21×21, 23×23, 23×23, 27×27) with 10 grayscale images (with a size of 242×242) respectively, and saved in the png format. Using the peak signal-to-noise ratio PSNR and structural similarity SSIM values as evaluation metrics, the restoration performance of existing methods such as L 0 regularization model, DCP model, LMG model and the method proposed in the present invention for blind image deblurring was tested. The results are shown in Table 1 as follows:
[0135]
[0136]
[0137] Table 1
[0138] It can be seen from Table 1 that the average peak signal-to-noise ratio PSNR value and average structural similarity SSIM value of the present invention on the entire dataset are significantly higher than those of other existing technologies. The difference in the average peak signal-to-noise ratio PSRN value from the sub-optimal method LMG model is 1.01dB, and the difference in the structural similarity SSIM value is 0.02. Because the present invention enhances the significant edges in the image, which is beneficial to the estimation of the blur kernel and improves the restoration performance of the model for blurred images.
[0139] Reference Figure 2 , the average peak signal-to-noise ratio PSNR values of the deblurred images obtained from 4 blurred images by different methods and the average peak signal-to-noise ratio PSNR values of 48 test images are shown. It can be clearly observed from the figure that, compared with other methods, the average peak signal-to-noise ratio of the images restored by the present invention has been significantly improved, that is, the images restored by the present invention are clearer.
[0140] Reference Figure 3 , the figure shows the visual comparison on the "Im02_ker010" in the color image dataset and the corresponding peak signal-to-noise ratio PSNR values. The two layout details in the clock images restored by the four methods and the original clear image are magnified, marked with red frames and green frames respectively, and the magnified results are placed below the images. Among them, Figure 3 (a) is the blurred image, Figure 3 (b) is the image restored by the L 0 regularization model, Figure 3 (c) is the image restored by the DCP model,Figure 3 (d) The image restored by the LMG model, Figure 3 (e) The image restored by the present invention, Figure 3 (f) The real clear image. By comparing the other three restored images in Figure 3 and the image restored by the present invention with the real clear image respectively, it can be obtained that: the result restored by the present invention not only has a higher peak signal-to-noise ratio (PSNR) value than the other three methods, but also has the best visual effect, and the restored image is the clearest.
Claims
1. A blind image deblurring method based on edge enhancement, characterized in that It includes the following steps: Step 1: Collect the original blurred image. If the blurred image is a color image, convert it to a grayscale image and perform pyramid layering through downsampling to construct an image pyramid. If the blurred image is a black-and-white image, directly perform pyramid layering on the blurred image through downsampling to construct an image pyramid; Step 2: Collect the original clear image, calculate the local second-order statistic HOS value at each pixel point of the original clear image to obtain the weight matrix of the original clear image; use the weight matrix and the gradient of the original clear image to obtain the regularization term of the original clear image and establish an image blind deblurring model; The establishment of the image blind area deblurring model specifically includes the following steps: 2.1 The regularization term of the original clear image is shown in Equation (1): In Equation (1), I represents the original clear image, and H i,j represents the local second-order statistic (HOS) value at each pixel of the original clear image, and its definition is R i,j represents a rectangular region centered at the pixel point (i, j) with a size of m×n. The average pixel value within this region is: In the formula, 0 ≤ H i,j ≤ 1; when R i,j is located in a smooth region, the pixel changes within the region are small, and the corresponding H i,j is small; when R i,j contains an edge region, the pixel changes within R(p) are drastic, and the corresponding H i,j is large; when (i, j) is located in a smooth region, H i,j → 0, 1 - H i,j → 1, making polish the noise within this region; when (i, j) is located at the edge position, H i,j → 1, 1 - H i,j → 0, making enhance the image edge effect; 2.2 Establish an image blind deblurring model according to the regularization term of the original clear image, as shown in Equation (2): In formula (2), the regularization parameters γ, τ, λ, β > 0; represents a two-dimensional linear convolution operator; B, k, and I represent a blurred image, a blur kernel, and the original clear image, respectively; H i,j represents the local second-order statistic (HOS) value at the position (i, j) in the original clear image I; represents the gradient of the pixel point (i, j) on the blur kernel I, then there is: where and represent the partial derivatives of the original clear image I in the horizontal and vertical directions, respectively; the gradient modulus is defined as the sum of the absolute values of its two components: then there is: The L 0 norm refers to the number of non-zero elements in Step 3: Take the blurred image at each layer scale in the image pyramid in Step 1 as the initial original clear image at that layer, calculate the initial weight matrix, and solve the original clear image at that layer according to the image blind deblurring model constructed in Step 2; Step 4: According to the original clear image at that layer obtained by solving in Step 3, solve the blur kernel of the original clear image at the same layer scale; Step 5: Upsample the blur kernel of the original clear image obtained by solving in Step 4 and transfer it to the next layer scale in the image pyramid in Step 1 as the initial blur kernel of the next layer. Loop and alternately execute Step 3 and Step 4 according to the set number of times until the final blur kernel is obtained at the finest scale; Step 6: Process the original blurred image using the final blur kernel estimated in Step 5 to obtain the final clear image.
2. The blind image deblurring method based on edge enhancement according to claim 1, wherein The solution of the original clear image in Step 3 is specifically: Initialize the regularization parameter and blur kernel in Equation (2), as shown in Equation (3): In formula (3), I t and k t respectively represent the t-th iteration results of the original clear image I and the blur kernel k. is the local second-order statistic HOS value of the pixel point (i, j) on I t The formula (3) is solved by the semi-quadratic splitting method and the alternating minimization method, including the following steps: 3.1 Introduce an auxiliary parameter η to replace g = (g h , g v ) to approximate As shown in Equation (4): In formula (4), the parameters α1, α2 > 0, and η i,j is the (i, j) element of η, Λ represents the modulo operation: Therefore, Equation (4) can be solved by alternately minimizing the following three equations: 3.2 Hypothesis I t+1,s It is known that η is updated t+1,s+1 , as shown in Equation (8): In formula (8), 1 represents a matrix with all elements being 1, and its size is the same as that of I t+1,s which is consistent with and is composed of the HOS values of I t (i, j). 3.3 Introduce the parameter J to approximate I and transform Equation (7) into Equation (9): In Equation (9), the parameter α3 > 0. Equation (9) can be solved by the method of alternating minimization to obtain two sub-problems as shown in Equations (10) and (11): In Equations (10) and (11), the parameter α3 > 0; 3.4 Based on η obtained in step 3.2 t+1,s+1 , assume I t+1,s+1,d is known, update J t+1,s+1,d+1 , as shown in Equation (12): 3.5 Hypothesis I t+1,s+1,d+1,r It is known that g is updated t+1,s+1,d+1,r+1 , as shown in Equation (13): 3.6 Based on J obtained in steps 3.4 and 3.5 t+1,s+1,d+1 and g t+1,s+1,d+1,r+1 , update I through fast Fourier transform t+1,s+1,d+1,r+1 , as shown in Equation (14): In Equation (14), and respectively represent the fast Fourier transform and its inverse transform, represents the complex conjugate operator, and there is 3. A blind image deblurring method based on edge enhancement according to claim 1, characterized in that In Step 4, according to the original clear image at that layer obtained by solving in Step 3, the blur kernel of the original clear image at the same layer scale is solved. The specific steps are shown in Equation (15): In formula (15), u t+1 represents the structural part of the original clear image I t+1 and its expression is as shown in formula (16): In formula (16), the parameter ε > 0, p represents a pixel point in the image u; D h (p) and D v (p) respectively represent the total window variation in the horizontal and vertical directions: R(p) represents a variational region centered at the pixel point p, q represents a pixel point within this region, and g p,q represents a Gaussian weighting function with a standard deviation of σ, that is p i and p j respectively represent the position coordinates of point p in the horizontal and vertical directions, q i and q j respectively represent the position coordinates of point q in the horizontal and vertical directions; L h (p) and L v (p) represent the window intrinsic variation: Solve Equation (15) through the fast Fourier transform, as shown in Equation (17): Estimate the blur kernel k t+1 After that, first set the negative elements of the blur kernel to 0, and then perform the next normalization process.
4. A blind image deblurring method based on edge enhancement according to claim 1, characterized in that, In Step 6, the original image is processed using the final blur kernel estimated in Step 5 to obtain the final clear image. The specific steps are as follows: 6.1 According to the blurred image and the final blur kernel estimated in step 5, use the Laplacian prior method to estimate the original clear image denoted as I L ; 6.2 Estimate the clear image using Equation (18) and denote it as I0: 6.3 Calculate the original clear image I L and the difference image between the two images of the clear image I0, and use bilateral filtering to remove artifacts; 6.4 Subtract the filtered difference image from the original clear image I L to obtain the final clear image.
5. An image blind deblurring system based on edge enhancement, characterized by including: An image acquisition preprocessing module, which is used to acquire the original blurred image, convert the color image into a grayscale image, and perform pyramid layering on the blurred image through downsampling to construct an image pyramid; and acquire the original clear image, calculate the local second-order statistic HOS value at each pixel point of the original clear image, so as to obtain the weight matrix of the original clear image; An image blind deblurring model construction module, which is used to utilize the weight matrix of the original clear image and the gradient of the original clear image obtained by the image acquisition preprocessing module to obtain the regularization term of the original clear image, and establish an image blind deblurring model; specifically including the following steps: 2.1 The regularization term of the original clear image is shown in Equation (1): In Equation (1), I represents the original clear image, and H i,j represents the local second-order statistic HOS value at each pixel of the original clear image, and its definition is R i,j represents a rectangular region centered at the pixel point (i, j) with a size of m×n, and the average pixel value in this region is: In the formula, 0 ≤ H i,j ≤ 1; when R i,j is located in a smooth region, the pixel changes in the region are small, and the corresponding H i,j is small; when R i,j contains an edge region, the pixel changes in R(p) are drastic, and the corresponding H i,j is large; when (i, j) is located in a smooth region, H i,j → 0, 1 - H i,j → 1, so that polishes the noise in this region; when (i, j) is located at the edge position, H i,j → 1, 1 - H i,j → 0, so that enhances the image edge effect; 2.2 Establish an image blind deblurring model according to the regularization term of the original clear image, as shown in Equation (2): In formula (2), the regularization parameters γ, τ, λ, β > 0; represents a two-dimensional linear convolution operator; B, k, and I represent the blurred image, the blur kernel, and the original clear image, respectively; H i,j represents the local second-order statistic (HOS) value at the position (i, j) in the original clear image I; represents the gradient of the pixel point (i, j) on the blur kernel I, then there is: where and represent the partial derivatives of the original clear image I in the horizontal and vertical directions, respectively; the gradient modulus is defined as the sum of the absolute values of its two components: then there is: The L 0 norm refers to the number of non-zero elements in An image blind deblurring model solving module, which is used to solve the image blind deblurring model established by the image blind deblurring model construction module to obtain the original clear image; A blur kernel solving module, which is used to solve according to the original clear image obtained by the image blind deblurring model solving module to obtain the estimated blur kernel; A clear image generation module, which is used to obtain the final clear image by using a non-blind deblurring method according to the blurred image and the blur kernel estimated by the blur kernel solving module.
6. An image blind deblurring device based on edge enhancement, characterized in that, Including: A memory, which stores a computer program of a method for edge-enhanced image blind deblurring according to any one of claims 1-4, and is a computer-readable device; A processor, which is used to implement a method for edge-enhanced image blind deblurring according to any one of claims 1-4 when executing the computer program.
7. A computer-readable medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by the processor, it can implement a method for edge-enhanced image blind deblurring according to any one of claims 1-4.
Citation Information
Patent Citations
Image semi-blind deblurring method of deconvolution total least square with deviation correction
CN114998146A
Image blind restoration method based on group sparse representation
CN110675347A
Image blind deblurring method and device based on saliency intensity and gradient prior
CN112581378A