A kind of video noise strength detecting method
Technical field
The invention discloses a kind of video noise strength detecting method, relate to image quality evaluation technical field.
Background technology
At present, the application of video is more and more extensive, but video obtain and transmit in be subject to the impact of various factors, as the interference etc. of channel used in the sole mass of the environmental condition in obtaining, transducer, transmitting procedure, video council is subject in various degree and multi-form noise pollution, thereby affect quality and the visual effect of video, also affected its follow-up use.Therefore, set up a set of reliable and practical noise intensity detection method and have very important construction value.
In current disclosed method, application number be mono-kind of the < < of 201210428662.X based on having proposed a kind of simple detection method in improved four directional operator video noise detection method > >, its accuracy and reliability are difficult to be guaranteed.Application number is that 201110334651.0 < < video noise detection method exists the scope of application narrower with device > > for existing related detecting method, scene is poor for applicability, and the problem that accuracy of estimation is not high has proposed a kind of new method.But the accuracy of the method can not well be guaranteed, its reason application number be in the video noise estimation method > > of 201210242301.6 < < based on human-eye visual characteristic, have cited: the variance of using the variance approximate noise of flat site, there is larger leak, thereby affect the accuracy of result.Further, above-mentionedly proposed a kind of noise estimation method based on human-eye visual characteristic in open, wherein having used can sensor model (JND), but can this model accurate description human-eye visual characteristic, will determine stability and the accuracy of the method.In fact, current method is the detection based on image (estimation) method mostly, does not more make full use of video information.In addition, video faces two two field pictures mutually, after former frame denoising, with a rear two field picture, can consider to process with the image quality evaluating method of full reference, and the theoretical foundation of the image quality evaluating method of full reference can be guaranteed the accuracy of this class video noise strength detecting method.If consider the learnability of noise estimation model, can further promote the reliability of video noise strength detecting method.
Summary of the invention
Technical problem to be solved by this invention is: for the defect of prior art, provide a kind of video noise strength detecting method.
The present invention is for solving the problems of the technologies described above by the following technical solutions:
A video noise strength detecting method, the concrete steps of described method comprise:
Step 1, obtain a two field picture, above-mentioned image is carried out to denoising, and by its buffer memory;
Step 2, obtain a two field picture again, the current frame image obtaining is divided by piece, each piece after division is designated as noise intensity and detects macro block, the height of setting current frame image is H, and width is W, and it is h that each noise intensity detects macro block height, width is w, current frame image has been divided into MxN noise intensity and has detected macro block, M=W/w wherein, N=H/h;
Step 3, the noise intensity that step 2 is obtained detect macro block and carry out the estimation of block noise intensity statistics amount;
The estimated value of all block noise intensity statistics amounts that step 4, statistic procedure 3 obtain, obtains the histogram that estimated value distributes;
The estimated value distribution histogram of step 5, the block noise intensity statistics amount that obtains according to step 4, calculates the noise intensity value of video;
Step 6, when a two field picture through step 1 to 5 processing, the numerical value of the frame counter of noise measuring is added to one;
Step 7, judge whether the numerical value of noise measuring frame counter is greater than the threshold value of setting, if be greater than the threshold value of setting, enters step 8, otherwise reenter step 1;
The noise intensity value of the video of step 8, output step 5 gained.
As present invention further optimization scheme, in described step 3, the estimated value computational methods of block noise intensity statistics amount are specific as follows:
301, the difference between the former frame image of calculating noise intensity detection macro block after current frame image and denoising:
Wherein, BAD
k(m, n) represents that the noise intensity of current frame image detects macro block
with the cumulative sum of noise intensity detection macro block respective pixel absolute difference after former frame image denoising, F
n(i, j) represents current frame image, F
n-1(i, j) represents former frame image, m=0 ..., M-1, n=0 ..., N-1;
302, use current macro difference value, macro block in the estimated value of the block noise intensity statistics amount in current frame image upside and left side, macro block the estimated value in the downside of former frame image and the block noise intensity statistics amount on right side, weighting is to the estimated value that obtains the block noise intensity statistics amount of current macro after adding:
CBAD
k(m,n)=ω
1*CBAD
k(m-1,n)+ω
2*CBAD
k(m,n-1)+ω
3*CBAD
k-1(m+1,n)+ω
4*CBAD
k-1(m,n+1)+BAD
k(m,n)
Wherein, CBAD
k(m, n) is designated as current frame image noise intensity and detects macro block
noise intensity statistic;
CBAD
k(m-1, n) represents that current frame image noise intensity detects macro block
the noise intensity statistic of left side macro block;
CBAD
k(m, n-1) represents that current frame image noise intensity detects macro block
the noise intensity statistic of upside macro block;
CBAD
k-1(m+1, n) represents that former frame image noise intensity detects macro block
the noise intensity statistic of right side macro block;
CBAD
k-1(m, n+1) represents that former frame image noise intensity detects macro block
the noise intensity statistic of downside macro block;
ω
1, ω
2, ω
3, ω
4for weight coefficient, for CBAD
k(m, n), when k=0, its value is 0.
As present invention further optimization scheme, in described step 5, the noise intensity value calculating method of current frame image is specific as follows:
Whether the value that 501, judges the frame counter of noise measuring is initial value, if initial value enters step 502, otherwise enters step 503;
502, the histogrammic datum mark estimated value of block noise intensity statistics amount and the peak point estimated value of initialization video, the initial value of described peak point estimated value is greater than the initial value of datum mark estimated value;
503, calculate histogrammic datum mark and the peak point of the block noise intensity statistics amount of present image;
The histogrammic datum mark of described block noise intensity statistics amount is specially the point that meets following condition: the direction traversal increasing by block noise intensity statistics value, the value of this point is greater than the threshold value one of setting, the threshold value that is greater than another setting two of the accumulated value of the block noise intensity statistics amount of the point before this point, and the numerical value of described threshold value two is greater than the numerical value of described threshold value one;
The histogrammic peak point of described block noise intensity statistics amount is specially the point that meets following condition: the direction traversal increasing by block noise intensity statistics value, the value of this point be a little in maximum value;
504, more histogrammic datum mark estimated value and the peak point estimated value of the block noise intensity statistics amount of new video, after the histogrammic benchmark point value weighting summation of the histogrammic datum mark estimated value of the block noise intensity statistics amount of the video that former frame is obtained and the block noise intensity statistics amount of present image, obtain the histogrammic datum mark estimated value of the block noise intensity statistics amount of current video, after the histogrammic peak value point value weighting summation of the histogrammic peak point estimated value of the block noise intensity statistics amount of the video that former frame is obtained and the block noise intensity statistics amount of present image, obtain the histogrammic peak point estimated value of the block noise intensity statistics amount of current video, specific formula for calculation is:
P'
k=(1-α)×P'
k-1+α×P
k;
Q'
k=(1-β)×Q'
k-1+β×Q
k;
Wherein, Q'
krepresent after k frame the estimation of fiducial value in the statistics with histogram of noise statistics amount during video noise detects, P '
krepresent after k frame, the estimation of peak value in the statistics with histogram of noise statistics amount during video noise detects, α and β represent the P obtaining in present frame
kand Q
kcontribution rate in video is estimated, span be 0 to 1, α and the value of β more contribution rate is higher;
505, calculate the noise intensity value L of video
k: L
k=P'
k-Q'
k.
The present invention adopts above technical scheme compared with prior art, there is following technique effect: video noise strength detecting method of the present invention, hierarchical structure is clear, calculates simple, detection stability is strong, can accurately, in time and effectively detect the intensity of video noise.
Accompanying drawing explanation
Fig. 1 is that the present invention is for the flow chart of video noise strength detecting method.
Fig. 2 is that the present invention is for the flow chart of the estimated value of computing block noise intensity statistic.
Fig. 3 is that the present invention is for calculating the flow chart of the noise intensity value of current frame image.
Embodiment
Below in conjunction with accompanying drawing, technical scheme of the present invention is described in further detail:
For the flow chart of video noise strength detecting method as shown in Figure 1, the key step of the method for the invention is as follows in the present invention:
Step 1, this is initial condition, obtains a two field picture F from video capture device
0, to F
0do denoising, result is designated as F'
0, noise measuring counting Noise_CNT is initialized as 0;
Step 2, obtains a two field picture F from video capture device
k, k value is greater than 0;
Step 3, presses piece to image and divides, and supposes that picture altitude is H, and width is W, and it is h that each noise intensity detects macro block height, and width is w, and image has been divided into M*N noise intensity detection macro block, M=W/w wherein, N=H/h;
Step 4, detects macro block to each noise intensity of present frame
(m=0 wherein ..., M-1, n=0 ..., N-1) do following statistics:
BAD
k(m, n) represents that current frame image noise intensity detects macro block
detect the cumulative sum of macro block respective pixel absolute difference with former frame image noise intensity after denoising;
CBAD
k(m,n)=ω
1*CBAD
k(m-1,n)+ω
2*CBAD
k(m,n-1)+ω
3*CBAD
k-1(m+1,n)+ω
4*CBAD
k-1(m,n+1)+BAD
k(m,n);
CBAD
k(m, n) is designated as current frame image noise intensity and detects macro block
noise intensity statistic;
CBAD
k(m-1, n) represents that current frame image noise intensity detects macro block
the noise intensity statistic of left side macro block;
CBAD
k(m, n-1) represents that current frame image noise intensity detects macro block
the noise intensity statistic of upside macro block;
CBAD
k-1(m+1, n) represents that former frame image noise intensity detects macro block
the noise intensity statistic of right side macro block;
CBAD
k-1(m, n+1) represents that former frame image noise intensity detects macro block
the noise intensity statistic of downside macro block;
ω
1, ω
2, ω
3, ω
4for weight coefficient, it should be noted that for CBAD
k(m, n), when k=0, its value is 0;
Step 5, in statistics current frame image, the histogram of noise intensity statistics distribution, is designated as Hist[CBAD
k(m, n)];
Step 6, utilizes statistics with histogram data in step 5, in conjunction with noise intensity detection model, calculates the noise intensity value of current frame image;
Step 7, does denoising to present image, and result images is designated as F'
k, noise measuring counting Noise_CNT adds one;
Step 8, judges whether the value of noise measuring counting Noise_CNT is greater than threshold value T
noiseif enter step 9, otherwise enter step 2;
Step 9, the detected value of output video noise intensity, and proceed to step 2.
For the flow chart of the estimated value of computing block noise intensity statistic as shown in Figure 2, concrete steps comprise in the present invention:
301, the difference of calculating noise intensity detection macro block between present image and former frame denoising image;
302, use current macro difference value, macro block in the estimated value of the block noise intensity statistics amount in present image upside and left side, macro block the estimated value in the downside of prior image frame and the block noise intensity statistics amount on right side, weighting is to the estimated value that obtains the block noise intensity statistics amount of current macro after adding.
In the present invention, the video noise intensity level of output can have the noise intensity detected value L of the current frame image that the present invention below mentions
kcharacterize, the weighted array value of noise intensity detected value that also can be by multiframe characterizes, and the testing result fluctuation of the latter's output is less.
The present invention for calculate current frame image noise intensity value flow chart as shown in Figure 3, specifically by following sub-step, realized:
Whether the value that 1, judges Noise_CNT is 0, if enter sub-step b, otherwise enters sub-step c;
2, initialization P'
kand Q'
k, k=0 wherein; Need to indicate P'
0initial value should be greater than Q'
0initial value;
3, according to the P of statistics with histogram data acquisition current frame image in step 5
kand Q
k; Q wherein
kbe expressed in Hist[CBAD
k(m, n)] in array, index value i increases progressively (maximum occurrences of i is MAX_CBAD) since 0, and the index value i assignment while meeting following condition is to Q
k: Hist[i] >=T
p, and
need to indicate threshold value T
pvalue should be less than threshold value T
sumP, and the value of the two is relevant with the macro block number that noise in image detects, and with macro block number, increases, and its value can increase.P
kbe expressed in Hist[CBAD
k(m, n)] in array, index value i is from P
kstart to increase progressively (maximum occurrences of i is MAX_CBAD), find Hist[CBAD
k(m, n)] first maximum of array, by index i assignment to Q
k;
4, upgrade P'
kand Q'
k, more new formula is as follows for it:
P'
k=(1-α)×P'
k-1+α×P
k;
Q'
k=(1-β)×Q'
k-1+β×Q
k;
Wherein, Q'
krepresent after k frame the estimation of fiducial value in the statistics with histogram of noise statistics amount during video noise detects, and P '
krepresent after k frame, the estimation of peak value in the statistics with histogram of noise statistics amount during video noise detects, wherein α and β value are the coefficient between 0-1, α and β represent the P obtaining in present frame
kand Q
kcontribution rate in video is estimated, larger its contribution rate of α and β value is higher;
5, calculate the noise intensity value L of present frame
k, L wherein
k=P'
k-Q'
k.
By reference to the accompanying drawings embodiments of the present invention are explained in detail above, but the present invention is not limited to above-mentioned execution mode, in the ken possessing those of ordinary skills, can also under the prerequisite that does not depart from aim of the present invention, makes a variety of changes.