Background technology
Image scaling is widely used in digital picture and video processing applications, comprise the fields such as consumer electronics product and medical image, along with various consumer electronics products extensively adopt flat-panel display device, as mobile phone, video player, panel computer and LCD TV etc., the video source of same resolution will show on the flat-panel display device of various different resolutions, must adopt image scaling technology.
Current Image Zooming Algorithm mainly divides three classes: 1) traditional interpolation algorithm; 2) interpolation algorithm based on edge; 3) interpolation algorithm based on estimation.Latter two algorithm is because operand is large, in consumer electronics product, seldom adopts, and traditional interpolation algorithm, because operand is less, is widely used in consumer electronics product, conventional arest neighbors interpolation, bilinear interpolation and the Tri linear interpolation of mainly containing.Tradition interpolation image convergent-divergent algorithm is all that to be based upon band-limited signal be perfectly to rebuild by ideal low-pass filter, therefore the low pass filter of these algorithm design is all to level off to the frequency spectrum of ideal low-pass filter, yet, picture signal is not with limit, so the HFS that traditional interpolation algorithm can not Recovery image, finally causes the edge blurry of image or has crenellated phenomena.
Summary of the invention
For above deficiency, the invention provides and a kind ofly can effectively overcome edge blurry in video image zooming processing procedure and the improved bilinear interpolation video scaling method of crenellated phenomena, first it receive pending vision signal; Then judgement is that this vision signal is amplified to processing, still carries out convergent-divergent processing; If amplify, process, first the vision signal receiving is carried out to sharp filtering processing, and then the vision signal after sharp filtering is processed is carried out bilinear interpolation processing, the output video image being finally disposed, if convergent-divergent is processed, first the vision signal receiving is carried out to bilinear interpolation processing, the vision signal after then bilinear interpolation being processed is carried out sharp filtering processing, the output video image being finally disposed.
The present invention adopts sharp filtering device to carry out sharp filtering processing.
Described sharp filtering device is associated filters, and its filter factor is:
Wherein, C and S are parameters, and their value is adjusted according to feature of image.
Described sharp filtering device is logarithmic filtering device, and its filter factor is:
Wherein, B is sharpening parameter, according to characteristics of image, adjusts, and must be greater than-12.
Described sharp filtering device is Laplace filter, and its filter factor is:
Wherein, C is sharpening parameter, according to characteristics of image, adjusts, and must be greater than-4.
Beneficial effect of the present invention: the present invention processes and adopts preposition sharp filtering device for the amplification of video image, and being dwindled to process, video image adopts rearmounted sharp filtering device, can promote significantly the quality of bilinear interpolation video scaling, can effectively overcome edge blurry and crenellated phenomena in video image zooming processing procedure, obtain the video image of better image quality.
Embodiment
Below in conjunction with accompanying drawing, the present invention is further elaborated.
As shown in Figure 1, improved bilinear interpolation video scaling method of the present invention comprises:
1) receive pending vision signal.
2) judgement is that this vision signal is amplified to processing, still carries out convergent-divergent processing, if amplify, processes, and performs step 3), no person, performs step 4).
3) vision signal receiving is carried out to sharp filtering processing, and then the vision signal after sharp filtering processing is carried out to bilinear interpolation processing, finally export final video image, termination routine.
4) vision signal receiving is carried out to bilinear interpolation processing, the vision signal after then bilinear interpolation being processed is carried out sharp filtering processing, finally exports final video image, termination routine.
Be that the present invention adopts before bilinear interpolation algorithm carries out convergent-divergent to video image, first judgement is that video image is amplified or dwindled; Then, if raw video image is amplified, first raw video image is carried out to sharp filtering, then carry out bilinear interpolation; If raw video image is dwindled, first carry out bilinear interpolation, then carry out sharp filtering.
Because bilinear interpolation has the character of low pass filter, make high fdrequency component impaired, so can make image outline thicken, therefore, the present invention adopts sharp filtering device to improve the quality of image scaling, the kind of sharp filtering device is a lot, and the present invention tests by multitude of video image scaling, and the present invention pays the utmost attention to and adopts the obvious sharp filtering device of following three kinds of effects: associating sharp filtering device, logarithm sharp filtering device, Laplce's sharp filtering device.
Filter factor also claims operator or convolution mask, and the concrete coefficient of associated filters is:
Wherein, C and S are parameters, can be according to feature of image adjustment.
Logarithm sharp filtering device filter factor is:
In above formula, B is sharpening parameter, can adjust according to characteristics of image, must be greater than-12.
Laplace filter filter factor is:
In above formula, C is sharpening parameter, can adjust according to characteristics of image, must be greater than-4.
Bilinear interpolation algorithm (Bilinear Interpolation) is modal linear interpolation, because linear interpolation can be decomposed into vertical and horizontal both direction carries out respectively, so be called bilinear interpolation, its video image zooming quality will be higher than neighbor interpolation algorithm.It obtains the gray value of pixel to be inserted according to the gray value of the related pixel point of 4 neighborhoods around pixel to be inserted by two-dimensional linear weighted average calculation, as shown in Figure 2, the value of required pixel is:
P(xx,yy)=(1-Δy)·[(1-Δx)·f(x,y)+Δx·f(x+1,y)]+Δy·[(1-Δx)·f(x,y+1)+Δx·f(x+1,y+1)]
Xx wherein, the location of pixels that yy is output image.F (x, y), f (x+1, y), f (x, y+1) and f (x+1, y+1) are the pixel value in neighbours territory in original image.If horizontal scaling and vertically scale are separated, convergent-divergent row convergent-divergent more in advance, so above-mentioned formula can be write:
I(xx,y)=(1-Δx)·f(x,y)+Δx·f(x+1,y);
I(xx,y+1)=(1-Δx)·f(x,y+1)+Δx·f(x+1,y+1);
P(xx,yy)=(1-Δy)·I(xx,y)+Δy·I(xx,y+1);
Wherein, I () has represented the interpolation calculation intermediate point of upper and lower two grey.
The foregoing is only preferred embodiments of the present invention, the present invention is not limited to above-mentioned execution mode, in implementation process, may there is local small structural modification, if various changes of the present invention or modification are not departed to the spirit and scope of the present invention, and within belonging to claim of the present invention and equivalent technologies scope, the present invention is also intended to comprise these changes and modification.