CN102663676A - Image zooming method and system thereof - Google Patents

Image zooming method and system thereof Download PDF

Info

Publication number
CN102663676A
CN102663676A CN2012100921159A CN201210092115A CN102663676A CN 102663676 A CN102663676 A CN 102663676A CN 2012100921159 A CN2012100921159 A CN 2012100921159A CN 201210092115 A CN201210092115 A CN 201210092115A CN 102663676 A CN102663676 A CN 102663676A
Authority
CN
China
Prior art keywords
pixel
component intensity
image
binary
belongs
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
Application number
CN2012100921159A
Other languages
Chinese (zh)
Inventor
李云夕
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Wondershare Software Co Ltd
Original Assignee
Shenzhen Wondershare Software Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Shenzhen Wondershare Software Co Ltd filed Critical Shenzhen Wondershare Software Co Ltd
Priority to CN2012100921159A priority Critical patent/CN102663676A/en
Publication of CN102663676A publication Critical patent/CN102663676A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Color Image Communication Systems (AREA)

Abstract

The embodiment of the invention discloses an image zooming method. The method comprises the following steps of: determining an image area to which each pixel belongs in red component intensity, green component intensity and blue component intensity of a source image respectively, wherein the image area comprises an edge area and a flat area; if it is determined that the pixel belongs to the flat area, carrying out interpolation calculation on the red component intensity, the green component intensity and the blue component intensity corresponding to the pixel belonging to the flat area according to a binary three-point Lagrange interpolation algorithm to calculate a pixel value of a target image; if it is determined that the pixel belongs to the edge region, carrying out the interpolation calculation on the red component intensity, the green component intensity and the blue component intensity corresponding to the pixel belonging to the edge area according to a gravity Newton binary mixed rational interpolation algorithm to calculate the pixel value of the target image; and generating the target image according to the pixel value. By employing the method and the system, the definition of the target image after zooming processing can be increased, and the quality of the target image after the zooming processing can be obviously improved.

Description

A kind of image-scaling method and system
Technical field
The present invention relates to image processing field, relate in particular to a kind of image-scaling method and system.
Background technology
Image zoom is exactly the resolution that changes image; Comprise from low resolution and dwindling to high-resolution image amplification and the image from the high resolving power to the low resolution; Its key problem is how to distribute according to the pixel color of source images and the various characteristics of image, the make new advances pixel color value of target image under the resolution of reconstruct.
The image zoom algorithm is numerous, how under the prerequisite that does not influence whole scaling speed, increases substantially the visual effect behind the image zoom, is the hot issue that people study.
Application number is that the patent of CN201010618417.6 has provided a kind of image-scaling method and device, and this method is: obtain the coordinate of coordinate corresponding virtual pixel in source images of pixel in the target image, said coordinate is horizontal coordinate or vertical coordinate; Obtain in the source images pixel value according to the coordinate of said virtual representation vegetarian refreshments at M actual pixels point of said virtual pixel point coordinate direction; Utilize the pixel value of a polyphase filters and a said M actual pixels point to obtain first pixel value and second pixel value, wherein, M is the tap number of polyphase filters; Said first pixel value and second pixel value are carried out the pixel value that linear interpolation obtains pixel in the said target image.
Application number is the image-scaling method that the patent of CN201010300656.7 has proposed a kind of technical field of image processing; May further comprise the steps: the first step; Regard each pixel as a rectangle; Set up rectangular coordinate system, obtain the positional information of four summits of image slices vegetarian refreshments M behind the convergent-divergent at this coordinate system; In second step, around pixel M, choose N the pixel in the original image, and, obtain the light distribution state of pixel M according to the positional information and the pixel value information of this N pixel; In the 3rd step,, obtain the pixel value UM of pixel M according to light distribution state and the positional information of pixel M; The 4th step repeated the 3rd step of the first step 1 successively, obtained behind the convergent-divergent positional information and the pixel value of each pixel in the image respectively, thereby obtained scaled images.
But image is all clear inadequately behind the convergent-divergent that these schemes obtain, and picture quality seriously descends.
Summary of the invention
Embodiment of the invention technical matters to be solved is, a kind of image-scaling method and system are provided.Mix reasonable interpolation method through center of gravity newton's binary of rectangular node convergent-divergent is carried out in the edge of image zone; Use 3 lagrange-interpolations of binary that the flat site of image is carried out convergent-divergent; Both guarantee whole scaling speed, can obtain image behind the high convergent-divergent of sharpness again.
In order to solve the problems of the technologies described above, the embodiment of the invention provides a kind of image-scaling method, comprising:
Based on three Color Channels of red, green, blue, confirm in red component intensity, green component intensity and the blue component intensity of source images image-region under each pixel respectively, said image-region comprises fringe region and flat site;
If confirm that said pixel belongs to flat site; Then corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to flat site is carried out interpolation calculation, calculate the pixel value of target image based on 3 Lagrange's interpolation algorithms of binary; If confirm that said pixel belongs to fringe region; Then mix reasonable interpolation algorithm corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to fringe region is carried out interpolation calculation, calculate the pixel value of target image based on center of gravity newton binary;
Generate target image according to the pixel value that calculates.
Wherein, the step of the affiliated image-region of each pixel specifically comprises in red component intensity, green component intensity and the blue component intensity of said definite source images respectively:
The first sampling rule according to preset is chosen each pixel at least one pixel on every side respectively as first sample space in red component intensity, green component intensity and the blue component intensity of source images;
Whether the variance of judging the pixel value of pixel in said first sample space is to confirm that then this pixel belongs to flat site if be judged as less than predetermined threshold value; If be judged as not, confirm that then this pixel belongs to fringe region.
Wherein, saidly mix the step that reasonable interpolation algorithm carries out interpolation calculation to the pixel that belongs to fringe region corresponding red component intensity, green component intensity and blue component intensity according to center of gravity newton binary and specifically comprise:
The second sampling rule according to preset is chosen this pixel at least one pixel on every side as second sample space, and the size of said second sample space is (n+1) * (m+1);
According to preset center of gravity newton's binary mix reasonable interpolation calculation formula calculate the corresponding pixel cell of this pixel in the target image (x, pixel value R y) (x, y), said center of gravity newton's binary is mixed reasonable interpolation calculation formula and is:
R ( x , y ) = Σ i = 0 m ω i x - x i A i ( y ) Σ i = 0 m ω i x - x i
Wherein, A i(y)=a I0+ a I1(y-y 0)+... + a In(y-y 0) (y-y 1) ... (y-y N-1),
M, n are respectively positive integer, x i, y jBe interpolation knot, ω iBe interpolation weight.
Wherein, calculate ω according to the numerical value approach method i
Correspondingly, the present invention also provides a kind of image scaling system, comprising:
The zone determination module based on three Color Channels of red, green, blue, is confirmed in red component intensity, green component intensity and the blue component intensity of source images image-region under each pixel respectively, and said image-region comprises fringe region and flat site;
The flat pixels computing module; Be used for when said image-region determination module confirms that said pixel belongs to flat site; According to 3 Lagrange's interpolation algorithms of binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to flat site is carried out interpolation calculation, calculate the pixel value of target image;
The edge pixel computing module; Be used for when said image-region determination module confirms that said pixel belongs to fringe region; Mix reasonable interpolation algorithm according to center of gravity newton binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to fringe region is carried out interpolation calculation, calculate the pixel value of target image;
The image generation module, the pixel value of each color component that is used for calculating according to said flat pixels computing module and edge pixel computing module generates target image.
Wherein, said image-region determination module specifically comprises:
Module is divided in first sample space, is used for according to regular at least one pixel around red component intensity, green component intensity and the blue component intensity of source images are chosen each pixel respectively of the first preset sampling as first sample space;
Whether judge module, the variance of pixel value that is used for judging the said first sample space pixel less than predetermined threshold value, if the judged result of said judge module is for being to represent that then this pixel belongs to flat site; If the judged result of said judge module representes then that for not this pixel belongs to fringe region.
Wherein, said edge pixel computing module specifically comprises:
Division module in second sample space is used for choosing this pixel at least one pixel on every side as second sample space according to the second preset sampling rule, and the size of said second sample space is (n+1) * (m+1);
Center of gravity newton's binary is mixed reasonable interpolation calculation module; Be used for mixing reasonable interpolation calculation formula and calculate the corresponding pixel cell (x of this pixel of target image according to preset center of gravity newton's binary; Pixel value R y) (x, y), said center of gravity newton's binary is mixed reasonable interpolation calculation formula and is:
R ( x , y ) = Σ i = 0 m ω i x - x i A i ( y ) Σ i = 0 m ω i x - x i
Wherein, A i(y)=a I0+ a I1(y-y 0)+... + a In(y-y 0) (y-y 1) ... (y-y N-1),
M, n are respectively positive integer, x i, y jBe interpolation knot, ω iBe interpolation weight.
Wherein, said center of gravity newton's binary is mixed reasonable interpolation calculation module according to numerical value approach method calculating ω i
Embodiment of the present invention embodiment; Has following beneficial effect: mix reasonable interpolation method through center of gravity newton's binary of rectangular node convergent-divergent is carried out in the edge of image zone; Use 3 lagrange-interpolations of binary that the flat site of image is carried out convergent-divergent; Particularly, it is to be x change in coordinate axis direction interpolation scheme with center of gravity rational interpolation polynomial expression that the rectangular node center of gravity newton binary of present embodiment is mixed rational interpolation, and Newton interpolation is the interpolation scheme of y change in coordinate axis direction; Construct a kind of better numerical value stability, approached effective interpolation algorithm; Both guaranteed whole scaling speed, and can obtain image behind the high convergent-divergent of sharpness again, comparing prior art picture quality has had tangible improvement.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art; To do to introduce simply to the accompanying drawing of required use in embodiment or the description of the Prior Art below; Obviously, the accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills; Under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the first embodiment process flow diagram of image-scaling method provided by the invention;
Fig. 2 is the second embodiment process flow diagram of image-scaling method provided by the invention;
Fig. 3 is the first example structure synoptic diagram of image scaling system provided by the invention;
Fig. 4 is the second example structure synoptic diagram of image scaling system provided by the invention.
Embodiment
To combine the accompanying drawing in the embodiment of the invention below, the technical scheme in the embodiment of the invention is carried out clear, intactly description, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills are not making the every other embodiment that is obtained under the creative work prerequisite, all belong to the scope of the present invention's protection.
Referring to Fig. 1, be the first embodiment process flow diagram of image-scaling method provided by the invention, this method comprises:
At step S100, based on three Color Channels of red, green, blue, confirm in red component intensity, green component intensity and the blue component intensity of source images image-region under each pixel respectively, said image-region comprises fringe region and flat site.
If confirm that pixel belongs to flat site, then execution in step S101.At step S101, according to 3 Lagrange's interpolation algorithms of binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to flat site is carried out interpolation calculation, calculate the pixel value of target image.
If confirm that pixel belongs to fringe region, then execution in step S102.At step S102, mix reasonable interpolation algorithm according to center of gravity newton binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to fringe region is carried out interpolation calculation, calculate the pixel value of target image.
At step S103, generate target image according to the pixel value that calculates.
The image-scaling method that the embodiment of the invention provides; Through different processing is carried out in regional peace smooth zone in edge; Utilize center of gravity newton binary to mix reasonable interpolation algorithm and calculate the pixel value in the target image; Can increase the sharpness of the target image after convergent-divergent is handled, obviously improve the quality of the target image after convergent-divergent is handled.
Referring to Fig. 2, be the second embodiment process flow diagram of image-scaling method provided by the invention, this method comprises:
At step S200; Based on three Color Channels of red, green, blue, in red component intensity, green component intensity and the blue component intensity of source images, choose each pixel at least one pixel on every side respectively as first sample space according to the first preset sampling rule.First the sampling rule can for: for the pixel I in the red component intensity r(i j), chooses the I in the red component intensity r(i-1, j-1), I r(i-1, j), I r(i-1, j+1), I r(i, j-1), I r(i, j), I r(i, j+1), I r(i+1, j-1), I r(i+1, j), I r(i+1, j+1) these 9 pixels are as first sample space; For the pixel I in the green component intensity g(i j), chooses the I in the green component intensity g(i-1, j-1), I g(i-1, j), I g(i-1, j+1), I g(i, j-1), I g(i, j), I g(i, j+1), I g(i+1, j-1), I g(i+1, j), I g(i+1, j+1) these 9 pixels are as first sample space; For the pixel I in the blue component intensity b(i j), chooses the I in the blue component intensity b(i-1, j-1), I b(i-1, j), I b(i-1, j+1), I b(i, j-1), I b(i, j), I b(i, j+1), I b(i+1, j-1), I b(i+1, j), I b(i+1, j+1) these 9 pixels that is to say as first sample space, the size of first sample space is the 3*3 block of pixels.Certainly, the present invention is not limited to this, and the first sampling rule can be the various method of sampling well known to those skilled in the art, and for example first sample space can be 6*6 block of pixels, 8*8 block of pixels etc., and the 3*3 block of pixels is preferred embodiment.
At step S201, whether the variance of judging the pixel value of pixel in first sample space is less than predetermined threshold value.Particularly, to be that the block of pixels of 3*3 is an example with image division, suppose R k, G kAnd B kBe respectively red component intensity, green component intensity and the blue component intensity of k pixel in this first sample space, judge whether to satisfy V r = &Sigma; i = 1 9 | R i - r &OverBar; | 2 < &epsiv; , V g = &Sigma; i = 1 9 | G i - g &OverBar; | 2 < &epsiv; And V b = &Sigma; i = 1 9 | B i - b &OverBar; | 2 < &epsiv; , Wherein r &OverBar; = &Sigma; i = 1 9 R i / 9 ,
Figure BDA0000149440340000065
And
Figure BDA0000149440340000066
ε is a predetermined threshold value, can get 1 to 5.
If the judged result of step S201 is for being then to represent to belong to flat site corresponding to the pixel of this first sample space, execution in step S202.In step S202, according to 3 Lagrange's interpolation algorithms of binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to flat site is carried out interpolation calculation, calculate the pixel value of target image.Wherein 3 Lagrange's interpolation formulas of binary are following:
Q ( x , y ) = &Sigma; i = p p + 2 &Sigma; j = p q + 2 &Pi; k = p k &NotEqual; i p + 2 ( x - x k x i - x k ) &Pi; l = q l &NotEqual; j q + 2 ( y - y l y j - y l ) z ij .
If the judged result of step S201 then representes to belong to fringe region corresponding to the pixel of this first sample space execution in step S203 for not.In step S203, mix reasonable interpolation algorithm according to center of gravity newton binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to fringe region is carried out interpolation calculation, calculate the pixel value of target image.Can in advance pixel cell in the target image and the pixel in the source images be shone upon, source images amplified or dwindles any multiple (comprising integral multiple and non-integral multiple) so that realize.
Particularly, step S203 can comprise: the second sampling rule according to preset is chosen this pixel at least one pixel on every side as second sample space, and the size of second sample space is (n+1) * (m+1); According to preset center of gravity newton's binary mix reasonable interpolation calculation formula calculate the corresponding pixel cell of this pixel in the target image (x, pixel value R y) (x, y), wherein center of gravity newton binary is mixed reasonable interpolation calculation formula and is:
R ( x , y ) = &Sigma; i = 0 m &omega; i x - x i A i ( y ) &Sigma; i = 0 m &omega; i x - x i
Wherein, A i(y)=a I0+ a I1(y-y 0)+... + a In(y-y 0) (y-y 1) ... (y-y N-1), (i=0,1 ..., n) m, n are respectively positive integer, x i, y jBe interpolation knot, ω iBe interpolation weight, ω i(i=0,1 ..., n).
Figure BDA0000149440340000071
(i=0; 1 ..., m; J=0; 1 ..., n), define the partial difference quotient of following form
Figure BDA0000149440340000072
Figure BDA0000149440340000073
Figure BDA0000149440340000074
The second sampling rule can be identical with the first sampling rule, also can be different with the first sampling rule.
Preferably, first sample space of describing among the step S200 as second sample space among the step S203, that is to say that the size of second sample space is 3*3, this moment n=2, m=2, in above-mentioned formula, when being divided into 3 * 3 block of pixels to image, n=2.And ω iBe called the interpolation weight that calculates interpolation, can be approached by numerical value, optimization method tries to achieve, especially, interpolation weight can utilize following numerical value approach method to calculate:
Power ω with each interpolation knot place i(i=0,1,2) is decision variable, and is minimum with the interpolation square error, promptly MIN = Max x 0 < x < x 2 , y 0 < y < y 2 [ R ( x , y ) - Sinc ( x , y ) ] 2 , Sinc ( x , y ) = Sin ( &pi; x ) Sin ( &pi; y ) &pi; X&pi; y (at this moment, objective function is merely power ω for objective function iThe function of (i=0,1,2)), simultaneously for guaranteeing that center of gravity newton binary mixing rational interpolating function satisfies interpolation condition, no limit, ω iConstraint condition also must be satisfied in (i=0,1,2)
ω i≠0,sign(ω i)=-sign(ω i+1)
At last; For guaranteeing that optimized Algorithm solves uniqueness, the Optimization Model that to sum up can find the solution optimum power to power additional specifications constraint
Figure BDA0000149440340000077
is following.
MIN = max x 0 < x < x 3 , y 0 < y < y 3 [ R ( x , y ) - Sinc ( x , y ) ] 2 , Sinc ( x , y ) = sin ( &pi;x ) sin ( &pi;y ) &pi;x&pi;y
ω i≠0,
sign(ω i)=-sign(ω i+1)
&Sigma; i = 0 2 | &omega; i | = 1 ,
Find the solution this Optimization Model with LINGO software and promptly get one group of best interpolation power.
Preferably,, accelerate image processing speed, can calculate w according to the numerical value approach method in order to reduce calculated amount lFor example, can get
At step S204, generate target image according to the pixel value of the pixel cell of each color component that calculates.
Embodiment shown in Figure 2 has enumerated a kind of method that definite pixel belongs to flat site or belongs to fringe region, but the present invention is not limited to this.In other embodiments of the invention; Can also adopt other modes; The absolute value of the difference of the pixel value of two relatively more adjacent pixels for example with this pixel; If this absolute value is less than predetermined threshold value (for example 25), then this pixel belongs to flat site (being non-fringe region), otherwise this pixel belongs to fringe region.
Referring to Fig. 3, be the first example structure synoptic diagram of image scaling system provided by the invention, this system comprises:
Zone determination module 310; Be used for based on three Color Channels of red, green, blue; Confirm in red component intensity, green component intensity and the blue component intensity of source images image-region under each pixel respectively, said image-region comprises fringe region and flat site.
Flat pixels computing module 320; Be used for when image-region determination module 310 confirms that said pixel belongs to flat site; According to 3 Lagrange's interpolation algorithms of binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to flat site is carried out interpolation calculation, calculate the pixel value of target image.
Edge pixel computing module 330; Be used for when image-region determination module 310 confirms that said pixel belongs to fringe region; Mix reasonable interpolation algorithm according to center of gravity newton binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to fringe region is carried out interpolation calculation, calculate the pixel value of target image.
Image generation module 340, the pixel value that is used for calculating according to flat pixels computing module 320 and edge pixel computing module 330 generates target image.
The image scaling system that the embodiment of the invention provides; Through different processing is carried out in regional peace smooth zone in edge; Utilize center of gravity newton binary to mix reasonable interpolation algorithm and calculate the pixel value in the target image; Can increase the sharpness of the target image after convergent-divergent is handled, obviously improve the quality of the target image after convergent-divergent is handled.
Referring to Fig. 4; It is the second example structure synoptic diagram of image scaling system provided by the invention; This system comprises regional determination module 410, flat pixels computing module 420, edge pixel computing module 430 and image generation module 440, and wherein regional determination module 410 can comprise that again first sample space divides module 411 and judge module 412.
Module 411 is divided in first sample space, is used for according to regular at least one pixel around red component intensity, green component intensity and the blue component intensity of source images are chosen each pixel respectively of the first preset sampling as first sample space.First the sampling rule can for: for the pixel I in the red component intensity r(i j), chooses the I in the red component intensity r(i-1, j-1), I r(i-1, j),
I r(i-1, j+1), I r(i, j-1), I r(i, j), I r(i, j+1), I r(i+1, j-1), I r(i+1, j), I r(i+1, j+1) these 9 pixels are as first sample space; For the pixel I in the green component intensity g(i j), chooses the I in the green component intensity g(i-1, j-1), I g(i-1, j), I g(i-1, j+1), I g(i, j-1), I g(i, j), I g(i, j+1), I g(i+1, j-1), I g(i+1, j), I g(i+1, j+1) these 9 pixels are as first sample space; For the pixel I in the blue component intensity b(i j), chooses the I in the blue component intensity b(i-1, j-1), I b(i-1, j), I b(i-1, j+1), I b(i, j-1), I b(i, j), I b(i, j+1), I b(i+1, j-1), I b(i+1, j), I b(i+1, j+1) these 9 pixels that is to say as first sample space, the size of first sample space is the 3*3 block of pixels.Certainly, the present invention is not limited to this, and the first sampling rule can be the various method of sampling well known to those skilled in the art, and for example first sample space can be 6*6 block of pixels, 8*8 block of pixels etc., and the 3*3 block of pixels is preferred embodiment.
Judge module 412, whether the variance of pixel value that is used for judging the first sample space pixel is less than predetermined threshold value.Particularly, to be that the block of pixels of 3*3 is an example with image division, suppose R k, G kAnd B kBe respectively red component intensity, green component intensity and the blue component intensity of k pixel in this first sample space, judge whether to satisfy V r = &Sigma; i = 1 9 | R i - r &OverBar; | 2 < &epsiv; , V g = &Sigma; i = 1 9 | G i - g &OverBar; | 2 < &epsiv; And V b = &Sigma; i = 1 9 | B i - b &OverBar; | 2 < &epsiv; , Wherein
Figure BDA0000149440340000095
And
Figure BDA0000149440340000096
ε is a predetermined threshold value, can get 1 to 5.If the judged result of judge module 412 is for being then to represent to belong to flat site corresponding to the pixel of this first sample space; If the judged result of judge module 412 is then represented to belong to fringe region corresponding to the pixel of this first sample space for not.
Flat pixels computing module 420; Be used in the judged result of judge module 412 when being; According to 3 Lagrange's interpolation algorithms of binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to flat site is carried out interpolation calculation, calculate the pixel value of target image.Wherein 3 Lagrange's interpolation formulas of binary are following:
Q ( x , y ) = &Sigma; i = p p + 2 &Sigma; j = p q + 2 &Pi; k = p k &NotEqual; i p + 2 ( x - x k x i - x k ) &Pi; l = q l &NotEqual; j q + 2 ( y - y l y j - y l ) z ij .
Edge pixel computing module 430; Be used in the judged result of judge module 412 for not the time; Mix reasonable interpolation algorithm according to center of gravity newton binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to fringe region is carried out interpolation calculation, calculate the pixel value of target image.In this image scaling system, can in advance pixel cell in the target image and the pixel in the source images be shone upon, so that realize source images is amplified or dwindles any multiple (comprising integral multiple and non-integral multiple).
Particularly; Edge pixel computing module 430 can comprise: module is divided in second sample space; Be used for choosing this pixel at least one pixel on every side as second sample space according to the second preset sampling rule, the size of second sample space is (n+1) * (m+1); Center of gravity newton's binary is mixed reasonable interpolation calculation module; Be used for mixing reasonable interpolation calculation formula and calculate the corresponding pixel cell (x of this pixel of target image according to preset center of gravity newton's binary; Pixel value r y) (x, y), wherein center of gravity newton binary is mixed reasonable interpolation calculation formula and is:
R ( x , y ) = &Sigma; i = 0 m &omega; i x - x i A i ( y ) &Sigma; i = 0 m &omega; i x - x i
Wherein, A i(y)=a I0+ a I1(y-y 0)+... + a In(y-y 0) (y-y 1) ... (y-y N-1), (i=0,1 ..., n) m, n are respectively positive integer, x i, y jBe interpolation knot, w iBe interpolation weight, ω i(i=0,1 ..., n).
(i=0; 1 ..., m; J=0; 1 ..., n), define the partial difference quotient of following form
Figure BDA0000149440340000103
Figure BDA0000149440340000104
The second sampling rule can be identical with the first sampling rule, also can be different with the first sampling rule.
Preferably, module 411 is divided in first sample space divide module, that is to say as second sample space; Adopt the above sampling rule of describing to sample, the size of second sample space is 3*3, at this moment n=2; In above-mentioned formula, when being divided into 3 * 3 block of pixels to image, n=2.And w iBe called the interpolation weight that calculates interpolation, can be approached by numerical value, optimization method tries to achieve, especially, interpolation weight can utilize following numerical value approach method to calculate:
Power ω with each interpolation knot place i(i=0,1,2) is decision variable, and is minimum with the interpolation square error, promptly MIN = Max x 0 < x < x 2 , y 0 < y < y 2 [ R ( x , y ) - Sinc ( x , y ) ] 2 , Sinc ( x , y ) = Sin ( &pi; x ) Sin ( &pi; y ) &pi; X&pi; y (at this moment, objective function is merely power ω for objective function iThe function of (i=0,1,2)), simultaneously for guaranteeing that center of gravity newton binary mixing rational interpolating function satisfies interpolation condition, no limit, ω iConstraint condition also must be satisfied in (i=0,1,2)
ω i≠0,sign(ω i)=-sign(ω i+1)
At last; For guaranteeing that optimized Algorithm solves uniqueness, the Optimization Model that to sum up can find the solution optimum power to power additional specifications constraint
Figure BDA0000149440340000111
is following.
MIN = max x 0 < x < x 3 , y 0 < y < y 3 [ R ( x , y ) - Sinc ( x , y ) ] 2 , Sinc ( x , y ) = sin ( &pi;x ) sin ( &pi;y ) &pi;x&pi;y
ω i≠0,
sign(ω i)=-sign(ω i+1)
&Sigma; i = 0 2 | &omega; i | = 1 ,
Find the solution this Optimization Model with LINGO software and promptly get one group of best interpolation power.
Preferably,, accelerate image processing speed, can calculate ω according to the numerical value approach method in order to reduce calculated amount lFor example, can get
Figure BDA0000149440340000115
Image generation module 440, the pixel value of each pixel cell of each color component that is used for calculating according to flat pixels computing module 420 and edge pixel computing module 430 generates target image.
Embodiment shown in Figure 4 has enumerated a kind of method that definite pixel belongs to flat site or belongs to fringe region, but the present invention is not limited to this.In other embodiments of the invention; The zone determination module can also adopt other modes to confirm the affiliated image-region of pixel; For example regional determination module can be relatively more adjacent with this pixel the absolute value of difference of pixel value of two pixels; If this absolute value is less than predetermined threshold value (for example 25), then this pixel belongs to flat site (being non-fringe region), otherwise this pixel belongs to fringe region.
One of ordinary skill in the art will appreciate that all or part of flow process that realizes in the foregoing description method; Be to instruct relevant hardware to accomplish through computer program; Described program can be stored in the computer read/write memory medium; This program can comprise the flow process like the embodiment of above-mentioned each side method when carrying out.Wherein, described storage medium can be magnetic disc, CD, read-only storage memory body (Read-Only Memory, ROM) or at random store memory body (Random Access Memory, RAM) etc.
Above disclosedly be merely a kind of preferred embodiment of the present invention; Certainly can not limit the present invention's interest field with this; One of ordinary skill in the art will appreciate that all or part of flow process that realizes the foregoing description; And, still belong to the scope that invention is contained according to the equivalent variations that claim of the present invention is done.

Claims (8)

1. an image-scaling method is characterized in that, comprising:
Based on three Color Channels of red, green, blue, confirm in red component intensity, green component intensity and the blue component intensity of source images image-region under each pixel respectively, said image-region comprises fringe region and flat site;
If confirm that said pixel belongs to flat site; Then corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to flat site is carried out interpolation calculation, calculate the pixel value of target image based on 3 Lagrange's interpolation algorithms of binary; If confirm that said pixel belongs to fringe region; Then mix reasonable interpolation algorithm corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to fringe region is carried out interpolation calculation, calculate the pixel value of target image based on center of gravity newton binary;
Generate target image according to the pixel value that calculates.
2. image-scaling method according to claim 1 is characterized in that, the step of the affiliated image-region of each pixel specifically comprises in red component intensity, green component intensity and the blue component intensity of said definite source images respectively:
The first sampling rule according to preset is chosen each pixel at least one pixel on every side respectively as first sample space in red component intensity, green component intensity and the blue component intensity of source images;
Whether the variance of judging the pixel value of pixel in said first sample space is to confirm that then this pixel belongs to flat site if be judged as less than predetermined threshold value; If be judged as not, confirm that then this pixel belongs to fringe region.
3. image-scaling method according to claim 1; It is characterized in that, saidly mix the step that reasonable interpolation algorithm carries out interpolation calculation to the pixel that belongs to fringe region corresponding red component intensity, green component intensity and blue component intensity according to center of gravity newton binary and specifically comprise:
The second sampling rule according to preset is chosen this pixel at least one pixel on every side as second sample space, and the size of said second sample space is (n+1) * (m+1);
According to preset center of gravity newton's binary mix reasonable interpolation calculation formula calculate the corresponding pixel cell of this pixel in the target image (x, pixel value R y) (x, y), said center of gravity newton's binary is mixed reasonable interpolation calculation formula and is:
R ( x , y ) = &Sigma; i = 0 m &omega; i x - x i A i ( y ) &Sigma; i = 0 m &omega; i x - x i
Wherein, A i(y)=a I0+ a I1(y-y 0)+... + a In(y-y 0) (y-y 1) ... (y-y N-1), m, n are respectively positive integer, x i, y jBe interpolation knot, ω iBe interpolation weight.
4. image-scaling method according to claim 3 is characterized in that, calculates w according to the numerical value approach method i
5. an image scaling system is characterized in that, comprising:
The zone determination module based on three Color Channels of red, green, blue, is confirmed in red component intensity, green component intensity and the blue component intensity of source images image-region under each pixel respectively, and said image-region comprises fringe region and flat site;
The flat pixels computing module; Be used for when said image-region determination module confirms that said pixel belongs to flat site; According to 3 Lagrange's interpolation algorithms of binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to flat site is carried out interpolation calculation, calculate the pixel value of target image;
The edge pixel computing module; Be used for when said image-region determination module confirms that said pixel belongs to fringe region; Mix reasonable interpolation algorithm according to center of gravity newton binary corresponding red component intensity, green component intensity and the blue component intensity of pixel that belongs to fringe region is carried out interpolation calculation, calculate the pixel value of target image;
The image generation module, the pixel value of each color component that is used for calculating according to said flat pixels computing module and edge pixel computing module generates target image.
6. image scaling system according to claim 5 is characterized in that, said image-region determination module specifically comprises:
Module is divided in first sample space, is used for according to regular at least one pixel around red component intensity, green component intensity and the blue component intensity of source images are chosen each pixel respectively of the first preset sampling as first sample space;
Whether judge module, the variance of pixel value that is used for judging the said first sample space pixel less than predetermined threshold value, if the judged result of said judge module is for being to represent that then this pixel belongs to flat site; If the judged result of said judge module representes then that for not this pixel belongs to fringe region.
7. image scaling system according to claim 5 is characterized in that, said edge pixel computing module specifically comprises:
Division module in second sample space is used for choosing this pixel at least one pixel on every side as second sample space according to the second preset sampling rule, and the size of said second sample space is (n+1) * (m+1);
Center of gravity newton's binary is mixed reasonable interpolation calculation module; Be used for mixing reasonable interpolation calculation formula and calculate the corresponding pixel cell (x of this pixel of target image according to preset center of gravity newton's binary; Pixel value R y) (x, y), said center of gravity newton's binary is mixed reasonable interpolation calculation formula and is:
R ( x , y ) = &Sigma; i = 0 m &omega; i x - x i A i ( y ) &Sigma; i = 0 m &omega; i x - x i
Wherein, A i(y)=a I0+ a I1(y-y 0)+... + a In(y-y 0) (y-y 1) ... (y-y N-1), m, n are respectively positive integer, x i, y jBe interpolation knot, ω iBe interpolation weight.
8. image scaling system according to claim 7 is characterized in that, said center of gravity newton's binary is mixed reasonable interpolation calculation module and calculated ω according to the numerical value approach method i
CN2012100921159A 2012-03-31 2012-03-31 Image zooming method and system thereof Pending CN102663676A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2012100921159A CN102663676A (en) 2012-03-31 2012-03-31 Image zooming method and system thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2012100921159A CN102663676A (en) 2012-03-31 2012-03-31 Image zooming method and system thereof

Publications (1)

Publication Number Publication Date
CN102663676A true CN102663676A (en) 2012-09-12

Family

ID=46773155

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2012100921159A Pending CN102663676A (en) 2012-03-31 2012-03-31 Image zooming method and system thereof

Country Status (1)

Country Link
CN (1) CN102663676A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218798A (en) * 2017-06-30 2019-01-15 武汉斗鱼网络科技有限公司 A kind of live streaming barrage color setting method and device
CN109727196A (en) * 2018-12-26 2019-05-07 呈像科技(北京)有限公司 Image interpolation processing method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008167027A (en) * 2006-12-27 2008-07-17 Olympus Corp Image processor, image processing method and image processing program
CN102170572A (en) * 2010-06-22 2011-08-31 上海盈方微电子有限公司 Novel edge adaptive color filter array (CFA) color image interpolation method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008167027A (en) * 2006-12-27 2008-07-17 Olympus Corp Image processor, image processing method and image processing program
CN102170572A (en) * 2010-06-22 2011-08-31 上海盈方微电子有限公司 Novel edge adaptive color filter array (CFA) color image interpolation method

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
YUE MA ET AL: "An Image Interpolation Algorithm Based on the Classification of the Pixels", 《2010 3RD INTERNATIONAL CONFERENCE ON COMPUTATIONAL INTELLIGENCE AND INDUSTRIAL APPLICATION (PACIIA)》 *
吴军 等: "构造一种广义重心混合有理插值", 《中小企业管理与科技(上旬刊)》 *
张玉武 等: "二元混合有理插值新方法", 《合肥工业大学学报(自然科学版)》 *
陈宝国 等: "一种基于Sobel算子和混合有理插值的图像缩放方法", 《微电子学与计算机》 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109218798A (en) * 2017-06-30 2019-01-15 武汉斗鱼网络科技有限公司 A kind of live streaming barrage color setting method and device
CN109727196A (en) * 2018-12-26 2019-05-07 呈像科技(北京)有限公司 Image interpolation processing method

Similar Documents

Publication Publication Date Title
Kucharik et al. A comparative study of interface reconstruction methods for multi-material ALE simulations
Li et al. Analysis-suitable T-splines: Characterization, refineability, and approximation
Bertsekas Convex optimization theory
CN110717005B (en) Thermodynamic diagram texture generation method, device and equipment
CN102567950A (en) Image scaling method and system
Kapl et al. Isogeometric analysis with $ C^ 1$ functions on planar, unstructured quadrilateral meshes
CN103093414B (en) A kind of DOM raster data DecryptDecryption and restoration methods
CN104461440A (en) Rendering method, rendering device and display device
CN105389290A (en) Efficient interpolation
CN105447815A (en) Method and device for processing image of mobile terminal equipment
CN101908216B (en) Method and device for realizing vector fonts
CN102663676A (en) Image zooming method and system thereof
CN102663677A (en) Image zooming method and system thereof
CN102663678A (en) Image zooming method and system thereof
CN104853059A (en) Super-resolution image processing method and device
CN102799750A (en) Method for quickly generating common side and non-common sides of geometry surface triangle
CN102663184B (en) Rasterization method of algebraic B-spline curve based on regularization conditions
JP2012063469A (en) Map display device, map display method, and program
Jaouen et al. Numerical transport of an arbitrary number of components
Ainsworth et al. A lowest-order composite finite element exact sequence on pyramids
Jalbert et al. Numerical computation of sharp travelling waves of a degenerate diffusion–reaction equation arising in biofilm modelling
CN102903097A (en) Method and device for image perspective correction
Zhang et al. On degree elevation of T-splines
Borradaile et al. Near-linear-time deterministic plane Steiner spanners for well-spaced point sets
Chen et al. Constructing connected bicritical graphs with edge-connectivity 2

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C53 Correction of patent of invention or patent application
CB02 Change of applicant information

Address after: 518057 Guangdong city of Shenzhen province Nanshan District Gao Xin Road, room 9 building on the north side of block A901 No. 006 TCL Industry Research Institute building A A Building 8 floor

Applicant after: Shenzhen Wondershare Information Technology Co., Ltd.

Address before: 518057 Guangdong city of Shenzhen province Nanshan District Gao Xin Road Building A block 8 Building TCL

Applicant before: Shenzhen Wondershare Software Co., Ltd.

COR Change of bibliographic data

Free format text: CORRECT: APPLICANT; FROM: SHENZHEN WONDERSHARE SOFTWARE CO., LTD. TO: SHENZHEN WONDERSHARE INFORMATION TECHNOLOGY CO., LTD.

C02 Deemed withdrawal of patent application after publication (patent law 2001)
WD01 Invention patent application deemed withdrawn after publication

Application publication date: 20120912