Embodiment
Before introducing scheme of the present invention, paper concept, i.e. a contrast.Contrast refers to how far differed between peak white in the image and the peak value black, if peak white and peak value black fall far short, then key diagram looks like to have higher contrast, image with higher contrast seems that color is clearly demarcated, if peak white and peak value black are very approaching, then key diagram looks like to have lower contrast, and the image that has than low contrast seems very gloomy, can't obviously distinguish the difference of white and black.
For problems of the prior art, Image Adjusting scheme in a kind of tv broadcasting technology is proposed among the present invention, adaptively degree of comparing adjustment, like this, when signal to noise ratio is low, can covers noise and white stripes by reducing contrast, and reduce the light and shade flicker level, thereby reduce user's visual discomfort sense, promote the user and experience.
For make technical scheme of the present invention clearer, understand, referring to the accompanying drawing embodiment that develops simultaneously, scheme of the present invention is described in further detail.
Fig. 1 is the flow chart of image adjusting method embodiment of the present invention.As shown in Figure 1, may further comprise the steps:
Step 11: for the negative polarity composite video broadcast singal (CVBS, Composite VideoBroadcast Signal) of input, determine respectively every line by line center of lock-out pulse wherein.
In actual applications, before obtaining the described negative polarity CVBS signal of this step, may also need to carry out some other processing, since irrelevant with scheme of the present invention, therefore be not described.
In this step, for negative polarity CVBS signal, determine respectively every line by line center of lock-out pulse wherein.The specific implementation process is as follows:
1) the passing ratio convergent-divergent is modulated into identical fixed value with the every line by line level value of lock-out pulse in the negative polarity CVBS signal; How to be modulated to prior art, to repeat no more, in addition, the concrete value of described fixed value can be decided according to the actual requirements;
2) the negative polarity CVBS signal after will modulating is converted to positive polarity CVBS signal; How to change being similarly prior art, repeat no more;
3) described positive polarity CVBS signal is carried out low-pass filtering; The purpose of low-pass filtering is in order to remove the high fdrequency component in the positive polarity CVBS signal, thereby is convenient to subsequent treatment;
4) for the positive polarity CVBS signal that carries out after the low-pass filtering, find out respectively the minimum value position of the positive polarity CVBS signal in each line period wherein, the minimum value position that finds out is defined as the center of horizontal synchronizing pulse.
Step 12: according to every line by line center of lock-out pulse of determining, calculate the signal to noise ratio of the every negative polarity CVBS of delegation signal.
In this step, calculate at first respectively capable sync level value Hsync_value_neg, noise variance mean (abs (delta (i))) and line blanking level value Blank_value_neg in each line period; Then, calculate the signal to noise ratio snr of the every negative polarity CVBS of delegation signal:
Wherein, the account form of capable sync level value Hsync_value_neg in each line period can for: with the center of the horizontal synchronizing pulse in each line period, be assumed to be centered by the Hminvalue_idx, calculate the level value average in nominated bank's clock-pulse width scope (the horizontal synchronizing pulse width range of each half length about Hminvalue_idx), with result of calculation as the capable sync level value Hsync_value_neg in each line period.
The account form of noise variance mean (abs (delta (i))) in each line period can for: centered by the center Hminvalue_idx of the horizontal synchronizing pulse in each line period, calculate the average of absolute value of the difference delta (i) of the interior capable sync level value Hsync_value_neg of level value and this line period in nominated bank's clock-pulse width scope, with result of calculation as the noise variance mean in each line period (abs (delta (i))).Here nominated bank's clock-pulse width scope that nominated bank's clock-pulse width scope of mentioning is mentioned during with above-mentioned calculating row sync level value Hsync_value_neg is identical.
The account form of line blanking level value Blank_value_neg in each line period can for: according to the center Hminvalue_idx of the horizontal synchronizing pulse in each line period, find the burst signal in each line period, calculate the average in the burst signal duration, with result of calculation as the line blanking level value Blank_value_neg in each line period.How finding burst signal according to the center Hminvalue_idx of horizontal synchronizing pulse is prior art, repeats no more.
Fig. 2 is the schematic diagram of row sync level value Hsync_value_neg of the present invention, noise variance mean (abs (delta (i))) and line blanking level value Blank_value_neg.
After obtaining the signal to noise ratio of the every negative polarity CVBS of delegation signal, follow-up, in order to make image more level and smooth, also the signal to noise ratio of the every negative polarity CVBS of delegation signal can be carried out addition with the signal to noise ratio of its capable negative polarity CVBS signal of N before respectively, with addition result divided by N+1, with the signal to noise ratio of result of calculation as the every negative polarity CVBS of delegation signal.N is positive integer, and concrete value can be decided according to the actual requirements, such as can be 15.Distinguishingly, for the signal to noise ratio of the capable negative polarity CVBS signal of front N, can process not according to aforesaid way, because there is not the signal to noise ratio of N capable negative polarity CVBS signal before it.
Step 13: by inquiring about pre-stored form, determine that the contrast corresponding to signal to noise ratio of the every negative polarity CVBS of delegation signal adjusted the factor.
Fig. 3 is the corresponding relation schematic diagram that signal to noise ratio of the present invention and contrast are adjusted the factor.As shown in Figure 3, signal to noise ratio is lower, the value that corresponding contrast is adjusted the factor is less, thereby when signal to noise ratio is low, can reduce the contrast of image, image is transferred ash, make image become gloomy, thereby cover noise and white stripes and reduce the light and shade flicker level, and then effectively reduce user's visual discomfort sense that the sudden change of image light and shade brings, promote the user and experience.The empirical value of corresponding relation shown in Figure 3 for determining by test of many times.
In actual applications, usually store the corresponding relation of signal to noise ratio shown in Figure 3 and the contrast adjustment factor with the form of form, like this, in the situation that known signal to noise ratio can be known its corresponding contrast adjustment factor by tabling look-up.
Step 14: negative polarity CVBS signal is converted to positive polarity CVBS signal, and adjusts the factor according to the contrast of determining, to the adjustment of the every positive polarity CVBS of delegation signal degree of comparing.
Usually, the aerial CVBS signal that sends all is negative polarity, and its reason is that such synchronizing signal value wherein can be larger, be difficult for by noise pollution, follow-up the CVBS signal separated timing, synchronizing signal is extremely important, synchronizing signal to be detected first, then just picture signal can be detected; If the aerial CVBS signal that sends is positive polarity, then the synchronizing signal value is smaller, and easily by noise pollution, correspondingly, detected synchronizing signal may be the synchronizing signal of mistake, and then causes detected picture signal also to be made mistakes.
In this step, in order to carry out follow-up decoding (for positive polarity CVBS signal), need at first to convert the negative polarity CVBS signal that receives to positive polarity CVBS signal.
In actual applications, can control by digital Auto Gain (DAGC, Digital Automatic GainControl) module, convert negative polarity CVBS signal to positive polarity CVBS signal.
Adjust the factor according to the contrast of determining, to the adjustment of the every positive polarity CVBS of delegation signal degree of comparing.The specific implementation process is as follows:
1) takes out video and burst signal in the every positive polarity CVBS of delegation signal, namely take out the signal on the edge after the horizontal blanking, colour burst forward position in the every positive polarity CVBS of delegation signal;
Black level in every delegation signal that 2) will take out is modulated to zero;
All include only video and burst signal in every delegation signal of described taking-up;
3) white level in the every delegation signal after the calculating modulation and the difference Y of black level deduct 1/2 of described Y with the every delegation signal after the modulation;
4) will deduct described Y 1/2 after every delegation signal times adjust the factor with its corresponding contrast;
5) will multiply by every delegation signal that contrast adjusts after the factor and add 1/2 of the above Y.
So far, namely finished introduction about the inventive method embodiment.
Based on said method, Fig. 4 is the composition structural representation of image adjusting device embodiment of the present invention.As shown in Figure 4, comprising:
Signal-to-noise ratio (SNR) estimation module 41, be used for the negative polarity CVBS signal for input, determine respectively every line by line center of lock-out pulse wherein, and according to every line by line center of lock-out pulse of determining, calculate the signal to noise ratio of the every negative polarity CVBS of delegation signal; Wherein, determine that every line by line center of lock-out pulse can refer to oneself finally obtain every line by line center of lock-out pulse by a series of processing by signal-to-noise ratio (SNR) estimation module 41, after also can referring to obtain the center of every line by line lock-out pulse by other module, send it to signal-to-noise ratio (SNR) estimation module 41;
Table look-up module 42 is used for by the pre-stored form of inquiry, determines that the contrast corresponding to signal to noise ratio of the every negative polarity CVBS of delegation signal adjusted the factor;
Contrast adjusting module 43 is used for adjusting the factor according to the contrast of determining, to by the every positive polarity CVBS of delegation signal degree of the comparing adjustment in the converted positive polarity CVBS signal of described negative polarity CVBS signal.
Wherein, can specifically comprise in the signal-to-noise ratio (SNR) estimation module 41:
Determining unit 411, be used for the passing ratio convergent-divergent every line by line level value of lock-out pulse of negative polarity CVBS signal is modulated into identical fixed value, negative polarity CVBS signal after the modulation is converted to positive polarity CVBS signal, and described positive polarity CVBS signal carried out low-pass filtering, for the described positive polarity CVBS signal that carries out after the low-pass filtering, search respectively the minimum value position of the positive polarity CVBS signal in each line period, the minimum value position that finds out is defined as the center of horizontal synchronizing pulse;
Computing unit 412, be used for according to every line by line center of lock-out pulse of determining, calculate respectively capable sync level value Hsync_value_neg, noise variance mean (abs (delta (i))) and line blanking level value Blank_value_neg in each line period, and calculate the SNR of the every negative polarity CVBS of delegation signal:
Can further comprise again (for simplifying accompanying drawing, not shown) in the computing unit 412:
The first computation subunit, be used for centered by the center of the horizontal synchronizing pulse in each line period, calculate the level value average in nominated bank's clock-pulse width scope, with result of calculation as the capable sync level value Hsync_value_neg in each line period;
The second computation subunit, be used for centered by the center of the horizontal synchronizing pulse in each line period, calculate the average of absolute value of the difference delta (i) of the interior capable sync level value Hsync_value_neg of level value and this line period in nominated bank's clock-pulse width scope, with result of calculation as the noise variance mean in each line period (abs (delta (i)));
The 3rd computation subunit, be used for the center according to the horizontal synchronizing pulse in each line period, find the burst signal in each line period, calculate the average in the burst signal duration, with result of calculation as the line blanking level value Blank_value_neg in each line period;
The 4th computation subunit is used for calculating the SNR of the every negative polarity CVBS of delegation signal:
Above-mentioned the 4th computation subunit also can be further used for, the signal to noise ratio of the every negative polarity CVBS of delegation signal is carried out addition with the signal to noise ratio of its capable negative polarity CVBS signal of N before respectively, with addition result divided by N+1, with the result that the obtains signal to noise ratio as every row negative polarity CVBS signal, N is positive integer.
In addition, can specifically comprise in the contrast adjusting module 43:
Extraction unit 431 is for the video and burst signal that takes out the every positive polarity CVBS of delegation signal;
Adjustment unit 432, the black level that is used for the every delegation signal that will take out is modulated to zero; White level in every delegation signal after the calculating modulation and the difference Y of black level deduct 1/2 of described Y with the every delegation signal after the modulation; With deduct described Y 1/2 after every delegation signal times adjust the factor with its corresponding contrast; Add 1/2 of the above Y with multiply by every delegation signal that contrast adjusts after the factor.
In embodiment illustrated in fig. 4, the positive polarity CVBS signal that contrast adjusting module 43 receives is sended over by the DAGC module, and the relation between DAGC module and each module shown in Figure 4 as shown in Figure 5; The specific works mode of DAGC module is prior art, repeats no more.
The specific works flow process of device embodiment shown in Figure 4 please refer to the respective description in the embodiment of the method shown in Figure 1, repeats no more herein.
In a word, adopt technical scheme of the present invention, adaptively degree of comparing adjustment, like this, when signal to noise ratio is low, can cover noise and white stripes and reduce the light and shade flicker level by reducing contrast, thereby effectively reduce user's visual discomfort sense that the sudden change of image light and shade brings, promote the user and experience; And scheme of the present invention need not artificial participation, implements simple and conveniently, is convenient to popularize.
The above only is preferred embodiment of the present invention, and is in order to limit the present invention, within the spirit and principles in the present invention not all, any modification of making, is equal to replacement, improvement etc., all should be included within the scope of protection of the invention.