Obtain the method and apparatus of high-definition picture
Technical field
The present invention relates to image technique more particularly to a kind of method and apparatus obtaining high-definition picture.
Background technology
With the development of science and technology, image has become the important carrier of information transmission, and for the need of high-definition picture
Ask even more increasingly extensive.For example, in fields such as remote sensing mapping, medical diagnosis, military surveillances, it is required to high-resolution image
More detailed information are obtained, to make more accurate judgement.However, due to the technical bottleneck of camera itself, it is difficult
To further increase image resolution ratio, therefore the image handled by equipment to obtain higher resolution is to solve the problems, such as this
Effective way.
Therefore, how according to low-resolution image get high-definition picture as urgent need to resolve the problem of.
Invention content
The present invention provide it is a kind of obtain high-definition picture method and apparatus, with according to low-resolution image get compared with
Good high-definition picture.
The first aspect of the present invention provides a kind of method obtaining high-definition picture, including:
Reference picture is obtained according to low-resolution image, the resolution ratio of the reference picture is more than the low-resolution image
Resolution ratio;
Determine that first refers to segment in the reference picture, the described first pixel for referring to center in segment is made
For pixel to be adjusted;
Determine that relatively segment, the area of the relatively segment are more than described first with reference to segment in the reference picture
Area and the relatively segment cover described with reference to segment;
The pixel value of the pixel to be adjusted is determined with reference to segment according to the relatively segment and described first;
Determine that second refers to segment in the reference picture, described second with reference to center in segment pixel with
The pixel to be adjusted differs, and described second is identical with reference to the shape and area of segment as described first with reference to segment, will
Described second is updated to described first with reference to segment refers to segment, returns to the behaviour for executing and comparing segment in reference picture determination
Make, until the pixel of predetermined number is used as pixel to be adjusted in the reference picture, generates the high-definition picture.
It is optionally, described to include according to low-resolution image acquisition reference picture according to method as described above:
Using bicubic interpolation method, the reference picture is obtained according to the low-resolution image.
It is optionally, described to be determined with reference to segment according to the relatively segment and described first according to method as described above
Before the pixel value of the pixel to be adjusted, further include:
Whether judge the pixel to be adjusted is original image vegetarian refreshments in the low-resolution image, if judging result
It is no, then executes the behaviour for the pixel value for adjusting the pixel to be adjusted with reference to segment according to the relatively segment and described first
Make;
If the determination result is YES, then retain the corresponding pixel value of the original image vegetarian refreshments.
It is optionally, described to be determined with reference to segment according to the relatively segment and described first according to method as described above
The pixel value of the pixel to be adjusted includes:
According to the relatively segment and described first the first autoregression model and the second autoregression model are determined with reference to segment;
According to first autoregression model, the second autoregression model and described first following target letter is determined with reference to segment
Number:
Wherein,W is value of each third with reference to multiple similarity weights between segment and the first reference segment
The matrix of structure, A are the matrixes built according to the first autoregression model, and B is the matrix built according to the second autoregression model, D
For down-sampling matrix,WithIndicate the pixel value of pixel,In all pixels point belong to compare segment,In extremely
Few there are one pixels to be not belonging to the relatively segment, and α is the first preset value, and β is the second preset value;
Determine the minimum value of the object function;
The object function is updated using the minimum value, and returns to the minimum value for executing the determination object function
Operation, until the minimum value of the object function no longer changes;
The pixel value of the pixel to be adjusted is determined according to the minimum value no longer changed.
It is optionally, described that first autoregression model and the are determined according to the relatively segment according to method as described above
Two autoregression models include:
Centered on the pixel of the predeterminated position in the reference picture, third is established respectively and refers to segment, described the
The shape and area of three reference segments are with first with reference to the identical of segment;
Similarity weight w of each third with reference to segment and the first reference segment is determined according to following formulauv:
Wherein,The pixel value for referring to each pixel in segment for first,For third
With reference to the pixel value of each pixel in segment;
Normalization operation is executed to all similarity weights, obtains normalized similarity weight set
Similarity image set of blocks T is obtained, wherein Wherein, τTFor predetermined threshold value, η is indicatedThe weight system of importance
Number, Indicate the first pixel value with reference to each pixel in segment,It indicates
Third refers to the pixel value of each pixel in segment;
Candidate reference pixel and same reference chart of each third with reference to m-th of position in segment are obtained according to following formula
Relative coefficient between the pixel of center in the block
Wherein, m represents the candidate reference pixel of m-th of position, and the candidate reference pixel is first with reference to segment
And each third refers to each pixel in segment other than center,Indicate third reference chart m in the block
The pixel value of candidate reference pixel on a position;
The directionality index of each candidate reference pixel is obtained according to following formula, the directionality index is with same
The pixel of reference chart center in the block is starting point, using the candidate reference pixel as the vector value of terminal, on the k of direction
Directionality index rkIt is expressed as follows:
Wherein, μkPixel value on the direction k between all adjacent candidate ginseng pixels
The mean value of difference, varianceThe mean value of margin of image element between all adjacent candidate ginseng pixels on the direction k;
According to the relative coefficient and the directionality index selection order standard
Wherein, | cm| indicate m-th of position pixel and the pixel of center between away from
From;
Each third is divided into first with reference to segment and the first reference chart pixel in the block according to preset rules
Part and second part;
According to the order standard, respectively to belonging to each candidate reference pixel of the first part and belonging to
Each candidate reference pixel of the second part is ranked up;
According to the preceding M presetted pixel point construction after sequence corresponding to the first autoregression model of the first part and right
Second autoregression model of second part described in Ying Yu.
According to method as described above, optionally, the shape of the first reference segment and the relatively segment is just
Rectangular, described first is identical with the area of the second reference segment with reference to segment, and described first is located at the ratio with reference to segment
Compared with the center of segment.
Another aspect of the invention provides a kind of device obtaining high-definition picture, including:
Acquisition module, for obtaining reference picture according to low-resolution image, the resolution ratio of the reference picture is more than institute
State the resolution ratio of low-resolution image;
First determining module, for determining that first refers to segment in the reference picture, described first with reference in segment
The pixel of center is as pixel to be adjusted;
Second determining module, for determining that relatively segment, the area of the relatively segment are more than in the reference picture
The area of the first reference segment and the relatively segment cover described with reference to segment;
Third determining module, for determining the pixel to be adjusted with reference to segment according to the relatively segment and described first
The pixel value of point;
4th determining module, for determining that second refers to segment in the reference picture, described second with reference in segment
The pixel of center is differed with the pixel to be adjusted, and described second with reference to segment and the first reference segment
Shape is identical with area, and being updated to described first with reference to segment by described second refers to segment, returns to triggering described second and determines
Module generates the high resolution graphics until the pixel of predetermined number is used as pixel to be adjusted in the reference picture
Picture.
According to device as described above, optionally, the acquisition module is specifically used for:
Using bicubic interpolation method, the reference picture is obtained according to the low-resolution image.
Further include judgment module optionally, the judgment module is used for according to device as described above:
Whether judge the pixel to be adjusted is original image vegetarian refreshments in the low-resolution image, if judging result
It is no, then triggers third determining module;
If the determination result is YES, then retain the corresponding pixel value of the original image vegetarian refreshments.
According to device as described above, optionally, the third determining module is specifically used for:
According to the relatively segment and described first the first autoregression model and the second autoregression model are determined with reference to segment;
According to first autoregression model, the second autoregression model and described first following target letter is determined with reference to segment
Number:
Wherein,W is value of each third with reference to multiple similarity weights between segment and the first reference segment
The matrix of structure, A are the matrixes built according to the first autoregression model, and B is the matrix built according to the second autoregression model, D
For down-sampling matrix,WithIndicate the pixel value of pixel,In all pixels point belong to compare segment,In extremely
Few there are one pixels to be not belonging to the relatively segment, and α is the first preset value, and β is the second preset value;
Determine the minimum value of the object function;
The object function is updated using the minimum value, and returns to the minimum value for executing the determination object function
Operation, until the minimum value of the object function no longer changes;
The pixel value of the pixel to be adjusted is determined according to the minimum value no longer changed.
According to device as described above, optionally, the third determining module is specifically used for:
Centered on the pixel of the predeterminated position in the reference picture, third is established respectively and refers to segment, described the
The shape and area of three reference segments are with first with reference to the identical of segment;
Similarity weight w of each third with reference to segment and the first reference segment is determined according to following formulauv:
Wherein,The pixel value for referring to each pixel in segment for first,For third
With reference to the pixel value of each pixel in segment;
Normalization operation is executed to all similarity weights, obtains normalized similarity weight set
Similarity image set of blocks T is obtained, wherein Wherein, τTFor predetermined threshold value, η is indicatedThe weight system of importance
Number, Indicate the first pixel value with reference to each pixel in segment,It indicates
Third refers to the pixel value of each pixel in segment;
Candidate reference pixel and same reference chart of each third with reference to m-th of position in segment are obtained according to following formula
Relative coefficient between the pixel of center in the block
Wherein, m represents the candidate reference pixel of m-th of position, and the candidate reference pixel is first with reference to segment
And each third refers to each pixel in segment other than center,Indicate third reference chart m in the block
The pixel value of candidate reference pixel on a position;
The directionality index of each candidate reference pixel is obtained according to following formula, the directionality index is with same
The pixel of reference chart center in the block is starting point, using the candidate reference pixel as the vector value of terminal, on the k of direction
Directionality index rkIt is expressed as follows:
Wherein, μkPixel value on the direction k between all adjacent candidate ginseng pixels
The mean value of difference, varianceThe mean value of margin of image element between all adjacent candidate ginseng pixels on the direction k;
According to the relative coefficient and the directionality index selection order standard
Wherein, | cm| indicate m-th of position pixel and the pixel of center between away from
From;
Each third is divided into first with reference to segment and the first reference chart pixel in the block according to preset rules
Part and second part;
According to the order standard, respectively to belonging to each candidate reference pixel of the first part and belonging to
Each candidate reference pixel of the second part is ranked up;
According to the preceding M presetted pixel point construction after sequence corresponding to the first autoregression model of the first part and right
Second autoregression model of second part described in Ying Yu.
According to device as described above, optionally, the shape of the first reference segment and the relatively segment is just
Rectangular, described first is identical with the area of the second reference segment with reference to segment, and described first is located at the ratio with reference to segment
Compared with the center of segment., including:
As shown from the above technical solution, the method and apparatus provided by the invention for obtaining high-definition picture, passes through consideration
The pixel value of the surrounding pixel point of pixel to be adjusted determines the final pixel value of pixel to be adjusted, that is, considers to be adjusted
The contextual information of pixel enables to final pixel value more accurate in this way, so that being obtained by low-resolution image
High-definition picture pixel value it is more accurate, picture is more clear.
Description of the drawings
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below
There is attached drawing needed in technology description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair
Some bright embodiments for those of ordinary skill in the art without having to pay creative labor, can be with
Obtain other attached drawings according to these attached drawings.
Fig. 1 is the flow diagram according to the method for the acquisition high-definition picture of one embodiment of the invention;
Fig. 2A is the flow diagram according to the method for the acquisition high-definition picture of another embodiment of the present invention;
Fig. 2 B are the schematic diagram according to the low-resolution image of another embodiment of the present invention;
Fig. 2 C are the schematic diagram according to the high-definition picture of another embodiment of the present invention;
Fig. 2 D are the schematic diagram according to the comparison segment of another embodiment of the present invention;
Fig. 2 E are the schematic diagram that segment is referred to according to the third of another embodiment of the present invention;
Fig. 2 F are that will be divided into two-part schematic diagram with reference to segment according to another embodiment of the present invention;
Fig. 3 is the structural schematic diagram according to the device of the acquisition high-definition picture of one embodiment of the invention;
Fig. 4 is the structural schematic diagram according to the device of the acquisition high-definition picture of another embodiment of the present invention.
Specific implementation mode
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention
In attached drawing, technical scheme in the embodiment of the invention is clearly and completely described, it is clear that described embodiment is
A part of the embodiment of the present invention, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art
The every other embodiment obtained without creative efforts, shall fall within the protection scope of the present invention.
Embodiment one
The present embodiment provides a kind of methods obtaining high-definition picture, for obtaining high-resolution according to low-resolution image
Rate image.
As shown in Figure 1, the flow diagram of the method for the acquisition high-definition picture of the present embodiment, this method include:
Step 101, reference picture is obtained according to low-resolution image, the resolution ratio of reference picture is more than low-resolution image
Resolution ratio.
The low-resolution image of the present embodiment can be the image directly acquired by camera, for example, after camera shooting
The original image preserved in equipment.Image includes multiple pixels being distributed in the form of an array, and each pixel has oneself
Pixel value (i.e. gray value), in this way, user is it is seen that the coloured image of a web.
The resolution ratio that the resolution ratio of reference picture is more than low-resolution image indicates, in identical image shape and area
Under, the number of the pixel of reference picture is more than the number of the pixel of low-resolution image.
The mode for obtaining the reference picture that resolution ratio is more than low-resolution image has very much, such as by low resolution figure
Reference picture is obtained as carrying out interpolation operation, the target of image interpolation is the information provided using low-resolution image, raw
At the image of higher resolution.Image interpolation method is usually to insertion estimation between each pixel of original low-resolution image
Full-resolution picture vegetarian refreshments, these unknown full-resolution picture vegetarian refreshments can obtain by surrounding low-resolution pixel point estimation
It arrives, to obtain the higher figure of resolution ratio, autoregression model specifically may be used to be estimated, autoregression model includes all
The selected low-resolution pixel point for being used for estimating full-resolution picture vegetarian refreshments.
For example, bicubic interpolation method may be used in the present embodiment, and reference picture is obtained according to low-resolution image.
Assuming that 4 neighbouring the full-resolution picture vegetarian refreshments P (x, y) of interpolation low-resolution pixel points be respectively Q11, Q21, Q12 and
Q22, coordinate are respectively (0,0) Q11, Q21 (1,0), Q12 (0,1) and Q22 (1,1), horizontal direction gradient fr, vertical direction ladder
Spend fsAnd gradient frs.The pixel value p (r, s) of the pixel of interpolation can be expressed as following formula:
Wherein, atwF can be passed throughr、fsAnd frsIt obtains, specifically how according to fr、fsAnd frsObtain atwBelong to existing
Technology, details are not described herein.rtIndicate the t powers of P point abscissas r, swIndicate the w powers of P point ordinates s.Specifically how to use
The pixel of bicubic interpolation method and surrounding gets full-resolution picture vegetarian refreshments and belongs to the prior art, and details are not described herein.
It is, of course, also possible to obtain reference picture using other manner, specifically repeat no more.
Step 102, determine that first refers to segment in a reference image, the pixel of the center of the first reference segment is made
For pixel to be adjusted.
First with reference to the image block that segment can be rectangle, can also be the image block of square, specifically can be according to reality
Border needs to select.
Step 103, relatively segment is determined in a reference image, compares the area that the area of segment is more than first with reference to segment
And compares segment covering and refer to segment.
The shape of the comparison segment can be rectangle, can also be square, specifically can be with the shape of the first reference segment
Shape is consistent.First is located at the center for comparing segment with reference to segment.
Step 104, the pixel value of pixel to be adjusted is determined with reference to segment according to comparing segment and first.
Compare the contextual information that segment includes the first reference segment, which refers to segment phase with first
The information of adjacent pixel, for example, pixel pixel value.In this way, the pixel value of the first reference chart pixel to be adjusted in the block
It is according to the first reference image block and to compare segment and determine, pixel value is more accurate.
Optionally, further include before the step 101:
Whether judge pixel to be adjusted is original image vegetarian refreshments in low-resolution image, if judging result is no,
Execute step 104;
If the determination result is YES, then retain the corresponding pixel value of original image vegetarian refreshments.
That is, if pixel to be adjusted is original pixel, the pixel value of the pixel to be adjusted can not adjust, and retain
Original pixel value.It is, of course, also possible to will be according to comparing segment and the first pixel value for determining with reference to segment and original picture
Plain value is compared, if difference within a preset range, illustrates according to comparing segment and what the first reference segment was determined waits for
The pixel value for adjusting pixel is more accurate.
Step 105, determine that second refers to segment in a reference image, second with reference to center in segment pixel with
Pixel to be adjusted is all different, and second is identical with reference to the shape and area of segment as first with reference to segment, by the second reference chart
Block is updated to first and refers to segment, returns to step 103, waits adjusting up to the pixel of predetermined number in reference picture is used as
Whole pixel generates high-definition picture.
The area and shape of the second reference segment can be identical with reference to segment as first, for example, first refers to segment
The number of middle pixel is identical with reference to the number of pixel in segment as second.Next, can take segment is referred to first
Identical processing mode adjusts the second pixel value with reference to pixel to be adjusted in segment, in this way, until will be in reference picture
Until the pixel value adjustment of the pixel of predetermined number finishes.That is, the pixel of the center of the second reference segment is ginseng
Examine any one pixel for being different from first in image with reference to the pixel of the center of segment.
The predetermined number can be the sum of the pixel in reference picture, can also be in addition to reference picture outer ring its
The number of its all pixels point, can also be other numerical value according to actual needs, specifically repeat no more.
According to the present embodiment, pixel to be adjusted is determined by the pixel value of the surrounding pixel point of consideration pixel to be adjusted
The final pixel value of point, that is, consider the contextual information of pixel to be adjusted, enable to final pixel value more smart in this way
Really, so that the pixel value of the high-definition picture obtained by low-resolution image is more accurate, picture is more clear.
Embodiment two
The present embodiment does further supplementary explanation to the method for the acquisition high-definition picture of embodiment one.Such as Fig. 2A, it is
According to the flow diagram of the method for the acquisition high-definition picture of the present embodiment, this method includes:
Step 201, reference picture is obtained according to low-resolution image, the resolution ratio of reference picture is more than low-resolution image
Resolution ratio.
The low-resolution image of the present embodiment can be the image directly acquired by camera, for example, after camera shooting
The original image preserved in equipment.Image includes multiple pixels being distributed in the form of an array, and each pixel has oneself
Pixel value (i.e. gray value), in this way, user is it is seen that the coloured image of a web.
The resolution ratio that the resolution ratio of reference picture is more than low-resolution image indicates, in identical image shape and area
Under, the number of the pixel of reference picture is more than the number of the pixel of low-resolution image.
The mode for obtaining the reference picture that resolution ratio is more than low-resolution image has very much, such as by low resolution figure
Reference picture is obtained as carrying out interpolation operation, the target of image interpolation is the information provided using low-resolution image, raw
At the image of higher resolution.Image interpolation method is usually to insertion estimation between each pixel of original low-resolution image
Full-resolution picture vegetarian refreshments, these unknown full-resolution picture vegetarian refreshments can obtain by surrounding low-resolution pixel point estimation
It arrives, to obtain the higher figure of resolution ratio, autoregression model specifically may be used to be estimated, autoregression model includes all
The selected low-resolution pixel point for being used for estimating full-resolution picture vegetarian refreshments.
For example, bicubic interpolation method may be used in the present embodiment, and reference picture is obtained according to low-resolution image.
Assuming that 4 neighbouring the full-resolution picture vegetarian refreshments P (x, y) of interpolation low-resolution pixel points be respectively Q11, Q21, Q12 and
Q22, coordinate are respectively (0,0) Q11, Q21 (1,0), Q12 (0,1) and Q22 (1,1), horizontal direction gradient fr, vertical direction ladder
Spend fsAnd gradient frs.The pixel value p (r, s) of the pixel of interpolation can be expressed as following formula:
Wherein, atwF can be passed throughr、fsAnd frsIt obtains, specifically how according to fr、fsAnd frsObtain atwBelong to existing
Technology, details are not described herein.rtIndicate the t powers of P point abscissas r, swIndicate the w powers of P point ordinates s.Specifically how to use
The pixel of bicubic interpolation method and surrounding gets full-resolution picture vegetarian refreshments and belongs to the prior art, and details are not described herein.
It is, of course, also possible to obtain reference picture using other manner, specifically repeat no more.
For example, as shown in Figure 2 B, be low-resolution image schematic diagram 211 comprising pixel 220 number
It is 100.As shown in Figure 2 C, it is the reference picture 212 obtained according to low-resolution image 211, the area of the reference picture 212
It is identical as the area of low-resolution image 211, but the number of pixel is 2 times of low-resolution image 211, that is, the reference
The number of the pixel of image 212 is 181, and pixel 221 is the pixel estimated by interpolation method, the reference chart
All pixels in 212, which are selected, can be known as full-resolution picture vegetarian refreshments.As can be seen that reference picture 212 from Fig. 2 B and Fig. 2 C
Pixel density be greater than low-resolution image 211 pixel density.
Step 202, determine that first refers to segment in a reference image, the pixel of the center of the first reference segment is made
For pixel to be adjusted.
As shown in Figure 2 C, the first reference image block 213 is located in reference picture 212, and pixel 250 to be adjusted is the first ginseng
Examine the central pixel point in image block 213.
Step 203, relatively segment is determined in a reference image, compares the area that the area of segment is more than first with reference to segment
And compares segment covering first and refer to segment.
The shape of the comparison segment can be rectangle, can also be square, specifically can be with the shape of the first reference segment
Shape is consistent.As shown in Figure 2 D, compare segment 214 to be located in reference picture 212, and cover first and refer to segment 213.This compares figure
The shape of block 214 is consistent with reference to the shape of segment 213 with first, is square.First reference segment 213, which is located at, compares segment
214 center.
Step 204, whether judge pixel to be adjusted is original image vegetarian refreshments in low-resolution image, if judging result
It is no, then switchs to step 205, otherwise switch to step 211.
As shown in Figure 2 C, pixel 2121 is original image vegetarian refreshments, and pixel 2122 is the pixel estimated, then for
The pixel value of pixel 2121 can not adjust.It is of course also possible to by the original image vegetarian refreshments in reference picture not as waiting adjusting
Whole pixel can specifically select according to actual needs.
It is noted that can also judge picture to be adjusted in the pixel value and then execution for determining pixel to be adjusted
Whether vegetarian refreshments is the operation of original image vegetarian refreshments in low-resolution image, and is judging that the pixel to be adjusted is original image
When vegetarian refreshments, do not adjust.
Step 205, the first autoregression model and the second autoregression model are determined according to comparing segment.
Autoregression model is used in the random process in statistics and signal processing.Its intension is:One signal can be with table
State the linear combination of front signal for it.And expand in two dimensional image, it can be expressed as by being exactly a pixel in image
The linear combination of neighbouring pixel..
The present embodiment uses two autoregression models, can more effectively be carried out in this way to the pixel value of pixel to be adjusted
Estimation.
The step can specifically include:
Step a:Centered on the pixel of the predeterminated position in reference picture, third is established respectively and refers to segment, third
Shape and area with reference to segment is identical with the first reference segment
The predeterminated position of the present embodiment can be the pixel that can establish third with reference to the position of segment.For example,
By taking the pixel in the upper left corner of reference picture as an example, third cannot be established centered on the pixel and refers to segment, therefore the position
Set is not predeterminated position.
As shown in Figure 2 E, show that a third refers to segment 215, the pixel of center is pixel 230.Third
Area with reference to segment 215 is identical with reference to the area of segment 213 as first,.
Step b:Similarity weight w of each third with reference to segment and the first reference segment is determined according to following formulauv:
Wherein,The pixel value for referring to each pixel in segment for first,For third
With reference to the pixel value of each pixel in segment.
In the step, all thirds are formed into ordered set with reference to segment 216, choose third ginseng successively from this collection
It examines segment and calculates similarity weight.
Step c:Normalization operation is executed to all similarity weights, obtains normalized similarity weight set
For example, it countsDistribution histogram, histogram has a k bucket, and each bucket corresponds to a segment length in [0,1]
ForSection.Then operation is normalized to histogram, obtains the first compression with reference to segment near zone picture structure
It indicates
Step d:Similarity image set of blocks T is obtained, wherein Wherein, τTFor predetermined threshold value, η is indicatedThe weight system of importance
Number, Indicate the first pixel value with reference to each pixel in segment,It indicates
Third refers to the pixel value of each pixel in segment.
η in the step can need to set according to the time, for example, 0.9-1.2.
Step e:According to following formula obtain each third with reference to m-th of position in segment candidate reference pixel with it is same
Relative coefficient between the pixel of reference chart center in the block
Wherein, m represents the candidate reference pixel of m-th of position, candidate reference pixel be first with reference to segment and
Each third refers to each pixel other than center in segment,Indicate m-th in the block of third reference chart
The pixel value for the candidate reference pixel set.
Wherein, m is positive integer, and m subtracts 1 equal to each pixel sum with reference to segment.
As shown in Figure 2 E, all other than the pixel 230 of center for third refers to segment 215
Pixel is used as candidate reference pixel, for first with reference to for segment 213, in addition to center pixel 232 it
Outer all pixels point is used as candidate reference pixel.There is pixel in each third reference chart each m-th of position in the block,
Assuming that each third reference chart upper left corner in the block is the 1st position, then each third reference chart the 1st position in the block has
Pixel.
Step f:The directionality index of each candidate reference pixel is obtained according to following formula, directionality index is with same
The pixel of reference chart center in the block is starting point, using candidate reference pixel as the vector value of terminal, the side on the k of direction
Tropism index rkIt is expressed as follows:
Wherein, all adjacent candidates join the margin of image element between pixels on the k of the directions μ k
Mean value, varianceThe mean value of margin of image element between all adjacent candidate ginseng pixels on the k of direction;
As shown in Figure 2 E, rkFor pixel 232 to be adjusted in the first reference image block and candidate reference pixel 2122 it
Between directionality index
As shown in Figure 2 E, each neighbor pixel on the k of direction is candidate reference pixel 2122, candidate reference pixel respectively
Point 2121, pixel to be adjusted 232, candidate reference pixel 233 and candidate reference pixel 234, obtain in these pixels
Margin of image element between all neighbor pixels, and obtain mean μkAnd varianceSpecifically how to obtain mean μkAnd variance
Belong to the prior art, details are not described herein.
From in Fig. 2 E as can be seen that first with reference to pixel in segment 213 direction other than k, also other 3 sides
To.Similarly, third also has the directions k and other 3 directions with reference to the direction of pixel in segment 215, that is, each third ginseng
It is identical to examine possessed direction in segment and the first reference segment.
Step g:According to relative coefficient and directionality index, order standard is obtained
Wherein, | cm| indicate the distance between the pixel of the pixel and center of m-th of position.
Step h:Each third is divided into first with reference to segment and the first reference chart pixel in the block according to preset rules
Point and second part.
As shown in Figure 2 F, each reference chart pixel in the block is divided into two parts, is first part 241 and second respectively
Divide 242.
It is noted that step h can be executed in any one step before step i.
Step i:According to order standard, respectively to belonging to each candidate reference pixel of first part and belonging to second
Each candidate reference pixel divided is ranked up.
Step j:According to after sequence preceding M presetted pixel point construction corresponding to first part the first autoregression model and
Corresponding to the second autoregression model of second part.
Wherein, the first autoregression model isSecond autoregression model is
Step 206, following target letter is determined with reference to segment according to the first autoregression model, the second sub- regression model and first
Number:
Wherein,W is value of each third with reference to multiple similarity weights between segment and the first reference segment
The matrix of structure, A are the matrixes built according to the first autoregression model, and B is the matrix built according to the second autoregression model, D
For down-sampling matrix,WithIndicate the pixel value of pixel,In all pixels point belong to compare segment,In extremely
Few there are one pixels to be not belonging to the relatively segment, and α is the first preset value, and β is the second preset value.
In the step 206, weight matrix W, W=diag (w are obtained according to following formula first1,w2..., wk), wk=
similarity(pu, qvk),w1It represents the 1st third and refers to segment qv1With first with reference to segment puBetween similarity weight, w2
It represents the 2nd third and refers to segment qv2With first with reference to segment puBetween similarity weight, wkRepresent k-th of third reference chart
Block qv3With first with reference to segment puBetween similarity weight, the error term after optimization is as follows:
Next, obtain third with reference in segment in addition to after pixel down-sampling to be adjusted with original-resolution image
Difference, as data fidelity project, i.e.,WhereinFor the pixel value of the pixel set of original image vegetarian refreshments, i.e., low resolution
The pixel value of each pixel of rate image, D are down-sampling matrix.
Step 207, the minimum value of object function is determined.
Object function is write a Chinese character in simplified form first with residual vector:Wherein
Then increment is introduced in residual vector:
Obtain formula
Step 208, object function is updated using minimum value, and returns to the operation for executing the minimum value for determining object function,
Until the minimum value of object function no longer changes.
Return to step 207.
Step 209, the pixel value of pixel to be adjusted is determined according to the minimum value no longer changed.
After minimum value no longer changes, corresponding first autoregression model and the second autoregression model also can be true
It decides, andIt equally can determine whether, and then can pass throughTo determine the pixel value of pixel to be adjusted.
For example, willIntermediary image vegetarian refreshments pixel value of the pixel value as pixel to be adjusted, if without in unique
Between pixel, pixel value of the average value of the pixel value of two intermediate pixels as pixel to be adjusted can be selected.
Step 210, determine that second refers to segment in a reference image, second with reference to predeterminated position in segment pixel with
Each pixel to be adjusted is all different, and being updated to first with reference to segment by second refers to segment, returns to step 203, until
The pixel of predetermined number is used as pixel to be adjusted in reference picture, generates high-definition picture.
The area of the second reference segment can be identical with reference to the area of segment as first, for example, in the first reference segment
The number of pixel is identical with reference to the number of pixel in segment as second.Next, can take segment phase is referred to first
With processing mode adjust the second pixel value with reference to pixel to be adjusted in segment, in this way, until will be pre- in reference picture
Until if the pixel value adjustment of the pixel of number finishes.
The predetermined number can be the sum of the pixel in reference picture, can also be other numbers according to actual needs
Value, specifically repeats no more.
Step 211, retain the original pixel value of the pixel.
According to the present embodiment, the pixel value and two sets of autoregression moulds of the surrounding pixel point by considering pixel to be adjusted
Type determines the final pixel value of pixel to be adjusted, that is, considers the contextual information of pixel to be adjusted, can make in this way
It is more accurate to obtain final pixel value, enables to the pixel value of the high-definition picture obtained by low-resolution image more smart
Really, picture is more clear.
Embodiment three
The present embodiment provides a kind of device obtaining high-definition picture, the acquisition for executing aforementioned any embodiment is high
The method of image in different resolution.
As shown in figure 3, for according to the structural schematic diagram of the device of the acquisition high-definition picture of the present embodiment.The device packet
Include acquisition module 301, the first determining module 302, the second determining module 303, third determining module 304 and the 4th determining module
305。
Wherein, acquisition module 301 is used to obtain reference picture, the resolution ratio of the reference picture according to low-resolution image
More than the resolution ratio of the low-resolution image;First determining module 302 for determining the first reference in the reference picture
Segment, described first refers to the pixel of center in segment as pixel to be adjusted;Second determining module 303 is used for
Determine relatively segment in the reference picture, the area of the relatively segment is more than described first with reference to the area of segment and described
It is described with reference to segment to compare segment covering;Third determining module 304 is used for according to relatively segment and first reference chart
Block determines the pixel value of the pixel to be adjusted;4th determining module 305 for determining the second ginseng in the reference picture
Segment is examined, the described second pixel for referring to center in segment is differed with the pixel to be adjusted, second ginseng
It is identical with reference to the shape and area of segment as described first to examine segment, first reference is updated to reference to segment by described second
Segment returns and triggers second determining module 303, waits adjusting up to the pixel of predetermined number in the reference picture is used as
Whole pixel generates the high-definition picture.
Optionally, acquisition module 301 is specifically used for:
Using bicubic interpolation method, the reference picture is obtained according to the low-resolution image.
Optionally, the third determining module 304 is specifically used for:
According to the relatively segment and described first the first autoregression model and the second autoregression model are determined with reference to segment;
According to first autoregression model, the second autoregression model and described first following target letter is determined with reference to segment
Number:
Wherein,W is value of each third with reference to multiple similarity weights between segment and the first reference segment
The matrix of structure, A are the matrixes built according to the first autoregression model, and B is the matrix built according to the second autoregression model, D
For down-sampling matrix,WithIndicate the pixel value of pixel,In all pixels point belong to compare segment,In extremely
Few there are one pixels to be not belonging to the relatively segment, and α is the first preset value, and β is the second preset value;
Determine the minimum value of the object function;
The object function is updated using the minimum value, and returns to the minimum value for executing the determination object function
Operation, until the minimum value of the object function no longer changes;
The pixel value of the pixel to be adjusted is determined according to the minimum value no longer changed.
Optionally, the third determining module 304 is specifically used for:
Centered on the pixel of the predeterminated position in the reference picture, third is established respectively and refers to segment, described the
The shape and area of three reference segments are with first with reference to the identical of segment;
Similarity weight w of each third with reference to segment and the first reference segment is determined according to following formulauv:
Wherein,The pixel value for referring to each pixel in segment for first,For third
With reference to the pixel value of each pixel in segment;
Normalization operation is executed to all similarity weights, obtains normalized similarity weight set
Similarity image set of blocks T is obtained, wherein Wherein, τTFor predetermined threshold value, η is indicatedThe weight system of importance
Number, Indicate the first pixel value with reference to each pixel in segment,It indicates
Third refers to the pixel value of each pixel in segment;
Candidate reference pixel and same reference chart of each third with reference to m-th of position in segment are obtained according to following formula
Relative coefficient between the pixel of center in the block
Wherein, m represents the candidate reference pixel of m-th of position, and the candidate reference pixel is first with reference to segment
And each third refers to each pixel in segment other than center,Indicate third reference chart m in the block
The pixel value of candidate reference pixel on a position;
The directionality index of each candidate reference pixel is obtained according to following formula, the directionality index is with same
The pixel of reference chart center in the block is starting point, using the candidate reference pixel as the vector value of terminal, on the k of direction
Directionality index rkIt is expressed as follows:
Wherein, μkPixel value on the direction k between all adjacent candidate ginseng pixels
The mean value of difference, varianceThe mean value of margin of image element between all adjacent candidate ginseng pixels on the direction k;
According to the relative coefficient and the directionality index selection order standard
Wherein, | cm| indicate m-th of position pixel and the pixel of center between away from
From;
Each third is divided into first with reference to segment and the first reference chart pixel in the block according to preset rules
Part and second part;
According to the order standard, respectively to belonging to each candidate reference pixel of the first part and belonging to
Each candidate reference pixel of the second part is ranked up;
According to the preceding M presetted pixel point construction after sequence corresponding to the first autoregression model of the first part and right
Second autoregression model of second part described in Ying Yu.
Optionally, described the first of the present embodiment is square with reference to the shape of segment and the relatively segment, described
First is identical with the area of the second reference segment with reference to segment, and described first is located at reference to segment in the relatively segment
The heart.
Optionally, as shown in figure 4, the device of the present embodiment further includes judgment module 401, which is used for:
Whether judge the pixel to be adjusted is original image vegetarian refreshments in the low-resolution image, if judging result
It is no, then triggers third determining module 304;
If the determination result is YES, then retain the corresponding pixel value of the original image vegetarian refreshments.
Device in this present embodiment is closed, wherein modules execute the concrete mode of operation in related this method
It is described in detail in embodiment, explanation will be not set forth in detail herein.
According to the present embodiment, pixel to be adjusted is determined by the pixel value of the surrounding pixel point of consideration pixel to be adjusted
The final pixel value of point, that is, consider the contextual information of pixel to be adjusted, enable to final pixel value more smart in this way
Really, so that the pixel value of the high-definition picture obtained by low-resolution image is more accurate, picture is more clear.
One of ordinary skill in the art will appreciate that:Realize that all or part of step of above method embodiment can pass through
The relevant hardware of program instruction is completed, and program above-mentioned can be stored in a computer read/write memory medium, the program
When being executed, step including the steps of the foregoing method embodiments is executed;And storage medium above-mentioned includes:ROM, RAM, magnetic disc or light
The various media that can store program code such as disk.
Finally it should be noted that:The above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although
Present invention has been described in detail with reference to the aforementioned embodiments, it will be understood by those of ordinary skill in the art that:It still may be used
With technical scheme described in the above embodiments is modified or equivalent replacement of some of the technical features;
And these modifications or replacements, the range for various embodiments of the present invention technical solution that it does not separate the essence of the corresponding technical solution.