Abstract:
Ordinarily, television signals are subjected to gamma correction at the source to compensate for non-linearities in CRT-based displays in accordance with set standards. However, it has been found in practice that all CRT-based displays do not exhibit the same amount of non-linearity. Hence, some television receivers include gamma correction circuitry which compensate for the difference between the particular CRT display and that assumed by the transmission system standard. In addition the above, circuitry is added for adapting this correction to local areas on the display thereby achieving dynamic range equalization. The input video signal is first low-pass filtered and then subjected to a normalization between 0.0 and a first predefined maximum value A. A second predefined value B is then added to this normalized signal generating a gamma exponential. At the same time, the input video signal is normalized for the range 0.0 and 1.0. This normalized input signal is then raised to an exponential power equivalent to the gamma exponential. Finally, this resultant signal is re-scaled back to the dynamic range of the input video signal. The resultant video signal on display then has the dark portions thereof more visible without the bright parts looking washed out.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of The Invention 
     The subject invention relates to controlling the contrast in a television receiver. 
     2. Description of The Related Art 
     Presently, the contrast of television displays is controlled in four ways. The first two are user controls which the user sets based on his/her own preferences. The last two are built into the television receiver by the manufacturer. These four controls include: 
     (1) The &#34;Contrast&#34; control on the television receiver varies the gain of the display; increasing the gain increases contrast. However, too much gain can cause clipping of the image highlights. 
     (2) The &#34;Brightness&#34; control adjusts the DC level of the blackest part of the image. Increasing the brightness control does give the sensation of a brighter image, but at the cost of lower color saturation and lower contrast. 
     (3) &#34;Gamma correction&#34; is usually built in by the manufacturer. CRT-based displays have a non-linear relationship between the applied signal voltage and the resulting image intensity. Gamma correction seeks to compensate for the distortions caused by such non-linearities by pre-distorting the signal in the opposite direction. This linearization of the image often improves image contrast. It is possible to provide additional low-level contrast by increasing the gamma correction. 
     (4) &#34;Edge enhancement&#34; steepens the transitions in the signal at detected edges which enhances the visibility of features in an image. 
     These conventional methods of contrast control are normally applied to the entire image uniformly. Since the dynamic range of displays is limited, it is not possible to simultaneously perceive small variations in image intensity, i.e. small details, in the bright and dark regions simultaneously. 
     SUMMARY OF THE INVENTION 
     It is an object of the present invention to increase image dynamic range and feature visibility of a video signal on display. 
     It is a further object of the invention to provide local dynamic gamma contrast control that allows contrast to be adapted to the local brightness level in each region of each image frame thereby making the dark portions of the image more visible without making the bright parts look washed out. 
     The above objects are achieved in a method of providing dynamic gamma contrast control of a video signal, characterized in that the method comprises the steps of low-pass filtering the input video signal so that processing only occurs on the low frequency components therein, normalizing, pixel-by-pixel, the low-pass filtered video signal so that the value thereof extends from 0 to a predetermined maximum value A, thereby forming a normalized signal, adding a predetermined parameter B to the normalized signal thereby forming a gamma exponent, normalizing the input video signal so that the values thereof lie between 0 and 1.0, raising the normalized video signal, pixel-by-pixel, to an exponential power equal to the gamma exponent forming a corrected normalized video signal, and rescaling the corrected normalized video signal to the full dynamic range of the input video signal. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     With the above and additional objects and advantages in mind as will hereinafter appear, the invention will be described with reference to the accompanying drawings, in which: 
     FIG. 1 is a graph showing the input-output characteristics of a normalized signal raised to both the 0.5 and 2.0 exponential powers; 
     FIG. 2 is a graph showing the low frequency input-output characteristics of a video signal when subjected to the gamma correction of the subject invention; 
     FIG. 3 is a graph showing a simulated line signal and the effects of low-pass filtering thereon; 
     FIG. 4 is a graph of the simulated line signal in which the overshoot and undershoot of the simulated line signal caused by the processing where the gamma is a function of the low-pass filtering; 
     FIG. 5 is a block diagram of a television receiver having a gamma correction circuit therein; 
     FIG. 6 is a block diagram of a first basic embodiment of a dynamic gamma contrast control circuit of the subject invention; 
     FIG. 7 is a block diagram of a second basic embodiment of a dynamic gamma contrast control circuit of the subject invention; 
     FIG. 8 is a block diagram of a first preferred embodiment of a dynamic gamma contrast control circuit of the subject invention having a digital implementation; and 
     FIG. 9 is a block diagram of a second preferred embodiment of a dynamic gamma contrast control circuit of the subject invention having an analog implementation. 
    
    
     DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The SMPTE standards assume that a TV display will be a CRT having a gamma of 2.2. That is, the light output I, as a function of the input video signal voltage V is given by: 
     
         I.sub.out =V.sup.2.2                                       (1) 
    
     To compensate for this assumed output distortion, all standard video cameras and other sources have a built-in gamma correction of 1/2.2=0.45. That is, the output voltage of the camera as a function of the input light level is: 
     
         V.sub.out =I.sub.in.sup.0.45                               (2) 
    
     The CRTs in today&#39;s receivers typically have gammas from 2.2 to 2.8, depending on the CRT being used. Therefore, it is often recommended that at the receiver, some additional gamma correction should be done. If the video source is originally corrected to a gamma of 2.2, and the display CRT has a gamma of 2.8, then it may be desirable to re-correct the video data to 2.8 at the receiver. The input and output voltages of the receiver gamma corrector have the relationship: 
     
         V.sub.out =V.sub.in.sup.2.2/2.8 =V.sub.in.sup.0.786        (3) 
    
     Raising the input voltage to some exponent lower than unity before display often increases the overall brightness and the contrast of details in the dark part of the image. 
     The method described above is what is currently performed in television receivers. The subject invention extends this method of contrast enhancement by adapting it locally. 
     FIG. 1 shows the input-output relationships when the input voltage (normalized to unity) is raised to the exponent 0.5 and the exponent 2.0. The exponent of 0.5 provides gain for the low input signal values and saturation, or de-emphasis, of the high signal values. Conversely, the exponent of 2.0 attenuates low signal values and accentuates high signal values. Using this principle, local gamma correction is applied with the following adjustment to the video signal: 
     1. Convert the input composite signal to R, G, B components using well known methods; 
     2. Derive a luminance-like two-dimensional signal g(x,y) defined at each pixel location as the maximum of the three signals R, G and B at that pixel; 
     3. low-pass filter the signal g(x,y) to yield g low  (x,y); 
     4. Normalize the low-pass filtered video signal so 
     that its values extend, for example, from 0 to A and add a second parameter B, as follows: 
     
         h(x,y)={g.sub.low (x,y)*A/maximum(g.sub.low (x,y))}+B      (4) 
    
     5. Normalize the original video signal so that its values range from 0.0 to 1.0, expressed as g norm  (x,y). 
     6. At every pixel of step 5, raise the normalized video signal value to an exponential power having the value given in step 4. Thus the output of the processing would be: 
     
         g.sub.out (x,y).sup.h(x,y)                                 (5) 
    
     7. Re-scale g out  (x,y) to the full dynamic range of the input video signal. 
     It has been found that A should fall in the range of 1.2 and 2.5, while B should fall in the range of 0.1 to 0.9. Preferably, A should equal 1.34, while B should equal 0.45. For these values, the input-output curve is shown at FIG. 2. It can be seen that the gain (the slope of the curve in FIG. 2) is highest at low input values, goes to a minimum at mid range (around 400-600 on the arbitrary scale of the graph in FIG. 2), and rises again at high values. 
     Such an input-output transfer curve does provide significant enhancement at low intensity values. However, by itself, it would provide a very &#34;washed-out&#34; look at other intensity ranges, especially at mid-range. The dynamic range compression of the subject invention only provides a psychophysically pleasing result due to the edge enhancement that the method automatically provides. To illustrate the edge enhancement, an arbitrary simulated image scan line is shown in FIG. 3. The signal is shown with a solid line. Its low-pass filtered version is shown superimposed as a dotted waveform. It was derived by convolving the original waveform by a rectangular window of size 50. The processing consists of raising the solid curve to an exponential power given by the dotted curve, all properly scaled, as described above. Low values of this exponent give high gain. Increasing values of the exponent give decreasing gain. Consider what happens at the first transition of the solid waveform from 0.0 to 0.5. At the instant of this transition, the dotted exponent lags behind, providing a high gain. Then, as the dotted curve &#34;catches up&#34; to the solid curve, its value stabilizes at a lower gain. The resulting overshoot is shown at the first edge in FIG. 4. These overshoots and undershoots provide the edge enhancement that is crucial for the method of the subject invention to work properly. The size of the convoluting window for the low-pass filter is a parameter of the method. Typical values for a normal NTSC image sampled at 14.3 MHz rates, ranges from 20 to about 40. Preferably, the video signal is convolved by a square window of uniform unit weight and size 31-by-31for an NTSC video signal sampled at 14.3 MHz. 
     FIG. 5 shows a block diagram of a television receiver. The television receiver includes an antenna input 10 for receiving television signals. The antenna input 10 is connected to a tuner circuit 20 for tuning to and receiving a particular television signal. An output from the tuner circuit 20 carrying a baseband composite video signal is applied to an input of a matrix circuit 30 for deriving the separate color signals R, G and B. These color signals are subjected to gamma correction as controlled by gamma correction circuit 40. The gamma corrected signals are then applied to a video signal processing circuit 50 for further processing and are then applied to a display 60 for displaying the resulting video images. 
     FIG. 6 shows a block diagram of, in part, the gamma correction circuit of FIG. 5. The R, G, B outputs from the matrix circuit 30 are applied to, on the one hand, the inputs of a variable gain amplifier arrangement 42, and, on the other hand, to a maximum determining circuit 44 for determining, pixel-by-pixel, the maximum of the three signals. An output V 1  of this maximum determining circuit 44 is subjected to analog-to-digital to-digital conversion in A/D 46 and is then applied to an input of digital signal processing (DSP) circuit 48. This DSP circuit 48 determines, pixel-by-pixel, the value V 2  /V 1 , where 
     
         V.sub.2 =V.sub.1.sup.(k1+k2V1)                             (6) 
    
     where V 1  is the average of V 1  (x,y) over the moving rectangular window, k2 equals A, and k1 equals B. 
     This output is applied to a control input of the variable gain amplifier arrangement 42 for varying the gain thereof in accordance with the subject invention. The output from the variable gain amplifier arrangement 42 is then applied to the display 60 (via the video signal processing circuit 50). 
     FIG. 7 shows an alternate embodiment to that shown in FIG. 6. In particular, each of the color signals is processed independently, FIG. 7 showing in detail the circuitry 40.1&#39; for processing only one of the color signals, the other two color signals being processed similarly. The output from the matrix circuit 30 is applied to a low-pass filter 41. An output of the low-pass filter 41 is applied to a first normalization circuit 43 to which is applied the parameters A and B. This first normalization circuit 43 performs the calculation of Equation (4). The output from the matrix circuit 30 is also applied to a second normalization circuit 45. An output of the second normalization circuit 45 is applied to an exponential amplification circuit 47 which receives as its exponential input, the output from the first normalization circuit 43 and which performs the calculation of Equation (5). An output from the exponential amplification circuit 47 is then applied to a re-scaling circuit 49 for re-scaling the input signal thereto back to the full dynamic range of the input video signal. An output from this re-scaling circuit 49 is then applied to the display 60 via the video signal processing circuit 50. 
     The use of the algorithm given in Equations (4) and (5) amplify low-level noise to an objectionable amount. This is due to the fact that the slope of Equation (5) is the gain at any given signal level. When g(x,y) approaches zero, the gain approaches infinity. The result is that the noise in the region of zero signal is amplified to a large extent. One approach is to modify Equation (5) so that it does not approach zero for small signals. Many arbitrary modifications could be used. The main requirement is that the slope of the system characteristic (Equation (5)) should not approach large values. To that end: 
     
         g.sub. (x,y)=r(g.sub.1 (x,y),c)=ln{cg.sub.(x,y)+sqrt(cg.sub.1 (x,y))2+1}(7) 
    
     where sqrt denotes the square root operation, and &#34;2&#34; refers to the squaring operation. Using this Equation (7), Equation (5) should be revised as follows: 
     
         g.sub.out (x,y)=r(g.sub.norm (x,y),c)*{g.sub.norm (x,y)}.sup.h1(x,y) /(r(1,c))                                                 (8) 
    
     where 
     
         h1(x,y)=g.sub.low (x,y)*A/maximum(g.sub.low (x,y))         (9) 
    
     as defined in Equation (4) 
     The implementation of Equation (8) requires that a time and space varying function be raised to a power that itself is a function of time and space. This is somewhat difficult and expensive to implement in consumer-level equipment. Therefore, an approximation is made in which n, m and p are set to be three numbers such that if n=m p , then 
     
         n=m.sup.p =(1+(m-1)).sup.p =1+p(m-1)+. . .                 (10) 
    
     In Equation (10), the first two terms of a standard power-series expansion are taken. Theoretically, these first two terms are only sufficient to approximate the actual function in the limit as m→1. However, in the current application, Applicant has discovered empirically that the coarse approximation of Equation (10) is a very adequate substitute for the normal exponentiation operation of Equation (8). The pictures produced by the approximation are virtually indistinguishable from the pictures produced by the actual exponential function. It allows the exponentiation to be replaced by two multiply operations. Thus Equation (8) becomes: 
     
         g.sub.out (x,y)=r(g.sub.norm (x,y),c)*{1+g.sub.norm (x,y)*(h(x,y)-1)}/(r(1,c))                                (11) 
    
     Now, understanding that the enhancement of the subject invention began with g norm  (x,y), the &#34;luminance&#34; like signal at each pixel location, the output of Equation (11) is g out  (x,y) at these location. Hence, the ratio of the output to the input is defined as: 
     
         z(x,y)=g.sub.out (x,y)/g.sub.in (x,y)                      (12) 
    
     This results in the output R, G, B values being: 
     
         R.sub.out (x,y)=R.sub.in (x,y)z(x,y)                       (13) 
    
     
         G.sub.out (x,y)=G.sub.in (x,y)z(x,y)                       (14) 
    
     
         B.sub.out (x,y)=B.sub.in (x,y)z(x,y)                       (15) 
    
     These signals may be applied in the usual manner to a display. 
     FIG. 8 shows a block diagram of a preferred embodiment of a digital implementation of the invention for use in a television receiver. After R, G, B signals are derived from the source of composite video signals, the R, G, B signals are digitized in analog-to-digital converters (ADC) 70, 72 and 74 forming the signals R in , G in , B in . At each sampling instant, these signals are converted to a single &#34;luminance&#34; like signal g(t) by replacing them by the maximum of R in , G in , B in  at each location in maximum determining circuit 76. At each sampling instant, the resultant signal g(t) is stored in a frame store 78. The output from the frame store 78 is then normalized in a normalization circuit 80 giving the output signal which ranges from 0.0 to 1.0. The output from the normalization circuit 80 is applied to a convolver 82 which performs a two-dimensional averaging of g norm  (x,y) and, after suitable rescaling as shown in Equation (9), outputs the signal h 1  (x,y). The level of this signal is shifted by subtracting  1.0 from it in the subtractor 84. The output from the subtractor 84 is multiplied by the input of convolver 82, g norm  (x,y), in a multiplier 86. The level in this signal is then shifted by adding 1.0 to it in adder 88, the output therefrom being then applied to one input of a second multiplier 90. In addition, g norm  (x,y) is applied as an address signal to a look-up table, which is in the form of a read-only memory 92. This look-up table performs the r function as defined in Equation (7), the output from which is applied to the other input of the second multiplier 90. The output from this second multiplier 90 g out  (x,y) is then applied to the dividend input of divider 94 which receives the divisor input from the output of the normalization circuit 80. The output z(x,y) from the divider 94 is applied to the first inputs of respective multipliers 96, 98 and 100 which receive the signals R in , G in , B in  from the outputs of the ADC&#39;s 70, 72 and 74, thereby forming the signals R out , G out , B out , respectively, as in Equations (13)-(15). 
     For reasons of economy, it would be preferable to have a low-cost analog implementation of the present algorithm. The main difficulty with a direct implementation of Equation (11) is to find a method of producing, with real-time analog systems, g low  (x,y), the two-dimensional low-pass filtered version of the input g in  (x,y). This problem is solved in the following manner. 
     Let g(t) be the one-dimensional, raster scanned representation of the two-dimensional scene g(x,y). The assumption is to generate the real-timed analog version of g(x,y) low-pass filtered by convolving with a uniform kernel of size 30×30. In an NTSC system, g(t) is band-limited to 4.3 MHz. g(t) is then passed through a conventional analog low-pass filter of bandwidth 4.3/30 MHz. If the normal sampling rate for the original video signal was 14.3 MHz, the output of the low-pass filtered signal can be adequately sampled at a 14.3/30 MHz rate. That would yield approximately 25 samples per horizontal video line. A kernel size of 30 vertical lines per frame equals 15 vertical lines per field. Therefore, 15×25=375 samples adequately represent all of the information inside the 30×30 kernel for any one field. Therefore, use is made of analog samplers working at 14.3/30 MHz=477 KHz. The resulting analog samples are stored in an analog FIFO delay line such as those based on CCDs. Then, an analog adder with 15 inputs is used to produce the output voltage that is proportional to the desired two-dimensional low-pass filtered output. 
     FIG. 9 shows a preferred embodiment of an analog implementation of the invention also for use in a television receiver. An analog maximum determining circuit 110 forms the signal g(t) from the R, G, B signals applied to the inputs thereof. This output signal is applied to a low-pass filter 112, which has a bandwidth of 1/30 of the original 4.3 MHz video bandwidth, and then to an analog sampling circuit 114 which samples g low  (x,y) at the rate of 14.3/30 MHz=477 KHz, resulting in 25 samples per video line. The output from the sampling circuit 114 is applied to an analog delay line 116 having 15 stages (116.1-116.15), each stage 116.n including 25 single sample delay elements. The outputs from all of the stages 116.n are applied to a summing circuit 118 for implementing the two-dimensional averaging. This signal is applied to one input of a first multiplier 120 which receives at its other input g(t) at the output of the maximum determining circuit 110. The output of the first multiplier 120 is applied to a first input of a second multiplier 122. g(t), after being processed by a nonlinear circuit 124, is then applied to the second input of the second multiplier 122. The output from the second multiplier 122 is applied to the dividend input of divider 126 which receives g(t) at its divisor input. The output from the divider 126 is the function z(t) which is used to individually multiply the analog input functions R, G, B (not shown). It should be understood that this analog embodiment also requires DC shifts similar to those shown in FIG. 8 at adders 84 and 88. 
     Numerous alterations and modifications of the structure herein disclosed will present themselves to those skilled in the art. However, it is to be understood that the above described embodiment is for purposes of illustration only and not to be construed as a limitation of the invention. All such modifications which do not depart from the spirit of the invention are intended to be included within the scope of the appended claims.