CN107507136A - Digital picture based on Rank conversion repairs algorithm - Google Patents
Digital picture based on Rank conversion repairs algorithm Download PDFInfo
- Publication number
- CN107507136A CN107507136A CN201710575148.1A CN201710575148A CN107507136A CN 107507136 A CN107507136 A CN 107507136A CN 201710575148 A CN201710575148 A CN 201710575148A CN 107507136 A CN107507136 A CN 107507136A
- Authority
- CN
- China
- Prior art keywords
- repaired
- rank
- multiblock
- calculated
- value
- 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.)
- Pending
Links
- 238000006243 chemical reaction Methods 0.000 title claims abstract description 23
- 238000004422 calculation algorithm Methods 0.000 title claims abstract description 20
- 230000008439 repair process Effects 0.000 title claims abstract description 20
- 238000005259 measurement Methods 0.000 claims abstract description 16
- 230000002146 bilateral effect Effects 0.000 claims abstract description 13
- 238000001914 filtration Methods 0.000 claims abstract description 13
- 230000006872 improvement Effects 0.000 claims abstract description 8
- 230000009466 transformation Effects 0.000 claims abstract description 8
- 238000006116 polymerization reaction Methods 0.000 claims description 10
- 238000004364 calculation method Methods 0.000 claims description 4
- 230000000694 effects Effects 0.000 description 9
- 238000000034 method Methods 0.000 description 5
- 235000013399 edible fruits Nutrition 0.000 description 2
- 230000015572 biosynthetic process Effects 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012913 prioritisation Methods 0.000 description 1
- 238000012545 processing Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
- 238000003786 synthesis reaction Methods 0.000 description 1
- 238000012360 testing method Methods 0.000 description 1
- 230000000007 visual effect Effects 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
Abstract
The present invention relates to a kind of digital picture based on Rank conversion to repair algorithm, including:For breakage image I to be repaired, its gradient information ▽ I are calculated, the principle according to bilateral filtering calculates the bilateral filtering weighted value W of each pixel in I, while carries out Rank conversion to breakage image I, obtains transformation results RI, and the Rank conversion after being polymerizeRepaired to repairing breakage image I damaged area;Calculate luminance difference between multiblock to be repaired and match block, gradient disparities, Rank differences, then blocks and optimal matching blocks ω (q are calculated using the similarity measurements flow function after improvement as the similarity measurements flow function after improving in the result obtained after above-mentioned three species diversity value being carried out into linear combination*), complete multiblock ω (p to be repaired*) reparation.
Description
Technical field
The invention belongs to computer picture to restore field, available for historical relic's protection, video display special effect making etc..
Background technology
Digital Image Inpainting is the study hotspot in image processing field, and how it utilizes figure to be repaired if mainly being studied
As the intact information of surrounding is filled reparation to damaged area, and then the reparation of image is completed, while ensure the effect repaired
In subjective vision effect naturally rationally.It is numerous that the technology can be applied to the reparation of older picture, the removal of captions, visual effect etc.
Field, there is important Research Significance and value.
Digital Image Inpainting conventional at this stage is the algorithm based on traditional sample block reparation, the main basis of the algorithm
Complex pattern damaged area to be repaired and neighbouring intact area information calculate the priority repaired, the maximum pixel of selecting priority
Point starts to repair, and priority essentially dictates the order of reparation, it is determined that, it is necessary to pass through similarity measurements flow function after repairing order
Carry out multiblock to be repaired to be matched with numerous possible match blocks, select matching degree highest match block to carry out to be repaired piece
The filling and synthesis of texture.Traditional digital picture based on sample block reparation repairs algorithm and generally selects minimum absolute difference square
With SSD criterions as unique similarity measurements flow function, and blocks and optimal matching blocks, the matching criterior mistake that the method uses are found with this
In influence that is single, and being vulnerable to noise, the robustness of algorithm is relatively low, is also easy to produce the phenomenon of error hiding and then causes repairing for image
Multiple junction fruit produces a certain degree of deviation.
The content of the invention
The present invention repairs the problem of algorithm is present for digital picture of the tradition based on sample block and proposes that one kind is based on Rank
The digital picture of conversion repairs algorithm, and algorithm is applied to phase by carrying out Rank conversion to breakage image to be repaired
Like property metric function calculating in obtain more accurate measurement criterion, finally realize the image repair effect of high accuracy.
Technical scheme is as follows:
A kind of digital picture based on Rank conversion repairs algorithm, comprises the following steps:
(1) for breakage image I to be repaired, its gradient information ▽ I are calculated, the principle according to bilateral filtering calculates every in I
The bilateral filtering weighted value W of individual pixel, while Rank conversion is carried out to breakage image I, obtain transformation results RI, and will be bilateral
Filtering weighting value W and transformation results RIIt is multiplied, and the value that above-mentioned multiplication obtains is polymerize in stationary window, is polymerize
Rank conversion afterwards
(2) repair to repairing breakage image I damaged area, calculated first using the digital picture reparation based on sample block
Priority calculation in method calculates target pixel points p priority P (p), is then calculated according to maximum priority principle
The target pixel points p maximum to priority*, and its corresponding object block is labeled as multiblock ω (p to be repaired*);
(3) multiblock ω (p to be repaired are calculated*) brightness value I (ω (p*)), Grad ▽ I (ω (p*)), polymerization after Rank
Transformed valueAfter the brightness value I (ω (q)), Grad ▽ I (ω (q)), polymerization that calculate match block ω (q) simultaneously
Rank transformed values
(4) according to formula cI(ω(p*), ω (q))=min (| I (ω (p*))-I(ω(q))|,τ1) calculate multiblock to be repaired
Luminance difference c between match blockI(ω(p*), ω (q)), wherein τ1For constant,
According to formula c▽I(ω(p*), ω (q))=min (| ▽ I (ω (p*))-▽I(ω(q))|,τ2) calculate it is to be repaired
Gradient disparities c between block and match block▽I(ω(p*), ω (q)), wherein τ2For constant,
According to formulaMultiblock to be repaired is calculated with matching
Rank differences between blockWherein τ3For constant, after above-mentioned three species diversity value then is carried out into linear combination
Obtained result is calculated optimal as the similarity measurements flow function after improving using the similarity measurements flow function after improvement
With block ω (q*), complete multiblock ω (p to be repaired*) reparation;
(5) by ω (p*) region is rejected from damaged area, and repeat step (2)~(4) are until damaged area is empty set
When complete reparation to breakage image I to be repaired.
In a word, the present invention repairs deficiency existing for algorithm for digital picture of the tradition based on sample block, it is proposed that a kind of
Based on Rank conversion digital picture repair algorithm, using the luminance difference between multiblock to be repaired and match block, gradient disparities with
And Rank transformed differences set relatively reasonable similarity measurements flow function, and the image repair knot of high accuracy is realized with this
Fruit.The present invention can obtain more rational digital picture repairing effect, there is relatively broad application prospect.
Brief description of the drawings
The digital picture based on Rank conversion of Fig. 1 present invention repairs algorithm flow chart.
Fig. 2 is that the present invention contrasts with digital picture reparation algorithm of the tradition based on sample block to the repairing effect of image, its
In:
Scheme (a) breakage image to be repaired (red area represents damaged area);
It is the repairing effect that digital picture of the tradition based on sample block repairs algorithm to scheme (b);
It is the inventive method repairing effect to scheme (c).
Embodiment
Digital picture of the present invention based on Rank conversion repairs algorithm, is mainly made up of two parts:Breakage image to be repaired
Rank conversion and polymerization, the improvement of similarity measurements flow function.Specific steps and principle are as follows:
101:The Rank conversion and polymerization of breakage image to be repaired;
For breakage image I to be repaired, its gradient information ▽ I are calculated, the principle according to bilateral filtering is each pixel in I
Point sets weighted value, while carries out Rank conversion to breakage image I, obtains transformation results RI, and conversion is tied according to weighted value
Fruit RIIt is polymerize, the Rank conversion after being polymerize
Pixel centered on wherein i;J is pixel, size ω centered on i1Window in any pixel;K is
The pixel centered on i, size ω2Window in any pixel;δ is piecewise function;W (k) is that the bilateral filtering of k points is weighed
Weight values, α, β are constant.
102:Breakage image I to be repaired relevant range mark;
Breakage image I to be repaired damaged area is Ω, and edge isTarget pixel points p isOn any point,
Source region is Φ, and meets relation Φ+Ω=I.
103:The calculating of prioritization functions;
P (p)=C (p) D (p)
Wherein P (p) be target pixel points p priority, C (p) be target pixel points p confidence item, ω (p) be using p as
Central pixel point, the object block that any pixel that window size is ω forms;V is ω (p) and the picture in source region Φ common factor
Vegetarian refreshments;D (p) is target pixel points p data item;▽I⊥(p) isophote direction of the p points in I, ▽ are representedxI、▽yI distinguishes
For I level, the gradient of vertical direction;T (p) is the normal vector of tangent line of the damaged boundary at p.
Calculate the maximum point p of target pixel points priority*:
The maximum point p of priority*Corresponding object block ω (p*) it is multiblock to be repaired.
104:The improvement of similarity measurements flow function calculates
Multiblock ω (p to be repaired are calculated first*) brightness value I (ω (p*)), Grad ▽ I (ω (p*)), polymerization after Rank
Transformed valueAfter the brightness value I (ω (q)), Grad ▽ I (ω (q)), polymerization that calculate match block ω (q) simultaneously
Rank transformed valuesQ is that source region is any pixel in Φ, is then calculated between multiblock to be repaired and match block
Luminance difference cI(ω(p*), ω (q)), gradient disparities c▽I(ω(p*), ω (q)), Rank differences
cI(ω(p*), ω (q))=min (| I (ω (p*))-I(ω(q))|,τ1)
c▽I(ω(p*), ω (q))=min (| ▽ I (ω (p*))-▽I(ω(q))|,τ2)
Wherein τ1、τ2、τ3For constant.
Above-mentioned three species diversity value is subjected to the similarity measurements flow function c (ω (p after linear combination generation improves*),ω
(q))。
Wherein λ1、λ2、λ3For weight constant.
105:The filling reparation of multiblock to be repaired;
Blocks and optimal matching blocks ω (q are found using the similarity measurements flow function after improvement*), complete object block ω (p*) reparation:
Wherein, q*For Optimum Matching point.
Then to the multiblock ω (p to be repaired of breakage*) be filled reparation, i.e.,:
I(ω(p*) ∩ Ω)=I (ω (q*))
Then update damaged area and source region, respectively obtain new damaged area Ω ' and new source region Φ ' i.e.:
Ω '=Ω-(ω (p*)∩Ω)
Φ '=Φ+(ω (p*)∩Ω)
New source region is again marked as source region again, i.e.,:
Ω=Ω '
Φ=Φ '
According to below equation to having repaired the confidence value of respective pixel point in sample block:
C(ω(p*) ∩ Ω)=C (p*)
106:102-105 steps are repeated, until damaged area is empty set, complete the reparation of image.
Obtain final image repair result.
Tested below with specific to verify the feasibility of this method, it is described below:
Result of the test is that this method in CPU is Intel i7-3610QM, 2.3GHz, inside saves as 16G notebook computer
Obtained by upper operation, operating system is Windows 7, and simulation software is 64 Matlab R2012b.
From figure 2 it can be seen that algorithm is repaired in armrests region using traditional digital picture based on sample block
Phenomenon is repaired by mistake in the presence of obvious, and the repairing effect that the present invention obtains is more naturally reasonable.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, the embodiments of the present invention
Sequence number is for illustration only, does not represent the quality of embodiment.
The foregoing is only presently preferred embodiments of the present invention, be not intended to limit the invention, it is all the present invention spirit and
Within principle, any modification, equivalent substitution and improvements made etc., it should be included in the scope of the protection.
The idiographic flow of the present invention is as follows:
(1) for breakage image I to be repaired, its gradient information ▽ I are calculated, the principle according to bilateral filtering calculates every in I
The bilateral filtering weighted value W of individual pixel, while Rank conversion is carried out to breakage image I, obtain transformation results RI, and will be bilateral
Filtering weighting value W and transformation results RIIt is multiplied, and the value that above-mentioned multiplication obtains is polymerize in stationary window, is polymerize
Rank conversion afterwards
(2) repair to repairing breakage image I damaged area, repaiied first using traditional digital picture based on sample block
Priority calculation in double calculation method calculates target pixel points p priority P (p), then according to maximum priority principle meter
Calculate and obtain the maximum target pixel points p of priority*, and its corresponding object block is labeled as multiblock ω (p to be repaired*);
(3) multiblock ω (p to be repaired are calculated*) brightness value I (ω (p*)), Grad ▽ I (ω (p*)), polymerization after Rank
Transformed valueAfter the brightness value I (ω (q)), Grad ▽ I (ω (q)), polymerization that calculate match block ω (q) simultaneously
Rank transformed values
(4) according to formula cI(ω(p*), ω (q))=min (| I (ω (p*))-I(ω(q))|,τ1) calculate multiblock to be repaired
Luminance difference c between match blockI(ω(p*), ω (q)), wherein τ1For constant,
According to formula c▽I(ω(p*), ω (q))=min (| ▽ I (ω (p*))-▽I(ω(q))|,τ2) calculate it is to be repaired
Gradient disparities c between block and match block▽I(ω(p*), ω (q)), wherein τ2For constant,
According to formulaMultiblock to be repaired is calculated with matching
Rank differences between blockWherein τ3For constant, after above-mentioned three species diversity value then is carried out into linear combination
Obtained result is calculated optimal as the similarity measurements flow function after improving using the similarity measurements flow function after improvement
With block ω (q*), complete multiblock ω (p to be repaired*) reparation;
(5) by ω (p*) region is rejected from damaged area, and repeat step (2)~(4) are until damaged area is empty set
When complete reparation to breakage image I to be repaired.
Claims (1)
1. a kind of digital picture based on Rank conversion repairs algorithm, comprise the following steps:
(1) for breakage image I to be repaired, its gradient information is calculatedPrinciple according to bilateral filtering calculates each pixel in I
The bilateral filtering weighted value W of point, while Rank conversion is carried out to breakage image I, obtain transformation results RI, and bilateral filtering is weighed
Weight values W and transformation results RIIt is multiplied, and the value that above-mentioned multiplication obtains is polymerize in stationary window, after is polymerize
Rank is converted
(2) repair to repairing breakage image I damaged area, repaired first using the digital picture based on sample block in algorithm
Priority calculation calculate target pixel points p priority P (p), be then calculated according to maximum priority principle excellent
First weigh the target pixel points p of maximum*, and its corresponding object block is labeled as multiblock ω (p to be repaired*);
(3) multiblock ω (p to be repaired are calculated*) brightness value I (ω (p*)), GradRank transformed values after polymerizationMatch block ω (q) brightness value I (ω (q)), Grad is calculated simultaneouslyRank conversion after polymerization
Value
(4) according to formula cI(ω(p*), ω (q))=min (| I (ω (p*))-I(ω(q))|,τ1) multiblock to be repaired is calculated with matching
Luminance difference c between blockI(ω(p*), ω (q)), wherein τ1For constant,
According to formulaCalculate between multiblock to be repaired and match block
Gradient disparitiesWherein τ2For constant,
According to formulaCalculate multiblock to be repaired and match block it
Between Rank differencesWherein τ3For constant, obtained after above-mentioned three species diversity value then is carried out into linear combination
Result as improve after similarity measurements flow function, blocks and optimal matching blocks are calculated using the similarity measurements flow function after improvement
ω(q*), complete multiblock ω (p to be repaired*) reparation;
(5) by ω (p*) region is rejected from damaged area, and repeat step (2)~(4) are until damaged area has been when being empty set
Paired breakage image I to be repaired reparation.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710575148.1A CN107507136A (en) | 2017-07-14 | 2017-07-14 | Digital picture based on Rank conversion repairs algorithm |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710575148.1A CN107507136A (en) | 2017-07-14 | 2017-07-14 | Digital picture based on Rank conversion repairs algorithm |
Publications (1)
Publication Number | Publication Date |
---|---|
CN107507136A true CN107507136A (en) | 2017-12-22 |
Family
ID=60679644
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710575148.1A Pending CN107507136A (en) | 2017-07-14 | 2017-07-14 | Digital picture based on Rank conversion repairs algorithm |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN107507136A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10005822A1 (en) * | 2000-02-10 | 2001-08-30 | Xenia Bruehn | Calculating a signal transformation, involves computing difference histograms for use with another window, then adds or substracts corresponding values from predecessor window |
CN104200444A (en) * | 2014-09-25 | 2014-12-10 | 西北民族大学 | Image restoring method based on symmetric sample pieces |
CN106204503A (en) * | 2016-09-08 | 2016-12-07 | 天津大学 | Based on improving confidence level renewal function and the image repair algorithm of matching criterior |
-
2017
- 2017-07-14 CN CN201710575148.1A patent/CN107507136A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
DE10005822A1 (en) * | 2000-02-10 | 2001-08-30 | Xenia Bruehn | Calculating a signal transformation, involves computing difference histograms for use with another window, then adds or substracts corresponding values from predecessor window |
CN104200444A (en) * | 2014-09-25 | 2014-12-10 | 西北民族大学 | Image restoring method based on symmetric sample pieces |
CN106204503A (en) * | 2016-09-08 | 2016-12-07 | 天津大学 | Based on improving confidence level renewal function and the image repair algorithm of matching criterior |
Non-Patent Citations (1)
Title |
---|
马璇等: "一种基于改进Rank 变换的图像匹配算法", 《传感器与微系统》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106204503B (en) | Based on the image repair algorithm for improving confidence level renewal function and matching criterior | |
US8392347B2 (en) | Coating color database creating method, search method using the database, their system, program, and recording medium | |
CN103325095B (en) | A kind of openness image repair method of sample block of the bonding position factor | |
CN101916436B (en) | Multi-scale spatial projecting and remote sensing image fusing method | |
JP6612196B2 (en) | Rock Strength Judging Device, Rock Strength Judging Method, and Rock Strength Judging Program | |
CN103810739B (en) | A kind of generation method of pictograph metamorphic animation | |
CN104537625A (en) | Bayer color image interpolation method based on direction flag bits | |
CN104933738B (en) | A kind of visual saliency map generation method detected based on partial structurtes with contrast | |
CN107680140A (en) | A kind of depth image high-resolution reconstruction method based on Kinect cameras | |
CN108010024A (en) | It is a kind of blind with reference to tone mapping graph image quality evaluation method | |
CN106530271A (en) | Infrared image significance detection method | |
CN104036493B (en) | No-reference image quality evaluation method based on multifractal spectrum | |
CN106355607B (en) | A kind of width baseline color image template matching method | |
CN103839271B (en) | A kind of image texture synthetic method based on optimal coupling | |
CN109308715A (en) | A kind of optical imagery method for registering combined based on point feature and line feature | |
JP2019204193A (en) | Image processing device, image processing method, and program | |
CN109035155A (en) | A kind of more exposure image fusion methods of halation removal | |
CN106530247A (en) | Multi-scale image restoring algorithm based on structure information | |
CN110334581A (en) | A kind of multi-source Remote Sensing Images change detecting method | |
CN105469392A (en) | High spectral image significance detection method based on regional spectrum gradient characteristic comparison | |
CN107369138B (en) | Image optimization display method based on high-order statistical model | |
CN104992433B (en) | The method and device of multi-spectral image registration based on line match | |
CN104298980B (en) | A kind of finger print matching method and device based on smart card | |
CN106096615A (en) | A kind of salient region of image extracting method based on random walk | |
CN107507136A (en) | Digital picture based on Rank conversion repairs algorithm |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20171222 |
|
RJ01 | Rejection of invention patent application after publication |