Summary of the invention
The purpose of the present invention is to provide a kind of super-resolution methods based on Uniform Domains, it is intended to solve existing double
Image border obscure portions in the high-definition picture that cube interpolation method there are problems that.
The invention is realized in this way the super-resolution side based on Uniform Domains in a kind of digital image processing field
Method, the super-resolution method based on Uniform Domains the following steps are included:
Carry out detection of edge pixels point first with Sobel operator;
Secondly the set for participating in the pixel of estimation and filtering of high-resolution pixel value is determined;
The pixel value to determine full-resolution picture vegetarian refreshments in this area will be finally filtered in Uniform Domains.
Further, the determination method of the Sobel operator and edge anchor point pixel includes:
It is expressed as in the template of the Sobel operator in x-axis and y-axis direction:
Meanwhile the modulus value and phase angle of gradient indicate are as follows:
The convolution algorithm of operator representation second order;Using a threshold T1, the pixel that gradient modulus value is greater than thresholding will be true
The edge pixel being set in image;To each high-resolution pixel, the pixel of four low resolution nearest with it is found, is used
(i, j) indicates the coordinate on low-resolution image.
Further, for the high-resolution pixel intermediate at (i, j) and (i, j+1), low-resolution pixel (i, j), (i, j+
1), (i-1, j), (i-1, j+1) will be determined four neighbor pixels of high-resolution pixel thus;
For the high-resolution pixel between (i, j) and (i+1, j), low-resolution pixel (i, j), (i+1, j), (i,
), j-1 (i+1, j-1) will be determined four neighbor pixels of high-resolution pixel thus;
For four neighbor pixels, if pixel (i, j) is edge pixel, it will be put by this and do a straight line, the angle of straight line
It is vertical with the angle φ (i, j) of the gradient of this pixel;For the straight line done near the pixel of Current high resolution, this picture is calculated
Element arrives the distance between each straight line;The straight line nearest from this pixel is the anchor straight line of current high-resolution pixel, generates this straight line
Low-resolution pixel is referred to as anchor point.
Further, the Uniform Domains around Current high resolution pixel are determined;Current edge anchor point pixel is p1=(ai,
aj), then increase by two anchor point p of selection2=(ai-1,aj- 1) and p3=(ai+1,aj+1);For two anchor points, with two anchor points
Centered on do two straight lines, the direction of two straight lines is parallel with existing anchor rectilinear direction;On every straight line, select close
5 pixels of the anchor point that straight line and this straight line pass through, that is, minimize following function:
α*||pi-xi||+β*l(xi);
||pi-xi| | it is pixel xiTo pixel piThe distance between, l (xi) it is pixel xiTo by anchor point piIt generates
The distance between straight line, α and β are two parameters in method;3 Uniform Domains set omegas comprising pixel will be generated1,
Ω2, and Ω3, and each set includes 5 pixels;The average value of the pixel value of pixel in each set is calculated, is gathered
Ω1,Ω2, and Ω3In average pixel value use m respectively1,m2, and m3To indicate;|m2-m1| > | m3-m1|, then use set omega3It replaces
For Ω2;Otherwise, Ω2Do not change.
Further, the determination method of high-resolution pixel value includes:
Its pixel value is determined using formula:
(u, v) is the position of current high-resolution pixel, and Ω is and the pixel of its nearest low resolution, f (x) and g (x) are
Two functions, take f (x)=x3, g (x)=x2, m (u, v) is the average value of the pixel value of the pixel nearest with current high-resolution,
W is normalized parameter, is had simultaneously:
For edge pixel, sets of pixel values Ω is used first1Substitute the formula of Ω use or moreTo obtain I1(u,v);Then, it uses
Sets of pixel values Ω2Substitute the formula of Ω use or moreTo obtain I2(u,v);To two
Value is combined to obtain high-resolution pixel value I (u, v), it may be assumed that
I (u, v)=w1*I1(u,v)+w2*I2(u,v);
Parameter wiWith pixel collection ΩiThe variance of middle pixel value is inversely proportional.
Super-resolution method provided by the invention based on Uniform Domains, using Sobel operator come detection of edge pixels
Point;Determine the set for participating in the pixel of estimation and filtering of high-resolution pixel value;It will be filtered in Uniform Domains
To determine, non-edge pixels is selected and the pixel value of full-resolution picture vegetarian refreshments in this area;As far as possible in the Uniform Domains of image
Interpolation is carried out, to avoid the interpolation for crossing over two inconsistent regions;Due to only being filtered in Uniform Domains, can keep away
The shortcomings that exempting from edge blurry in conventional method simultaneously obtains better visual effect.Experimental result show that institute moving party
The superiority of method.The invention proposes a kind of new based on the method for interpolation to improve existing methods performance, such to reduce
The fuzzy problem of generally existing image border part in method.To obtain clearer high-resolution image.
Specific embodiment
In order to make the objectives, technical solutions, and advantages of the present invention clearer, with reference to embodiments, to the present invention
It is further elaborated.It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not used to
Limit the present invention.
Application principle of the invention is explained in detail with reference to the accompanying drawing.
As shown in Figure 1, the super-resolution method provided in an embodiment of the present invention based on Uniform Domains the following steps are included:
S101: carry out detection of edge pixels point first with Sobel operator;
S102: the set for participating in the pixel of estimation and filtering of high-resolution pixel value is determined;
S103: it will be filtered in Uniform Domains to determine non-edge pixels point and full-resolution picture in this area
The pixel value of vegetarian refreshments.
Application principle of the invention is further described combined with specific embodiments below.
1 the embodiment of the present invention will carry out detection of edge pixels using Sobel gradient operator first.Then, determination is being counted
The pixel for needing to use during calculating high-resolution pixel value and in filtering.Then, high-resolution is determined using bilateral filtering
The pixel value of the edge pixel part of rate.It, can be to avoid figure since bilateral filtering is the trend along edge and carries out here
As the fuzzy of marginal portion and obtain better result.
The determination of 1.1Sobel operator and edge anchor point pixel
It can be indicated in the template of the Sobel operator in x-axis and y-axis direction are as follows:
Meanwhile the modulus value and phase angle of gradient can indicate are as follows:
HereThe convolution algorithm of operator representation second order.These operations will be implemented the pixel of low resolution.Then, it will adopt
With a threshold T1, gradient modulus value is greater than the edge pixel that the pixel of thresholding will be confirmed as in image.
After completing this operation, to each high-resolution pixel, the pixel of four low resolution nearest with it is found.
Here coordinate on low-resolution image is indicated with (i, j), for the high-resolution pixel in the centre (i, j) and (i, j+1),
Low-resolution pixel (i, j), (i, j+1), (i-1, j), (i-1, j+1) will be determined four neighbour's pictures of high-resolution pixel thus
Element.For the high-resolution pixel between (i, j) and (i+1, j), low-resolution pixel (i, j), (i+1, j), (i, j-1),
(i+1, j-1) will be determined four neighbor pixels of high-resolution pixel thus.For other situations, four neighbor pixels can be by very
It is easy and uniquely determines.
For four neighbor pixels, if pixel (i, j) is edge pixel, it will be put by this and do a straight line, the angle of this straight line
The angle φ (i, j) (being calculated by above formula 6) of the gradient of degree and this pixel is vertical.Near the pixel of Current high resolution
The straight line done calculates this pixel the distance between to each straight line.The straight line nearest from this pixel will be referred to as in the present invention
It is the anchor straight line of current high-resolution pixel, the low-resolution pixel for generating this straight line is referred to as anchor point.
1.2 pairs of each high-resolution pixels determine set composed by the pixel of the participation filtering corresponding to it
When four neighborhood pixels of Current high resolution pixel determined above are not edge pixels, Current high resolution
Pixel is confirmed as smooth pixel.9 low-resolution pixels of smooth pixel and its arest neighbors will be confirmed as and this picture
Pixel in the corresponding filtered pixel set of element.Here, when determining neighbor pixel, if there is more than one pixel and current picture
Element distance having the same, then the pixel of preferred upper left angular direction, these pixels have higher priority.
Have in four neighbor pixels of the pixel of Current high resolution one or more pixel be edge pixel when,
By using and filtered pixel set of the different method of above method to determine this pixel in pixel.Described above
After anchor point and anchor straight line all determines in step, upward filtering is walked into control as much as possible perpendicular to edge, keeps its smaller the better,
Carry out the pixel value that high-resolution pixel is accurately determined along the filtering of anchor straight line simultaneously.In this way, base can be reduced to the greatest extent
The defect for having many edge blurry parts in the conventional method of interpolation.At the fringe region of image, the edge of usual image
Content in image is divided into two relatively uniform regions of content.Picture for each content consistency region, in region
Plain value reaches unanimity.So herein, it is first determined the Uniform Domains around Current high resolution pixel.If current edge
Anchor point pixel is p1=(ai,aj), then increase by two anchor point p of selection2=(ai-1,aj- 1) and p3=(ai+1,aj+1).For this
Two anchor points of multiselect centered on the two anchor points will do two straight lines more, and the direction of the two straight lines and existing anchor are straight
Line direction is parallel.In this way, including existing anchor straight line, one shares three straight lines.On every straight line, select close to straight line and this
5 pixels of the anchor point that straight line passes through, that is, minimize following function:
α*||pi-xi||+β*l(xi) (7)
Here, | | pi-xi| | it is pixel xiTo pixel piThe distance between, l (xi) it is pixel xiTo by anchor point pi
The distance between straight line of generation, α and β are two parameters in method.When encountering the pixel for having same functions value, use
With identical method described above, the preferential pixel for selecting upper left angular direction.After completing this operation, include by generating 3
The set omega of the Uniform Domains of pixel1,Ω2, and Ω3, and each set includes 5 pixels.Then, it calculates each
The average value of the pixel value of pixel, set omega in set1,Ω2, and Ω3In average pixel value use m respectively1,m2, and m3Come
It indicates.If | m2-m1| > | m3-m1|, then use set omega3Substitute Ω2;Otherwise, Ω2Do not change.
The determination of 1.3 high-resolution pixel values:
For being determined as the high-resolution pixel of smooth pixel above, its pixel value will be determined using following formula:
Here, (u, v) is the position of current high-resolution pixel, and Ω is the pixel with its nearest low resolution, f (x) and g
(x) it is two functions, takes f (x)=x in the present invention3, g (x)=x2, m (u, v) is the pixel nearest with current high-resolution
The average value of pixel value, w are normalized parameters, are had simultaneously:
For edge pixel, sets of pixel values Ω is used first1The formula (8) of Ω use or more is substituted, to obtain I1(u,v)。
Then, with sets of pixel values Ω2The formula (8) of Ω use or more is substituted, to obtain I2(u,v).Then, will to the two values into
Row combination is to obtain high-resolution pixel value I (u, v), it may be assumed that
I (u, v)=w1*I1(u,v)+w2*I2(u,v) (10)
Here, parameter wiWith pixel collection ΩiThe variance of middle pixel value is inversely proportional.
Application effect of the invention is explained in detail below with reference to experiment.
The comparison of the PSNR value of the method for the invention of table 1 and bi-cubic interpolation method
In the experiment to the method for the present invention, parameter value α and β are set individually into 2 and 1.Threshold T1It is configured to
200.The image tested from website " http://sipi.usc.edu/database/database.php? volume=
Image data base on misc ".In an experiment, original image is reduced first and down-sampling, the factor of down-sampling are 4 × 4.
Then, super-resolution processing is carried out to the image of obtained down-sampling using method of the invention and bi-cubic interpolation method, obtained
To the reconstruction image of big amplification as original image.Finally, calculating the peak value noise between original image and reconstruction image
Than (PSNR) with the performance of the various methods of determination.Table 1 shows experimental result.From this table, it is easy to see that the method proposed
Performance will be much better than the method for bi-cubic interpolation.
In present aspect, a new interpolation super-resolution method is proposed, is carried out in the Uniform Domains of image slotting
Value, to avoid the interpolation for crossing over two inconsistent regions.With the method, the high-resolution of reconstruction can be reduced to a certain extent
In the image of rate the problem of edge blurry.
The foregoing is merely illustrative of the preferred embodiments of the present invention, is not intended to limit the invention, all in essence of the invention
Made any modifications, equivalent replacements, and improvements etc., should all be included in the protection scope of the present invention within mind and principle.