Embodiment
Refer to Fig. 1, Fig. 1 is the schematic flow sheet of vedio noise reduction method of the present invention.
Described vedio noise reduction method comprises the following steps:
S101, calculates the sad value of corresponding pixel in current frame image and previous frame image, is compared by described sad value with the SAD threshold value preset;
In this step, in described current frame image and previous frame image, corresponding pixel is the pixel of same position on two two field pictures.The sad value of described pixel is compared with the SAD threshold value (being such as set as 512) preset, if lower than described SAD threshold value, then not there is relative motion in described pixel in current frame image and previous frame image, and described pixel is " static pixel "; If the sad value of described pixel is not less than described SAD threshold value, then described pixel there occurs relative movement in current frame image and previous frame image, and described pixel is " pixel of movement ".
Preferably, in this step, further by each two field picture all correspondence be divided into multiple image block, calculate the sad value of all pixels in the corresponding image block of current frame image and previous frame image, the sad value of described image block compared with default SAD threshold value.
Such as by each two field picture all in the same way correspondence be divided into the image block of multiple size 16 pixel × 16 pixel, by each image block in current frame image and previous frame image according to from left to right, order from top to bottom carries out differential comparison successively, calculate the sad value of the image block of each correspondence in two two field pictures of front and back, and the sad value of described image block is compared with the SAD threshold value preset.If the fast sad value of described image is lower than described SAD threshold value, then not there is relative motion in described image block in current frame image and previous frame image, described image block is " static image block ", and each pixel comprised in described image block is " static pixel "; If the sad value of described image block is not less than described SAD threshold value, then described image block there occurs relative movement in current frame image and previous frame image, described image block is " image block of movement ", and each pixel comprised in described image block is " pixel of movement ".
S102, if be less than described SAD threshold value, be then weighted average computation to the pixel value of described pixel at least in current frame image and previous frame image, obtain new pixel;
For static pixel, average computation is weighted to its pixel value at least in current frame image and previous frame image, obtains new pixel.Average computation can be weighted according to the requirement setting of noise reduction to the pixel of front some two field pictures when calculating.
Preferably, can perform weighted average calculation to pixel static in front 3 two field pictures at most, to obtain better noise reduction, particularly, when carrying out noise reduction process to the n-th two field picture, wherein, n is natural number; Step S102 comprises following sub-step:
If the sad value of corresponding pixel is less than described SAD threshold value in the n-th two field picture and the (n-1)th two field picture, then record the pixel value of described pixel at the n-th two field picture, and calculate the sad value of corresponding pixel in the (n-1)th two field picture and the n-th-2 two field picture further;
If the sad value of corresponding pixel is not less than described SAD threshold value in the (n-1)th two field picture and the n-th-2 two field picture, then average computation is weighted to the pixel value of described pixel in the n-th two field picture and the (n-1)th two field picture, obtains new pixel; If be less than described SAD threshold value, then record the pixel value of described pixel at the (n-1)th two field picture, and calculate the sad value of corresponding pixel in the n-th-2 two field picture and the n-th-3 two field picture further;
If the sad value of corresponding pixel is not less than described SAD threshold value in the n-th-2 two field picture and the n-th-3 two field picture, then average computation is weighted to the pixel value of described pixel in the n-th two field picture, the (n-1)th two field picture and the n-th-2 two field picture, obtains new pixel; If be less than described SAD threshold value, then average computation be weighted to the pixel value of described pixel in the n-th two field picture, the (n-1)th two field picture, the n-th-2 two field picture and the n-th-3 two field picture, obtain new pixel.
In the above-described embodiments, weighted average process can be done to the pixel value of described pixel in present frame and first three two field picture, to obtain higher noise reduction at most.
The weights of above-mentioned weighting processing procedure can be arranged by user, as a preferred embodiment, when being weighted average computation to the pixel value of described pixel in the n-th two field picture and the (n-1)th two field picture, obtain new pixel according to following formulae discovery:
n(x)=(p0(x)*4+p1(x)*2)/6;
Wherein, n (x) is the pixel value of new pixel, and p0 (x) is present frame, i.e. the pixel value of the pixel of the n-th two field picture, and p1 (x) is the pixel value of the pixel of the (n-1)th two field picture.
When being weighted average computation to the pixel value of described pixel in the n-th two field picture, the (n-1)th two field picture and the n-th-2 two field picture, obtain new pixel according to following formulae discovery:
n(x)=(p0(x)*4+p1(x)*2+p2(x))/7;
Wherein, p2 (x) is the pixel value of the pixel of the n-th-2 two field picture.
When being weighted average computation to the pixel value of described pixel in the n-th two field picture, the (n-1)th two field picture, the n-th-2 two field picture and the n-th-3 two field picture, obtain new pixel according to following formulae discovery:
n(x)=(p0(x)*4+p1(x)*2+p2(x)+p3(x))/8;
Wherein, p3 (x) is the pixel value of the pixel of the n-th-3 two field picture.
In the above-described embodiment, the maximum weight of the pixel of current frame image, larger with the time interval of present frame, the weights of this two field picture are fewer.
S103, if be not less than described SAD threshold value, then the pixel that search is identical with current frame image in previous frame image;
For the pixel of movement, then the pixel that search is identical with current frame image in previous frame image.When searching for, preferably adopt MV(motion vector) search, in previous frame image, find identical pixel or image block.Such as can have employed simple Three Step Search Algorithm, in order to improve speed, only former frame being searched for, hunting zone is set as 32 pixels, why the SAD threshold value setting justice stopped search, for being less than 512, is defined as so little, is because want complete whole frame coupling.
Preferably, for avoiding noise to affect the search of motion pixel, before search, to the method that the pixel of current frame image adopts neighboring mean value to calculate, reducing noise to the impact of Search Results, specifically comprising the following steps:
Obtain the pixel value of 8 neighboring pixel points centered by the described pixel in current frame image;
The pixel value of described pixel and described 8 neighboring pixel points is weighted on average, obtains the neighboring mean value of described pixel;
According to the neighboring mean value of described pixel, the pixel that search is identical with current frame image in previous frame image.
By being weighted on average to the neighboring pixel point of 8 centered by described pixel, effectively can reducing the impact of noise on this pixel, identical pixel can be searched for more accurately in former frame.
The result of calculation of the neighboring mean value of the described pixel in current frame image can be stored in internal memory further, to read when comparing more convenient afterwards.
In one embodiment, when being weighted neighboring mean value described in average computation to the pixel value of described pixel and described 8 neighboring pixel points, following formulae discovery is adopted:
f(x,y)=(f(x-1,y-1)+f(x-1,y)+f(x-1,y+1)+f(x,y)*8+f(x,y-1)+f(x,y+1)+f(x+1,y)+f(x-1,y+1)+f(x+1,y+1))/16。
Wherein, x is the abscissa of described pixel, and y is the ordinate of described pixel, and f (x, y) is the pixel value of respective pixel point.
In previous frame image, the result of the pixel that search is identical with current frame image has two, and a situation searches identical pixel, performs step S104 in this case; And another situation is searched for less than identical pixel, perform step S105 in this case.
S104, if search identical pixel, is then weighted average computation to the pixel value of described pixel in current frame image and previous frame image, obtains new pixel;
During the weighted average calculation process carried out in this step, the weights of the pixel value in the pixel value of described current frame image and previous frame image can require arrange according to noise reduction.As a preferred embodiment, obtain new pixel according to following formulae discovery:
n(x)=(p0(x)*4+p1(x)*2)/6;
Wherein, n (x) is the pixel value of new pixel, and p0 (x) is present frame, i.e. the pixel value of the pixel of the n-th two field picture, and p1 (x) is former frame, i.e. the pixel value of the pixel of the (n-1)th two field picture.
S105, if do not search identical pixel, then performs noise reduction process in frame to described pixel, obtains new pixel in current frame image.
If in former frame search less than identical pixel, then this pixel is the pixel of new images, does not occur in former frame, therefore carries out noise reduction process in frame to this pixel.
In described frame, noise reduction process can adopt various noise reduction modes conventional in the industry, preferably adopts NLM(Non-local Means in frame) noise reduction process.
In one embodiment, in described frame, the step of noise reduction process comprises:
Calculate the difference of arbitrary pixel in described pixel and adjacent 36 pixels;
According to following formula, calculate the weight of described arbitrary pixel:
Fw (x, y)=exp (-(f3w (x, y) * fNoiseLevel+ (x*x+y*y) * fg)), wherein, f3w (x, y) is described difference square, fNoiseLevel=1.0/ (0.2*0.2), the abscissa distance of pixel described in fg=1.0/80.0, x and arbitrary pixel, y is the ordinate distance of described pixel and arbitrary pixel;
Get its mean value after the pixel value of described 36 pixels is multiplied by the weight of its correspondence, obtain the theoretical value of described pixel;
According to following formula, calculate the pixel value of new pixel:
n(x,y)=p(x,y)+(p(x,y)-p1(x,y))*f;
Wherein, p (x, y) is the actual pixel value of described pixel, and p1 (x, y) is the theoretical value of described pixel, and f arranges the weighted value of new pixel in old pixel, gets between (0.0-1.0).
In the above-described embodiments, according to the weighted average of the pixel value of surrounding's 36 pixels of pixel, noise reduction process in frame is carried out to described pixel, can not have to carry out noise reduction process to present frame when same pixel point between the frame of front and back two, reach comprehensive noise reduction.
Vedio noise reduction method of the present invention is by calculating the sad value of corresponding pixel in current frame image and previous frame image, thus whether be moved by the pixel that described sad value judges in current frame image and previous frame image, search out present frame and at least corresponding pixel in previous frame image, the pixel value of corresponding pixel at least in current frame image and previous frame image is weighted on average, thus before reaching utilization, each two field picture carries out the object of noise reduction to current frame image.And carry out noise reduction process in frame to pixel emerging in present frame (namely at the pixel that former frame does not occur), make all pixels of each frame video image can both obtain the effect of noise reduction, noise reduction is better.Without the need to performing complicated noise reduction algorithm in whole vedio noise reduction method, fairly simple, faster to vedio noise reduction process, less to the process resource occupation of CPU, meet the requirement of real-time of network video technique.
And, because the most noise reduction process of the present invention can walk abreast to multiple pixel simultaneously, therefore, the part of parallel processing can be transferred to the GPU(graphic process unit being more suitable for processing parallel data) process, reduce to CPU(central processing unit) occupancy, uncomplicated, therefore also low to the requirement of video card due to algorithm.
As a kind of preferred implementation of vedio noise reduction method of the present invention, when noise reduction process is carried out to video flowing, because the first two field picture cannot by carrying out noise reduction with the weighted average of previous frame image, therefore, first noise reduction process in frame is performed to the first two field picture, after adopting noise reduction to complete, be saved in historical queue, carried out noise reducing process for next frame image.Then, from the second two field picture, perform step S101-105, noise reduction process is carried out to this two field picture.
As the another kind of preferred implementation of vedio noise reduction method of the present invention, after noise reduction process is carried out to current frame image, perform the step of a sharpening and color enhancement further:
Generate according to user instruction and cover plate image;
New pixel is obtained according to following formulae discovery:
a(x,y)=p(x,y)+(p(x,y)–p2(x,y))*k;
Wherein, a (x, y) is the pixel value of new pixel, and p (x, y) is described pixel original pixel value, and p2 (x, y) is the pixel value of pixel corresponding in described illiteracy plate image, and k is ratio value.
In one embodiment, described illiteracy plate image is generated in the following manner:
1. determine the radius that each pixel associates:
Radius r=Round (radius*3*sqrt (2.0*3.1415956)/4.0);
Wherein, Round is rounding operation symbol, and radius is the designated value comprised in user instruction, and sqrt is extraction of square root operator.
2. calculated level covers plate with vertical, each direction double counting 3 times, generates new illiteracy plate image:
If radius r is odd number, then
Starting point extent length: H=0+... (r-1)/2(starting point)
Afterbody wraparound length: T=-r; (being exactly the length terminated)
If radius is even number,
If the 1st time calculates:
H=(r/2)-1;
T=r;
Calculate for 2nd time:
H=r/2;
T=r;
Calculate for 3rd time:
H=0;
T=0;
Calculating is divided into 4 sections:
Initial range:
S (0): 0--H: calculate accumulative conjunction Total1=P (0)+..P (h)
S(1):H--T:(Total1+P(x)+(x/2))/X,Total2=Total1+..+P(t)
S(2):T--L:(Total2+P(x)+(x/2))/X,Total3=Total2+..+P(l)
S(3):L--E:(Total3-P(x)+(x/2))/X。
By the way, sharpening and color enhancement can be carried out to the image after noise reduction, while the noise reducing image, the color of image can be kept again unaffected, improve the image display effect after noise reduction.The step of described sharpening and color enhancement preferably performs in GPU.
As the another kind of preferred implementation of vedio noise reduction method of the present invention, before execution step S101 carries out noise reduction process to image, carry out Gamma correction to image further, described Gamma corrects and can search correction by searching the Gamma table pre-set to the RGB component of each pixel.Described Gamma corrects and preferably carries out at CPU.
Compared with prior art, picture can be made after adopting vedio noise reduction method of the present invention to carry out vedio noise reduction to seem cleaner, more clearly, substantially do not lose original details of video simultaneously, effect is much better than traditional Denoising Algorithm, does not also have the complexity of other algorithms simultaneously.In addition owing to having lacked noise jamming, be also beneficial to next step Video coding process, such as infra-frame prediction and MV are searched.Cover video sharpening and the enhancing of plate based on sharpening, make video seem sharper keen, effect is better than traditional enhancing algorithm.And, because the most process of vedio noise reduction method of the present invention can to the parallel processing simultaneously of multiple pixel, therefore, the part of parallel processing can be transferred to GPU(graphic process unit) process, reduce to CPU(central processing unit) occupancy, uncomplicated, therefore also low to the requirement of video card due to algorithm.
Refer to Fig. 2, Fig. 2 is the structural representation of video noise reduction system of the present invention.
Described video noise reduction system comprises:
For calculating the sad value of corresponding pixel in current frame image and previous frame image, by the comparison module 11 that described sad value compares with the SAD threshold value preset;
If be less than described SAD threshold value, then average computation is weighted to the pixel value of described pixel at least in current frame image and previous frame image, obtains the first processing module 12 of new pixel;
If be not less than described SAD threshold value, then in previous frame image, search for the search module 13 of the pixel identical with current frame image;
If search identical pixel, then average computation is weighted to the pixel value of described pixel in current frame image and previous frame image, obtains the second processing module 14 of new pixel;
And, if do not search identical pixel, then noise reduction process in frame is performed in current frame image to described pixel, obtain the 3rd processing module 15 of new pixel.
For described comparison module 11, in described current frame image and previous frame image, corresponding pixel is the pixel of same position on two two field pictures.The sad value of described pixel compares with the SAD threshold value (being such as set as 512) preset by described comparison module 11, if lower than described SAD threshold value, then not there is relative motion in described pixel in current frame image and previous frame image, and described pixel is " static pixel "; If the sad value of described pixel is not less than described SAD threshold value, then described pixel there occurs relative movement in current frame image and previous frame image, and described pixel is " pixel of movement ".
Preferably, in this step, described comparison module 11 further by each two field picture all correspondence be divided into multiple image block, calculate the sad value of all pixels in the corresponding image block of current frame image and previous frame image, the sad value of described image block compared with default SAD threshold value.
Such as by each two field picture all in the same way correspondence be divided into the image block of multiple size 16 pixel × 16 pixel, by each image block in current frame image and previous frame image according to from left to right, order from top to bottom carries out differential comparison successively, calculate the sad value of the image block of each correspondence in two two field pictures of front and back, and the sad value of described image block is compared with the SAD threshold value preset.If the fast sad value of described image is lower than described SAD threshold value, then not there is relative motion in described image block in current frame image and previous frame image, described image block is " static image block ", and each pixel comprised in described image block is " static pixel "; If the sad value of described image block is not less than described SAD threshold value, then described image block there occurs relative movement in current frame image and previous frame image, described image block is " image block of movement ", and each pixel comprised in described image block is " pixel of movement ".
Described first processing module 12, for when being less than described SAD threshold value, being weighted average computation to the pixel value of described pixel at least in current frame image and previous frame image, obtaining new pixel;
For static pixel, described first processing module 12 is weighted average computation to its pixel value at least in current frame image and previous frame image, obtains new pixel.Average computation can be weighted according to the requirement setting of noise reduction to the pixel of front some two field pictures when calculating.
Preferably, described first processing module 12 can perform weighted average calculation to pixel static in front 3 two field pictures at most, to obtain better noise reduction, particularly, described first processing module 12 is when carrying out noise reduction process to the n-th two field picture, if the sad value of corresponding pixel is less than described SAD threshold value in the n-th two field picture and the (n-1)th two field picture, then record the pixel value of described pixel at the n-th two field picture, and calculate the sad value of corresponding pixel in the (n-1)th two field picture and the n-th-2 two field picture further; If the sad value of corresponding pixel is not less than described SAD threshold value in the (n-1)th two field picture and the n-th-2 two field picture, then average computation is weighted to the pixel value of described pixel in the n-th two field picture and the (n-1)th two field picture, obtains new pixel; If be less than described SAD threshold value, then record the pixel value of described pixel at the (n-1)th two field picture, and calculate the sad value of corresponding pixel in the n-th-2 two field picture and the n-th-3 two field picture further; If the sad value of corresponding pixel is not less than described SAD threshold value in the n-th-2 two field picture and the n-th-3 two field picture, then average computation is weighted to the pixel value of described pixel in the n-th two field picture, the (n-1)th two field picture and the n-th-2 two field picture, obtains new pixel; If be less than described SAD threshold value, then average computation be weighted to the pixel value of described pixel in the n-th two field picture, the (n-1)th two field picture, the n-th-2 two field picture and the n-th-3 two field picture, obtain new pixel.Wherein, n is natural number.
In the above-described embodiments, described first processing module 12 can do weighted average process to the pixel value of described pixel in present frame and first three two field picture, to obtain higher noise reduction at most.
The weights of above-mentioned weighting processing procedure can be arranged by user, as a preferred embodiment, described first processing module 12, when being weighted average computation to the pixel value of described pixel in the n-th two field picture and the (n-1)th two field picture, obtains new pixel according to following formulae discovery:
n(x)=(p0(x)*4+p1(x)*2)/6;
Wherein, n (x) is the pixel value of new pixel, and p0 (x) is present frame, i.e. the pixel value of the pixel of the n-th two field picture, and p1 (x) is the pixel value of the pixel of the (n-1)th two field picture.
Described first processing module 12, when being weighted average computation to the pixel value of described pixel in the n-th two field picture, the (n-1)th two field picture and the n-th-2 two field picture, obtains new pixel according to following formulae discovery:
n(x)=(p0(x)*4+p1(x)*2+p2(x))/7;
Wherein, p2 (x) is the pixel value of the pixel of the n-th-2 two field picture.
Described first processing module 12, when being weighted average computation to the pixel value of described pixel in the n-th two field picture, the (n-1)th two field picture, the n-th-2 two field picture and the n-th-3 two field picture, obtains new pixel according to following formulae discovery:
n(x)=(p0(x)*4+p1(x)*2+p2(x)+p3(x))/8;
Wherein, p3 (x) is the pixel value of the pixel of the n-th-3 two field picture.
In the above-described embodiment, the maximum weight of the pixel of current frame image, larger with the time interval of present frame, the weights of this two field picture are fewer.
Described search module 13, for when being not less than described SAD threshold value, searches for the pixel identical with current frame image in previous frame image;
For the pixel of movement, then the pixel that search is identical with current frame image in previous frame image.When searching for, preferably adopt MV(motion vector) search, in previous frame image, find identical pixel or image block.Such as can have employed simple Three Step Search Algorithm, in order to improve speed, only former frame being searched for, hunting zone is set as 32 pixels, why the SAD threshold value setting justice stopped search, for being less than 512, is defined as so little, is because want complete whole frame coupling.
Preferably, for avoiding noise to affect the search of motion pixel, described search module 13, before search, obtains the pixel value of 8 neighboring pixel points centered by the described pixel in current frame image; The pixel value of described pixel and described 8 neighboring pixel points is weighted on average, obtains the neighboring mean value of described pixel; According to the neighboring mean value of described pixel, the pixel that search is identical with current frame image in previous frame image.
By the way to the method that the pixel of current frame image adopts neighboring mean value to calculate, reduce noise to the impact of Search Results.By being weighted on average to the neighboring pixel point of 8 centered by described pixel, effectively can reducing the impact of noise on this pixel, identical pixel can be searched for more accurately in former frame.
The result of calculation of the neighboring mean value of the described pixel in current frame image can be stored in internal memory by described search module 13 further, to read when comparing more convenient afterwards.
In one embodiment, described search module 13, when being weighted neighboring mean value described in average computation to the pixel value of described pixel and described 8 neighboring pixel points, adopts following formulae discovery:
f(x,y)=(f(x-1,y-1)+f(x-1,y)+f(x-1,y+1)+f(x,y)*8+f(x,y-1)+f(x,y+1)+f(x+1,y)+f(x-1,y+1)+f(x+1,y+1))/16。
Wherein, x is the abscissa of described pixel, and y is the ordinate of described pixel, and f (x, y) is the pixel value of respective pixel point.
In previous frame image, the result of the pixel that search is identical with current frame image has two, and a situation searches identical pixel; And another situation is that search is less than identical pixel.
Described second processing module 14, for when searching identical pixel, being weighted average computation to the pixel value of described pixel in current frame image and previous frame image, obtaining new pixel;
Described second processing module 14 carry out weighted average calculation process time, the weights of the pixel value in the pixel value of described current frame image and previous frame image can require arrange according to noise reduction.As a preferred embodiment, described second processing module 14 obtains new pixel according to following formulae discovery:
n(x)=(p0(x)*4+p1(x)*2)/6;
Wherein, n (x) is the pixel value of new pixel, and p0 (x) is present frame, i.e. the pixel value of the pixel of the n-th two field picture, and p1 (x) is former frame, i.e. the pixel value of the pixel of the (n-1)th two field picture.
Described 3rd processing module 15, for when not searching identical pixel, performing noise reduction process in frame to described pixel, obtaining new pixel in current frame image.
If in former frame search less than identical pixel, then this pixel is the pixel of new images, does not occur in former frame, and therefore described 3rd processing module 15 carries out noise reduction process in frame to this pixel.
In described frame, noise reduction process can adopt various noise reduction modes conventional in the industry, preferably adopts NLM(Non-local Means in frame) noise reduction process.
In one embodiment, described 3rd processing module 15 performs noise reduction process in frame by a under type:
Calculate the difference of arbitrary pixel in described pixel and adjacent 36 pixels;
According to following formula, calculate the weight of described arbitrary pixel:
Fw (x, y)=exp (-(f3w (x, y) * fNoiseLevel+ (x*x+y*y) * fg)), wherein, f3w (x, y) is described difference square, fNoiseLevel=1.0/ (0.2*0.2), the abscissa distance of pixel described in fg=1.0/80.0, x and arbitrary pixel, y is the ordinate distance of described pixel and arbitrary pixel;
Get its mean value after the pixel value of described 36 pixels is multiplied by the weight of its correspondence, obtain the theoretical value of described pixel;
According to following formula, calculate the pixel value of new pixel:
n(x,y)=p(x,y)+(p(x,y)-p1(x,y))*f;
Wherein, p (x, y) is the actual pixel value of described pixel, and p1 (x, y) is the theoretical value of described pixel, and f arranges the weighted value of new pixel in old pixel, gets between (0.0-1.0).
In the above-described embodiments, described 3rd processing module 15 is according to the weighted average of the pixel value of surrounding's 36 pixels of pixel, noise reduction process in frame is carried out to described pixel, can not have to carry out noise reduction process to present frame when same pixel point between the frame of front and back two, reach comprehensive noise reduction.
Video noise reduction system of the present invention is by calculating the sad value of corresponding pixel in current frame image and previous frame image, thus whether be moved by the pixel that described sad value judges in current frame image and previous frame image, search out present frame and at least corresponding pixel in previous frame image, the pixel value of corresponding pixel at least in current frame image and previous frame image is weighted on average, thus before reaching utilization, each two field picture carries out the object of noise reduction to current frame image.And carry out noise reduction process in frame to pixel emerging in present frame (namely at the pixel that former frame does not occur), make all pixels of each frame video image can both obtain the effect of noise reduction, noise reduction is better.Without the need to performing complicated noise reduction algorithm in whole vedio noise reduction method, fairly simple, faster to vedio noise reduction process, less to the process resource occupation of CPU, meet the requirement of real-time of network video technique.
And, because the most noise reduction process of the present invention can walk abreast to multiple pixel simultaneously, therefore, the part of parallel processing can be transferred to the GPU(graphic process unit being more suitable for processing parallel data) process, reduce to CPU(central processing unit) occupancy, uncomplicated, therefore also low to the requirement of video card due to algorithm.
As a kind of preferred implementation of video noise reduction system of the present invention, when noise reduction process is carried out to video flowing, because the first two field picture cannot by carrying out noise reduction with the weighted average of previous frame image, therefore, first 3rd processing module 15 performs noise reduction process in frame to the first two field picture, after adopting noise reduction to complete, be saved in historical queue, carried out noise reducing process for next frame image.Then, from the second two field picture, described comparison module 11 starts to perform sad value and compares, and according to comparative result by described first processing module 12, described search module 13, described second processing module 14 and described 3rd processing module 15 process.
Refer to Fig. 3, Fig. 3 is the structural representation of the another kind of preferred implementation of video noise reduction system of the present invention.
As the another kind of preferred implementation of video noise reduction system of the present invention, comprise a sharpening module 16 further, described sharpening module 16 comprises:
The illiteracy plate generation module 161 covering plate image is generated according to user instruction;
Calculate the 4th processing module 162 obtaining new pixel according to described illiteracy plate image, wherein, described 4th processing module 162 obtains new pixel according to following formulae discovery:
a(x,y)=p(x,y)+(p(x,y)–p2(x,y))*k;
Wherein, a (x, y) is the pixel value of new pixel, and p (x, y) is described pixel original pixel value, and p2 (x, y) is the pixel value of pixel corresponding in described illiteracy plate image, and k is ratio value.
By the way, sharpening and color enhancement can be carried out to the image after noise reduction, while the noise reducing image, the color of image can be kept again unaffected, improve the image display effect after noise reduction.The step of described sharpening and color enhancement preferably performs in GPU.
As the another kind of preferred implementation of video noise reduction system of the present invention, described video noise reduction system can comprise a Gamma correction module (not shown) further, described Gamma correction module was used for before carrying out noise reduction process to image, carry out Gamma correction to image, described Gamma correction module can search correction by searching the Gamma table pre-set to the RGB component of each pixel.Described Gamma corrects and preferably carries out at CPU.
Compared with prior art, picture can be made after video noise reduction system of the present invention carries out vedio noise reduction to seem cleaner, more clearly, substantially do not lose original details of video simultaneously, effect is much better than traditional Denoising Algorithm, does not also have the complexity of other algorithms simultaneously.In addition owing to having lacked noise jamming, be also beneficial to next step Video coding process, such as infra-frame prediction and MV are searched.Cover video sharpening and the enhancing of plate based on sharpening, make video seem sharper keen, effect is better than traditional enhancing algorithm.And, because the most process of video noise reduction system of the present invention can to the parallel processing simultaneously of multiple pixel, therefore, the part of parallel processing can be transferred to GPU(graphic process unit) process, reduce to CPU(central processing unit) occupancy, uncomplicated, therefore also low to the requirement of video card due to algorithm.
One of ordinary skill in the art will appreciate that the system realizing all or part of flow process in above-mentioned execution mode and correspondence, that the hardware that can carry out instruction relevant by computer program has come, described program can be stored in a computer read/write memory medium, this program, when performing, can comprise the flow process as the respective embodiments described above.Wherein, described storage medium can be magnetic disc, CD, read-only store-memory body (Read-Only Memory, ROM) or random store-memory body (Random Access Memory, RAM) etc.
The above embodiment only have expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but therefore can not be interpreted as the restriction to the scope of the claims of the present invention.It should be pointed out that for the person of ordinary skill of the art, without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.