CN107316283B - Digital image restoration method based on multi-window fusion - Google Patents
Digital image restoration method based on multi-window fusion Download PDFInfo
- Publication number
- CN107316283B CN107316283B CN201710575157.0A CN201710575157A CN107316283B CN 107316283 B CN107316283 B CN 107316283B CN 201710575157 A CN201710575157 A CN 201710575157A CN 107316283 B CN107316283 B CN 107316283B
- Authority
- CN
- China
- Prior art keywords
- pixel point
- omega
- repaired
- repair
- formula
- 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
Links
- 230000004927 fusion Effects 0.000 title claims abstract description 13
- 238000000034 method Methods 0.000 title claims description 13
- 230000008439 repair process Effects 0.000 claims abstract description 37
- 238000004422 calculation algorithm Methods 0.000 claims abstract description 30
- 238000004364 calculation method Methods 0.000 claims abstract description 8
- 230000008569 process Effects 0.000 claims description 6
- 238000005286 illumination Methods 0.000 claims description 2
- 230000000694 effects Effects 0.000 description 7
- 230000015572 biosynthetic process Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 238000003786 synthesis reaction Methods 0.000 description 4
- 230000007547 defect Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 230000006872 improvement Effects 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 241000593989 Scardinius erythrophthalmus Species 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 201000005111 ocular hyperemia Diseases 0.000 description 1
- 238000007500 overflow downdraw method Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention relates to a digital image restoration algorithm based on multi-window fusion, which comprises the following steps: setting repair windows omega in different sizes for an image I to be repairedn(ii) a ) At the repair window omeganThen, repairing the image I to be repaired by adopting a Criminisi repairing algorithm, and marking the repaired image as In(ii) a Calculating the updated image U to be restoredICalculating a repair variance map VI(ii) a Calculating a target pixel point puAnd changing the priority calculation mode of the target pixel point in the Criminisi repair algorithm into Pu(pu) Then according to the Criminisi repair principle, U is correctedIRepairing to obtain a final repairing result IP。
Description
Technical Field
The invention belongs to the field of computer image restoration, and relates to a digital image restoration algorithm based on multi-window fusion, which can be used for cultural relic protection, movie and television special effect production and the like.
Background
The digital image restoration technology is a process of filling information in an information missing area in an image to be restored, and aims to restore a damaged image and enable an observer to be unable to perceive the restored trace of the image. Digital image restoration techniques are now used in many areas in the photographic and motion picture industries to restore motion pictures, to restore deteriorated film, and to remove red-eye, date on photograph, digital watermarks, and the like.
Digital image restoration technologies at present are mainly divided into two major categories, one is a digital image restoration algorithm based on partial differential equations, and the other is a digital image restoration algorithm based on texture synthesis. Compared with a partial differential equation-based restoration algorithm, the texture synthesis-based digital image restoration algorithm has a plurality of remarkable advantages, and the texture and the structure of the image are both considered, so that the large-area damaged image restoration is easy to realize. The Criminisi algorithm is the most commonly used digital image restoration algorithm based on texture synthesis at present, but the Criminisi algorithm has certain defects, the filling and synthesis of textures are required to be carried out through the size of a designated restoration window, and when the restoration window is changed, the restoration result is prone to have larger deviation. Therefore, the Criminisi algorithm for repair using a single repair window requires a reasonable choice of the size of the repair window.
Disclosure of Invention
The invention provides a digital image restoration algorithm based on multi-window fusion aiming at the problems of the Criminisi algorithm, and the digital image restoration under the multi-window fusion is completed by fusing restoration results under restoration windows with different sizes and updating texture and structure information of a damaged image to be restored. The technical scheme of the invention is as follows:
a digital image restoration algorithm based on multi-window fusion comprises the following steps:
(1) setting repair windows omega in different sizes for an image I to be repairednWherein N is the serial number of the repair window and N ∈ { 1.., N }, N is the number of windows;
(2) at the repair window omeganThen, repairing the image I to be repaired by adopting a Criminisi repairing algorithm, and marking the repaired image as In;
(3) According to the formulaCalculating the updated image U to be restoredIWhere d is the comparison order and f is the comparison function, and are based on the formulaCalculating and repairing variogram VI;
(4) According to formula Pu(pu)=Cu(pu)·Du(pu)·Eu(pu) Calculating a target pixel point puPriority of Pu(pu) In which C isu(pu) Is a target pixel point puConfidence term of (2), Du(pu) Is a target pixel point puThe data items of (a) are,is constant, and changes the priority calculation mode of the target pixel point in the Criminisi repair algorithm into Pu(pu) Then according to the Criminisi repair principle, U is correctedIRepairing to obtain a final repairing result IP。
In a word, the invention provides a digital image restoration algorithm based on multi-window fusion aiming at the defects of the Criminisi algorithm, the damaged image to be restored is updated according to the restoration result of the multi-window, and the priority calculation in the traditional Criminisi algorithm is improved according to the restoration variance information. The invention can obtain more accurate digital image restoration effect and has wide application prospect.
Drawings
FIG. 1 is a flow chart of a digital image restoration algorithm based on multi-window fusion according to the present invention.
FIG. 2 is a comparison of the image restoration effect of the present invention and the conventional Criminisi digital image restoration algorithm, wherein:
FIG. a is a broken image to be repaired (red areas represent broken areas);
FIG. (b) is a graph of the repair effect of the conventional Criminisi algorithm;
FIG. c shows the repairing effect of the method of the present invention.
Detailed Description
The invention relates to a digital image restoration algorithm based on multi-window fusion, which mainly comprises three parts: digital image restoration under a multi-size window, updating of an image to be restored, calculation of restoration variance information and improvement of a priority calculation function. The specific steps and principles are as follows:
101: setting repair windows with different sizes;
the size of the repair window is omeganN is the serial number of the repair window, and N is the number of the windows. Repairing the image I to be repaired by adopting a Criminsi repairing algorithm, and recording the repaired image as In:
102: the size of the repair window is omeganTarget of damaged area and source area of image I to be repairedRecording;
recording the damaged area of the image I to be repaired as omeganAnd the edge is marked asTarget pixel point pnIs composed ofAt any point above, the source region is phinAnd satisfies the relation phin+Ωn=I。
103: updating relevant parameters in the I repairing process;
Pn(pn)=Cn(pn)·Dn(pn)
wherein P isn(pn) Is a target pixel point pnPriority of Cn(pn) Is a target pixel point pnThe confidence term of (a), ωn(pn) Is represented by pnAs a central pixel point, with a window size of omeganA target block composed of any pixel point of (1); v. ofnIs omegan(pn) And source region phinPixel points within the intersection; dn(pn) Is a target pixel point pnThe data item of (1);represents pnPoint equal illuminance squareThe direction vector is a vector of the direction,the gradients in the horizontal and vertical directions of I respectively; t (p)n) Is broken boundary at pnThe normal vector of the tangent line at α is a constant, value of 255.
Calculating the point with the maximum priority of the target pixel point according to the following formula
To obtainThen, its corresponding target blockNamely the block to be repaired, and calculating the optimal matching point corresponding to the block to be repaired according to the similarity measurement functionAnd an optimal matching block
Wherein q isnThe source region is phinAny pixel point in it.
And then filling and repairing the damaged block to be repaired by using the optimal matching block, marking the block to be repaired as a repaired sample block, and updating the damaged area and the source area:
obtaining the optimal matching blockAfter that, the air conditioner is started to work,for damaged block to be repairedPerforming filling repair, namely:
then, the damaged region and the source region are updated to obtain new damaged regions omega'nAnd a new source region of phi'nNamely:
the new damaged area is then marked again as a damaged area and the new source area is marked again as a source area, i.e.:
Ωn=Ω'n
Φn=Φ'n
updating the confidence value of the corresponding pixel point in the repaired sample block;
the confidence value of the corresponding pixel point in the repaired sample block is calculated according to the following formula,
104: and repeating the steps 102 and 103 until the damaged area is an empty set, and completing the image restoration.
Obtaining the size of the repair window as omeganRepair results ofn。
105: updating an image to be repaired and calculating a repair variogram;
using the similar part in the repairing result to update the image I to be repaired, and recording the updated image to be repaired as UICounting U at the same timeIWherein each pixel point is in I1,...,INCorresponding to the variance of the brightness value in the position to obtain a repaired variance chart VI:
Wherein z is the coordinate of the pixel point, d is the comparison sequence, and the updated image to be repaired is marked as VIFusing the results of N repairs and counting by I1For reference, the variance information of the image is restored. VIThe smaller (z) is, the less the z point is deviated among the plurality of repair results, and the preferential repair can be performed in the subsequent repair. Therefore, the reasonable addition of the variance information in the calculation of the priority can ensure that the z point is repaired preferentially.
106: to UIRepairing by adopting a Criminisi algorithm based on an improved priority function, and marking the size of a repair window as omega1Lower to-be-restored image UIA damaged region and a source region;
image to be restored UIIs expressed as omegauAnd the edge is marked asTarget pixel point puIs composed ofAt any point above, the source region is phiuAnd satisfies the relation phiu+Ωu=UI。
107: to UIUpdating related parameters in the repairing process;
Pu(pu)=Cu(pu)·Du(pu)·Eu(pu)
wherein P isu(pu) Is a target pixel point puPriority of Cu(pu) Is a target pixel point puThe confidence term of (a), ωu(pu) Is represented by puAs a central pixel point, with a window size of omegauA target block composed of any pixel point of (1); v. ofuIs omegau(pu) And source region phiuPixel points within the intersection; du(pu) Is a target pixel point puThe data item of (1); eu(pu) Is a target pixel point puRepair variance information V ofI(pu) A fusion term with a constant (value taken to be 1) which reflects puThe larger the deviation degree among the previous multi-window repairing results, the smaller the deviation is, and the prior repairing is carried out;represents puThe direction of the line of illumination of the spot,are respectively UIThe gradient in the horizontal and vertical directions of (a); t (p)u) Is broken boundary at puNormal vector of tangent line of (α) is constantAnd the value is 255.
Calculating the point with the maximum priority of the target pixel point according to the following formula
To obtainThen, its corresponding target blockNamely the block to be repaired, and calculating the optimal matching point corresponding to the block to be repaired according to the similarity measurement functionAnd an optimal matching block
Wherein q isuThe source region is phiuAny pixel point in it.
And then filling and repairing the damaged block to be repaired by using the optimal matching block, marking the block to be repaired as a repaired sample block, and updating the damaged area and the source area:
obtaining the optimal matching blockThen, the damaged block to be repaired is repairedPerforming filling repair, namely:
then, the damaged region and the source region are updated to obtain new damaged regions omega'uAnd a new source region of phi'uNamely:
the new damaged area is then marked again as a damaged area and the new source area is marked again as a source area, i.e.:
Ωu=Ω'u
Φu=Φ'u
updating the confidence value of the corresponding pixel point in the repaired sample block;
the confidence value of the corresponding pixel point in the repaired sample block is calculated according to the following formula,
108: and repeating the steps 106 and 107 until the damaged area is an empty set, and completing the image restoration.
Obtaining the final repairing result IP。
The feasibility of the method is verified in the following detailed tests, which are described in the following:
the test results are obtained by running the method on a notebook computer with a CPU of Intel i7-3610QM and 2.3GHz and a memory of 16G, the operating system is Windows 7, and the simulation software is 64-bit Matlab R2012 b.
As can be seen from FIG. 2, the repairing effect obtained by adopting the traditional Criminisi repairing algorithm is poor, obvious error repairing exists at the edge of the chair, and the repairing effect obtained by the multi-window repairing fusion method is more natural and reasonable.
Those skilled in the art will appreciate that the drawings are only schematic illustrations of preferred embodiments, and the above-described embodiments of the present invention are merely provided for description and do not represent the merits of the embodiments.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents, improvements and the like that fall within the spirit and principle of the present invention are intended to be included therein.
The specific process of the invention is as follows:
(1) setting repair windows omega in different sizes for an image I to be repairednWherein N is the serial number of the repair window and N ∈ { 1.., N }, N is the number of windows;
(2) at the repair window omeganThen, repairing the image I to be repaired by adopting a Criminisi repairing algorithm, and marking the repaired image as In;
(3) According to the formulaCalculating the updated image U to be restoredIWhere d is the comparison order and f is the comparison function, and are based on the formulaCalculating and repairing variogram VI;
(4) According to formula Pu(pu)=Cu(pu)·Du(pu)·Eu(pu) Calculating a target pixel point puPriority of Pu(pu) In which C isu(pu) Is a target pixel point puConfidence term of (2), Du(pu) Is a target pixel point puThe data items of (a) are,is constant, and changes the priority calculation mode of the target pixel point in the Criminisi repair algorithm into Pu(pu) Then according to the Criminisi repair principle, U is correctedIRepairing to obtainFinal repair result IP。
Claims (1)
1. A digital image restoration method based on multi-window fusion comprises the following steps:
(1) setting repair windows omega in different sizes for an image I to be repairednWherein N is the serial number of the repair window and N ∈ { 1.., N }, N is the number of windows;
(2) at the repair window omeganNext, P is first calculated using the Criminisi repair algorithmn(pn)=Cn(pn)·Dn(pn),
Wherein P isn(pn) Is a target pixel point pnPriority of Cn(pn) Is a target pixel point pnThe confidence term of (a), ωn(pn) Is represented by pnAs a central pixel point, with a window size of omeganA target block composed of any pixel point of (1); v. ofnIs omegan(pn) And source region phinPixel points within the intersection; dn(pn) Is a target pixel point pnThe data item of (1);represents pnThe direction vector of the point isolux line,the gradients in the horizontal and vertical directions of I respectively; t (p)n) Is broken boundary at pnThe normal vector of the tangent line of (c) α is a constant with a value of 255, and then according to the formulaCalculating an object imageThe point with the highest priority of the prime pointsAnd according to the formulaCalculating a block to be repairedCorresponding optimal matching pointAnd an optimal matching blockWherein q isnThe source region is phinAny pixel point in the table, then using the formulaFor damaged block to be repairedFilling and repairing; second using the formulaUpdating the damaged region and the source region to obtain new damaged region omega'nAnd a new source region of phi'nThen using the formula omegan=Ω'n,Φn=Φ'nRe-marking the new damaged area as a damaged area, re-marking the new source area as a source area, and re-using the formulaUpdating the confidence values of corresponding pixel points in the repaired sample block; repeating the above process until the damaged area is an empty set, completing the image restoration, and obtaining the restoration window with the size of omeganRepair results ofn;
(3) According to the formulaCalculating the updated image U to be restoredIWherein d is a comparison sequence with a value range of d ∈ { 1., N-1}, and f is a comparison function, and is calculated according to a formulaCalculating and repairing variogram VI;
(4) According to formula Pu(pu)=Cu(pu)·Du(pu)·Eu(pu) Firstly, a target pixel point p is calculateduPriority of Pu(pu) The calculation mode of each expression is as follows:
wherein P isu(pu) Is a target pixel point puPriority of Cu(pu) Is a target pixel point puThe confidence term of (a), ωu(pu) Is represented by puAs a central pixel point, with a window size of omegauA target block composed of any pixel point of (1); v. ofuIs omegau(pu) And source region phiuPixel points within the intersection; du(pu) Is a target pixel point puThe data item of (1); eu(pu) Is a target pixel point puRepair variance information V ofI(pu) A fusion term formed by the constant takes a value of 1;represents puThe direction of the line of illumination of the spot,are respectively UIIn the horizontal and vertical directionsA gradient of (a); t (p)u) Is broken boundary at puThe normal vector of the tangent line of (c) α is a constant with a value of 255, and then according to the formulaCalculating the point with the maximum priority of the target pixel pointAnd according to the formulaCalculating a block to be repairedCorresponding optimal matching pointAnd an optimal matching blockWherein q isuThe source region is phiuAny pixel point in the table, then using the formulaFor damaged block to be repairedFilling and repairing; second using the formulaUpdating the damaged region and the source region to obtain new damaged region omega'uAnd a new source region of phi'uThen using the formula omegau=Ω'u,Φu=Φ'uRe-marking the new damaged area as a damaged area, re-marking the new source area as a source area, and re-using the formulaUpdating the confidence values of corresponding pixel points in the repaired sample block; repeating the above processes until the damaged area is an empty set, completing the image restoration, and obtaining a final restoration result IP。
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710575157.0A CN107316283B (en) | 2017-07-14 | 2017-07-14 | Digital image restoration method based on multi-window fusion |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710575157.0A CN107316283B (en) | 2017-07-14 | 2017-07-14 | Digital image restoration method based on multi-window fusion |
Publications (2)
Publication Number | Publication Date |
---|---|
CN107316283A CN107316283A (en) | 2017-11-03 |
CN107316283B true CN107316283B (en) | 2020-08-14 |
Family
ID=60178786
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710575157.0A Active CN107316283B (en) | 2017-07-14 | 2017-07-14 | Digital image restoration method based on multi-window fusion |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107316283B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110223252B (en) * | 2019-06-10 | 2022-12-06 | 成都理工大学 | Depth image restoration algorithm based on composite self-adaptive region growing criterion |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5268771A (en) * | 1989-02-15 | 1993-12-07 | Hitachi, Ltd. | Image restoration processing system and method |
CN101661613A (en) * | 2009-08-27 | 2010-03-03 | 北京交通大学 | Image restoration method based on image segmentation, and system therefor |
CN102760285A (en) * | 2012-05-31 | 2012-10-31 | 河海大学 | Image restoration method |
US8447135B2 (en) * | 2011-03-02 | 2013-05-21 | Nanyang Technological University | Methods and systems for generating enhanced images using Euler's Elastica model |
CN103700093A (en) * | 2013-12-03 | 2014-04-02 | 杭州电子科技大学 | Criminisi image restoration method based on textures and edge features |
CN104680493A (en) * | 2015-03-12 | 2015-06-03 | 华东理工大学 | Digital image repairing method based on scale optimization |
CN104809698A (en) * | 2015-03-18 | 2015-07-29 | 哈尔滨工程大学 | Kinect depth image inpainting method based on improved trilateral filtering |
CN105389781A (en) * | 2015-10-30 | 2016-03-09 | 哈尔滨工程大学 | Vehicle light repairing method based on saliency detection and Criminisi algorithm |
CN105678712A (en) * | 2016-01-29 | 2016-06-15 | 陕西师范大学 | Improved Criminisi image restoration method with self-adaptive gradient block division and equilong transformation |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10235657A1 (en) * | 2002-08-02 | 2004-02-12 | Leica Microsystems Heidelberg Gmbh | Process, arrangement and software for optimizing the image quality of moving objects taken with a microscope |
-
2017
- 2017-07-14 CN CN201710575157.0A patent/CN107316283B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5268771A (en) * | 1989-02-15 | 1993-12-07 | Hitachi, Ltd. | Image restoration processing system and method |
CN101661613A (en) * | 2009-08-27 | 2010-03-03 | 北京交通大学 | Image restoration method based on image segmentation, and system therefor |
US8447135B2 (en) * | 2011-03-02 | 2013-05-21 | Nanyang Technological University | Methods and systems for generating enhanced images using Euler's Elastica model |
CN102760285A (en) * | 2012-05-31 | 2012-10-31 | 河海大学 | Image restoration method |
CN103700093A (en) * | 2013-12-03 | 2014-04-02 | 杭州电子科技大学 | Criminisi image restoration method based on textures and edge features |
CN104680493A (en) * | 2015-03-12 | 2015-06-03 | 华东理工大学 | Digital image repairing method based on scale optimization |
CN104809698A (en) * | 2015-03-18 | 2015-07-29 | 哈尔滨工程大学 | Kinect depth image inpainting method based on improved trilateral filtering |
CN105389781A (en) * | 2015-10-30 | 2016-03-09 | 哈尔滨工程大学 | Vehicle light repairing method based on saliency detection and Criminisi algorithm |
CN105678712A (en) * | 2016-01-29 | 2016-06-15 | 陕西师范大学 | Improved Criminisi image restoration method with self-adaptive gradient block division and equilong transformation |
Non-Patent Citations (2)
Title |
---|
Fast and Enhanced Algorithm for Exemplar Based Image Inpainting;Anupam等;《2010 Fourth Pacific-Rim Symposium on Image and Video Technology》;20101231;第1-6页 * |
基于样本的数字图像修复技术研究;张晴;《中国博士学位论文全文数据库(信息科技辑)》;20120615(第06期);第I138-54页 * |
Also Published As
Publication number | Publication date |
---|---|
CN107316283A (en) | 2017-11-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110288657B (en) | Augmented reality three-dimensional registration method based on Kinect | |
CN109712067B (en) | Virtual viewpoint drawing method based on depth image | |
US8818131B2 (en) | Methods and apparatus for facial feature replacement | |
CN105957007B (en) | Image split-joint method based on characteristic point plane similarity | |
Lee et al. | Robust exemplar-based inpainting algorithm using region segmentation | |
US10824910B2 (en) | Image processing method, non-transitory computer readable storage medium and image processing system | |
CN103971338B (en) | Variable-block image repair method based on saliency map | |
CN102760285A (en) | Image restoration method | |
CN106023089B (en) | A kind of image repair method based on Block- matching | |
CN102999887A (en) | Sample based image repairing method | |
CN109493272B (en) | Criminisi image restoration method based on HSV color space | |
CN107507232B (en) | Stereo matching method based on multi-scale iteration | |
CN107316283B (en) | Digital image restoration method based on multi-window fusion | |
CN104836953A (en) | Multi-projector screen feature point automatic shooting and de-noising identification method | |
CN107492073B (en) | Digital image restoration method based on weight guide filtering | |
CN116152121B (en) | Curved surface screen generating method and correcting method based on distortion parameters | |
CN106504203A (en) | A kind of Block- matching image repair method of application screening strategy | |
CN114972612B (en) | Image texture generation method based on three-dimensional simplified model and related equipment | |
CN115063485B (en) | Three-dimensional reconstruction method, device and computer-readable storage medium | |
CN111539875A (en) | Image restoration method for improving Criminisi algorithm | |
WO2022086360A1 (en) | Method and device for creating a panoramic image | |
Condorelli et al. | Benchmark of metric quality assessment in photogrammetric reconstruction for historical film footage | |
Sangeetha et al. | Improved exemplar based texture synthesis method for natural scene image completion | |
CN111179190A (en) | Image restoration method based on Criminisi | |
CN103778604A (en) | Image restoration method based on texture direction |
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 |