CN106846279A - A kind of adapting to image method for repairing and mending and its system based on interpolation by continued-fractions technology - Google Patents
A kind of adapting to image method for repairing and mending and its system based on interpolation by continued-fractions technology Download PDFInfo
- Publication number
- CN106846279A CN106846279A CN201710119485.XA CN201710119485A CN106846279A CN 106846279 A CN106846279 A CN 106846279A CN 201710119485 A CN201710119485 A CN 201710119485A CN 106846279 A CN106846279 A CN 106846279A
- Authority
- CN
- China
- Prior art keywords
- prime
- point
- rsqb
- lsqb
- phi
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 78
- 238000005516 engineering process Methods 0.000 title claims abstract description 31
- 238000004458 analytical method Methods 0.000 claims abstract description 4
- 230000008439 repair process Effects 0.000 claims description 21
- 238000005070 sampling Methods 0.000 claims description 15
- 239000011159 matrix material Substances 0.000 claims description 13
- 230000006978 adaptation Effects 0.000 claims description 10
- 238000002156 mixing Methods 0.000 claims description 6
- 238000012892 rational function Methods 0.000 claims description 6
- 238000004364 calculation method Methods 0.000 claims description 4
- 238000010276 construction Methods 0.000 claims description 3
- 238000001514 detection method Methods 0.000 claims description 3
- 230000003044 adaptive effect Effects 0.000 claims 1
- 230000000694 effects Effects 0.000 abstract description 11
- 230000008859 change Effects 0.000 abstract description 2
- 230000007547 defect Effects 0.000 abstract description 2
- 230000008901 benefit Effects 0.000 description 5
- 230000015572 biosynthetic process Effects 0.000 description 3
- 230000004048 modification Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 3
- 238000003786 synthesis reaction Methods 0.000 description 3
- 230000000007 visual effect Effects 0.000 description 3
- 238000010586 diagram Methods 0.000 description 2
- HUTDUHSNJYTCAR-UHFFFAOYSA-N ancymidol Chemical compound C1=CC(OC)=CC=C1C(O)(C=1C=NC=NC=1)C1CC1 HUTDUHSNJYTCAR-UHFFFAOYSA-N 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 150000001875 compounds Chemical class 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000008569 process Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000012163 sequencing technique Methods 0.000 description 1
- 238000001308 synthesis method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/77—Retouching; Inpainting; Scratch removal
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20004—Adaptive image processing
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The present invention relates to a kind of adapting to image method for repairing and mending and its system based on interpolation by continued-fractions technology, the defect that repairing effect is poor, efficiency is low is solved compared with prior art.The present invention is comprised the following steps:Initialisation image signature analysis;The repairing of cut image breaking point is carried out using unitary interpolation by continued-fractions technology;Repairing for cut image is carried out using binary interpolation by continued-fractions technology, using initial repairing figure as A as frame, the position of each breaking point is determined by mask artwork, the Pixel Information for obtaining each breaking point is updated using binary interpolation by continued-fractions by the Pixel Information around breaking point, final repairing figure is obtained as B.The present invention improves the quality and efficiency of image mending, can change any type of cut, it is adaptable to all of image procossing.
Description
Technical field
The present invention relates to technical field of image processing, a kind of specifically self adaptation figure based on interpolation by continued-fractions technology
As method for repairing and mending and its system.
Background technology
Image repair is that the part damaged in image is repaired with certain mode, makes the complete figure of a width
Picture.Image repair has a wide range of applications in the industries such as image procossing, film industry, such as the cut in photo and old film
Word and shelter removal in removal, image etc. is all relevant with image repair.Thus, image repair has great application preceding
Scape, is a study hotspot of computer vision and computer graphics.
There are many researchers that different image mending methods have been proposed at this stage, and achieve certain success,
But these methods lack versatility, repair it is sufficiently complete, while treatment obscurity boundary.Wherein, based on partial differential equation
Method and the method based on textures synthesis are current most common method for repairing and mending.Image repair method based on partial differential equation is
By the direction along the isophote of pixel in image, by the information iteration around restoring area to area to be repaired,
Until untill the image completion is complete.This method based on partial differential equation has certain repairing effect, but is a lack of steady
It is qualitative, especially can not obtain good effect in the larger texture maps for the treatment of background.Texture synthesis method is that another kind is repaiied
Compound method, the method uses Markov random field models in textures synthesis first.It was verified that the method based on textures synthesis
Tend not to solve the problems, such as obscurity boundary in treatment, thus cannot practical application.
For example, as shown in figure 3, Fig. 3 is image to be repaired.
1st, repaired using the method for document [1] and document [2], ([1] Xing Huo, Jieqing Tan, and Min
Hu.An automatic video scratch removal based on Thiele type continued
fraction,Multimedia Tools and Applications,vol.71,no.2,pp.451-467,2014.[2]
Xing Huo,Jieqing Tan.A novel non-linear method of automatic video scratch
removal,Proceedings-4th International Conference on Digital Home,pp.39-45,
2012.) method repaired by using unitary continued fraction is (i.e. newest at present to carry out image mending using unitary continued fraction
Method, specific algorithm refers to document [1] [2], and its Literature [1] is a kind of improved method of document [2]) treatment after, such as Fig. 5 institutes
Show, the image for recovering cut position that the method can only be basic.
2nd, after the method repaired by using document [3] binary continued fraction is processed, as a result as shown in fig. 6, ([3] Xing
Huo,Jieqing Tan.Bivariate rational interpolant in image inpainting,Journal of
Information and Computational Science, vol.2, no.3, pp.487-492,2005. document [3] is mesh
The method that preceding newest use binary continued fraction carries out image mending), the method is come relative to the method that unitary continued fraction is repaired
Saying can preferably repair cut, but the effect and bad of general image repairing, and image relatively obscures.
It is possible thereby to find, for the limitation that various repairing techniques are present at present, under existing hardware condition, how
Design a kind of efficient, simple method for repairing and mending and have become the current technical problem be badly in need of and solving.
The content of the invention
The invention aims to solve the defect that repairing effect in the prior art is poor, efficiency is low, there is provided one kind is based on
The adapting to image method for repairing and mending and its system of interpolation by continued-fractions technology solves the above problems.
To achieve these goals, technical scheme is as follows:
A kind of adapting to image method for repairing and mending based on interpolation by continued-fractions technology, comprises the following steps:
Initialisation image signature analysis, the cut image to being input into is analyzed, and judges that the cut image is gray level image
Or coloured image;If coloured image, then by the coloured image along tri- Color Channels of R, G, B respectively according to gray level image
Mode perform;
The repairing of cut image breaking point is carried out using unitary interpolation by continued-fractions technology, is obtained by the mask artwork being input into
The position of each point to be repaired in corresponding cut image, then the information matrix with the cut image detected line by line as target
These points to be repaired, for each the point self-adapted known pixels for selecting surrounding point to be repaired as sampled point, by these
Sampled point combination unitary continued fraction rational interpolation reconstructs the Pixel Information of each point to be repaired, obtains initial repairing figure as A;
Repairing for cut image is carried out using binary interpolation by continued-fractions technology, using initial repairing figure as A as information
Image, the position of each breaking point is determined by mask artwork, is inserted using binary continued fraction by the Pixel Information around breaking point
Value updates the Pixel Information for obtaining each breaking point, obtains final repairing figure as B.
The described repairing for carrying out cut image breaking point using unitary interpolation by continued-fractions technology is comprised the following steps:
The determination of cut image breaking point, be input into cut image mask artwork, mask artwork and cut image are carried out it is overlap,
Get the point to be repaired of cut image;
Adaptively selected interpolation sampling point, reads the damaged information matrix of cut image, and self adaptation is selected to be repaired
4 nearest known pixels points of point (x, y) are mended, this 4 known pixels points are constituted into interpolation sampling point;
The calculating of breaking point pixel value, the breakage is calculated by 4 known pixels point combination unitary interpolation by continued-fractions functions
The pixel value of point, it is comprised the following steps:
Unitary interpolation by continued-fractions form is defined as:
Wherein, bi=φ [x0,x1,…,xi;Y] (i=0 ... is m) function f (x, y) in point x0,x1,…,xiUnfavourable balance
Business, m is the length of input picture, is met as follows:
φ[xi;Y]=f (xi;Y), i=0,1,2 ..., m,
Calculated using the information combination unitary interpolation by continued-fractions function of 4 known pixels points around point (x, y) to be repaired
Go out the pixel value R of the point to be repaired1(x,y);
Wherein,
b0=φ [x0;Y]=f (x0;Y),
F (x in above formula0;y),f(x1;y),f(x2;y),f(x3;Y) 4 known pixels point (x are respectively0,y),(x1,y),
(x2,y),(x3, pixel value y), R1(x, y) is the pixel value of the point (x, y) to be repaired calculated;
According to each point to be repaired in direction sequence detection cut image from left to right, from top to bottom, carry out certainly
The calculation procedure of selection interpolation sampling point step and breaking point pixel value is adapted to, initial repairing figure is obtained as A.
It is described to carry out repairing for cut image using binary interpolation by continued-fractions technology and comprise the following steps:
The determination of bivariate interpolation sampled point, reads initial repairing figure as A and as information matrix, by mask artwork with
Initial repairing figure is overlapped as A, initial repairing figure is got as the to be repaired position of A, by point (x, y) to be repaired week
The 16 known pixels information structure interpolating pixel points for enclosing;
16 pixels neighbouring around it are found to point (x, y) to be repaired search, according to the coordinate position of point to be repaired,
Select successively:
16 pixels are used as bivariate interpolation sampled point by more than;
The renewal of breaking point pixel value, the breakage is calculated by bivariate interpolation sampled point combination binary interpolation by continued-fractions function
The pixel value of point, and update instead of original repairing figure as the pixel value of the point in A, it is comprised the following steps:
Binary interpolation by continued-fractions form is defined as:
Wherein, i=0,1 ..., m, m, n are respectively the length and width of input picture;
Wherein,It is Newton-Thiele type blending differences;
The binary vector rational function of constructionMeet:
Using 16 pixels around point (x, y) to be repaired as bivariate interpolation sampled point, i.e.,This is calculated with reference to binary vector rational function to treat
Repair the pixel value R of point2(x,y);
R2(x, y)=B0(y)+2B1(y)+2B2(y)-2B3(y),
Wherein, x0'=x-2, x1'=x-1, x2'=x+1, x3'=x+2, y0'=y+2, y1'=y+1, y2'=y-1, y3′
=y-2,
Wherein,
φNT[x0′,…,xi′;y0′,…,yj'], i=0,1,2,3, j=0,1,2,3 are the mixing of Newton-Thiele types
Difference coefficient, x0'=x-2, x1'=x-1, x2'=x+1, x3'=x+2, y0'=y+2, y1'=y+1, y2'=y-1, y3'=y-2,
φ in above formulaNT[xi′;yj'] meet:φNT[xi′;yj']=f (xi′,yj'), wherein f (xi′,yj'), it is corresponding
Known pixels point (xi′,yj') pixel value;
By pixel value R2(x, y) replaces initial repairing figure as the pixel value R of the point in A1(x, y), point to be repaired after renewal
The pixel value of (x, y) is R2(x,y);
From by from left to right, from top to bottom direction order to initial repairing figure as each point to be repaired of A enters
The determination step of row bivariate interpolation sampled point and the renewal step of breaking point pixel value, have obtained final repairing figure as B.
Described adaptively selected interpolation sampling point is comprised the following steps:
Detected line by line by target of the damaged information matrix of cut image;
If it was found that point (x, y) to be repaired, then in the both sides of point (x, y) to be repaired colleague by damaged closely to remote search successively
Neighbouring not damaged pixel around point, the not damaged pixel that will be searched is used as a sampled point;
When searching unbroken pixel quantity and reaching 4, stop search, the two of point (x, y) to be repaired colleague
Side is obtained 4 effective sampling points.
A kind of system of the adapting to image method for repairing and mending based on interpolation by continued-fractions technology, including:For determining input figure
The initialisation image input module of the type of picture, for obtain initial repairing figure as A unitary interpolation by continued-fractions repair module
With for obtaining final repairing figure as the binary interpolation by continued-fractions of B repairs module;
The output end of described initialisation image input module is connected with the input of unitary interpolation by continued-fractions repairing module,
The input that the output end of unitary interpolation by continued-fractions repairing module repairs module with binary interpolation by continued-fractions is connected.
Beneficial effect
A kind of adapting to image method for repairing and mending and its system based on interpolation by continued-fractions technology of the invention, with prior art
Compared to the quality and efficiency that improve image mending, any type of cut can be changed, it is adaptable to all of image procossing.
By using cooperatively for mask artwork, can rapidly determine the position of repairing and save time of repairing, meanwhile, can be with
Required neatly to repair part image block interested according to user.The image effect repaired of the invention is good, grain details are rich
Richness, modification efficiency is greatly improved, and practical application is strong.
Brief description of the drawings
Fig. 1 is method of the present invention precedence diagram;
Fig. 2 is system architecture schematic diagram of the invention;
Fig. 3 is picture to be repaired in the prior art;
Fig. 4 is the corresponding mask artworks of Fig. 3;
Fig. 5 is the design sketch after being repaired to Fig. 3 using the method for document [1] [2];
Fig. 6 is the design sketch after being repaired to Fig. 3 using the method for document [3];
Fig. 7 is the design sketch after being repaired using the inventive method.
Specific embodiment
To make have a better understanding and awareness to architectural feature of the invention and the effect reached, to preferably
Embodiment and accompanying drawing coordinate detailed description, are described as follows:
As shown in figure 1, a kind of adapting to image method for repairing and mending based on interpolation by continued-fractions technology of the present invention, passes through
Unitary interpolation by continued-fractions is obtained in that initial repairing figure picture, then initial repairing figure picture is carried out by binary interpolation by continued-fractions
Repair again, so as to obtain final repair efficiency.The present invention combines two methods will not bring huge operand
Problem because the repairing of simple unitary interpolation by continued-fractions wants small very relative to simple binary interpolation by continued-fractions repairing operand
It is many, so, using unitary interpolation by continued-fractions method for repairing and mending as main repairing technique, and by binary interpolation by continued-fractions method for repairing and mending
As secondary repairing technique, it is used merely to update the pixel value of breaking point, so as to reduce overall operand.
It is comprised the following steps:
The first step, initialisation image signature analysis.Cut image to being input into is analyzed, and judges that the cut image is ash
Degree image or coloured image.If coloured image, then by the coloured image along tri- Color Channels of R, G, B respectively according to ash
The mode for spending image is performed, and carries out second step;If gray image, then second step is directly carried out.
Second step, the repairing of cut image breaking point is carried out using unitary interpolation by continued-fractions technology.
The position of each point to be repaired in corresponding cut image is obtained by the mask artwork being input into, then with this stroke
The information matrix of trace image detects these points to be repaired line by line for target, for each it is to be repaired it is point self-adapted select around
Known pixels point as sampled point, reconstruct each point to be repaired by these sampled point combination unitary continued fraction rational interpolations
Pixel Information, obtains initial repairing figure as A.
As shown in Figure 3 and Figure 4, mask artwork is the cut figure of figure to be repaired, can be accurately positioned by using mask artwork
Cut in figure to be repaired.Meanwhile, the cooperation repairing of mask artwork breaches traditional repairing only for damaged figure, also may be used
Have to be not necessarily cut figure, such as the removal of shelter, image suitable for the repairing to image part interested position
Part details is rebuild again.In addition, mask artwork can also be shielded to some regions on image, it is set not carry out mend
Reason, so as to improve repairing efficiency, simultaneously for the image mending of some special shapes, mask artwork can be repaiied preferably
It is multiple.With selected image, figure or object, pending image (all or local) is blocked to control image procossing
Region or processing procedure.Specific image or object for covering are referred to as mask or template.
It is comprised the following steps that:
(1) determination of cut image breaking point.The mask artwork of cut image is input into, mask artwork and cut image are carried out into weight
It is folded, get the point to be repaired of cut image.Mask artwork is usually bianry image, and image size is the size of cut figure, for
Uninterested part area pixel value is 0, is presented as black, and it is interested or block or cut where position picture
Element value is 1, is presented as white.
(2) adaptively selected interpolation sampling point.
Read the damaged information matrix of cut image, self adaptation is selected from known to nearest 4 of point (x, y) to be repaired
This 4 known pixels points are constituted interpolation sampling point by pixel (non-damaged effective information point).In general, interpolation sampling
Point quantity is more more more can embody the advantage of continued fraction, but can be caused due to entering row interpolation using the pixel of more than 4 quantity
The efficiency of algorithm is low, and the effect of interpolation is also similar to 4 interpolation of pixel, in addition, 2 or 3 interpolation of pixel
The advantage of interpolation by continued-fractions can not be embodied, and the effect of interpolation is bad, thus, it is most come interpolation processing using 4 pixels
Suitably.
A, detected line by line by target of the damaged information matrix of cut image;
If B, finding point (x, y) to be repaired, then in the both sides of point (x, y) to be repaired colleague by closely being broken to remote search successively
Damage neighbouring not damaged pixel around point, the not damaged pixel that will be searched is used as a sampled point;
C, when searching unbroken pixel quantity and reaching 4, stop search, point (x, y) to be repaired colleague's
Both sides are obtained 4 effective sampling points.
The method of self adaptation is used to be had more compared to traditional interpolation window in the selection of unitary interpolation by continued-fractions sampled point
There is flexibility, because it is unknown to might have several adjacent points to be repaired in per a line or each row, according to traditional interpolation
Window certainly will cause that the calculated for pixel values of breaking point is incorrect or deviation is too big, and the mode of self adaptation is according to actual to be repaired
The position of point is mended, available sampled point is searched using the way of search of left and right arest neighbors in same a line, and the sampled point is added
Enter as interpolation point, when the sampled point quantity of search reaches requirement, just stop search, and these sampled points are used for interpolation
Calculate the pixel value of the repairing point.
With continued fraction theory be combined the method for self adaptation and be applied in image procossing by the present invention, is image processing field
It is pioneering.The method of self adaptation and continued fraction theory are combined in the repairing for image, the side of self adaptation is mainly reflected in
Method is used in the selection of unitary interpolation by continued-fractions sampled point.The selection of traditional unitary interpolation by continued-fractions sampled point has random
Property, generally select several known pixels points near breaking point as sampled point (method such as in document [1] [2]) or along
The direction of coordinate chooses several known pixels points as sampled point successively where breaking point.Due to this randomness, cause
Patch algorithm it is unstable, or even the pixel value of the breaking point that interpolation is obtained every time is different.The method of self adaptation be used for into
During the selection of row sampled point, be centered on the breaking point, take it is symmetrical, by choosing sampled point closely to remote mode,
It is the same similar to pointer treatment, first search the pixel of the left and right nearest from the breaking point two (left and right two pixel herein
Sequencing regardless of), determine whether known pixels point, if being both known pixels point, by the two pixels make
It is sampled point, if one of them is known pixels point, the pixel is incorporated as sampled point, if not being both known
Pixel, then pointer move to that next near (secondary refers to closely one from breaking point midfeather pixel from the breaking point time
Position) left or right pixel, use same method to carry out judging that whether the pixel is known pixels point, and located
Reason.The like, same operation, when the sampled point quantity of search reaches requirement, just stops search, and by these sampled points
Go out the pixel value of the repairing point for interpolation calculation.
(3) calculating of breaking point pixel value.This is calculated by 4 known pixels point combination unitary interpolation by continued-fractions functions to break
The pixel value of point is damaged, it is comprised the following steps:
A, unitary interpolation by continued-fractions form is defined as:
Wherein, bi=φ [x0,x1,…,xi;Y] (i=0 ... is m) function f (x, y) in point x0,x1,…,xiUnfavourable balance
Business, m is the length of input picture, is met as follows:
φ[xi;Y]=f (xi;Y), i=0,1,2 ..., m,
B, the information combination unitary interpolation by continued-fractions function meter using 4 known pixels points around point (x, y) to be repaired
Calculate the pixel value R of the point to be repaired1(x,y);
Wherein,
b0=φ [x0;Y]=f (x0;Y),
F (x in above formula0;y),f(x1;y),f(x2;y),f(x3;Y) 4 known pixels point (x are respectively0,y),(x1,y),
(x2,y),(x3, pixel value y), R1(x, y) is the pixel value of the point (x, y) to be repaired calculated;
(4) according to each point to be repaired in direction sequence detection cut image from left to right, from top to bottom, carry out
The calculation procedure of adaptively selected interpolation sampling point step and breaking point pixel value, when all of point to be repaired has been calculated, just
Initial repairing figure is obtained as A.
3rd step, repairing for cut image is carried out using binary interpolation by continued-fractions technology.By initial repairing figure as A makees
It is frame, the position of each breaking point is determined by mask artwork.Herein, then with a mask artwork it is to confirm breakage
The position of point, because initial repairing figure is not as having seen which is breaking point in A, therefore it is necessary to be determined by mask artwork
Damaged dot position information.The picture for obtaining each breaking point is updated using binary interpolation by continued-fractions by the Pixel Information around breaking point
Prime information, obtains final repairing figure as B.
Binary interpolation by continued-fractions technology carries out repairing for cut image, from the choosing of the interpolating function and interpolation window for using
It is identical with existing interpolation method for selecting, different be interpolating function and interpolation window role object it is different.It is existing
The object of technical role is all original damaged figure, and effective object of the present invention is initial repairing figure obtained in the previous step.Why
It is to improve the efficiency of repairing using initial repairing figure.Repaired because second step has employed unitary continued fraction,
Parts against wear point may have been obtained for correct pixel value, if again using binary continued fraction to original damaged Tu Laixiu
Mend, the operation that certainly will be repeated, this is unnecessary, while can also reduce the efficiency of total algorithm.Therefore in this step,
When repairing of cut image is carried out using binary interpolation by continued-fractions technology, point to be repaired is only regarded breaking point by us, and
Not as breaking point, but using these points as known pixels point, they are taken other breaking points in original damaged figure
Pixel value be corresponding these points in initial repairing figure pixel value, then using existing interpolating function and interpolation window meter
Calculate the pixel value of point to be repaired.Why the step is so processed, and is to consider the relevance between image pixel, closer to
Similitude of the pixel of point to be repaired between them is bigger, therefore, other all pixels points around point to be repaired are all made
Being processed for known pixels point will certainly obtain closer to original pixel value.From the step process it has also been discovered that, due to handle
Other pixels in addition to point to be repaired are all as known pixels point, then how next point to be repaired determines just becomes
Obtain difficult, be accomplished by this when coordinating mask figure to use, the position of each breaking point is determined by mask artwork.
It is comprised the following steps:
(1) determination of bivariate interpolation sampled point.Initial repairing figure is read as A and as information matrix, by mask
Figure and initial repairing figure carry out overlap as A, get initial repairing figure as the to be repaired position of A, by point to be repaired (x,
Y) 16 known pixels information structure interpolating pixel points around;
16 pixels neighbouring around it are found to repairing point (x, y) search, according to the coordinate position of point to be repaired, according to
Secondary selection:
16 pixels are used as bivariate interpolation sampled point by more than.
It is herein the renewal that damaged information is carried out on the basis of initial repairing figure is as A, so, without using 3*3 interpolation
Window (i.e. 9 pixels), but processed using 4*4 interpolation window (i.e. 16 pixels), because 3*3 interpolation window and 4*
The effect that 4 interpolation windows are located herein is similar, meanwhile, the image block of 3*3 is divided the image into compared to the image for being divided into 4*4
For block, image block is more, and the number of times of the more algorithm performs of image block is more, so, from the point of view of standpoint of efficiency, using 16
Pixel is more suitable as sampled point.For the pixel of more than 16, the speed of continued fraction computing is slow, whole algorithm
Efficiency is low, is not suitable for using.
(2) renewal of breaking point pixel value.This is calculated by bivariate interpolation sampled point combination binary interpolation by continued-fractions function
The pixel value of breaking point, and update instead of original repairing figure as the pixel value of the point in A, it is comprised the following steps:
A, binary interpolation by continued-fractions form is defined as:
Wherein, i=0,1 ..., m, m, n are respectively the length and width of input picture;
Wherein,It is Newton-Thiele type blending differences;
The binary vector rational function of constructionMeet:
B, using 16 pixels around point (x, y) to be repaired as bivariate interpolation sampled point, i.e.,This is calculated with reference to binary vector rational function to treat
Repair the pixel value R of point2(x,y);
R2(x, y)=B0(y)+2B1(y)+2B2(y)-2B3(y),
Wherein, x0'=x-2, x1'=x-1, x2'=x+1, x3'=x+2, y0'=y+2, y1'=y+1, y2'=y-1, y3′
=y-2,
Wherein,
φNT[x0′,…,xi′;y0′,…,yj'], i=0,1,2,3, j=0,1,2,3 are the mixing of Newton-Thiele types
Difference coefficient,
x0'=x-2, x1'=x-1, x2'=x+1, x3'=x+2, y0'=y+2, y1'=y+1, y2'=y-1, y3'=y-2,
φ in above formulaNT[xi′;yj'] meet:φNT[xi′;yj']=f (xi′,yj'), wherein f (xi′,yj'), it is corresponding
Known pixels point (xi′,yj') pixel value;
C, by pixel value R2(x, y) replaces initial repairing figure as the pixel value R of the point in A1(x, y), it is to be repaired after renewal
The pixel value of point (x, y) is R2(x,y)。
(3) by from left to right, from top to bottom direction order to initial repairing figure as each point to be repaired of A enters
The determination step of row bivariate interpolation sampled point and the renewal step of breaking point pixel value, have obtained final repairing figure as B.
As shown in Fig. 2 a kind of system of the adapting to image method for repairing and mending based on interpolation by continued-fractions technology is also provided herein,
It includes:For determining the initialisation image input module of the type of input picture, for obtaining initial repairing figure as the one of A
First interpolation by continued-fractions repairs module and for obtaining final repairing figure as the binary interpolation by continued-fractions of B repairs module.
The output end of described initialisation image input module is connected with the input of unitary interpolation by continued-fractions repairing module,
The input that the output end of unitary interpolation by continued-fractions repairing module repairs module with binary interpolation by continued-fractions is connected.
It is illustrated in figure 3 picture to be repaired, the mask figure that Fig. 4 is used when being repairing.Repaiied by using unitary continued fraction
After compensating method (specific algorithm refers to document [1] [2]) treatment, as shown in figure 5, part modification has been carried out to picture damaged portion,
But parts against wear point is still suffered from not repair.Processed by using binary continued fraction method for repairing and mending (specific algorithm refers to document [3])
Afterwards, as shown in fig. 6, picture entirety visual effect and quality have been lifted.As shown in fig. 7, being repaiied using the method for the present invention
After benefit, hence it is evident that the detail recovery of scored portion it is more preferable, overall visual effect more preferably, the method compared with document [1] [2] [3] has
A greater degree of optimization and lifting.
It is higher compared to other three kinds of methods in order to embody efficiency of the invention, by the ratio of these four method run times
Relatively it is displayed in table 1.
The run time comparison sheet of the inventive method of table 1 and document [1] [2] [3] method
In order to show that effect of the invention more preferably, has more preferable lifting compared to another three kinds of methods, will be using assessment
The theoretical parameter of picture quality, i.e. Y-PSNR are used as the index evaluated, after the repairing of these four methods has been displayed in Table 2
Image Y-PSNR comparing.
Table 2 uses the inventive method and the comparison sheet of the Y-PSNR of document [1] [2] [3] method
It is compared from objective angle it can be found that according to formula
Here m × n is the size of matrix, and max=255, f (i, j) are original image,It is the image after repairing, using this formula
Calculate the value of Y-PSNR PSNR.Y-PSNR is bigger, shows image and original image after repairing closer to repairing
The image visual effect of benefit is better, and resolution ratio is higher.
As shown in table 2, the result of the Y-PSNR after being repaired using as above method to picture to be repaired, it can be found that
The result that Y-PSNR after present invention repairing compares art methods is substantially higher, and image resolution ratio and quality are higher.
As shown in table 1, the result of the run time repaired using as above method to picture to be repaired, in same operation ring
Operation art methods and the method for the present invention on the computer in border, and the run time of algorithm is recorded, it can be found that of the invention
Efficiency it is higher compared to binary continued fraction method for repairing and mending (i.e. the method for document [3]), because unitary continued fraction is in one-dimensional seat
Treatment on mark direction, thus efficiency will height for the binary continued fraction that two-dimensional coordinate direction is processed simultaneously.So, from
Overall angle estimator, it is of the invention compared to not only having preferable operation efficiency for prior art, while the picture matter of repairing
Amount is higher.
General principle of the invention, principal character and advantages of the present invention has been shown and described above.The technology of the industry
Personnel it should be appreciated that the present invention is not limited to the above embodiments, the simply present invention described in above-described embodiment and specification
Principle, various changes and modifications of the present invention are possible without departing from the spirit and scope of the present invention, these change and
Improvement is both fallen within the range of claimed invention.The protection domain of application claims by appending claims and its
Equivalent is defined.
Claims (5)
1. a kind of adapting to image method for repairing and mending based on interpolation by continued-fractions technology, it is characterised in that comprise the following steps:
11) initialisation image signature analysis, to be input into cut image be analyzed, judge the cut image be gray level image also
It is coloured image;If coloured image, then by the coloured image along tri- Color Channels of R, G, B respectively according to gray level image
Mode is performed;
12) repairing of cut image breaking point is carried out using unitary interpolation by continued-fractions technology, is obtained by the mask artwork being input into
The position of each point to be repaired in corresponding cut image, then the information matrix with the cut image detected line by line as target
These points to be repaired, for each the point self-adapted known pixels for selecting surrounding point to be repaired as sampled point, by these
Sampled point combination unitary continued fraction rational interpolation reconstructs the Pixel Information of each point to be repaired, obtains initial repairing figure as A;
13) repairing for cut image is carried out using binary interpolation by continued-fractions technology, using initial repairing figure as A as hum pattern
Picture, the position of each breaking point is determined by mask artwork, and binary interpolation by continued-fractions is used by the Pixel Information around breaking point
Renewal obtains the Pixel Information of each breaking point, obtains final repairing figure as B.
2. a kind of adapting to image method for repairing and mending based on interpolation by continued-fractions technology according to claim 1, its feature exists
In the described repairing for carrying out cut image breaking point using unitary interpolation by continued-fractions technology is comprised the following steps:
21) determination of cut image breaking point, be input into cut image mask artwork, mask artwork and cut image are carried out it is overlap,
Get the point to be repaired of cut image;
22) adaptively selected interpolation sampling point, reads the damaged information matrix of cut image, and self adaptation is selected to be repaired
This 4 known pixels points are constituted interpolation sampling point by 4 nearest known pixels points of point (x, y);
23) calculating of breaking point pixel value, the breaking point is calculated by 4 known pixels point combination unitary interpolation by continued-fractions functions
Pixel value, it is comprised the following steps:
231) unitary interpolation by continued-fractions form is defined as:
Wherein, bi=φ [x0,x1,…,xi;Y] (i=0 ... is m) function f (x, y) in point x0,x1,…,xiUnfavourable balance business, m is
The length of input picture, meets as follows:
φ[xi;Y]=f (xi;Y), i=0,1,2 ..., m,
232) calculated using the information combination unitary interpolation by continued-fractions function of 4 known pixels points around point (x, y) to be repaired
Go out the pixel value R of the point to be repaired1(x,y);
Wherein,
b0=φ [x0;Y]=f (x0;Y),
F (x in above formula0;y),f(x1;y),f(x2;y),f(x3;Y) 4 known pixels point (x are respectively0,y),(x1,y),(x2,
y),(x3, pixel value y), R1(x, y) is the pixel value of the point (x, y) to be repaired calculated;
24) according to each point to be repaired in direction sequence detection cut image from left to right, from top to bottom, carry out adaptive
The calculation procedure of interpolation sampling point step and breaking point pixel value should be selected, initial repairing figure is obtained as A.
3. a kind of adapting to image method for repairing and mending based on interpolation by continued-fractions technology according to claim 1, its feature exists
In described to carry out repairing for cut image using binary interpolation by continued-fractions technology and comprise the following steps:
31) determination of bivariate interpolation sampled point, reads initial repairing figure as A and as information matrix, by mask artwork with
Initial repairing figure is overlapped as A, initial repairing figure is got as the to be repaired position of A, by point (x, y) to be repaired week
The 16 known pixels information structure interpolating pixel points for enclosing;
16 pixels neighbouring around it are found to point (x, y) to be repaired search, according to the coordinate position of point to be repaired, successively
Selection:
(x-2,y+2)(x-2,y+1)(x-2,y-1)(x-2,y-2)
(x-1,y+2)(x-1,y+1)(x-1,y-1)(x-1,y-2)
(x+1, y+2) (x+1, y+1) (x+1, y-1) (x+1, y-2),
(x+2,y+2)(x+2,y+1)(x+2,y-1)(x+2,y-2)
16 pixels are used as bivariate interpolation sampled point by more than;
32) renewal of breaking point pixel value, the breakage is calculated by bivariate interpolation sampled point combination binary interpolation by continued-fractions function
The pixel value of point, and update instead of original repairing figure as the pixel value of the point in A, it is comprised the following steps:
321) binary interpolation by continued-fractions form is defined as:
Wherein, i=0,1 ..., m, m, n are respectively the length and width of input picture;
Wherein,It is Newton-Thiele type blending differences;
The binary vector rational function of constructionMeet:
322) using 16 pixels around point (x, y) to be repaired as bivariate interpolation sampled point, i.e.,
It is calculated with reference to binary vector rational function
The pixel value R of the point to be repaired2(x,y);
R2(x, y)=B0(y)+2B1(y)+2B2(y)-2B3(y),
Wherein, x '0=x-2, x '1=x-1, x '2=x+1, x '3=x+2, y '0=y+2, y '1=y+1, y '2=y-1, y '3=y-
2,
Wherein,
φNT[x′0,…,x′i;y′0,…,y′j], i=0,1,2,3, j=0,1,2,3 are that the mixing of Newton-Thiele types is poor
Business,
x′0=x-2, x '1=x-1, x '2=x+1, x '3=x+2, y '0=y+2, y '1=y+1, y '2=y-1, y '3=y-2,
φ in above formulaNT[x′i;y′j] meet:φNT[x′i;y′j]=f (x 'i,y′j), wherein f (x 'i,y′j), it is corresponding known
Pixel (x 'i,y′j) pixel value;
323) by pixel value R2(x, y) replaces initial repairing figure as the pixel value R of the point in A1(x, y), point to be repaired after renewal
The pixel value of (x, y) is R2(x,y);
33) from by from left to right, from top to bottom direction order to initial repairing figure as each point to be repaired of A is carried out
The determination step of bivariate interpolation sampled point and the renewal step of breaking point pixel value, have obtained final repairing figure as B.
4. a kind of adapting to image method for repairing and mending based on interpolation by continued-fractions technology according to claim 2, its feature exists
In described adaptively selected interpolation sampling point is comprised the following steps:
41) detected line by line by target of the damaged information matrix of cut image;
If 42) find point (x, y) to be repaired, then in the both sides of point (x, y) to be repaired colleague by damaged closely to remote search successively
Neighbouring not damaged pixel around point, the not damaged pixel that will be searched is used as a sampled point;
43) when searching unbroken pixel quantity and reaching 4, stop search, in the both sides of point (x, y) to be repaired colleague
4 effective sampling points are obtained.
5. the system of a kind of adapting to image method for repairing and mending based on interpolation by continued-fractions technology according to claim 1, its
It is characterised by, including:For determining the initialisation image input module of the type of input picture, for obtaining initial repairing figure
As the unitary interpolation by continued-fractions repairing module of A and for obtaining final repairing figure as the binary interpolation by continued-fractions of B repairs mould
Block;
The output end of described initialisation image input module is connected with the input of unitary interpolation by continued-fractions repairing module, unitary
The input that the output end of interpolation by continued-fractions repairing module repairs module with binary interpolation by continued-fractions is connected.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710119485.XA CN106846279B (en) | 2017-03-02 | 2017-03-02 | A kind of adapting to image method for repairing and mending and its system based on interpolation by continued-fractions technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710119485.XA CN106846279B (en) | 2017-03-02 | 2017-03-02 | A kind of adapting to image method for repairing and mending and its system based on interpolation by continued-fractions technology |
Publications (2)
Publication Number | Publication Date |
---|---|
CN106846279A true CN106846279A (en) | 2017-06-13 |
CN106846279B CN106846279B (en) | 2019-10-01 |
Family
ID=59137838
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710119485.XA Active CN106846279B (en) | 2017-03-02 | 2017-03-02 | A kind of adapting to image method for repairing and mending and its system based on interpolation by continued-fractions technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106846279B (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108885787A (en) * | 2018-07-06 | 2018-11-23 | 深圳前海达闼云端智能科技有限公司 | Method for training image restoration model, image restoration method, device, medium, and apparatus |
CN109472078A (en) * | 2018-10-31 | 2019-03-15 | 天津大学 | One kind detecting restorative procedure based on the 3D rendering defect sensor of 2 × 2 sub-array of pixels |
CN110766625A (en) * | 2019-10-15 | 2020-02-07 | 中国科学院光电技术研究所 | Method for rapidly filling digital image mask |
CN111292255A (en) * | 2020-01-10 | 2020-06-16 | 电子科技大学 | Filling and correcting technology based on RGB image |
CN111369452A (en) * | 2020-02-26 | 2020-07-03 | 青海民族大学 | Large-area image local damage point optimization extraction method |
CN111768357A (en) * | 2019-03-29 | 2020-10-13 | 银河水滴科技(北京)有限公司 | Image detection method and device |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104463793A (en) * | 2014-11-12 | 2015-03-25 | 合肥工业大学 | Video super-resolution reestablishing method and system based on sparse representation and vector continued fraction interpolation under polar coordinates |
CN105957038A (en) * | 2016-05-07 | 2016-09-21 | 安徽兆尹信息科技股份有限公司 | Damaged bank note image positive and negative repair method and damaged bank note image positive and negative repair system based on continued fraction interpolation technology |
-
2017
- 2017-03-02 CN CN201710119485.XA patent/CN106846279B/en active Active
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104463793A (en) * | 2014-11-12 | 2015-03-25 | 合肥工业大学 | Video super-resolution reestablishing method and system based on sparse representation and vector continued fraction interpolation under polar coordinates |
CN105957038A (en) * | 2016-05-07 | 2016-09-21 | 安徽兆尹信息科技股份有限公司 | Damaged bank note image positive and negative repair method and damaged bank note image positive and negative repair system based on continued fraction interpolation technology |
Non-Patent Citations (1)
Title |
---|
苏本跃等: "基于切触有理混合插值的自适应图像缩放算法", 《第四届全国几何设计与计算学术会议》 * |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108885787A (en) * | 2018-07-06 | 2018-11-23 | 深圳前海达闼云端智能科技有限公司 | Method for training image restoration model, image restoration method, device, medium, and apparatus |
CN108885787B (en) * | 2018-07-06 | 2021-11-05 | 达闼机器人有限公司 | Method for training image restoration model, image restoration method, device, medium, and apparatus |
CN109472078A (en) * | 2018-10-31 | 2019-03-15 | 天津大学 | One kind detecting restorative procedure based on the 3D rendering defect sensor of 2 × 2 sub-array of pixels |
CN109472078B (en) * | 2018-10-31 | 2023-05-09 | 天津大学 | 3D image sensor defect detection and repair method based on 2X 2 pixel subarray |
CN111768357A (en) * | 2019-03-29 | 2020-10-13 | 银河水滴科技(北京)有限公司 | Image detection method and device |
CN111768357B (en) * | 2019-03-29 | 2024-03-01 | 银河水滴科技(北京)有限公司 | Image detection method and device |
CN110766625A (en) * | 2019-10-15 | 2020-02-07 | 中国科学院光电技术研究所 | Method for rapidly filling digital image mask |
CN110766625B (en) * | 2019-10-15 | 2022-04-19 | 中国科学院光电技术研究所 | Method for rapidly filling digital image mask |
CN111292255A (en) * | 2020-01-10 | 2020-06-16 | 电子科技大学 | Filling and correcting technology based on RGB image |
CN111369452A (en) * | 2020-02-26 | 2020-07-03 | 青海民族大学 | Large-area image local damage point optimization extraction method |
Also Published As
Publication number | Publication date |
---|---|
CN106846279B (en) | 2019-10-01 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106846279A (en) | A kind of adapting to image method for repairing and mending and its system based on interpolation by continued-fractions technology | |
CN108416377B (en) | Information extraction method and device in histogram | |
CN102790841B (en) | Method of detecting and correcting digital images of books in the book spine area | |
CN101226631B (en) | Super-resolution image reconstruction method and apparatus | |
US6347156B1 (en) | Device, method and storage medium for recognizing a document image | |
US6233364B1 (en) | Method and system for detecting and tagging dust and scratches in a digital image | |
CN106506899B (en) | A kind of Image Acquisition based on machine vision and method for reconstructing and device | |
JP4908440B2 (en) | Image processing apparatus and method | |
CN108346135B (en) | Improved Criminisi image restoration method | |
CN109242858B (en) | Fabric printing cyclic pattern element segmentation method based on self-adaptive template matching | |
CN111696079B (en) | Surface defect detection method based on multitask learning | |
CN113240626A (en) | Neural network-based method for detecting and classifying concave-convex flaws of glass cover plate | |
CN109712071A (en) | Unmanned plane image mosaic and localization method based on track constraint | |
CN110728640A (en) | Double-channel single-image fine rain removing method | |
CN112215859B (en) | Texture boundary detection method based on deep learning and adjacency constraint | |
CN111179173B (en) | Image splicing method based on discrete wavelet transform and gradient fusion algorithm | |
CN115147418A (en) | Compression training method and device for defect detection model | |
CN113723472B (en) | Image classification method based on dynamic filtering constant-variation convolutional network model | |
CN110378167B (en) | Bar code image correction method based on deep learning | |
CN111612802A (en) | Re-optimization training method based on existing image semantic segmentation model and application | |
US5293471A (en) | Graphics processing system for deleting one of overlapping line and graphics images | |
CN114511862B (en) | Form identification method and device and electronic equipment | |
CN105957038B (en) | A kind of bank's breakage bill picture based on interpolation by continued-fractions technology is positive and negative to method for repairing and mending and its system | |
CN114299516A (en) | Processing method of table or text line, bill processing method, bill processing device and storage medium | |
CN106504201A (en) | A kind of stochastic searching rapid image repair system and method based on multiple dimensioned k neighbours |
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 |