The invention relates to video signal processing, particularly to a method and apparatus for bilevel coding or representation of colour video signals, and is especially applicable to composite television signals, for example NTSC broadcast colour television signals.
Whether a video signal originates as a broadcast television signal or otherwise, for example in an interactive visual communications system using video terminals and telephone lines, the need often arises to code the signal to reduce the required storage capacity or transmission channel bandwidth. Also in television programme production it is sometimes desirable to create a stylized representation or a sketch of the picture for special effects or animation. A type of process evolved for this purpose is so-called "bilevel coding (representation)". In such a process, each multi-level or continuous tone point in the frame, or picture element (Pel), is represented in bilevel form, i.e. it can assume only one of two states, typically high or low. Consequently only one digital bit is required to represent each picture element and the receiver can be very simple.
Basically bilevel coding involves comparing the picture element intensity with a threshold value and, depending upon whether or not it exceeds the threshold, assigning a corresponding output signal to either a high or low state. Generally the threshold value is chosen, and hence varied, according to the content of an area of the picture surrounding or adjacent to the picture element being coded at a particular instant. Determination of the threshold value affects the ability to preserve grey scale rendition, apparent contrast and detail in the picture.
Hitherto bilevel coding has generally been limited to monochrome signals. One known process, known as the "ordered dither" technique is disclosed in a paper entitled "Design of dither waveforms for quantized visual signals", by J. O. Limb. Bell System Technical Journal No. 48, 1969 pp. 2555-2582 and a paper entitled "An optimum method for two level rendition of continuous tone pictures", by B. E. Bayer, ICC conference record, 1973 pp. 26-11, 26-15.
In this process a set of predetermined position-dependent thresholds are used to derive the bilevel picture elements or a random dither signal, for example noise, is added to the multilevel picture. The process is primarily suited to bilevel displays since an objectionable flicker is usually perceived if the signal is displayed on a television monitor. Also, the process is not satisfactory for colour television signals due to excessive high frequency components in the chrominance bands which overlap with the chrominance signal and distort it.
An alternative process, known as the "constrained average technique" is disclosed in U.S. Pat. No. 3,961,134 issued June 1, 1976, which is hereby incorporated by reference. In this process the threshold value is chosen as a function of the local average within an area surrounding the point or picture element. To produce an apparent grey scale the process utilizes noise in the video signal. To alleviate the reliance upon an indeterminate parameter a controlled amount of noise (dither) is added to the video signal, in effect utilizing the ordered dither technique. Accordingly, the resulting picture suffers from the same problems of flicker and chrominance band distortion.
An object of the present invention is to eliminate or at least mitigate these problems in providing a process and apparatus for bilevel coding of a colour video signal.
According to one aspect of the present invention a process for bilevel coding of a colour video signal includes the steps of:
(i) deriving from a plurality of picture elements a first signal proportional to the luminance component of the colour video signal;
(ii) deriving a second signal proportional to the chrominance component of the colour video signal;
(iii) computing from the first and second signals a threshold value;
(iv) comparing a picture element value to the threshold value and deriving an output signal having one of two states in dependence upon whether or not the picture element value exceeds the threshold value.
In preferred embodiments of the invention the signal proportional to the luminance component is a weighted constrained average (.phi..sub.ij), computed, for example, in accordance with the equation ##EQU1## where X is the pel value and a.sub.nm is the weighting coefficient chosen to the signal proportional to the luminance.
Then the chrominance-proportional signal (C.sub.ij), which acts as a dither signal producing an apparent grey scale, is used to derive a contrast enhancement factor X.sub.ij thus:
where .alpha. and .beta. are constants. Conveniently .alpha. is in the range 5-20, preferably 10, and .beta. is in the range 0.5-2, preferably 1.0. .vertline.C.sub.ij .vertline. denotes the absolute value or magnitude of C.sub.ij.
The threshold value B.sub.ij is then computed as:
Where .gamma..sub.ij is the contrast enhancement factor and R is the maximum range of the video signal, for example 256 for an 8 bit digital signal.
According to another aspect, the invention comprises apparatus for implementing the process of the first aspect. Thus, said apparatus comprises:
means for deriving from a plurality of picture elements a first signal proportional to the luminance component of the colour video signal;
means for deriving a second signal proportional to the chrominance component of the colour video signal;
means for computing from the first and second signals a threshold value; and
means for comparing a picture element value to said threshold value to derive an output signal having one of two states in dependence upon whether the picture element value exceeds the threshold value or not.
Means for deriving the chrominance-proportional signal may conveniently comprise a bandpass filter having a pass band encompassing the chrominance subcarrier frequency f.sub.sc. Such bandpass filter may be a one- or two-dimensional digital filter.
A particularly simple apparatus may be realized if the signal proportional to the luminance component is a weighted constrained .phi..sub.ij average of the form: ##EQU2## and furthermore if the weighting coefficient a.sub.nm is substantially unity and N.sub.1 is an integer multiple of the subcarrier cycles. Thus if a sampling frequency of 3f.sub.sc were used, N.sub.1 would be multiples of three.
An exemplary embodiment of the invention will now be described with reference to the accompanying drawings, in which:
FIG. 1 is a schematic block representation of apparatus for bilevel coding of a colour video signal; and
FIG. 2 is a more detailed representation of the apparatus for a sampling frequency triple the colour subcarrier frequency.
It should be understood that although the input video signal can be analog or digital, for the specific embodiment the input signal is in digital form, for example 8 bits, and could be derived from a store, wherein it is stored still in digital form, or could be derived from a camera or other such source with an intervening analog/digital converter to convert it to the digital format required for input to the apparatus. The output bilevel signal will be decoded in the receiver. Since the receiver decoding circuit is known, it too is not shown in the drawing. Typically the receiver will comprise a standard monitor with a one bit digital/analog converter.
Referring to FIG. 1, apparatus for bilevel coding an NTSC composite colour video signal comprises an input terminal 10 to which is applied the digital video signal to be encoded sampled at three times the colour subcarrier frequency f.sub.sc. The input terminal 10 is connected to, respectively, an input 12 of summing means 14, an input 16 of a bandpass filter 18 and an input 20 of a comparator 22. The summing means 14 serves to compute from the input picture elements X.sub.ij a constrained weighted average .phi..sub.ij according to the formula: ##EQU3##
X.sub.i-n,j-m is the picture element preceding the particular element being encoded. As can be seen from FIG. 2, summing means 14 is adapted to sum nine preceding picture elements to produce the weighted constrained average .phi..sub.ij. Thus, summing means 14 comprises two delays 24 and 26, each equal to the duration of one line scan of the signal. The delays 24 and 26 are connected in series between the input 12 and one input 28 of an adder 30. The input 12 also is connected directly to an input 32 of the adder 30. A third input 34 of the adder 30 is connected to the output 36 of the first delay 24. The output of the adder 30, on line 38, is applied to the input 40 of a delay 42, equal to the duration of one picture element (Pel). Line 38 also is connected to an input 44 of a second adder 46. The output of the Pel delay 42 is applied to a second input 48 of the adder 46 and to a second Pel delay 50, the output of which is applied to a third input 52 of the adder 46. The output of adder 46 is connected to a divider 54, where the summed signal is divided by nine to give the signal .phi..sub.ij proportional to the luminance of the composite colour video signal X.sub.ij. For this case the individual coefficients a.sub.nm for each delay or Pel is equal to one ninth. Sampling at 3f.sub.sc, the sequence of values of each three successive picture elements will be Y+I, ##EQU4## where Y is the luminance component and I and Q are the chrominance components. It will be seen that when these are summed the resultant is proportional to luminance only.
As will be described more fully hereafter, other proportions can be used depending upon sampling frequency and number of samples.
Bandpass filter 18 is a one-or two-dimensional digital filter arranged to pass the chrominance signal, C.sub.ij. The centre frequency of the passband is f.sub.sc, where f.sub.sc is the subcarrier frequency. The output of the filter 18 is connected to the input of means 54 for deriving a contrast enhancement factor proportional to the absolute value of C.sub.ij plus a constant .alpha.. Means 54 comprises a device 56 for deriving the magnitude, (in effect a rectifier), the output of which is applied by way of an multiplier 58, having a multiplication factor .beta., to an input 60 of an adder 62. A second input 64 of the adder 62 is connected to a reference source having a value .alpha.. The output (.gamma..sub.ij) of the adder 62 is connected to an input 66 of means 68 for computing the threshold value B.sub.ij according to the equation:
Where .gamma..sub.ij is the contrast enhancement factor and R is the maximum range of the video signal, for example 256 for an 8 bit digital signal.
A second input 70 of means 68 is connected to the output of divider 54. The output of computing means 68 is applied to a second input 72 of comparator 22. The input signal from terminal 12 is applied to the first input 20 of the comparator by way of a delay 74, equal to the delay of the bandpass filter 18. The output of the comparator 22 constitutes the output bilevel signal for storage and/or transmission.
As mentioned previously, the means 14 derives the weighted constrained average .phi..sub.ij from nine picture elements in a 3.times.3 matrix. The last element, in a conventional scan at the corner of the matrix, is the element X.sub.ij applied also to the comparator 22 and hence compared with the threshold value B.sub.ij. The output bilevel signal Y.sub.ij will be high (S.sub.1) if the element intensity X.sub.ij exceeds B.sub.ij and low (S.sub.0) if it does not.
As mentioned previously, the values of a.sub.nm can be chosen to render a signal proportional to luminance only, even though it has other than nine samples and a different sampling frequency. For example, at four times the colour subcarrier sampling frequency (4f.sub.sc) the coefficients for a.sub.nm can be: ##EQU5##
It should be appreciated that although the specific description is for a digital video signal, the invention is not limited to digital signals but also comprehends analog signal processing. Then means for deriving the luminance-related signal could be a low pass filter, means for deriving the contrast enhancement factor could be a rectifier, amplifier and adder or summing amplifier, and means for computing the threshold value B.sub.ij would use suitable analog devices.
It will also be appreciated that for some applications, such as stylized single frame images, the invention need not be embodied using the precise circuit element described hereinbefore, but could be put into practice using a microprocessor.
With suitable modification the invention could be applied to component colour video signals, i.e. in which the luminance and chrominance components have previously been separated.
A significant advantage of using the chrominance signal to constrain the averaged luminance signal is that the video signal reproduced can be kept relatively free from objectionable artifacts such as flicker or distorted colour. It will be appreciated that to add noise as in the various dither techniques mentioned in the introduction will generally degrade picture quality.