Apparatus for adaptively controlling a video signal recursive filter
This invention relates to circuitry for adaptively controlling digital recursive filters. 
     BACKGROUND OF THE INVENTION 
     The invention will be described in the environment of a video signal processing system, however, it is to be understood that it is not limited to such applications. 
     In video systems recursive filters may be used to reduce noise in the frequency band of the video signal. From frame-to-frame there is a relatively high degree of signal correlation. Thus, if a video signal from successive frames is summed, the correlated video signal will add linearly, but random noise accompanying the signal will not. The summed signal is generally normalized to a desired amplitude range and the signal-to-noise ratio of the averaged signal is enhanced by the processing. 
     A typical video recursive filter includes a delay device coupled in a recirculating loop with circuitry for combining a fraction of delayed signal with a fraction of incoming signal. The combined signal is applied to the delay device which delays the combined signal by the time period necessary to insure that constituent parts of each combined video signal samples are from corresponding pixels of successive video frames. The fractional parts of the incoming and delayed signals are obtained by scaling the two signals by factors K and (1-K) respectively. Thus, if the amplitude of the incoming signal is equal to the amplitude of the averaged signal from the delay device, the new combined signal will be normalized to equal the input signal. In a digital processing system, the normalization tends to minimize the sample bit size required of the delay device. If the incoming signal consists of 8-bit samples, the sample size in the delay device can be held to e.g. 9 or 10 bits. This is an important design aspect in reducing the manufacturing costs of recursive filters for consumer applications. 
     When the images represented by video signals change, recursively filtered video signals tend to be degraded. Phantom images are introduced in the reproduced images and picture sharpness along moving image edges is degraded. To counter these undesirable effects it is known to adaptively change the parameters of the recursive filter when motion occurs. The adaptive changes are performed independently for each picture element (pixel). Typically changes are made to the filter scale factors in response to the amplitude of the change in the video signal between successive frames. For larger interframe video signal changes a larger fraction of the incoming signal is applied in the averaging process and for smaller interframe video signal changes a larger fraction of the averaged delayed signal is applied in the averaging process. 
     After interframe image motion ceases a recursive filter system can be conditioned to more rapidly converge to the desired noise reduction level by applying a sequence of successively smaller scale factors. The timing of the sequence is determined separately for each pixel and is a function of the history of the interframe image motion for the respective pixels. An example of this type of system is described in U.S. Pat. No. 4,240,106 entitled &#34;Video Noise Reduction&#34;. The system in this patent develops sequences of scale factors for each pixel wherein successive scale factor values are equal to the reciprocals of the number of frames from the last frame in which motion was detected. 
     While the foregoing systems tend to enhance the performance of recursive filters in video signal processing systems they do not address an important element in the filtering process. This element is the amplitude of the noise in the signal being processed. If the noise level is low, less noise reduction is required and the filter may be adaptively conditioned to converge at a faster rate than when a greater degree of noise reduction is requred. Programming the system for less noise reduction when the signal noise level is low tends to condition the system to be more tolerant to interframe image motion. 
     In accordance with the present invention, it is an object to adaptively control a recursive filter as a function of the noise level of the signal to be processed. 
     Motion detectors for recursive filter systems typically measure the video signal differences between successive frames to determine if the image has changed. Noise attendant these video signals may trigger the motion detector to produce a false indication of motion causing the system to undesirably affect noise reduction. It is a further object of this invention to provide a motion detection system with a low incidence of false motion indications. 
     SUMMARY OF THE INVENTION 
     The present invention is circuitry for adaptively controlling a recursive filter. Incoming or current signal and delayed signal are applied to a subtractor which develops signal differences. The signal differences are applied to a minimum detector which selects the smallest signal difference in a predetermined interval. In one embodiment of the invention, the selected signal difference is coupled to the address input of a read only memory which is programmed to provide scale factor coefficients to the recursive filter dependent on the amplitude or range of amplitudes of the selected signal difference. 
     In another embodiment of the invention, the selected signal difference is coupled to a threshold determining circuit for developing a noise dependent threshold value. The noise dependent threshold is coupled to one input of a comparator. Signal differences from the subtractor are applied to a second input of the comparator. If respective signal differences exceed the noise dependent threshold the comparator develops motion signals. The motion signals are coupled to a read only memory to produce scale factor coefficients for the recursive filter. 
    
    
     BRIEF DESCRIPTION OF THE DRAWING 
     FIG. 1 is a block diagram of an adaptive recursive filter employing scale factor generating circuitry embodying the present invention, which recursive filter is arranged to perform noise reduction and separation of the luminance component from composite video signal. 
     FIG. 2 is a block diagram of an exemplary minimum value detector for use in the FIG. 1 system. 
    
    
     DETAILED DESCRIPTION 
     In the figures, broad arrows interconnecting circuit elements represent multiconductor connections for parallel-bit samples. Narrow arrows interconnecting circuit elements represent single conductor connections for serial bit digital samples or analog signals. 
     FIG. 1 is a motion/noise adaptive recursive filter for processing video signals. The circuitry circumscribed by the dashed line boxes 21 and 31 defines the more general system. The entire circuitry shown in FIG. 1 is directed toward the more specific application, of separating the luminance component from composite video signal. 
     The circuitry circumscribed in the dashed box 21 is a recursive filter of the type generally described in U.S. Pat. No. 4,485,403, and is adaptive by virtue of the capability to change the scale factor K m  of scaling circuit 16. Noise reduced video signal samples are available at the output connection, 27, of the video signal sample delay element 22. Alternatively noise reduced video signal samples may be taken from the input connection 121 of the video signal samples delay element 22. 
     Briefly, circuit 21 operates as follows. Video signal samples, V x , to be processed are applied from input port 10 to a subtracter 12. Delayed samples V DY  from delay element 22 are coupled to a second input port of subtracter 12 which develops the difference samples (V x  -V DY ). The difference samples are coupled via compensating delay element 14, to the input of scaling circuit 16. Scaling circuit 16 develops scaled difference sample values K m  (V x  -V DY ) which are coupled to an input port of adder 20. Delayed samples V DY  from delay element 22 are coupled via compensating delay element 18 to a second input port of adder 20 which develops the sample sums V Y  given by ##EQU1## The delay element 22 and the compensating delay elements 14 and 18 are designed so that the samples V x  and V DY  combined in subtractor 12 correspond to like pixels of succeeding frames. Compensating delay element 14 is required to afford circuitry 31 time to develop scale factors K m , for scaling circuit 16 on a pixel-by-pixel basis, i.e. a sample-by-sample basis. Compensating delay element 18 is provided to accomodate the delay introduced by both the compensating delay element 14 and the scaling circuit 16. 
     The values of samples V DY  correspond to the samples V Y  delayed by one video frame period. Expanding equation (1) by substituting V Y  for V DY  with the appropriate time shift and simplifying it can be shown that the signal component, V SY , of samples V Y  equal the signal component, V SX , of the input samples V x . The noise component V NY  of the samples V Y  is reduced by the factor √K m  /(2-K m ). These results assume that the signal component V SX  is in component video form, i.e. either luminance or chrominance signal. However, if the signal component V SX  is a chrominance component or composite video including a chrominance component, provision must be made to invert the phase of the chrominance component before it is fed back from the delay element 22 to elements 12 and 20. Such chrominance component phase inversion is known in the art of video signal recursive filters. 
     Assuming that the input signal is a composite video signal, and that no provision is made for chrominance phase inversion, the samples V SY  will have a luminance component V LY  and a chrominance component V CY . In the absence of interframe image motion, the luminance component V LY  will converge to a value which is equal to the input luminance component V LX . The chrominance component V CY  in the absence of motion will tend to converge to the value given by 
     
         V.sub.CY =V.sub.CX K.sub.m /(2-K.sub.m).                   (2) 
    
     In an adaptive system the values of the scale factor K m  are determined on a pixel-by-pixel basis according to the history of interframe image motion for each pixel. If motion exists between the current frame and the preceding frame the scale factor, K m , may be set to a value of one in order not to incur signal bandwidth reduction. When interframe image motion ceases the scale factor K m  is established at a value or a sequence of values less than one, which values are determined by the time desired for the system to converge to the steady state and the desired amount of noise reduction. 
     Additional elements 24 and 26 are coupled with recursive filter 21 in order to process composite video to produce a noise reduced luminance component with complete cancellation of the chrominance component. To accomplish complete cancellation of the chrominance component, the chrominance component V CY  at the output of adder 20 must be made to converge to a steady state value the first frame of no motion. If this condition is obtained a portion of the input chrominance component can be subtracted from V Y  or V DY  to completely cancel the chrominance component therein. Causing the chrominance component to converge in the first frame of no motion may be achieved if three values for K m  are applied which correspond to &#34;one&#34; for motion, 1/(2-K m ) the first frame after motion, and K m  for successive frame periods. With this sequence of scale factor values, the chrominance component, V CY  converges to K m  /(2-K m ) times the input chrominance component value the first frame of no motion. 
     Noise reduced luminance with the chrominance component cancelled is available at the output port of adder 26. Samples from delay element 22 are coupled via compensating delay element 23 to one input port of adder 26. Scaled sample differences from scaling circuit 24 are coupled to a second input port of adder 26. Sample differences from subtracter 12 are applied to the input of scaling circuit 24. 
     Output samples, V o , from adder 26 are expressed by the equation 
     
         V.sub.o =K.sub.o (V.sub.x -V.sub.DY)+V.sub.DY              (3) 
    
     where K o  is the scale factor applied to scaling circuit 24. The values of the scale factor K o  are &#34;one&#34; during interframe image motion, one-half for the first frame after motion, and K m  /2 for succeeding frames. Rearranging equation (3) and solving for the luminance component V LO  and the chrominance V CO   
     
         V.sub.LO =K.sub.o V.sub.LX +(1-K.sub.o)V.sub.LD            (4) 
    
     
         V.sub.CO =K.sub.o V.sub.CX +(1-K.sub.o)V.sub.CDY           (5) 
    
     From equations (4) and (5) for K o  equal to &#34;one&#34; i.e. during motion periods, V LO  and V CO  are equal to V LX  and V CX  respectively. Thus, alternate means must be provided to separate luminance and chrominance during motion intervals. An example of such alternate means may be a low-pass filter connected in parallel with the recursive filter, which is switched into the circuit when motion is detected. 
     During the first frame of no motion the scale factor K o  is set to one-half. The samples V DY  correspond to the unaltered composite video of the previous frame. Since there is no motion the luminance component of signal V DY  is correlated with the luminance component of the incomming samples but the chrominance component is shifted 180 degrees in phase. Under these conditions, and with the value of scale factor K o  equal to one-half, the luminance and chrominance components from equations (4) and (5) are 
     
         V.sub.LO =1/2V.sub.LX +(1-1/2)V.sub.LX =V.sub.LX           (6) 
    
     
         V.sub.CO =1/2V.sub.CX +(1-1/2)(-V.sub.CX)=0                (7) 
    
     which indicates that the chrominance component is completely cancelled during this frame. For this interval the system functions as a frame comb filter with a luminance output. Note that for this frame the chrominance V CY  is equal to V CS  K m  /(2-K m ). These values will be the values V CDY  during the next frame period and succeeding frame periods in which time there is no interframe image motion. 
     In the second and all succeeding frame periods in which there is no motion, the value of scale factor K o  is set to K m  /2. Substituting this value for K o  in equations (4) and (5) and solving 
     
         V .sub.LO =(K.sub.m /2)V.sub.LX +(1-K.sub.m /2)V.sub.LX =V.sub.LX (8) 
    
     
         V.sub.CO =(K.sub.m /2)V.sub.CX +(1-K.sub.m /2)(-V.sub.CX K.sub.m /(2-K.sub.m))=0                                           (9) 
    
     indicating that for all non motion frames the chrominance component is cancelled. 
     For the above system the motion adaptive circuit 31 provides the scale factors to scaling circuits 16 and 24. However, each set of scale factors will contain only three values as indicated in Table I. 
     
                       TABLE I                                                     
______________________________________                                    
          Delayed                                                         
Motion Signal                                                             
          Motion Signal K.sub.o K.sub.m                                   
______________________________________                                    
0         0             K.sub.mi /2                                       
                                K.sub.mi                                  
0         1             1/2     1/(2 - K.sub.mi)                          
1         0             1       1                                         
1         1             1       1                                         
______________________________________                                    
 
    
     The value K mi  is variable according to the noise content of the incoming signal. For instance, if the system determines that the signal contains a relatively low amplitude noise content the selected set of scale factors K o  and K m  may be derived from a value of K mi  equal to 1/4. Alternatively, if the signal contains more noise, the selected set of scale factors may be derived from a value of K mi  equal to e.g. 1/16 or 1/32. 
     The circuitry circumscribed by the dashed box 31 is exemplary circuitry according to the present invention for generating the appropriate sequences of scale factors K m  and K o  on a pixel-by-pixel basis. This circuitry is responsive to the sample differences from subtractor 12. Note that if the input signal V x  contains a chrominance component e.g. the input signal is composite video signal, the chrominance component of V DY  will be 180 degrees out of phase with the chrominance component of input samples V x , and they will add constructively in subtractor 12 even when there is no interframe image motion. The luminance components of input samples V x  and delayed samples V DY  will cancel in subtracter 12 when there is no motion and will produce sample differences when image changes occur from frame-to-frame. These luminance sample differences are an indication of image motion. In order to detect motion from the sample differences if the input signal contains chrominance, the chrominance component must be removed from the sample differences before they are applied to the motion detector. 
     The chrominance component of the sample differences is eliminated by the low-pass filter 27 which has a pass-band designed to attenuate the frequency spectrum occupied by chrominance signals. The luminance component of the sample differences from low-pass filter 27 is applied to the absolute value circuit 28 which converts all of the luminance sample differences to a single polarity, e.g. positive. These samples are applied to a second low-pass filter 32 which smooths the output of the absolute value circuit. 
     Output samples from low-pass filter 32 are applied to one input of the comparator 30 which compares them to a reference value from adder 42. If the samples from low-pass filter 32 exceed the reference value, comparator 30 provides a motion signal for the respective pixel sample, on output connection 31. Note low-pass filter 32, by smoothing the sample differences from circuit 28, tends to preclude the comparator from developing a jittering motion signal for successive samples. Note also that comparator 30 may alternatively be connected to compare the sample differences ahead of the absolute value circuit 28 as indicated by the phantom connection 29. 
     The motion--no motion signals from comparator 30 are applied to a motion memory 34 which delays them by one or more frame periods. The motion--no motion signals and delayed motion--no motion signals from comparator 30 and motion memory 34 are coupled as partial address codewords to ROM 38 which outputs the desired sequences of scale factors K m  for scaling circuit 16 and scale factor K O  for scaling circuit 24, on a pixel-by-pixel basis, examples of which are illustrated in Table I. 
     An assumption is made that every image frame will contain a portion of an image in which there is no motion. For this portion of the image, the amplitude of the sample differences from the output of subtracter 12 and consequently the output of low-pass filter 32 will correspond to the amplitude of the noise in the signal. It is further assumed that sample differences consisting of noise only, will have a lower amplitude than noise plus motion samples. Thus, if all the sample differences over the active image portion of each field (or frame) are measured to detect the smallest sample difference, this value will be representative of the noise in the respective field or frame. 
     Element 36 coupled to low-pass filter 32 detects the smallest sample difference in each field or frame. These differences are smoothed in low-pass filter 40 which is a digital filter clocked at the field or frame rate. The output of low-pass filter 40 is applied as one input to adder 42 and provides the base line for the reference values coupled to comparator 30. Onto this baseline is added a motion threshold value V TH  supplied by source 44 to provide an additional degree of noise immunity to the motion detector for instantaneous noise signals. The motion reference value coupled to comparator 30 is therefore noise dependent. 
     In an alternative embodiment, adder 42 and source 44 may be replaced with e.g. a ROM having an address input port coupled to lowpass filter 40 and an output port coupled to comparator 30. This ROM will be programmed with appropriate reference values to correspond to the noise related signal applied as address codewords to its address input. 
     The noise related signal from low-pass filter 40 is also coupled to the input port of logic circuitry 46. Logic circuitry 46 develops codewords related to ranges of amplitudes of the noise related signals. A priority encoder such as the CD4532 integrated circuit manufactured by the Solid State Division of RCA Corporation is an example of the type of logic which may be implemented in logic circuit 46. The CD4532 develops a 3-bit output code effectively dividing an 8-bit input signal into eight ranges. For application to circuitry 31 of FIG. 1, it is not necessary to divide the noise related signal into as many as eight ranges. The number of ranges will nominally be determined by designer preference but it is anticipated that three or four ranges will be sufficient. To adapt a circuit such as the CD4532 to partition an 8-bit input signal into e.g., 4 ranges represented by two bit codewords, pairs of the input bit lines may be ORed together with their output connection coupled respectively to the least significant input bit positions of the encoder. 
     The noise range related codewords produced by logic circuitry 46 are concatenated with the motion-no motion signals from comparator 30 and motion memory 34, and then coupled to the address input port of ROM 38. 
     ROM 38 may be partitioned into pages, with the address bits provided by logic circuitry 36 enabling the particular page, and the address bits provided from motion memory 34 and comparator 30 selecting the particular scale factors from the respective page. The pages are addressed at a field or frame rate since information is provided to logic circuit 46 at a field or frame rate. 
     Each of the pages of ROM 38 will be programmed with a set or sets of scale factors appropriate for its respective range of noise amplitude. 
     Additional circuitry, for controlling selection of the scale factors on a pixel basis and related to the magnitude of image motion derived from the instantaneous amplitude of the difference samples from subtractor 12, may be coupled between low pass filter 27 and the address input of ROM 38. This additional circuitry may also comprise a priority encoder to generate additional address codeword bits for ROM 38. These additional address bits would be ORed with the address bits of logic circuitry 46 and effect (for limited motion) selection of the ROM 38 pages on a pixel basis. The larger the magnitude of image motion the larger the value of the scale factor K m  that is selected. 
     FIG. 2 is exemplary circuitry of a minimum value detector 36&#39; which may be substituted for element 36 of FIG. 1. The function of the circuit is to detect the lowest valued sample difference occurring in the active image portion of a video signal. Circuit 36&#39; examines a major portion of each field, i.e. the portion starting with horizontal line 32 and ending with line 256, and only the active portion of these lines is examined. 
     The operation proceeds as follows. A parallel-bit latch 66 is preset to all ones by a digital one shot 68 at the beginning of the 32nd horizontal line. The value in the latch 66 is coupled as a reference value to one input of comparator 65. Difference samples from low-pass filter 32 are coupled to a second input of comparator 65 and to the data input of latch 66. If the difference sample value is less than the reference value, comparator 65 develops a control signal, to condition latch 66 to store the applied difference sample. The value of the difference sample stored in latch 66 becomes the new reference value for comparator 65. On the other hand if the applied difference sample from 32 is greater than the reference value, the current reference value is retained in latch 66. In effect, each successive sample is compared against an earlier lowest valued sample and if the current sample is lower in value than all earlier samples the current sample becomes the new reference. 
     Comparator 65 is coupled to the control input terminal of latch 66 by gate 64. Gate 64 having an input coupled to e.g. a horizontal blanking signal derived from the video signal is enabled to couple comparator 65 to latch 66 only during the active image portions of each horizontal line. Thus, samples occurring during the horizontal, back porch and color burst intervals are not included for minimum value detection. 
     At line 256 the value currently stored in latch 66 is loaded into latch 67 responsive to a control signal from one shot 69. This value is stored in latch 67 for the next field or frame period for use in determining the baseline of the reference vaue of comparator 30 and the K scale factors. 
     The digital one shot 68, which is responsive to horizontal and vertical blanking pulses, outputs a pulse at the beginning of the line 32 to set latch 66 to the maximum binary value commensurate with the number of sample bits stored in the latch to reinitialize the minimum value detector each field or frame of video information. 
     The digital one shot 69, which is also responsive to horizontal and vertical blanking pulses, generates an output clock signal to latch 67 at line 256 of the field interval (or line 512 of the frame interval) to load the value from latch 66 into latch 67. Digital one shot 69 and digital one shot 68 may consist of binary counters arranged to count 256 and 32 horizontal blanking pulses respectively.