CN106651790B - Image deblurring method, device and equipment - Google Patents

Image deblurring method, device and equipment Download PDF

Info

Publication number
CN106651790B
CN106651790B CN201611032330.4A CN201611032330A CN106651790B CN 106651790 B CN106651790 B CN 106651790B CN 201611032330 A CN201611032330 A CN 201611032330A CN 106651790 B CN106651790 B CN 106651790B
Authority
CN
China
Prior art keywords
image
layer
light
background layer
kernel
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611032330.4A
Other languages
Chinese (zh)
Other versions
CN106651790A (en
Inventor
陶鑫
贾佳亚
鲁亚东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huawei Technologies Co Ltd
Original Assignee
Hangzhou Huawei Digital Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou Huawei Digital Technologies Co Ltd filed Critical Hangzhou Huawei Digital Technologies Co Ltd
Priority to CN201611032330.4A priority Critical patent/CN106651790B/en
Publication of CN106651790A publication Critical patent/CN106651790A/en
Application granted granted Critical
Publication of CN106651790B publication Critical patent/CN106651790B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

The embodiment of the invention provides image deblurring methods, devices and equipmentA blur kernel of the layer; according to the formula
Figure DDA0001159180980000011
Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR. The method of the embodiment of the invention respectively considers the fuzzy kernel of the background layer and the fuzzy kernel of the reflecting layer of the image to be processed, and separates and deblurs the background layer and the reflecting layer based on the two fuzzy kernels, thereby not only improving the deblurring accuracy of the image, but also enabling the restored image to be clearer.

Description

Image deblurring method, device and equipment
Technical Field
The embodiment of the invention relates to an image processing technology, in particular to image deblurring methods, devices and equipment.
Background
In the process of actually taking a picture, because of the shake of a camera or the motion of an object, the motion blur of the taken picture often occurs, especially under the conditions that the ambient light is dark and the time is is long, the probability of the image blur is greatly improved.
In the prior art, an image Deblurring algorithm is proposed by Xu & jiaa in 2010 ECCV conference article "Two-phase Kernel Estimation for Robust Motion Deblurring", and specifically, starting from the bottom layer of an image pyramid, a multi-scale (multi-scale) iteration is used for optimizing a Motion blur kernel of an image from small to large, then an ISD technology is used for carrying out -step optimization on the estimated Motion blur kernel, and finally a clear result image is obtained after deconvolution is carried out by adopting a fast TV-L1 deconvolution algorithm based on the estimated Motion blur kernel.
However, for a picture with motion blur and light reflection, the part of the strongest edge in the picture belongs to a background layer, but part of the strongest edge belongs to a light reflection layer, namely the strong edges are not generated by fuzzy cores, while the image deblurring method in the prior art is based on a prior condition that no light reflection exists in the picture, so the prior condition is not satisfied in the picture with the light reflection layer, and the image deblurring method in the prior art cannot obtain an accurate result.
Disclosure of Invention
The embodiment of the invention provides image deblurring methods, devices and equipment, which are used for solving the technical problem that when an image with a reflective layer is deblurred in the prior art, the obtained deblurring result is low in accuracy.
, embodiments of the present invention provide a method for deblurring images, comprising:
acquiring a fuzzy kernel of a background layer and a fuzzy kernel of a reflecting layer of an image to be processed;
according to the formula
Figure BDA0001159180960000021
Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR(ii) a Wherein, B is a pixel matrix of an image to be processed, and K isBIs a blur kernel of the background layer, the KRIs a blur kernel of the light-reflecting layer, the KiIs KBOr KRSaid L isiIs LBOr LRSaid αlThe factor for characterizing the degree of gradient distribution of the original sharp image, the μdAnd mulAnd adjusting factors for adjusting the smoothness degree of the restored clear image.
The image demould provided by the embodiment of the inventionThe blurring method comprises the steps of obtaining a blurring kernel of a background layer and a blurring kernel of a reflecting layer of an image to be processed, and then obtaining a blurring kernel of a background layer and a blurring kernel of a reflecting layer of the image to be processed according to a formula
Figure BDA0001159180960000022
Determining a background layer L of an image to be processedBAnd a light-reflecting layer L of the image to be processedRTherefore, the image with the definition meeting the requirements of the user is restored. Because the fuzzy kernel of the background layer and the fuzzy kernel of the reflecting layer of the image to be processed are respectively considered in the embodiment of the invention, and the background layer and the reflecting layer are separated and deblurred simultaneously by adopting the formula 1 based on the two fuzzy kernels, the deblurring accuracy of the image is improved, and the restored image is clearer.
In possible designs, the acquiring the blur kernel of the background layer and the blur kernel of the light reflection layer of the image to be processed specifically includes:
clustering each image block in the image to be processed to obtain th background layer LB' and th light-reflecting layer LR';
According to the formula
Figure BDA0001159180960000031
And said th background layer LB', obtaining a blur kernel K for the background layerB(ii) a Wherein, 0 is<λk≤1;
According to the formula
Figure BDA0001159180960000032
And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR
In possible designs, clustering each image block in the image to be processed to obtain a th background layer LB' and th light-reflecting layer LR', specifically includes:
according to the formula
Figure BDA0001159180960000033
For each image block in the image to be processedFourier transform is carried out to obtain a plurality of th image blocks, wherein P isxIs an image block of the image to be processed, the
Figure BDA0001159180960000034
A Fourier transform of a 5-point Laplace kernel;
according to the formula
Figure BDA0001159180960000035
Determining a clustering distance between any two th image blocks, and clustering the image blocks of the image to be processed according to the clustering distance to obtain a th cluster and a second cluster, wherein the th cluster comprises at least pixel values of the image blocks which belong to a background layer, the second cluster comprises at least pixel values of the image blocks which belong to the background layer, and the P cluster comprises at least pixel values of the image blocks which belong to the background layeryThe image blocks of the image to be processed are obtained;
obtaining the background layer L according to the th clusterB';
Obtaining the th light-reflecting layer L according to the second polymerR'。
In possible designs, the μ d1 and μl=1e-1。
The method for deblurring the image, provided by the embodiment of the invention, obtains the th background layer L by clustering each image block in the image to be processedB' and th light-reflecting layer LR', then according to the formula
Figure BDA0001159180960000036
And th background layer LB', obtaining a blur kernel K for the background layerBAnd according to a formula
Figure BDA0001159180960000041
And th light-reflecting layer LR', obtaining a fuzzy kernel K of the light-reflecting layerRAnd further determining the background layer L of the image to be processed according to the formula 1BAnd a reflective layer of the image to be processed, so that the image with the definition meeting the requirements of the user is restored. Book (I)Fuzzy kernel K of background layer determined by embodiment of the inventionBAnd a blurring kernel K of the light-reflecting layerRIn addition, because the fuzzy kernel of the background layer of the image to be processed and the fuzzy kernel of the reflecting layer are respectively considered in the embodiment of the invention, and the background layer and the reflecting layer are simultaneously separated and deblurred by adopting the formula 1 based on the two fuzzy kernels, the deblurring accuracy of the image is improved, and the restored image is clearer.
In possible designs, the formula is used
Figure BDA0001159180960000042
And said th background layer LB', obtaining a blur kernel K for the background layerBAnd, according to the formula
Figure BDA0001159180960000043
And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerRThe method specifically comprises the following steps:
step A: according to the formula
Figure BDA0001159180960000044
And said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formulaAnd said th light-reflecting layer LR' obtaining a second initialized blur kernel K of the light reflecting layerR';
And B: according to the formula
Figure BDA0001159180960000046
The th initialization blur kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR"; wherein, 0 is<λl≤1;
And C: will be describedThe second background layer LB"as a new th background layer LB', and combining said second light-reflecting layer LR"as a new th light-reflecting layer LR' executing the step A until the iteration number reaches a preset number, and taking the th initialized fuzzy kernel obtained in the last iterations as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR
Of the possible designs, the αlEqual to 0.8.
In the method for deblurring an image, which is provided by the embodiment of the invention, the th initialization blur kernel K of the background layer is obtained through the step AB' and second initialization blur kernel of light-reflecting layer KR' and then a second background layer L is determined by the above step BBAnd a second light-reflecting layer LR", and then a second background layer LB"as a new th background layer LB', and a second light-reflecting layer LR"as a new th light-reflecting layer LR' executing the step A until the iteration number reaches a preset number, and taking the th initialized fuzzy core acquired in the last iterations as the fuzzy core K of the background layerBAnd taking the second initialized fuzzy kernel obtained in the last iterations as the fuzzy kernel K of the light reflecting layerR. The method of the embodiment of the invention determines the fuzzy kernel K of the background layer of the image to be processed through multiple iterationsBAnd a blurring kernel K of the light-reflecting layerRSo that the two obtained fuzzy kernels are more accurate, and the finally determined background layer L of the image to be processed is greatly improvedBAnd a light-reflecting layer L of the image to be processedRThe restored image is clearer due to the accuracy of the image restoration method.
In a second aspect, an embodiment of the present invention provides apparatus for deblurring an image, including:
the acquisition module is used for acquiring a fuzzy kernel of a background layer and a fuzzy kernel of a reflecting layer of the image to be processed;
a determination module for determining the formulaDetermining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR(ii) a Wherein, B is a pixel matrix of an image to be processed, and K isBIs a blur kernel of the background layer, the KRIs a blur kernel of the light-reflecting layer, the KiIs KBOr KRSaid L isiIs LBOr LRSaid αlThe factor for characterizing the degree of gradient distribution of the original sharp image, the μdAnd mulAnd adjusting factors for adjusting the smoothness degree of the restored clear image.
In possible designs, the obtaining module includes:
a clustering unit for clustering each image block in the image to be processed to obtain th background layer LB' and th light-reflecting layer LR';
An acquisition unit for acquiring the formula
Figure BDA0001159180960000061
And said th background layer LB', obtaining a blur kernel K for the background layerB(ii) a And, according to the formula
Figure BDA0001159180960000062
And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR(ii) a Wherein, 0 is<λk≤1。
In possible designs, the obtaining unit is specifically configured to obtain the formula
Figure BDA0001159180960000063
And said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formula
Figure BDA0001159180960000064
And said thLight reflecting layer LR' obtaining a second initialized blur kernel K of the light reflecting layerR'; and according to the formula
Figure BDA0001159180960000065
The th initialization blur kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR", and applying said second background layer LB"as a new th background layer LB', and combining said second light-reflecting layer LR"as a new th light-reflecting layer LR', return to determining a new th initialization fuzzy kernel KB' and a new second initialization fuzzy core KR', until the iteration number reaches the preset number, and the -th initialized fuzzy kernel obtained in the last iterations is used as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR(ii) a Wherein, 0 is<λl≤1。
Of the possible designs, the αlEqual to 0.8.
In possible designs, the clustering unit includes:
a processing subunit for processing according to a formula
Figure BDA0001159180960000066
Fourier transform is carried out on each image block in the image to be processed to obtain a plurality of th image blocks, wherein P isxIs an image block of the image to be processed, the
Figure BDA0001159180960000067
A Fourier transform of a 5-point Laplace kernel;
a clustering subunit for clustering according to a formulaDetermining a clustering distance between any two th image blocks, and mapping the to-be-processed image according to the clustering distanceClustering image blocks of the images to obtain th cluster and a second cluster, wherein the th cluster comprises at least pixel values of the image blocks which belong to the background layer, the second cluster comprises at least pixel values of the image blocks which belong to the background layer, and the P cluster comprises a plurality of P clustersyThe image blocks of the image to be processed are obtained;
an obtaining subunit, configured to obtain the th background layer L according to the th clusterB' and, obtaining said th retroreflective layer L from said second polymerR'。
In possible designs, the μ d1 and μl=1e-1。
The advantages of the image deblurring apparatus provided by the second aspect and the possible designs of the second aspect can refer to the advantages brought by the aspect and the aspect, and are not described herein again.
In a third aspect, embodiments of the invention provide image deblurring devices, including an input device and a processor;
the processor is used for acquiring the fuzzy kernel of the background layer and the fuzzy kernel of the reflecting layer of the image to be processed input by the input equipment and according to a formula
Figure BDA0001159180960000072
Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR(ii) a Wherein, B is a pixel matrix of an image to be processed, and K isBIs a blur kernel of the background layer, the KRIs a blur kernel of the light-reflecting layer, the KiIs KBOr KRSaid L isiIs LBOr LRSaid αlThe factor for characterizing the degree of gradient distribution of the original sharp image, the μdAnd mulAnd adjusting factors for adjusting the smoothness degree of the restored clear image.
In possible designs, the processor is specifically configured to perform clustering on each image block in the image to be processed to obtain a clusterTo th background layer LB' and th light-reflecting layer LRAccording to formula
Figure BDA0001159180960000073
And said th background layer LB', obtaining a blur kernel K for the background layerB(ii) a And, according to the formula
Figure BDA0001159180960000081
And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR(ii) a Wherein, 0 is<λk≤1。
In possible designs, the processor is specifically configured to be based on a formula
Figure BDA0001159180960000082
And said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formulaAnd said th light-reflecting layer LR' obtaining a second initialized blur kernel K of the light reflecting layerR'; and according to the formula
Figure BDA0001159180960000084
The th initialization blur kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR", and applying said second background layer LB"as a new th background layer LB', and combining said second light-reflecting layer LR"as a new th light-reflecting layer LR', return to determining a new th initialization fuzzy kernel KB' and a new second initialization fuzzy core KR', until the iteration number reaches the preset number, and the -th initialized fuzzy kernel obtained in the last iterations is used as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR(ii) a Wherein, 0 is<λl≤1。
Of the possible designs, the αlEqual to 0.8.
In possible designs, the processor is specifically configured to be based on a formulaFourier transform is carried out on each image block in the image to be processed to obtain a plurality of th image blocks, and the th image blocks are obtained according to a formula
Figure BDA0001159180960000086
Determining the clustering distance between any two th image blocks, clustering the image blocks of the image to be processed according to the clustering distance to obtain a th cluster and a second cluster, and obtaining the th background layer L according to the th clusterB', and obtaining said th retroreflective layer L from said second polymerR'; wherein, the PxIs an image block of the image to be processed, the
Figure BDA0001159180960000087
A Fourier transform of a 5-point Laplacian kernel, said th cluster comprising pixel values of at least image blocks belonging to the background layer, said second cluster comprising pixel values of at least image blocks belonging to the background layer, said PyIs an image block of the image to be processed.
In possible designs, the μ d1 and μl=1e-1。
The beneficial effects of the image deblurring device provided by the above possible designs of the third aspect and the third aspect can refer to the beneficial effects brought by the th aspect and the th aspect, and are not described herein again.
Drawings
FIG. 1 is a schematic diagram of a blurred image with reflection according to an embodiment of the present invention;
FIG. 2 is a flow chart illustrating an embodiment of a method for deblurring an image according to an embodiment of the present invention;
FIG. 3 is a comparison diagram illustrating the deblurring effect of an image according to an embodiment of the present invention;
FIG. 4 is a second comparison diagram illustrating the deblurring effect of an image according to an embodiment of the present invention;
FIG. 5 is a flowchart illustrating a second method for deblurring an image according to an embodiment of the present invention;
FIG. 6 is a flowchart illustrating a third method for deblurring an image according to an embodiment of the present invention;
FIG. 7 is a flowchart illustrating a fourth embodiment of a method for deblurring an image according to an embodiment of the present invention;
FIG. 8 is a schematic structural diagram of an embodiment of an apparatus for deblurring an image according to an embodiment of the present invention;
FIG. 9 is a schematic structural diagram of a second embodiment of an apparatus for deblurring an image according to an embodiment of the present invention;
FIG. 10 is a schematic structural diagram of a third embodiment of an apparatus for deblurring an image according to an embodiment of the present invention;
fig. 11 is a schematic structural diagram of an image deblurring apparatus provided in an embodiment of the present invention.
Detailed Description
The method, the device and the equipment for deblurring the image provided by the embodiment of the invention can be suitable for scenes which do not meet the definition requirement of a shot picture and need to be subjected to image restoration due to camera shake, object movement, a reflective surface of an object and the like when the shot picture is shot.
The image processing device according to the embodiment of the present invention may be a computer, a mobile terminal, and the like having an image processing function, and the mobile terminal may be a mobile phone, a tablet computer, a personal digital assistant, and the like of a user.
However, for a motion-blurred and reflective picture, the strongest edge in the picture is subordinate to a background layer, but some strongest edges belong to a reflective layer, i.e., the strong edges are not generated by types of blur kernels, for example, referring to the label shown in fig. 1, the strong edge marked with the symbol "1 #" is subordinate to the background layer, and the strong edge marked with the symbol "2 #" is subordinate to the reflective layer.
Therefore, the image deblurring method provided by the embodiment of the invention aims to solve the above technical problems in the prior art.
The technical solution of the present invention will be described in detail below with specific examples. The following several specific embodiments may be combined with each other, and details of the same or similar concepts or processes may not be repeated in some embodiments.
Fig. 2 is a schematic flowchart of an embodiment of a method for deblurring an image according to an embodiment of the present invention, in this embodiment, an image processing apparatus separates a background layer and a reflective layer based on an image imaging model, where B is LB*KB+LR*KR+ n; wherein L isBFor a clear background layer to be estimated (i.e. clear to be separated out)Background layer), LRIs the clear reflector to be estimated (i.e. the clear reflector desired to be separated), KBIs a fuzzy kernel of the background layer of the current image to be processed, KRThe method is characterized in that the method is a fuzzy kernel of a reflecting layer of a current image to be processed, B is a actually shot fuzzy picture with reflection (namely the image to be processed), and n is noise. In the imaging model, the shot picture B is a known quantity, and the separation of the background layer and the light reflecting layer of the image to be processed is actually to solve the L in the imaging model of the imageBAnd LRThe process of (1).
It should be noted that, in the image imaging model, B is actually a pixel matrix of the image to be processed in the formula, and K is described aboveB、KR、LB、LRAre all in the form of a matrix.
As shown in fig. 2, the method comprises the steps of:
s101: and acquiring a fuzzy kernel of a background layer and a fuzzy kernel of a reflecting layer of the image to be processed.
Optionally, the image processing device may iteratively optimize the motion blur kernel of the image to be processed from a bottom layer of an image pyramid in a multi-scale (multi-scale) from small to large manner, and then optimize the estimated motion blur kernel by steps using an ISD technology to obtain a blur kernel K of the background layerB(ii) a Optionally, the image processing apparatus may also obtain the blur kernel K of the reflective layer by applying different prior constraints to different image layersR. In summary, the embodiment of the present invention does not limit how to obtain the blur kernel of the background layer and the blur kernel of the reflective layer of the image to be processed, as long as the image processing apparatus can respectively consider and obtain the blur kernels of the two layers when determining that the image to be processed has both the background layer and the reflective layer.
S102: according to the formula
Figure BDA0001159180960000111
Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR
Specifically, when the image processing apparatus obtains the blur kernel K of the background layerBAnd a blurring kernel K of the light-reflecting layerRThen, the image processing apparatus calculates the formula
Figure BDA0001159180960000112
(equation 1) solving the background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedRI.e. L which minimizes the value to the right of the equation of equation 1 during the solution processBAnd LRThen is L to be finally obtainedBAnd LR. Wherein, B is the pixel matrix of the image to be processed, KBBlur kernel for background layer obtained at S101, KRK in equation 1 for the blurring kernel of the light-reflecting layer obtained in the above-described S101iIs KBOr KR,LiIs LBOr LRα as described abovelThe above-mentioned μ is a factor characterizing the degree of gradient distribution of the original sharp imagedAnd mulFor adjusting the adjustment factor for the smoothness of the restored sharp image, the above
Figure BDA0001159180960000113
Is the differential operator of the image along the horizontal and vertical directions, optionally α, abovelThe separation effect of the background layer and the reflective layer is more obvious by taking 0.8; alternatively, the above μdCan take on a value of 1, mulThe value of (1 e-1) can be set, so that the smoothness degree of the finally restored clear image can better meet the requirements of users.
It should be noted that, in the prior art, when performing image deblurring, only the situation that an image has a background layer is considered, that is, the prior art performs deblurring based on a priori condition that the image does not have reflection, and for the image with both the background layer and the reflection layer, the priori condition of the prior art is not true, so that the prior art cannot accurately restore both the background layer and the reflection layerAn image of the optical layer; in the embodiment of the invention, the imaging model B is L based on the imageB*KB+LR*KR+ n, it can be seen that the method of the embodiment of the present invention considers the blur kernel of the background layer and the blur kernel of the reflective layer of the image to be processed, and based on the two blur kernels, the separation and deblurring of the background layer and the reflective layer are performed simultaneously by using the above formula 1, which not only improves the accuracy of deblurring the image, but also makes the restored image clearer.
To better illustrate the effect of the embodiment of the present invention in deblurring an image, refer to a comparison graph of restoration effects shown in fig. 3 and fig. 4, where (a) in fig. 3 and (a) in fig. 4 are images to be processed, fig. 3 (b) (c) and fig. 4 (b) (c) are image deblurring effects in the prior art, and fig. 3 (d) and fig. 4 (d) are image deblurring effects by using the method of the embodiment of the present invention.
Of course, the method provided by the embodiment of the invention is also suitable for deblurring of the image without reflection, as long as the K in the image imaging model is enabledRIt is sufficient if 0.
The image deblurring method provided by the embodiment of the invention obtains the fuzzy kernel of the background layer and the fuzzy kernel of the reflecting layer of the image to be processed, and then obtains the fuzzy kernels according to a formulaDetermining a background layer L of an image to be processedBAnd a light-reflecting layer L of the image to be processedRTherefore, the image with the definition meeting the requirements of the user is restored. Because the fuzzy kernel of the background layer and the fuzzy kernel of the reflecting layer of the image to be processed are respectively considered in the embodiment of the invention, and the background layer and the reflecting layer are separated and deblurred simultaneously by adopting the formula 1 based on the two fuzzy kernels, the deblurring accuracy of the image is improved, and the restored image is clearer.
Fig. 5 is a flowchart of a second embodiment of a method for deblurring an image according to an embodiment of the present invention, where this embodiment relates to a specific process of an image processing device acquiring a blur kernel of a background layer and a blur kernel of a reflective layer of an image to be processed, and on the basis of the foregoing embodiment, step , where step S101 may specifically include the following steps:
s201, clustering each image block in the image to be processed to obtain th background layer LB' and th light-reflecting layer LR′。
Specifically, after the image processing device acquires the image to be processed and determines that the image to be processed has the background layer and the reflection layer, the image processing device performs clustering on each image block of the image to be processed, that is, the image block belonging to the background layer and the image block belonging to the reflection layer in the image to be processed are classified, and a specific clustering algorithm is not limited in the embodiment of the present invention.
After clustering image blocks of an image to be processed by the image processing equipment, obtaining image blocks of a background layer and image blocks of a reflecting layer, wherein the image blocks of the background layer comprise all image blocks belonging to the background layer in the image to be processed, and the image blocks of the reflecting layer comprise all image blocks belonging to the reflecting layer in the image to be processedB' and th reflecting layer L is obtained according to the image block type of the reflecting layerR'. Note that the background layer LB' in the form of a matrix, each elements in the matrix are the pixel values of each image block in the image block class of the background layer, the th light-reflecting layer LR' also in the form of a matrix, where each elements in the matrix are the pixel values of each image block in the image block class of the light-reflective layer.
Optionally, the third embodiment shown in fig. 6 provides obtaining background layers LB' and th light-reflecting layer LRIn a possible embodiment of the' method, as shown in fig. 6, the method comprises:
s301: according to the formula
Figure BDA0001159180960000131
And performing Fourier transform on each image block in the image to be processed to obtain a plurality of th image blocks.
Wherein, the PxIs an image block of the image to be processed, the
Figure BDA0001159180960000132
Is a fourier transform of a 5-point laplacian kernel.
S302: according to the formula
Figure BDA0001159180960000133
And determining a clustering distance between any two th image blocks, and clustering the image blocks of the image to be processed according to the clustering distance to obtain a th cluster and a second cluster.
Wherein the th cluster comprises pixel values of at least image blocks belonging to the background layer, the second cluster comprises pixel values of at least image blocks belonging to the background layer, the PyIs an image block of the image to be processed.
Specifically, when the image processing apparatus is based on the above formula
Figure BDA0001159180960000141
After each image block in the image to be processed is subjected to Fourier transform to obtain a plurality of th image blocks, the image processing equipment adopts a formula
Figure BDA0001159180960000142
Optionally, the image processing device may set clustering distance thresholds, and set an original image block (i.e., an image block not subjected to fourier transform) corresponding to the -th image block of which the clustering distance is smaller than the threshold to belong to the -th cluster, and set an original image block (i.e., an image block not subjected to fourier transform) corresponding to the -th image block of which the clustering distance is greater than or equal to the threshold to belong to the second cluster.
S303, obtaining the background layer L according to the th clusterB′。
S304, obtaining the th light reflecting layer L according to the second polymerR′。
Specifically, after the image processing apparatus obtains the th cluster and the second cluster, since the th cluster includes at least pixel values of image blocks belonging to the background layer, and the second cluster includes at least pixel values of image blocks belonging to the background layer, the image processing apparatus can obtain the th background layer L according to the th clusterB' obtaining a th retroreflective layer L according to the second polymerizationR'。
S202: according to the formula
Figure BDA0001159180960000143
And said th background layer LB', obtaining a blur kernel K for the background layerB
Wherein, 0 is<λk≤1。
S203: according to the formula
Figure BDA0001159180960000144
And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR
Specifically, the embodiment of the invention determines the fuzzy kernel K of the background layerBThe time is determined in consideration of the light-reflecting layer, that is, the image processing apparatus of the embodiment of the present invention is based on the general formula (4):
Figure BDA0001159180960000151
to determine KiWherein K isiBlur kernel K as background layerBOr the fuzzy core K of the light-reflecting layerR0 to said<λk≤1。
At the solution of KiThen, the above equation 4 can be used to obtain
Figure BDA0001159180960000152
Due to the data fidelity term in equation 5
Figure BDA0001159180960000153
And the regularization term
Figure BDA0001159180960000154
All are L2 norms, so that closed solving can be carried out by utilizing a Fourier transform algorithm to obtain
Figure BDA0001159180960000155
Therefore, the th background layer L is obtained based on the image processing apparatus in the above-described S201B' and th light-reflecting layer LR', the image processing device may be based on the th background layer LB' and
Figure BDA0001159180960000156
Figure BDA0001159180960000157
obtaining a blur kernel K for a background layerBAnd the light reflecting layer L can also be according to the th light reflecting layer LR' sum formula
Figure BDA0001159180960000158
Obtaining a fuzzy kernel K of a light-reflecting layerR
When the image processing device obtains the fuzzy kernel K of the background layerBAnd a blurring kernel K of the light-reflecting layerRThen, the image processing device can calculate the clear background layer L of the image to be processed according to the above formula 1BAnd a light-reflecting layer L of the image to be processedR
The method for deblurring the image, provided by the embodiment of the invention, obtains the th background layer L by clustering each image block in the image to be processedB' and th light-reflecting layer LR', then according to the formulaAnd th background layer LB', obtaining a blur kernel K for the background layerBAnd according to a formula
Figure BDA00011591809600001510
And th light-reflecting layer LR', obtaining a fuzzy kernel K of the light-reflecting layerRAnd further determining the background layer L of the image to be processed according to the formula 1BAnd a reflective layer of the image to be processed, so that the image with the definition meeting the requirements of the user is restored. Fuzzy kernel K of background layer determined by embodiment of the inventionBAnd a blurring kernel K of the light-reflecting layerRIn addition, because the fuzzy kernel of the background layer of the image to be processed and the fuzzy kernel of the reflecting layer are respectively considered in the embodiment of the invention, and the background layer and the reflecting layer are simultaneously separated and deblurred by adopting the formula 1 based on the two fuzzy kernels, the deblurring accuracy of the image is improved, and the restored image is clearer.
Fig. 7 is a flowchart illustrating a fourth embodiment of a method for deblurring an image according to an embodiment of the present invention, where the embodiment relates to a specific process in which an image processing apparatus obtains a blur kernel of a background layer and a blur kernel of a light reflection layer of an image to be processed in an iterative manner, so that the two blur kernels have better convergence, and the effects of separation and deblurring of the background layer and the light reflection layer are more obvious, and based on the above embodiment, further , the above S202 and S203 may specifically include the following steps:
step A: according to the formula
Figure BDA0001159180960000161
And said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formula
Figure BDA0001159180960000162
And said th light-reflecting layer LR' obtaining a second initialized blur kernel K of the light reflecting layerR′。
And B: according to the formula
Figure BDA0001159180960000163
The th pointInitialized fuzzy kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR”。
Specifically, the above-mentioned 0<λlLess than or equal to 1. Based on the above formula (4), it can be known
Figure BDA0001159180960000164
K hereiNamely, the th initialization fuzzy core K calculated in the step AB' and a second initialization fuzzy core KR', L on the left side of the equationiL to the right of the equation for the unknowns to be solvediL to the left of the equation for the variable for which the equation is directediThe value of (a) is a value that can minimize the right side of the equation, so to distinguish from the parameter identifier of the formula in the above embodiment, the formula 9 may be specifically written as:
Figure BDA0001159180960000165
where X and Y replace variables on the right side of the equation of equation 9, { LB”,LR"} replaces the unknown number L on the left side of the equation of equation 9i
Therefore, th initialization blur kernel K when the image processing apparatus acquires the background layer of the image to be processedB' and second initialization blur kernel of light-reflecting layer KRAfter that, the image processing apparatus determines the second background layer L according to equation 10BAnd a second light-reflecting layer LR”。
And C: applying the second background layer LB"as a new th background layer LB', and combining said second light-reflecting layer LR"as a new th light-reflecting layer LR' executing the step A until the iteration number reaches a preset number, and taking the th initialized fuzzy kernel obtained in the last iterations as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR
Specifically, when the image processing apparatus initializes the mode according to Paste kernel KB', second initial blurring kernel of light-reflecting layer KR' and the above equation 10 to obtain the second background layer LBAnd a second light-reflecting layer LR"thereafter, the second background layer LB"as a new th background layer LB', and the second light-reflecting layer LR"as a new th light-reflecting layer LR' are respectively substituted into the above-mentioned formula 7 and formula 8 to respectively obtain the new th initialization fuzzy kernel KB' and a new second initialization fuzzy core KR' then the new th initialization fuzzy kernel KB' and a new second initialization fuzzy core KR' the above formula 10 is substituted again to obtain a new second background layer LB"and a new second light-reflecting layer LR", and then the new second background layer L is applied againB"and a new second light-reflecting layer LR"as a new th background layer LB' and a new th light-reflecting layer LR' sequentially circulating until the iteration times reach the preset times, and taking the -th initialized fuzzy kernel obtained in the last iterations as the fuzzy kernel K of the background layer of the image to be processedBAnd taking the second initialized fuzzy kernel obtained in the last iterations as the fuzzy kernel K of the light reflecting layer of the image to be processedR
It should be noted that α in the above equation 10lAnd the separation effect of the background layer and the light reflecting layer of the image to be processed is more obvious, and the iterative process is specifically solved by an iterative weighted least squares (IRLS) method.
In the method for deblurring an image, which is provided by the embodiment of the invention, the th initialization blur kernel K of the background layer is obtained through the step AB' and second initialization blur kernel of light-reflecting layer KR' and then a second background layer L is determined by the above step BBAnd a second light-reflecting layer LR", and then a second background layer LB"as a new th background layer LB', and a second light-reflecting layer LR"as a new th light-reflecting layer LR' go back to the above step A until the number of iterations reaches the preset number, and go back to the end iterationsObtained th initialized blur kernel as blur kernel K of background layerBAnd taking the second initialized fuzzy kernel obtained in the last iterations as the fuzzy kernel K of the light reflecting layerR. The method of the embodiment of the invention determines the fuzzy kernel K of the background layer of the image to be processed through multiple iterationsBAnd a blurring kernel K of the light-reflecting layerRSo that the two obtained fuzzy kernels are more accurate, and the finally determined background layer L of the image to be processed is greatly improvedBAnd a light-reflecting layer L of the image to be processedRThe restored image is clearer due to the accuracy of the image restoration method.
Fig. 8 is a schematic structural diagram of an embodiment of an apparatus for image deblurring according to an embodiment of the present invention, where the apparatus for image deblurring can be integrated into the above-mentioned image deblurring device, or can be a stand-alone image deblurring device, and the apparatus for image deblurring can be implemented by software, hardware, or a combination of software and hardware, as shown in fig. 7, the apparatus includes an obtaining module 11 and a determining module 12.
Specifically, the obtaining module 11 is configured to obtain a blur kernel of a background layer and a blur kernel of a reflective layer of the image to be processed;
a determination module 12 for determining the formula
Figure BDA0001159180960000181
Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR(ii) a Wherein, B is a pixel matrix of an image to be processed, and K isBIs a blur kernel of the background layer, the KRIs a blur kernel of the light-reflecting layer, the KiIs KBOr KRSaid L isiIs LBOr LRSaid αlThe factor for characterizing the degree of gradient distribution of the original sharp image, the μdAnd mulAnd adjusting factors for adjusting the smoothness degree of the restored clear image.
The image deblurring device provided by the embodiment of the invention can execute the method embodiment, has similar realization principle and technical effect, and is not repeated herein.
Fig. 9 is a schematic structural diagram of a second embodiment of the image deblurring apparatus according to the present invention, and based on the embodiment shown in fig. 8, further , the obtaining module 11 may include a clustering unit 111 and an obtaining unit 112.
Specifically, the clustering unit 111 is configured to perform clustering on each image block in the image to be processed to obtain an th background layer LB' and th light-reflecting layer LR';
An obtaining unit 112 for obtaining the formula
Figure BDA0001159180960000182
And said th background layer LB', obtaining a blur kernel K for the background layerB(ii) a And, according to the formula
Figure BDA0001159180960000191
And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR(ii) a Wherein, 0 is<λk≤1。
, the obtaining unit 112 is specifically configured to obtain the formula
Figure BDA0001159180960000192
And said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formula
Figure BDA0001159180960000193
And said th light-reflecting layer LR' obtaining a second initialized blur kernel K of the light reflecting layerR'; and according to the formulaThe th initialization blur kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR", and applying said second background layer LB"as a new th background layer LB', and willThe second light reflecting layer LR"as a new th light-reflecting layer LR', return to determining a new th initialization fuzzy kernel KB' and a new second initialization fuzzy core KR', until the iteration number reaches the preset number, and the -th initialized fuzzy kernel obtained in the last iterations is used as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR(ii) a Wherein, 0 is<λl≤1。
Optionally, said αlEqual to 0.8.
Alternatively, the μ d1 and μl=1e-1。
The image deblurring device provided by the embodiment of the invention can execute the method embodiment, has similar realization principle and technical effect, and is not repeated herein.
Fig. 10 is a schematic structural diagram of a third embodiment of the image deblurring apparatus according to the embodiment of the present invention, and based on the embodiment shown in fig. 9, further , the clustering unit 111 may specifically include a processing subunit 201, a clustering subunit 202, and an obtaining subunit 203.
In particular, the processing subunit 201 is configured to perform the following operations according to a formula
Figure BDA0001159180960000195
Fourier transform is carried out on each image block in the image to be processed to obtain a plurality of th image blocks, wherein P isxIs an image block of the image to be processed, the
Figure BDA0001159180960000201
A Fourier transform of a 5-point Laplace kernel;
a clustering subunit 202 for calculating a formula
Figure BDA0001159180960000202
Determining a clustering distance between any two th image blocks, and clustering the image blocks of the image to be processed according to the clustering distanceClass, obtaining th cluster and second cluster, wherein, the th cluster comprises at least pixel values of image blocks subordinating to the background layer, the second cluster comprises at least pixel values of image blocks subordinating to the background layer, the P cluster is a cluster of the image blocks subordinating to the background layeryThe image blocks of the image to be processed are obtained;
an obtaining subunit 203, configured to obtain the th background layer L according to the th clusterB' and, obtaining said th retroreflective layer L from said second polymerR'。
The image deblurring device provided by the embodiment of the invention can execute the method embodiment, has similar realization principle and technical effect, and is not repeated herein.
Fig. 11 is a schematic structural diagram of an image deblurring device according to an embodiment of the present invention, as shown in fig. 11, the image deblurring device may include an input device 20, a processor 21, for example, a CPU, a memory 22, and at least communication buses 23, and optionally, may further include a display device 24, the communication buses 23 are used to implement communication connections between elements, the memory 22 may include a high-speed RAM memory, and may also include a non-volatile memory NVM, for example, at least disk memories, and various programs may be stored in the memory 22 for performing various processing functions and implementing the method steps of the embodiment, and the input device 20 is used to input an image to be processed to the processor 21.
Specifically, in this embodiment, the processor 21 is configured to obtain a blur kernel of a background layer and a blur kernel of a reflective layer of the image to be processed input by the input device 20, and according to a formula
Figure BDA0001159180960000203
Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR(ii) a Wherein, B is a pixel matrix of an image to be processed, and K isBIs a blur kernel of the background layer, the KRIs a blur kernel of the light-reflecting layer, the KiIs KBOr KRSaid L isiIs LBOr LRSaid αlThe factor for characterizing the degree of gradient distribution of the original sharp image, the μdAnd mulAnd adjusting factors for adjusting the smoothness degree of the restored clear image.
, the processor 21 is specifically configured to perform clustering on each image block in the image to be processed to obtain a th background layer LB' and th light-reflecting layer LRAccording to formula
Figure BDA0001159180960000211
And said th background layer LB', obtaining a blur kernel K for the background layerB(ii) a And, according to the formulaAnd said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR(ii) a Wherein, 0 is<λk≤1。
Further , the processor 21 is specifically configured to calculate a formulaAnd said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formula
Figure BDA0001159180960000214
And said th light-reflecting layer LR' obtaining a second initialized blur kernel K of the light reflecting layerR'; and according to the formulaThe th initialization blur kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR", and applying said second background layer LB"as a new th background layer LB', and combining said second light-reflecting layer LR"as a new th light-reflecting layer LR', return to determining a new th initialization fuzzy kernel KB' and a new second initialization fuzzy core KR', until the iteration number reaches the preset number, and the -th initialized fuzzy kernel obtained in the last iterations is used as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR(ii) a Wherein, 0 is<λl≤1。
Optionally, said αlEqual to 0.8.
Alternatively, the μ d1 and μl=1e-1。
, the processor 21 is specifically configured to calculate a formula
Figure BDA0001159180960000216
Fourier transform is carried out on each image block in the image to be processed to obtain a plurality of th image blocks, and the th image blocks are obtained according to a formula
Figure BDA0001159180960000221
Determining the clustering distance between any two th image blocks, clustering the image blocks of the image to be processed according to the clustering distance to obtain a th cluster and a second cluster, and obtaining the th background layer L according to the th clusterB', and obtaining said th retroreflective layer L from said second polymerR'; wherein, the PxIs an image block of the image to be processed, the
Figure BDA0001159180960000222
A Fourier transform of a 5-point Laplacian kernel, said th cluster comprising pixel values of at least image blocks belonging to the background layer, said second cluster comprising pixel values of at least image blocks belonging to the background layer, said PyIs an image block of the image to be processed.
The image deblurring device provided by the embodiment of the invention can execute the method embodiment, has similar realization principle and technical effect, and is not repeated herein.
It will be understood by those skilled in the art that all or a portion of the steps of implementing the various method embodiments described above may be performed by hardware associated with program instructions, and that the program may be stored in a computer readable storage medium, which when executed performs the steps comprising the various method embodiments described above, including ROM, RAM, magnetic or optical disks, among various media capable of storing program code.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.

Claims (18)

  1. A method of deblurring an image of the type , comprising:
    acquiring a fuzzy kernel of a background layer and a fuzzy kernel of a reflecting layer of an image to be processed;
    according to the formula
    Figure FDA0001159180950000011
    Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR(ii) a Wherein, B is a pixel matrix of an image to be processed, and K isBIs a blur kernel of the background layer, the KRIs a blur kernel of the light-reflecting layer, the KiIs KBOr KRSaid L isiIs LBOr LRSaid αlThe factor for characterizing the degree of gradient distribution of the original sharp image, the μdAnd mulAnd adjusting factors for adjusting the smoothness degree of the restored clear image.
  2. 2. The method according to claim 1, wherein the acquiring of the blur kernel of the background layer and the blur kernel of the reflective layer of the image to be processed specifically comprises:
    clustering each image block in the image to be processed to obtain th background layer LB' and th light-reflecting layer LR';
    According to the formula
    Figure FDA0001159180950000012
    And said th background layer LB', obtaining a blur kernel K for the background layerB(ii) a Wherein, 0 is<λk≤1;
    According to the formula
    Figure FDA0001159180950000013
    And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR
  3. 3. The method of claim 2, wherein the equation is based on
    Figure FDA0001159180950000014
    And said th background layer LB', obtaining a blur kernel K for the background layerBAnd, according to the formula
    Figure FDA0001159180950000015
    And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerRThe method specifically comprises the following steps:
    step A: according to the formulaAnd said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formula
    Figure FDA0001159180950000022
    And said th light-reflecting layer LR', obtaining said inverseSecond initialization blur kernel K of the optical layerR';
    And B: according to the formula
    Figure FDA0001159180950000023
    The th initialization blur kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR"; wherein, 0 is<λl≤1;
    And C: applying the second background layer LB"as a new th background layer LB', and combining said second light-reflecting layer LR"as a new th light-reflecting layer LR' executing the step A until the iteration number reaches a preset number, and taking the th initialized fuzzy kernel obtained in the last iterations as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR
  4. 4. The method of claim 3, wherein said αlEqual to 0.8.
  5. 5. The method according to claim 2, wherein the clustering process is performed on each image block in the image to be processed to obtain th background layer LB' and th light-reflecting layer LR', specifically includes:
    according to the formula
    Figure FDA0001159180950000024
    Fourier transform is carried out on each image block in the image to be processed to obtain a plurality of th image blocks, wherein P isxIs an image block of the image to be processed, the
    Figure FDA0001159180950000025
    A Fourier transform of a 5-point Laplace kernel;
    according to the formula
    Figure FDA0001159180950000026
    Determining a clustering distance between any two th image blocks, and clustering the image blocks of the image to be processed according to the clustering distance to obtain a th cluster and a second cluster, wherein the th cluster comprises at least pixel values of the image blocks which belong to a background layer, the second cluster comprises at least pixel values of the image blocks which belong to the background layer, and the P cluster comprises at least pixel values of the image blocks which belong to the background layeryThe image blocks of the image to be processed are obtained;
    obtaining the background layer L according to the th clusterB';
    Obtaining the th light-reflecting layer L according to the second polymerR'。
  6. 6. The method of claim 1, wherein said μd1 and μl=1e-1。
  7. An apparatus for deblurring an image of the type 7, , comprising:
    the acquisition module is used for acquiring a fuzzy kernel of a background layer and a fuzzy kernel of a reflecting layer of the image to be processed;
    a determination module for determining the formula
    Figure FDA0001159180950000031
    Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR(ii) a Wherein, B is a pixel matrix of an image to be processed, and K isBIs a blur kernel of the background layer, the KRIs a blur kernel of the light-reflecting layer, the KiIs KBOr KRSaid L isiIs LBOr LRSaid αlThe factor for characterizing the degree of gradient distribution of the original sharp image, the μdAnd mulAnd adjusting factors for adjusting the smoothness degree of the restored clear image.
  8. 8. The apparatus of claim 7, wherein the obtaining module comprises:
    a clustering unit for clustering each image block in the image to be processed to obtain th background layer LB' and th light-reflecting layer LR';
    An acquisition unit for acquiring the formula
    Figure FDA0001159180950000032
    And said th background layer LB', obtaining a blur kernel K for the background layerB(ii) a And, according to the formula
    Figure FDA0001159180950000033
    And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR(ii) a Wherein, 0 is<λk≤1。
  9. 9. Device according to claim 8, wherein the obtaining unit is specifically configured to obtain the data according to a formula
    Figure FDA0001159180950000041
    And said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formulaAnd said th light-reflecting layer LR' obtaining a second initialized blur kernel K of the light reflecting layerR'; and according to the formula
    Figure FDA0001159180950000043
    The th initialization blur kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR", and applying said second background layer LB"as a new th background layer LB', and inverting said secondOptical layer LR"as a new th light-reflecting layer LR', return to determining a new th initialization fuzzy kernel KB' and a new second initialization fuzzy core KR', until the iteration number reaches the preset number, and the -th initialized fuzzy kernel obtained in the last iterations is used as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR(ii) a Wherein, 0 is<λl≤1。
  10. 10. The apparatus of claim 9, wherein said αlEqual to 0.8.
  11. 11. The apparatus of claim 8, wherein the clustering unit comprises:
    a processing subunit for processing according to a formula
    Figure FDA0001159180950000044
    Fourier transform is carried out on each image block in the image to be processed to obtain a plurality of th image blocks, wherein P isxIs an image block of the image to be processed, the
    Figure FDA0001159180950000045
    A Fourier transform of a 5-point Laplace kernel;
    a clustering subunit for clustering according to a formula
    Figure FDA0001159180950000046
    Determining a clustering distance between any two th image blocks, and clustering the image blocks of the image to be processed according to the clustering distance to obtain a th cluster and a second cluster, wherein the th cluster comprises at least pixel values of the image blocks which belong to a background layer, the second cluster comprises at least pixel values of the image blocks which belong to the background layer, and the P cluster comprises at least pixel values of the image blocks which belong to the background layeryThe image blocks of the image to be processed are obtained;
    an obtaining subunit, configured to obtain the th background layer L according to the th clusterB' and, obtaining said th retroreflective layer L from said second polymerR'。
  12. 12. The apparatus of claim 7, wherein μd1 and μl=1e-1。
  13. An image deblurring apparatus of the kind , comprising an input device and a processor;
    the processor is used for acquiring the fuzzy kernel of the background layer and the fuzzy kernel of the reflecting layer of the image to be processed input by the input equipment and according to a formula
    Figure FDA0001159180950000051
    Determining a background layer L of the image to be processedBAnd a light-reflecting layer L of the image to be processedR(ii) a Wherein, B is a pixel matrix of an image to be processed, and K isBIs a blur kernel of the background layer, the KRIs a blur kernel of the light-reflecting layer, the KiIs KBOr KRSaid L isiIs LBOr LRSaid αlThe factor for characterizing the degree of gradient distribution of the original sharp image, the μdAnd mulAnd adjusting factors for adjusting the smoothness degree of the restored clear image.
  14. 14. The apparatus according to claim 13, wherein the processor is specifically configured to perform clustering on each image block in the image to be processed to obtain an th background layer LB' and th light-reflecting layer LRAccording to formula
    Figure FDA0001159180950000052
    And said th background layer LB', obtaining a blur kernel K for the background layerB(ii) a And, according to the formula
    Figure FDA0001159180950000053
    And said th light-reflecting layer LR', obtaining a blur kernel K of said light-reflecting layerR(ii) a Wherein, 0 is<λk≤1。
  15. 15. Device according to claim 14, wherein the processor is specifically configured to operate according to a formula
    Figure FDA0001159180950000054
    And said th background layer LB' obtaining th initialization blur kernel K of the background layerB'; and, according to the formulaAnd said th light-reflecting layer LR' obtaining a second initialized blur kernel K of the light reflecting layerR'; and according to the formula
    Figure FDA0001159180950000061
    The th initialization blur kernel KB' and the second initialization fuzzy core KR', determining a second background layer LBAnd a second light-reflecting layer LR", and applying said second background layer LB"as a new th background layer LB', and combining said second light-reflecting layer LR"as a new th light-reflecting layer LR', return to determining a new th initialization fuzzy kernel KB' and a new second initialization fuzzy core KR', until the iteration number reaches the preset number, and the -th initialized fuzzy kernel obtained in the last iterations is used as the fuzzy kernel K of the background layerBAnd taking a second initialized fuzzy kernel obtained in the last iterations as a fuzzy kernel K of the light reflecting layerR(ii) a Wherein, 0 is<λl≤1。
  16. 16. The apparatus of claim 15, wherein said αlEqual to 0.8.
  17. 17. Device according to claim 16, wherein the processor is specifically configured to operate according to a formula
    Figure FDA0001159180950000062
    Fourier transform is carried out on each image block in the image to be processed to obtain a plurality of th image blocks, and the th image blocks are obtained according to a formula
    Figure FDA0001159180950000063
    Determining the clustering distance between any two th image blocks, clustering the image blocks of the image to be processed according to the clustering distance to obtain a th cluster and a second cluster, and obtaining the th background layer L according to the th clusterB', and obtaining said th retroreflective layer L from said second polymerR'; wherein, the PxIs an image block of the image to be processed, theA Fourier transform of a 5-point Laplacian kernel, said th cluster comprising pixel values of at least image blocks belonging to the background layer, said second cluster comprising pixel values of at least image blocks belonging to the background layer, said PyIs an image block of the image to be processed.
  18. 18. The apparatus of claim 13, wherein μd1 and μl=1e-1。
CN201611032330.4A 2016-11-22 2016-11-22 Image deblurring method, device and equipment Active CN106651790B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611032330.4A CN106651790B (en) 2016-11-22 2016-11-22 Image deblurring method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611032330.4A CN106651790B (en) 2016-11-22 2016-11-22 Image deblurring method, device and equipment

Publications (2)

Publication Number Publication Date
CN106651790A CN106651790A (en) 2017-05-10
CN106651790B true CN106651790B (en) 2020-01-31

Family

ID=58808693

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611032330.4A Active CN106651790B (en) 2016-11-22 2016-11-22 Image deblurring method, device and equipment

Country Status (1)

Country Link
CN (1) CN106651790B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107945127B (en) * 2017-11-27 2021-05-07 南昌大学 High-speed motion image deblurring method based on image column gray probability consistency
CN110827217B (en) * 2019-10-30 2022-07-12 维沃移动通信有限公司 Image processing method, electronic device, and computer-readable storage medium
CN111815537B (en) * 2020-07-16 2022-04-29 西北工业大学 Novel image blind solution deblurring method
CN115631098B (en) * 2022-06-16 2023-10-03 荣耀终端有限公司 Antireflection method and device

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930601A (en) * 2010-09-01 2010-12-29 浙江大学 Edge information-based multi-scale blurred image blind restoration method
CN104103050A (en) * 2014-08-07 2014-10-15 重庆大学 Real video recovery method based on local strategies
CN105741243A (en) * 2016-01-27 2016-07-06 北京航空航天大学 Blurred image restoration method

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20150086127A1 (en) * 2013-09-20 2015-03-26 Samsung Electronics Co., Ltd Method and image capturing device for generating artificially defocused blurred image

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101930601A (en) * 2010-09-01 2010-12-29 浙江大学 Edge information-based multi-scale blurred image blind restoration method
CN104103050A (en) * 2014-08-07 2014-10-15 重庆大学 Real video recovery method based on local strategies
CN105741243A (en) * 2016-01-27 2016-07-06 北京航空航天大学 Blurred image restoration method

Also Published As

Publication number Publication date
CN106651790A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
Hyun Kim et al. Dynamic scene deblurring
Pan et al. Soft-segmentation guided object motion deblurring
US9692939B2 (en) Device, system, and method of blind deblurring and blind super-resolution utilizing internal patch recurrence
Li et al. Fast guided global interpolation for depth and motion
Whyte et al. Deblurring shaken and partially saturated images
Cho et al. Image restoration by matching gradient distributions
US9262815B2 (en) Algorithm for minimizing latent sharp image cost function and point spread function cost function with a spatial mask in a regularization term
US9076205B2 (en) Edge direction and curve based image de-blurring
US8781250B2 (en) Image deconvolution using color priors
Favaro Recovering thin structures via nonlocal-means regularization with application to depth from defocus
KR102115066B1 (en) Adaptive path smoothing for video stabilization
CN106651790B (en) Image deblurring method, device and equipment
US9196021B2 (en) Video enhancement using related content
US9953400B2 (en) Adaptive path smoothing for video stabilization
JP2015225665A (en) Image noise removal method and image noise removal device
CN106663315B (en) Method for denoising noisy images
KR20130104259A (en) A method and an apparatus for debluring non-uniform motion blur of a large scale input image based on a tile unit
US9619870B2 (en) Scale adaptive blind deblurring
KR20170052634A (en) Depth map enhancement
WO2022100490A1 (en) Methods and systems for deblurring blurry images
Chen et al. Kinect depth recovery using a color-guided, region-adaptive, and depth-selective framework
Alam et al. Space-variant blur kernel estimation and image deblurring through kernel clustering
Zhao et al. Natural image deblurring based on ringing artifacts removal via knowledge-driven gradient distribution priors
Khan et al. Multi‐scale GAN with residual image learning for removing heterogeneous blur
Xu et al. Single image blind deblurring with image decomposition

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right

Effective date of registration: 20200417

Address after: 518129 Bantian HUAWEI headquarters office building, Longgang District, Guangdong, Shenzhen

Patentee after: HUAWEI TECHNOLOGIES Co.,Ltd.

Address before: 301, A building, room 3, building 301, foreshore Road, No. 310052, Binjiang District, Zhejiang, Hangzhou

Patentee before: Huawei Technologies Co.,Ltd.

TR01 Transfer of patent right