CN106327432A - Image restoration method and device based on offset quantity - Google Patents
Image restoration method and device based on offset quantity Download PDFInfo
- Publication number
- CN106327432A CN106327432A CN201510340991.2A CN201510340991A CN106327432A CN 106327432 A CN106327432 A CN 106327432A CN 201510340991 A CN201510340991 A CN 201510340991A CN 106327432 A CN106327432 A CN 106327432A
- Authority
- CN
- China
- Prior art keywords
- image
- image block
- target image
- target
- play amount
- 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
Landscapes
- Image Processing (AREA)
Abstract
The invention provides an image restoration method and device based on offset quantity. The method comprises the steps of forming an image cube by a to-be-restored target image and an image in an image library; dividing all images in the image cub into image blocks and obtaining a target image block of the target image and the image block of the image; obtaining a dominant offset quantity of the image block of a known region in the target image, wherein the dominant offset quantity is a statistic set of a plurality of offset quantities of the image blocks similar to the image block of the known region; restoring pixels of a missed region in the target image by employing an energy equation distribution strategy according to the dominant offset quantity, thereby obtaining a restored target image, wherein the target image comprises the known region and the missed region. According to the method and the device, the structure information of the target image is described effectively, extra information of the image library can be imported, and the restoration structure of the target image is more natural.
Description
Technical field
The present invention relates to technical field of image processing, particularly relate to a kind of image based on side-play amount
Restorative procedure and device.
Background technology
Image repair is lack part in a kind of process image, by lack part completion, and makes to repair
Result after Fu looks natural technology.Utilize image repair technology, image can be completed dirty
Point is removed, panorama picture formation, textures synthesis, removes watermark, and cultural relics and historic sites picture reparation etc. should
With, video field can also be applied to simultaneously, carry out real border and merge, remove the complicated behaviour such as captions
Make.
Seriality based on picture structure, an existing scheme is will to be lacked by partial differential equation
The known color of mistake portion outboard travels to lack part and repairs.This scheme can effectively keep
The original structure of image, but it is only applicable to less absent region, if absent region is relatively big,
The result then repaired can obscure shortage details.
Self-similarity based on image, an existing scheme is to seek along the edge of lack part
Look for similar block, the pixel value of similar block is filled up into, the most gradually complete repair process.
This scheme also can keep details to bigger absent region, but Greedy strategy is often absorbed in
Locally optimal solution, it is impossible to effectively keep the seriality of picture structure.
On the other hand, when single image is repaired, if target image loses information too much,
Lack enough useful informations, also can bring difficulty to repair.So image repair needs
Key problems-solving is in the face of bigger absent region and not enough useful information, how to repair
Keep the structural continuity of image during Fu, and make reparation result look nature.
Summary of the invention
For defect of the prior art, the present invention provides a kind of image based on side-play amount to repair
Multiple method and device, the method can effectively describe the structural information of target image, can draw again
Enter the extraneous information of image library, make target image repair structure more natural.
First aspect, the present invention provides a kind of image repair method based on side-play amount, including:
By the image in target image to be repaired and image library, pie graph picture cube;
To the image block that each image division is partly overlapping r × r in image cube, obtain
Obtaining target image block and the image block of image of target image, r is the natural number more than 1;
Obtain the leading side-play amount of the image block of known region in described target image;Described master
Lead the similar image block of the image block to described known region that side-play amount is statistics some partially
The set of shifting amount;
According to described leading side-play amount, use energy equation allocation strategy to described target image
The pixel of middle absent region is repaired, and obtains the target image after repairing;
Described target image includes known region and absent region.
Alternatively, obtain the leading side-play amount of the image block of known region in described target image,
Step include:
For each target image block in described known region, in described image cube
Search the image block most like with this target image block;
Obtain the skew of each target image block image block most like with this target image block
Amount;
Use statistical by described for selected part side-play amount combination in all side-play amounts leading inclined
Shifting amount.
Alternatively, for each target image block in described known region, at described figure
As cube in search the image block most like with this target image block, step include:
Use formula (1) to calculate the difference degree between two image blocks, stand at described image
Side search minimum with each target image block difference degree as most like image
Block;
Wherein, ΨxRepresent in the known region of described target image point centered by pixel value x
Target image block, ΨyFor in described image cube centered by pixel value y point image block,Being gradient operator, β represents the color item in equation of equilibrium (1) and the balance of gradient terms
Coefficient.
Alternatively, the image that each target image block is most like with this target image block is obtained
The side-play amount of block, step include:
For target image block ΨxThe most like image block Ψ foundy, form similar block pair
(Ψx,Ψy), if x=is (x1,y1), y=(x2,y2), and ΨyBelong to the I in described image cubek
Image, then Ψx, ΨyBetween relative dimensional side-play amount be s=(x2-x1,y2-y1,k)。
Alternatively, use statistical by selected part side-play amount combination institute in all side-play amounts
State leading side-play amount, step include:
For all relative dimensional side-play amounts of all target image block of described known region,
Extract the occurrence number leading side-play amount of relative dimensional side-play amount composition more than predetermined threshold value
S={s1,s2,…,sN};
Or,
For all relative dimensional side-play amounts of all target image block of described known region,
Extract N number of relative dimensional side-play amount that occurrence number is most, the leading side-play amount of composition
S={s1,s2,…,sN}。
Alternatively, described according to described leading side-play amount, use energy equation allocation strategy pair
In described target image, the pixel of absent region is repaired, and obtains the target figure after repairing
Picture, step include:
Formula (2) is used to determine in described absent region selected by each target pixel points x
Repairing pixel point x+sL(x), described repairing pixel point is that target pixel points is along 3-D migration
Pixel in the image cube that amount is pointed to;
For each target pixel points x in absent region, distribute one for this target pixel points x
Individual leading side-play amount sL(x), by pixel x+s in described image cubeL(x)Value replace this target
Pixel x, it is thus achieved that the target image after reparation;Described target pixel points is target image block
Central pixel point, pixel is the central pixel point of image block;
Wherein,
L represents a kind of method of salary distribution, shows that the pixel to being positioned at x in absent region distributes L
(x) individual leading side-play amount sL(x), E (L) is for weighing the quality of the described method of salary distribution, N4
Being four neighborhoods, α represents for balancing smooth item EsWith data item EdCoefficient of balance,
Es(L (x), L (y)) is smooth item, Ed(L (x)) is data item.
Second aspect, the present invention also provides for a kind of image fixing apparatus based on side-play amount, bag
Include:
Image cube Component units, for by the figure in target image to be repaired and image library
Picture, pie graph picture cube;
Image block division unit, being used for each image division in image cube is part
The image block of overlapping r × r, it is thus achieved that the target image block of target image and the image block of image,
R is the natural number more than 1;
Leading side-play amount acquiring unit, for obtaining the figure of known region in described target image
Leading side-play amount as block;Described leading side-play amount is the figure with described known region of statistics
The set of some side-play amounts of the image block that picture block is similar;
Repair unit, for according to described leading side-play amount, use energy equation allocation strategy
The pixel of absent region in described target image is repaired, obtains the target after repairing
Image;
Described target image includes known region and absent region.
Alternatively, leading side-play amount acquiring unit, specifically for
For each target image block in described known region, in described image cube
Search the image block most like with this target image block;
Obtain the skew of each target image block image block most like with this target image block
Amount;
Use statistical by described for selected part side-play amount combination in all side-play amounts leading inclined
Shifting amount.
Alternatively, leading side-play amount acquiring unit, specifically for
Use formula (1) to calculate the difference degree between two image blocks, stand at described image
Side search minimum with each target image block difference degree as most like image
Block;
Wherein, ΨxRepresent in the known region of described target image point centered by pixel value x
Target image block, ΨyFor in described image cube centered by pixel value y point image block,Being gradient operator, β represents the color item in equation of equilibrium (1) and the balance of gradient terms
Coefficient;
For target image block ΨxThe most like image block Ψ foundy, form similar block pair
(Ψx,Ψy), if x=is (x1,y1), y=(x2,y2), and ΨyBelong to the I in described image cubek
Image, then Ψx, ΨyBetween relative dimensional side-play amount be s=(x2-x1,y2-y1,k);
For all relative dimensional side-play amounts of all target image block of described known region,
Extract the occurrence number leading side-play amount of relative dimensional side-play amount composition more than predetermined threshold value
S={s1,s2,…,sN};
Or,
For all relative dimensional side-play amounts of all target image block of described known region,
Extract N number of relative dimensional side-play amount that occurrence number is most, the leading side-play amount of composition
S={s1,s2,…,sN}。
Alternatively, described reparation unit, specifically for
Formula (2) is used to determine in described absent region selected by each target pixel points x
Repairing pixel point x+sL(x), described repairing pixel point is that target pixel points is along 3-D migration
Pixel in the image cube that amount is pointed to;
For each target pixel points x in absent region, distribute one for this target pixel points x
Individual leading side-play amount sL(x), by pixel x+s in described image cubeL(x)Value replace this target
Pixel x, it is thus achieved that the target image after reparation, described target pixel points is target image block
Central pixel point, pixel is the central pixel point of image block;
Wherein,
L represents a kind of method of salary distribution, shows that the pixel to being positioned at x in absent region distributes L
(x) individual leading side-play amount sL(x), E (L) is for weighing the quality of the described method of salary distribution, N4
Being four neighborhoods, α represents for balancing smooth item EsWith data item EdCoefficient of balance,
Es(L (x), L (y)) is smooth item, Ed(L (x)) is data item.
As shown from the above technical solution, the image repair method based on side-play amount of the present invention and dress
Put, by image cube, obtain leading side-play amount, and then obtain the target image after repairing,
The method can effectively describe the structural information of target image, can introduce again the extra letter of image library
Breath, is conducive to keeping the seriality of target image structure, improves the subjective vision repairing result
Quality, makes target image repair structure more natural.
Accompanying drawing explanation
By reading the detailed description of hereafter preferred implementation, various other advantage and benefit
Those of ordinary skill in the art be will be clear from understanding.Accompanying drawing is only used for illustrating and is preferable to carry out
The purpose of mode, and it is not considered as limitation of the present invention.And in whole accompanying drawing, use
Identical reference marks represents identical parts.In the accompanying drawings:
The flow process of the image repair method based on side-play amount that Fig. 1 provides for one embodiment of the invention
Schematic diagram;
The schematic diagram of the image repair method that Fig. 2 provides for one embodiment of the invention;
The knot of the image fixing apparatus based on side-play amount that Fig. 3 provides for another embodiment of the present invention
Structure schematic diagram.
Detailed description of the invention
Embodiments of the invention are described below in detail, and the example of described embodiment is shown in the accompanying drawings
Going out, the most same or similar label represents same or similar element or has phase
With or the element of similar functions.The embodiment described below with reference to accompanying drawing is exemplary,
It is only used for explaining the present invention, and is not construed as limiting the claims.
Those skilled in the art of the present technique are appreciated that unless expressly stated, odd number used herein
Form " one ", " one ", " described " and " being somebody's turn to do " may also comprise plural form.Should manage further
Solving, the wording used in the description of the present invention " includes " referring to existing described feature, whole
Number, step, operation, element and/or assembly, but it is not excluded that existence or add one or
Other features multiple, integer, step, operation, element, assembly and/or their group.
Those skilled in the art of the present technique are appreciated that unless otherwise defined, used herein all
Term (includes technical term and scientific terminology), and have with art of the present invention is common
Technical staff is commonly understood by identical meaning.Should also be understood that in such as general dictionary
Those terms of definition, it should be understood that have and the meaning one in the context of prior art
The meaning caused, and unless by specific definitions, otherwise will not be with idealization or the most formal containing
Justice is explained.
Fig. 1 shows the image repair method based on side-play amount that one embodiment of the invention provides
Schematic flow sheet, Fig. 2 shows showing of the image repair method that one embodiment of the invention provides
It is intended to, shown in Fig. 1 and Fig. 2, the image repair method based on side-play amount of the present embodiment
Comprise the steps:
101, by the image I in target image to be repaired and image library1~Iw, pie graph picture stands
Side C={I0,I1,…,Iw};
102, to the image that each image division is partly overlapping r × r in image cube
Block, it is thus achieved that the target image block of target image and the image block of image, r is the nature more than 1
Number.
In the present embodiment, can be to each image in image cube, with the most each picture
Vegetarian refreshments is the upper left corner of block, divides an image into the image block of can be overlapping 8 × 8, it is thus achieved that mesh
The target image block of logo image and the image block of image;The preferred r of the present embodiment is 8,10,16
Deng.
In the present embodiment, the position of target image block is by the center pixel of this target image block
Point represents, the pixel value of target image block is the picture of the internal all pixels of this target image block
The set of element value;The position of image block is represented by the central pixel point of this target image block, figure
As the pixel value of block is the set of the pixel value of all pixels inside this target image block.
103, the leading side-play amount of the image block of known region in described target image is obtained;Institute
If stating the similar image block of the image block to described known region that leading side-play amount is statistics
The set of dry side-play amount;
In the present embodiment, described target image includes known region Φ and absent region Ω.
104, according to described leading side-play amount, use energy equation allocation strategy to described target
In image, the pixel of absent region is repaired, and obtains the target image after repairing.
Such as: definition energy equation (equation below (2)) describes the quality of image repair,
Solving energy equation, obtain optimum distributes a leading side-play amount for each unknown pixel
Strategy, then known pixel values corresponding for side-play amount is filled up the unknown pixel of absent region.
It will be appreciated that during the image repair of the present embodiment, use and use known pixel values
Repair unknown pixel, be not to repair target image block with known image block block.In the present embodiment
Image block/the target image block of aforementioned division is overlapped, and each pixel occurs in some
In individual block, it is not easily repaired based on image block.
The image repair method based on side-play amount of the present embodiment, by image cube, obtains
Leading side-play amount, and then obtain the target image after repairing, the method can effectively describe mesh
The structural information of logo image, can introduce again the extraneous information of image library, is conducive to keeping target
The seriality of picture structure, improves the subjective visual quality repairing result, makes target image
Repair structure more natural.
In actual applications, abovementioned steps 103 may particularly include the son not shown in following figure
Step 1031 is to sub-step 1033:
1031, for each target image block in described known region, at described image
The image block most like with this target image block is searched in cube;
Such as: use formula (1) to calculate the difference degree between two image blocks, described
Image cube is searched minimum with each target image block difference degree as most like
Image block;
Wherein, during Ψ x represents the known region of described target image centered by pixel value x point
Target image block, Ψ y be in described image cube centered by pixel value y point image block,Being gradient operator, β represents the color item in equation of equilibrium (1) and the balance of gradient terms
Coefficient, d (Ψx,Ψy) it is difference (Ψx,Ψy)。
1032, the image block that each target image block is most like with this target image block is obtained
Side-play amount;
For example, for target image block ΨxThe most like image block Ψ foundy, group
Become similar block to (Ψx,Ψy), if x=is (x1,y1), y=(x2,y2), and ΨyBelong to described image to stand
I in sidekImage, then Ψx, ΨyBetween relative dimensional side-play amount be s=(x2-x1,y2-y1,
k)。
1033, use statistical by described for selected part side-play amount combination in all side-play amounts
Leading side-play amount.
Such as, all relative dimensional for all target image block of described known region are inclined
Shifting amount, extracts the occurrence number leading skew of relative dimensional side-play amount composition more than predetermined threshold value
Amount S={s1,s2,…,sN};
Or, all relative dimensional for all target image block of described known region are inclined
Shifting amount, extracts N number of relative dimensional side-play amount that occurrence number is most, the leading side-play amount of composition
S={s1,s2,…,sN}。
Correspondingly, the step 104 shown in earlier figures 1 is not shown in may also include following figure
The sub-step 1041 gone out and sub-step 1042;
1041, formula (2) is used to determine each target pixel points x in described absent region
Selected repairing pixel point x+sL(x), described repairing pixel point is that target pixel points is along three
Pixel in the image cube that dimension side-play amount is pointed to;
Wherein,
L represents a kind of method of salary distribution, shows that the pixel to being positioned at x in absent region distributes L
(x) individual leading side-play amount sL(x), E (L) is for weighing the quality of the described method of salary distribution, N4
Being four neighborhoods, α represents for balancing smooth item EsWith data item EdCoefficient of balance,
Es(L (x), L (y)) is smooth item, Ed(L (x)) is data item.
1042, for each target pixel points x in absent region, for this target pixel points x
Distribute leading side-play amount sL(x), by pixel x+s in described image cubeL(x)Value replace
This target pixel points x, it is thus achieved that the target image after reparation.
Said method can effectively describe the structural information of target image, can introduce again image library
Extraneous information, make image repair structure more natural.
Use concrete example that image repair method based on side-play amount is carried out below in conjunction with figure
Illustrating, the image repair method based on side-play amount of the present embodiment comprises the steps:
A01, to target image I to be repaired0With the image I in image library c1~Iw, composition
Image cube C={I0,I1,…,Iw};
Wherein, target image I0In absent region be labeled as Ω, it is known that zone marker is Φ.
In the present embodiment, each target image all includes absent region Ω and known region Φ.
A02, to image cube C={I0,I1,…,IwEach image in }, with the most each
Pixel is the upper left corner of block, divides an image into the image block of 8*8 that can be overlapping, it is thus achieved that
The target image block of target image and the image block of image.
A03, to each target image block Ψ in known region Φx, in image library c
Find the most most like image block Ψy。
Wherein, target image block ΨxRepresent the target image block of pixel centered by x.Block
Shown in the most following formula of similar measurement criterion (1), whereinIt it is gradient operator.
It should be noted that the computational methods of formula (1) can be color value squared differences and
(k=2), it is also possible to be absolute difference (k=1) other criterions, it is also possible to add gradient terms (β ≠ 0)
I.e. | | Ψx-▽Ψy||。
Specifically, according to the value of coefficient of balance β, the difference degree seeking two image blocks can
To be divided into:
When β=0, there is no the latter half of plus sige in formula (1), namely there is no gradient terms;
When β ≠ 0, be equivalent to add gradient terms.
According to the value of k in formula (1), the difference degree of two blocks is asked to be divided into:
As k=1, represent that this formula asks is the absolute value sum of the difference of pixel in block.
As k=2, represent that this formula asks is square sum of the difference of pixel in image block.
For example, color difference of two squares sum and the absolute value sum of formula (1) the inside are schematic
Be described as follows: tile size is as a example by 2 × 2: a1~a4, b1~b4 are pixel values,
A04, in step A03, the similar block found is to (Ψx,Ψy), x=(x might as well be set1,y1),
And y=(x2,y2), and ΨyBelong to image Ik, then Ψ is calculatedx,ΨyBetween relative dimensional inclined
Shifting amount is s=(x2-x1,y2-y1,k)。
The all of 3-D migration amount calculated in A05, statistic procedure A03 and step A04,
Extract the most 3-D migration amount of occurrence number and amount to N number of, the leading side-play amount of composition
S={s1,s2,…,sN}。
The value of generally N according to the amount of images in image cube can set in advance such as
40,60,80,100 etc..
A06, definition energy equation:
Wherein, L represents a kind of method of salary distribution, shows the pixel being positioned at x in absent region
Distribute the individual leading side-play amount of L (x), i.e. sL(x).E (L) has weighed the quality of this method of salary distribution,
The least quality of numerical value is the highest.N4Being four neighborhoods, α is used for balancing smooth item EsWith data item Ed。
Es(L (x), L (y)) is smooth item.
Assume L (x)=i, L (y)=j, then the definition smoothing item is:
Formula (3) has been weighed pixel value corresponding to the side-play amount of adjacent two pixels distribution
Structurally seriality, it is ensured that absent region internal repair result seriality structurally.
On the other hand, E (L (x)) is data item, is defined as:
Wherein, in formula (4)Represent the border of absent region.When unknown pixel is divided
The side-play amount joined can not be allowed to find effective pixel points (i.e. falling at the pixel of known region)
Time, data item gives maximum punishment, and (i.e.+∞ in formula (4) is exactly infinitely-great to one
Energy), which ensure that final each unknown pixel has value to follow.
Pixel borderline for absent region, then when taking into full account reparation with outside boundaries
Know the continuity degree of area pixel point, it is ensured that boundary transition is natural.
A07, use figure cut the minima of Algorithm for Solving energy equation, obtain the distribution side of optimum
Case L.
A08, to each pixel in absent region, by x+sL(x)The pixel of the pixel at place
It is padded at x.
Just can make full use of inside image during repairing image according to above method
Structural information, add image library extraneous information.In actual applications, have more
Priori, by revising the definition of above-mentioned equation, can effectively utilize these priori and know
Know, thus more tally with the actual situation and repair absent region more accurately.The introducing of image library is also
Be process provides more motility, target image can be carried out minute surface symmetry transformation,
Join in image library, to better profit from the self-similarity of image;For video, permissible
Consecutive frame is joined in image library, it is provided that abundant inter-frame information;Can also use relevant
Image retrieval technologies, make the image in image library higher with the degree of correlation of target image,
Thus obtain more excellent reparation result.
Fig. 3 shows the image fixing apparatus based on side-play amount that another embodiment of the present invention provides
Structural representation, as it is shown on figure 3, the image fixing apparatus based on side-play amount of the present embodiment
Including: image cube Component units 31, image block division unit 32, leading side-play amount obtain single
Unit 33 and reparation unit 34;
Wherein, image cube Component units 31 is for by target image to be repaired and image library
In image, pie graph picture cube;
Image block division unit 32 is used for each image division in image cube being part
The image block of overlapping r × r, it is thus achieved that the target image block of target image and the image block of image,
R is the natural number more than 1;
Leading side-play amount acquiring unit 33 is for obtaining the figure of known region in described target image
Leading side-play amount as block;Described leading side-play amount is the figure with described known region of statistics
The set of some side-play amounts of the image block that picture block is similar;
Repair unit 34 for according to described leading side-play amount, employing energy equation allocation strategy
The pixel of absent region in described target image is repaired, obtains the target after repairing
Image;
Described target image includes known region and absent region.
In a kind of concrete implementation mode, aforesaid leading side-play amount acquiring unit 33 can have
Body is used for
For each target image block in described known region, in described image cube
Search the image block most like with this target image block;
Obtain the skew of each target image block image block most like with this target image block
Amount;
Use statistical by described for selected part side-play amount combination in all side-play amounts leading inclined
Shifting amount.
For example, leading side-play amount acquiring unit 33 specifically for
Use formula (1) to calculate the difference degree between two image blocks, stand at described image
Side search minimum with each target image block difference degree as most like image
Block;
Wherein, ΨxRepresent in the known region of described target image point centered by pixel value x
Target image block, ΨyFor in described image cube centered by pixel value y point image block,Being gradient operator, β represents the color item in equation of equilibrium (1) and the balance of gradient terms
Coefficient;
For target image block ΨxThe most like image block Ψ foundy, form similar block pair
(Ψx,Ψy), if x=is (x1,y1), y=(x2,y2), and ΨyBelong to the I in described image cubek
Image, then Ψx, ΨyBetween relative dimensional side-play amount be s=(x2-x1,y2-y1,k);
For all relative dimensional side-play amounts of all target image block of described known region,
Extract the occurrence number leading side-play amount of relative dimensional side-play amount composition more than predetermined threshold value
S={s1,s2,…,sN};
Or,
For all relative dimensional side-play amounts of all target image block of described known region,
Extract N number of relative dimensional side-play amount that occurrence number is most, the leading side-play amount of composition
S={s1,s2,…,sN}。
In alternatively possible implementation, described reparation unit 34 can be specifically for,
Formula (2) is used to determine in described absent region selected by each target pixel points x
Repairing pixel point x+sL(x), described repairing pixel point is that target pixel points is along 3-D migration
Pixel in the image cube that amount is pointed to;
For each target pixel points x in absent region, distribute one for this target pixel points x
Individual leading side-play amount sL(x), by pixel x+s in described image cubeL(x)Value replace this target
Pixel x, it is thus achieved that the target image after reparation, described target pixel points is target image block
Central pixel point, pixel is the central pixel point of image block;
Wherein,
L represents a kind of method of salary distribution, shows that the pixel to being positioned at x in absent region distributes L
(x) individual leading side-play amount sL(x), E (L) is for weighing the quality of the described method of salary distribution, N4
Being four neighborhoods, α represents for balancing smooth item EsWith data item EdCoefficient of balance,
Es(L (x), L (y)) is smooth item, Ed(L (x)) is data item.
The image fixing apparatus based on side-play amount of the present embodiment, by image cube Component units
Set up image cube, and then obtain leading side-play amount by leading side-play amount acquiring unit, and then
Repairing unit and obtain the target image after repairing, this device can effectively describe the knot of target image
Structure information, can introduce again the extraneous information of image library, is conducive to keeping the company of target image structure
Continuous property, improves the subjective visual quality repairing result, makes target image repair structure more certainly
So.
Through the above description of the embodiments, those skilled in the art it can be understood that
Can be realized by hardware to the present invention, it is also possible to add the general hardware platform of necessity by software
Mode realize.Based on such understanding, technical scheme can be with software product
Form embody, this software product can be stored in a non-volatile memory medium (can
To be CD-ROM, USB flash disk, portable hard drive etc.) in, including some instructions with so that one
Platform computer equipment (can be personal computer, server, or the network equipment etc.) performs
Method described in each embodiment of the present invention.
It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, attached
Module or flow process in figure are not necessarily implemented necessary to the present invention.
It will be appreciated by those skilled in the art that the module in the system in embodiment can be according to reality
Execute example description to carry out being distributed in the system of embodiment, it is also possible to carry out respective change and be positioned at difference
In one or more systems of the present embodiment.The module of above-described embodiment can merge into one
Module, it is also possible to be further split into multiple submodule.
The above is only the some embodiments of the present invention, it is noted that lead for this technology
For the those of ordinary skill in territory, under the premise without departing from the principles of the invention, it is also possible to make
Some improvements and modifications, these improvements and modifications also should be regarded as protection scope of the present invention.
Claims (10)
1. an image repair method based on side-play amount, it is characterised in that including:
By the image in target image to be repaired and image library, pie graph picture cube;
To the image block that each image division is partly overlapping r × r in image cube, obtain
Obtaining target image block and the image block of image of target image, r is the natural number more than 1;
Obtain the leading side-play amount of the image block of known region in described target image;Described master
Lead the similar image block of the image block to described known region that side-play amount is statistics some partially
The set of shifting amount;
According to described leading side-play amount, use energy equation allocation strategy to described target image
The pixel of middle absent region is repaired, and obtains the target image after repairing;
Described target image includes known region and absent region.
Method the most according to claim 1, it is characterised in that obtain described target figure
The leading side-play amount of the image block of known region in Xiang, step include:
For each target image block in described known region, in described image cube
Search the image block most like with this target image block;
Obtain the skew of each target image block image block most like with this target image block
Amount;
Use statistical by described for selected part side-play amount combination in all side-play amounts leading inclined
Shifting amount.
Method the most according to claim 2, it is characterised in that for described known district
Each target image block in territory, searches and this target image block in described image cube
Most like image block, step include:
Use formula (1) to calculate the difference degree between two image blocks, stand at described image
Side search minimum with each target image block difference degree as most like image
Block;
Wherein, ΨxRepresent in the known region of described target image point centered by pixel value x
Target image block, ΨyFor in described image cube centered by pixel value y point image block,Being gradient operator, β represents the color item in equation of equilibrium (1) and the balance of gradient terms
Coefficient.
Method the most according to claim 3, it is characterised in that obtain each target
The side-play amount of the image block that image block is most like with this target image block, step include:
For target image block ΨxThe most like image block Ψ foundy, form similar block pair
(Ψx,Ψy), if x=is (x1,y1), y=(x2,y2), and ΨyBelong to the I in described image cubek
Image, then Ψx, ΨyBetween relative dimensional side-play amount be s=(x2-x1,y2-y1,k)。
Method the most according to claim 4, it is characterised in that employing statistical will
In all side-play amounts selected part side-play amount combine described leading side-play amount, step include:
For all relative dimensional side-play amounts of all target image block of described known region,
Extract the occurrence number leading side-play amount of relative dimensional side-play amount composition more than predetermined threshold value
S={s1,s2,…,sN};
Or,
For all relative dimensional side-play amounts of all target image block of described known region,
Extract N number of relative dimensional side-play amount that occurrence number is most, the leading side-play amount of composition
S={s1,s2,…,sN}。
Method the most according to claim 1, it is characterised in that described according to described master
Lead side-play amount, use energy equation allocation strategy to the picture of absent region in described target image
Vegetarian refreshments is repaired, obtain repair after target image, step include:
Formula (2) is used to determine in described absent region selected by each target pixel points x
Repairing pixel point x+sL(x), described repairing pixel point is that target pixel points is along 3-D migration
Pixel in the image cube that amount is pointed to;
For each target pixel points x in absent region, distribute one for this target pixel points x
Individual leading side-play amount sL(x), by pixel x+s in described image cubeL(x)Value replace this target
Pixel x, it is thus achieved that the target image after reparation;
Wherein,
L represents a kind of method of salary distribution, shows that the pixel to being positioned at x in absent region distributes L
(x) individual leading side-play amount sL(x), E (L) is for weighing the quality of the described method of salary distribution, N4
Being four neighborhoods, α represents for balancing smooth item EsWith data item EdCoefficient of balance,
Es(L (x), L (y)) is smooth item, Ed(L (x)) is data item.
7. an image fixing apparatus based on side-play amount, it is characterised in that including:
Image cube Component units, for by the figure in target image to be repaired and image library
Picture, pie graph picture cube;
Image block division unit, being used for each image division in image cube is part
The image block of overlapping r × r, it is thus achieved that the target image block of target image and the image block of image,
R is the natural number more than 1;
Leading side-play amount acquiring unit, for obtaining the figure of known region in described target image
Leading side-play amount as block;Described leading side-play amount is the figure with described known region of statistics
The set of some side-play amounts of the image block that picture block is similar;
Repair unit, for according to described leading side-play amount, use energy equation allocation strategy
The pixel of absent region in described target image is repaired, obtains the target after repairing
Image;
Described target image includes known region and absent region.
Device the most according to claim 7, it is characterised in that leading side-play amount obtains
Unit, specifically for
For each target image block in described known region, in described image cube
Search the image block most like with this target image block;
Obtain the skew of each target image block image block most like with this target image block
Amount;
Use statistical by described for selected part side-play amount combination in all side-play amounts leading inclined
Shifting amount.
Device the most according to claim 7, it is characterised in that leading side-play amount obtains
Unit, specifically for
Use formula (1) to calculate the difference degree between two image blocks, stand at described image
Side search minimum with each target image block difference degree as most like image
Block;
Wherein, ΨxRepresent in the known region of described target image point centered by pixel value x
Target image block, ΨyFor in described image cube centered by pixel value y point image block,Being gradient operator, β represents the color item in equation of equilibrium (1) and the balance of gradient terms
Coefficient;
For target image block ΨxThe most like image block Ψ foundy, form similar block pair
(Ψx,Ψy), if x=is (x1,y1), y=(x2,y2), and ΨyBelong to the I in described image cubek
Image, then Ψx, ΨyBetween relative dimensional side-play amount be s=(x2-x1,y2-y1,k);
For all relative dimensional side-play amounts of all target image block of described known region,
Extract the occurrence number leading side-play amount of relative dimensional side-play amount composition more than predetermined threshold value
S={s1,s2,…,sN};
Or,
For all relative dimensional side-play amounts of all target image block of described known region,
Extract N number of relative dimensional side-play amount that occurrence number is most, the leading side-play amount of composition
S={s1,s2,…,sN}。
Device the most according to claim 7, it is characterised in that described reparation unit,
Specifically for
Formula (2) is used to determine in described absent region selected by each target pixel points x
Repairing pixel point x+sL(x), described repairing pixel point is that target pixel points is along 3-D migration
Pixel in the image cube that amount is pointed to;
For each target pixel points x in absent region, distribute one for this target pixel points x
Individual leading side-play amount sL(x), by pixel x+s in described image cubeL(x)Value replace this target
Pixel x, it is thus achieved that the target image after reparation, described target pixel points is target image block
Central pixel point, pixel is the central pixel point of image block;
Wherein,
L represents a kind of method of salary distribution, shows that the pixel to being positioned at x in absent region distributes L
(x) individual leading side-play amount sL(x), E (L) is for weighing the quality of the described method of salary distribution, N4
Being four neighborhoods, α represents for balancing smooth item EsWith data item EdCoefficient of balance,
Es(L (x), L (y)) is smooth item, Ed(L (x)) is data item.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510340991.2A CN106327432A (en) | 2015-06-18 | 2015-06-18 | Image restoration method and device based on offset quantity |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510340991.2A CN106327432A (en) | 2015-06-18 | 2015-06-18 | Image restoration method and device based on offset quantity |
Publications (1)
Publication Number | Publication Date |
---|---|
CN106327432A true CN106327432A (en) | 2017-01-11 |
Family
ID=57733340
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510340991.2A Pending CN106327432A (en) | 2015-06-18 | 2015-06-18 | Image restoration method and device based on offset quantity |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN106327432A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108510569A (en) * | 2018-01-26 | 2018-09-07 | 北京大学 | A kind of characters in a fancy style generation method and system based on multichannel |
CN112734668A (en) * | 2021-01-07 | 2021-04-30 | 中国工商银行股份有限公司 | Image restoration method and system |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101009021A (en) * | 2007-01-25 | 2007-08-01 | 复旦大学 | Video stabilizing method based on matching and tracking of characteristic |
CN101511030A (en) * | 2009-03-30 | 2009-08-19 | 北京中星微电子有限公司 | Method and system for processing video data transmission deletion |
CN103955891A (en) * | 2014-03-31 | 2014-07-30 | 中科创达软件股份有限公司 | Image restoration method based on block matching |
US20140369622A1 (en) * | 2013-06-13 | 2014-12-18 | Microsoft Corporation | Image completion based on patch offset statistics |
CN104680492A (en) * | 2015-03-11 | 2015-06-03 | 浙江工业大学 | Image repairing method based on sample structure consistency |
-
2015
- 2015-06-18 CN CN201510340991.2A patent/CN106327432A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101009021A (en) * | 2007-01-25 | 2007-08-01 | 复旦大学 | Video stabilizing method based on matching and tracking of characteristic |
CN101511030A (en) * | 2009-03-30 | 2009-08-19 | 北京中星微电子有限公司 | Method and system for processing video data transmission deletion |
US20140369622A1 (en) * | 2013-06-13 | 2014-12-18 | Microsoft Corporation | Image completion based on patch offset statistics |
CN103955891A (en) * | 2014-03-31 | 2014-07-30 | 中科创达软件股份有限公司 | Image restoration method based on block matching |
CN104680492A (en) * | 2015-03-11 | 2015-06-03 | 浙江工业大学 | Image repairing method based on sample structure consistency |
Non-Patent Citations (4)
Title |
---|
KAIMING HE ET AL.: "Image Completion Approaches Using the Statistics of Similar Patches", 《IEEE TRANSACTIONS ON PATTERN ANALYSIS AND MACHINE INTELLIGENCE》 * |
THOMAS BROX ET AL.: "High Accuracy Optical Flow Estimation Based on a Theory for Warping", 《COMPUTER VISION - ECCV 2004》 * |
YANLI LI ET AL.: "AUTOMATIC PEDESTRIAN SEGMENTATION COMBINING SHAPE, PUZZLE AND APPEARANCE", 《INTERNATIONAL JOURNAL ON ARTIFICIAL INTELLIGENCE TOOLS》 * |
高辉 等: "视差信息辅助的视频修补方法", 《模式识别与人工智能》 * |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108510569A (en) * | 2018-01-26 | 2018-09-07 | 北京大学 | A kind of characters in a fancy style generation method and system based on multichannel |
CN108510569B (en) * | 2018-01-26 | 2020-11-03 | 北京大学 | Multichannel-based artistic word generation method and system |
CN112734668A (en) * | 2021-01-07 | 2021-04-30 | 中国工商银行股份有限公司 | Image restoration method and system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
Yi et al. | Hierarchical tunnel modeling from 3D raw LiDAR point cloud | |
CN101375315B (en) | Methods and systems for digitally re-mastering of 2D and 3D motion pictures for exhibition with enhanced visual quality | |
US9172947B2 (en) | Method and apparatus for processing multi-view image using hole rendering | |
CN101657839B (en) | System and method for region classification of 2D images for 2D-to-3D conversion | |
CA2597056C (en) | Method and apparatus for distinguishing foliage from buildings for topographical modeling | |
US8345742B2 (en) | Method of processing moving picture and apparatus thereof | |
CN104537625A (en) | Bayer color image interpolation method based on direction flag bit | |
CN102999887A (en) | Sample based image repairing method | |
US8520940B1 (en) | Automatic city block segmentation in aerial imagery for parallel processing | |
CN106203277A (en) | Fixed lens real-time monitor video feature extracting method based on SIFT feature cluster | |
MX2010014049A (en) | Registration of street-level imagery to 3d building models. | |
US9460520B2 (en) | Method and arrangement for identifying a difference between a first 3D model of an environment and a second 3D model of the environment | |
CN105719250A (en) | Image inpainting method based on simple background, system and shooting camera | |
CN102196292A (en) | Human-computer-interaction-based video depth map sequence generation method and system | |
CN103024421A (en) | Method for synthesizing virtual viewpoints in free viewpoint television | |
JP2013218660A (en) | Method, program, and device for processing image | |
JP7193728B2 (en) | Information processing device and stored image selection method | |
Li et al. | Image inpainting based on scene transform and color transfer | |
CN106327432A (en) | Image restoration method and device based on offset quantity | |
JPH10301948A (en) | Method for retrieving image and video | |
EP3376160A1 (en) | Method and system for identifying urban objects | |
CN105957027A (en) | MRF sample image restoring method based on required directional structural feature statistics | |
CN102609937A (en) | Hardware accelerator oriented image matching method | |
US6483949B1 (en) | Image processing apparatus and method, and medium therefor | |
CN103955890B (en) | Stereoscopic image restoration method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20170111 |