Summary of the invention
The present invention has overcome the deficiencies in the prior art, and the method when improving video image zooming is provided.
For solving above-mentioned technical matters, the present invention by the following technical solutions:
Improve the method for image scaling quality, according to following steps:
Steps A. the mean value of brightness and the mean value of colourity in the statistics convergent-divergent front window;
Step B. divided by convergent-divergent front window magnitude proportion coefficient, selects macroblock partition according to convergent-divergent rear hatch size;
Step C. carries out filtering in selected macro block mode;
The mean value of the image brightness behind the step D. statistical filtering and the mean value of colourity with the mean value of the image brightness of convergent-divergent front window and the mean value comparison of colourity, carry out edge brightness and edge colourity adjustment;
Step e. export adjusted pictorial data.
Further technical scheme is among the step B, and macroblock partition is that window is divided into 4x4,4x8,8x4,8x8,8x16,16x8 or 16x16 part.
Further technical scheme be the horizontal scaling scale-up factor of resize-window be 〉=0.5 and<2.0, the vertically scale scale-up factor is 〉=0.5 and<2.0 o'clock, macroblock partition is selected 4x4; The horizontal scaling scale-up factor of window is 〉=0.5 and<2.0, the vertically scale scale-up factor is 〉=2.0 and<4.0 o'clock, macroblock partition is selected 4x8; The horizontal scaling scale-up factor of window is 〉=2.0 and<4.0, the vertically scale scale-up factor is 〉=0.5 and<2.0 o'clock, macroblock partition is selected 8x4; The horizontal scaling scale-up factor of window is 〉=2.0 and<4.0, the vertically scale scale-up factor is 〉=2.0 and<4.0 o'clock, macroblock partition is selected 8x8; The horizontal scaling scale-up factor of window is 〉=0.5 and<4.0, the vertically scale scale-up factor is 〉=4.0 and<8.0 o'clock, macroblock partition is selected 8x16; The horizontal scaling scale-up factor of window is 〉=4.0 and<8.0, the vertically scale scale-up factor is 〉=0.5 and<4.0 o'clock, macroblock partition is selected 16x8; The horizontal scaling scale-up factor of window is 〉=4.0 and<8.0, the vertically scale scale-up factor is 〉=4.0 and<8.0 o'clock, macroblock partition is selected 16x16; The horizontal scaling scale-up factor of window and vertically scale scale-up factor all do not fall into above-mentioned when interval, and macroblock partition is selected 16x16.
Further technical scheme is among the step C, and filtering mode is level, vertical, cross filtering or direct any in the copy etc.
Further technical scheme is among the step D, the mean value of image brightness after the filtering, and the absolute value of the difference of the mean value of the image brightness of convergent-divergent front window carries out the edge brightness adjustment again 2 between 5 the time.
Further technical scheme is among the step D, the mean value of colourity after the filtering, and the absolute value of the difference of the mean value of the colourity of convergent-divergent front window carries out the adjustment of edge colourity again 0.02 between 0.05 the time.
Further technical scheme is that the edge filter picture element number adjusted is between 1 to 3.
Further technical scheme is for sequence line by line, each frame according to steps A to the step e adjustment; For interlaced, each or frame according to steps A to the step e adjustment; For still image, directly the back pictorial data is adjusted in output.
Compared with prior art, the invention has the beneficial effects as follows and enrich ganmma controller level and gradation performance behind the scaling, strengthen the light and shade contrast, improve the level of whole image quality.
Embodiment
The present invention is further elaborated below in conjunction with accompanying drawing.
On simulated television, plan on the picture picture of one 1/3 size and be amplified to all over the screenly, then the horizontal scaling scale-up factor is 3.0, the vertically scale scale-up factor is 3.0, selects macroblock partition to select 8x8.At first statistics is amplified the brightness of the preceding first frame original window and the mean value of colourity, and the mean value of brightness is 200cd square metre, and the mean value of colourity is 0.250.After adopting cross filtering to carry out filtering in the macro block of 8x8, by interpolation method, calculate image all over the screen, every square metre of the mean value 202cd of the brightness of image after calculating is amplified again, the mean value of colourity is 0.310.The absolute value of the difference of the average brightness before and after the convergent-divergent is every square metre of 2cd, carries out the brightness adjustment to amplifying 2 pixels of back edge of image, reduces every square metre of each pixel brightness 2cd.The absolute value of the difference of the colourity mean value before and after the convergent-divergent is 0.06, and the colourity of edge pixel is not adjusted.This frame data output that to adjust brightness again is used for showing.
The image of each frame original window before amplifying and the image after the amplification are all handled according to the method described above, formed final amplification rear video image, all show on TV, realize the level and smooth amplification of window.
By weight Zoom method of the present invention, the performance of ganmma controller level and gradation strengthens the light and shade contrast behind scaling, improves the level of whole image quality, and the amplification process of video is more natural and tripping, for the beholder provides impression more attractive in appearance.