Abstract:
A chroma keying generator apparatus is disclosed having a monitor camera transmitting color signals to multipliers for separating a luminance signal from an image signal and amplifying same by selected gain levels, comparison circuits for comparing two color signals with pre-selected reference levels therefor having upper and lower limits and producing outputs denoting that the ratio of the color signal to the luminance signal for a given color falls within a pre-selected reference range, and a gate circuit which evaluates the outputs from the comparison circuits to produce pulses representing a logical &#34;1&#34; when the output is within the reference range and a logical &#34;0&#34; when the output is not within the reference range.

Description:
This is a continuation of copending application Ser. No. 661,991 filed Oct. 18, 1984, now abandoned. 
    
    
     BACKGROUND OF THE INVENTION 
     This invention relates to a color signal separating apparatus and especially to a color signal separating apparatus for separating and digitizing signals corresponding only to particular colors from image signals provided by a monitor camera thereby to obtain signals corresponding to the particular colors. More particularly, the invention relates to an apparatus suited for use with a fruit harvesting machine as means to exclude the sky, leaves and the like which lie in the background of fruit from image signals provided by a monitor camera acting as means to detect positions of fruit to be harvested. 
     In one known type of color signal separating apparatus, the monitor camera for picking up the image of an object includes an optical filter for passing particular colors only, in order to obtain signals corresponding to the particular colors from image signals from the monitor camera. Another type of known apparatus carries out logical processing to obtain a sum of or a difference between color signals corresponding to particular colors among a plurality of color signals output by a color video camera. 
     In order to digitize the color signals, the color signals are first stored in a frame memory or the like and are thereafter put to digital logical processing. Such a process requires a complicated construction and the logical processing is time-consuming. Where the optical filter is employed, it is necessary to have available many kinds of filter corresponding to particular colors to be determined. 
     Futhermore, both of the known apparatus noted above have the serious disadvantage that the image signals obtained under conditions where brightness or luminance levels deviate from a certain value cannot be differentiated without greatly complicating software therefor. Especially, it is impossible to maintain the brightness to a certain level where the apparatus is used with the above-noted fruit harvesting machine which operates outdoors. On the other hand, the particualr colors to be sampled have a certain range, further complicating the process with the known construction, and simple improvements in hardware are inadequate to permit the image signals to be processed on real time basis. 
     SUMMARY OF THE INVENTION 
     This invention has been made having regard to the above state of the art, and its object is to provide a color signal separating apparatus capable of obtaining digital signals corresponding to particular colors on real time basis and regardless of luminance levels. 
     In order to achieve this object, the color signal separating apparatus according to this invention comprises chief features based on the following principle: 
     A certain color   may be expressed by a vector represented by the following equation (i): 
     
          =a +b +c                                                  (i) 
    
     wherein a, b and c are coefficients, and    and    correspond to the vectors of the three primary colors of light. 
     Therefore, particular colors are determinable by determining the coefficients a, b and c, but the color   cannot be determined without obtaining definite brightness since each of the coefficients include a brightness (luminance level) parameter. 
     Image information input means comprising a monitor camera such as a color video camera normally is adapted to output a luminance signal Y and signals R, G and B of the three primary colors separately. The signals Y, R, G and B have the relationship represented by the following equations (ii)-(v): ##EQU1## 
     Thus, the certain color   is normalized and determined regardless of brightness by determining the luminance level Y and the parameters of any two of the gains K1 to K3. 
     More particularly, where, for example, a particular color   which is red or redish is to be picked out, a digital signal corresponding to the particular color   is obtained by a simple logical processing by predetermining K1 and K2 in the above equations (ii) and (iii) utilizing the luminance signal Y, the red color signal R and the blue color signal B. 
     The principle of this invention is also applicable where the red signal R, the green signal G and the blue signal B are available, for a sum in intensity of these signals R, G and B equals an intensity of the luminance signal Y. That is to say the principle of this invention is applicable if any three of the four signals are made available. 
     The divisions as equations (ii) and (iii) deteriorate processing precision because it is difficult to process actual signals in broad band. In order to avoid this disadvantage this invention modifies the above equations (ii) and (iii) into multiplications and the data are processed by multipliers which carry out the following equations (ii&#39;) and (iii&#39;). Thus, the invention is capable of selecting particular colors on real time basis without requiring a memory for storing the signals prior to the processing. 
     
         R=K1Y                                                      (ii&#39;) 
    
     
         B=K2Y                                                      (iii&#39;) 
    
     In order to carry out the above signal processing, the apparatus according to this invention comprises multipliers for amplifying a luminance signal separated from the image signals by selected gains, comparison circuits for comparing color signals with upper limits and lower limits corresponding to separating levels output by the multipliers and digitizing the color signals, and a gate circuit for carrying out a logical operation on digitized color signals provided by the comparison circuits, the signals corresponding to the particular colors being output by the gate circuit. 
     The features set out above produce the following excellent effects: digitized signals corresponding to particular color are obtained with high precision on real time basis and regardless of brightness, only by setting ratios of the luminance signal and the color signals to values corresponding to the particular colors. Furthermore, the sampling color may be selected as desired only by changing the ratios. 
     Since the range of the color to be selected may be determined as desired by the range of gains by which the luminance signal is multiplied, not only one particular color but signals including a certain range of color may be digitized. This is a very important advantage when digitizing a color such as of fruit which has a certain range. 
     It will be noted from the above description that the signal processing system employed in the apparatus of the invention is essentially less likely to be affected by the variation in luminance. 
     However, undesired effects of the variation in luminance are not necessarily eliminated perfectly. An error caused by fluctuation of the pedestal level of the luminance and color signals will probably occur in case where said signals are generated as outputs from electronic circuits having a structure of an alternative connection. 
     Accordingly, one of the preferred embodiments of the invention is adapted to previously process the luminance and color signals respectively by means of DC restoration circuit prior to the processing of said signals in multipliers or other circuits. In these DC restoration circuits, output signals from sample hold circuits are subtracted respectively from the input signals such as the luminance signal so as to eliminate the adverse influence of the pedestal level fluctuation whereby the input signals are converted into DC signals having intensities based on a ground level, i.e. an absolute 0 (zero) volt. The preferred embodiment can therefore provide an extremely exact detection of objects such as fruits because said undesired influence of the luminance fluctuation is perfectly eliminated. Frame memories are necessary to store the thus processed signals in the preferred embodiments. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Several embodiments of this invention will hereinafter be described with reference to the drawings, in which: 
     FIG. 1 is a block diagram showing a color signal separating apparatus according to a principal embodiment of the invention, 
     FIG. 2 is a schematic view of a control panel used in the above embodiment, 
     FIG. 3 is a block diagram of the above apparatus where a light emitting device and an automatic shutter speed adjusting device are additionally provided, 
     FIG. 4 is a circuit diagram of the above embodiment where signal modifying means are additionally provided, 
     FIG. 5 is a time chart showing operation of the signal modifying means, and 
     FIG. 6 is a circuit diagram showing an automatic camera stop adjusting device. 
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     Referring to FIG. 1, a monitor camera 1 comprising a color video camera detects a fruit tree A and its picture information in the form of luminance signal Y is input to multipliers 2 and 2&#39;. These multipliers 2 and 2&#39; multiply the luminance signal Y by gains K1, K1&#39;, K2 and K2&#39; set by potentiometers R1, R1&#39; and R2 and R2&#39;, respectively. Resulting values are input to comparison circuits 3 and 3&#39; as reference levels K1Y, K1&#39;Y, and K2Y and K2&#39;Y respectively. The comparison circuit 3 selects and digitizes red color signals R between upper limit reference level K1Y and lower limit reference level K1&#39;Y, and the comparison circuit 3&#39; selects and binarizes blue color signals B between upper limit reference levek K2Y and lower limit reference level K2&#39;Y. A gate 4 obtains a logical AND of binary color signal R&#39; and B&#39; output from the comparison circuits 3 and 3&#39;. Thus the gate 4 outputs only those particular colors  , in the form of particular binary color signals F, corresponding to fruit a laying within the range determined by using the gains K1, K1&#39;, K2 and K2&#39;, and an image responsive to the binary signals corresponding only to the fruit a is displayed on a screen 5a of a monitor television 5. 
     In order to facilitate determination of the particular colors to be differentiated, the color signal separating apparatus according to this embodiment comprises a control panel 6a  having control knobs C1, C1&#39;, C2 and C2&#39; arranged two dimensionally thereon for controlling the potentiometers R1, R1&#39;, R2 and R2&#39;, respectively. More particularly, as shown in FIG. 2, the control knobs C1 and C1&#39; for controlling the potentiometers R1 and R1&#39;to determine digitized levels of the red color signals R are one above the other to be movable in horizontal directions, whereas the control knobs C2 and C2&#39; for controlling the potentiometers R2 and R2&#39; to determine digitized levels of the blue color signals B are arranged side by side to be movable in vertical directions. The panel 6a provides, above, the control knobs C1 and C1&#39; and at a righthand side of the control knobs C2 and C2&#39; a color display which shades off in accordance with positions of the control knobs C1, C1&#39;, C2 and C2&#39;, that is to say the aforesaid gains K1, K1&#39;, K2 and K2&#39;. Thus it enables the operator to recognize by intuition that the colors to be digitized are in the range f defined by extension lines from the four control knobs. 
     The portion having a triangular shape in FIG. 2 is colored such that green shades off into red in the righthand direction and into blue in the upward direction, whereby the range of digitized color signals is readily perceptible. 
     It is to be noted that reference R, B and G in FIG. 2 indicate ranges of the three primary colors, red, blue and green, and that reference W indicates a range of white. 
     Another embodiment is shown in FIGS. 3 to 5. 
     In this embodiment, color picture signals for one frame provided by the monitor camera 1 having the above construction are converted by a color identifying device 20 into digital signals corresponding only to the fruit, and the digital signals are stored in a frame memory 22. At the same time the results are displayed on a monitor television 5 and a control device 24 carries out fruit position detection and other processing, whereby the apparatus is capable of automatically discriminating fruit from other objects. 
     Referring to FIG. 4 showing details of the color identifying device 20, the pictorial information or luminance signal Y provided by the monitor camera 1 is fed through one of DC restoration circuits 28 to be described later to a multiplication circuit 30 having two multipliers 2 and 2&#39;. 
     At the multiplication circuit 30 the luminance signal Y is multiplied by the gains K1, K1&#39;, K2 and K2&#39; set by potentiometers R1, R1&#39;, R2 and R2&#39;, respectively, and is thereafter input to comparison circuits 3 and 3&#39;. The values thus obtained are utilized as the reference levels K1Y, K1&#39;Y, K2Y and K2&#39;Y for digitizing the red color signals R and the blue color signals B. 
     The red and blue color signals R and B output together with the luminance signal Y by the monitor camera 1 are also fed to the comparison circuits 3 and 3&#39;. Each of these comparison circuits 3 and 3&#39; constitutes a window comparator having two comparators A1 and A2 and a reverse buffer G1. The color signals R and B lying between their respective upper limits K1Y and K2Y and their respective lower limits K1&#39;Y and K2&#39;Y of the reference levels are selected and digitized. The AND gate 4 obtains a logical AND of the resulting digital signals R&#39; and B&#39;, and the frame memory 22 receives the particular digital color signals F corresponding only to the fruit lying in the range determined by the potentiometers R1, R1&#39;, R2 and R2&#39;. 
     The monitor camera 1 outputs the luminance signal Y, the red color signals R and the blue color signals B in AC coupling, and therefore these signals have an inconstant pedestal level Pd. The DC restoration circuits 28 are provided to control the pedestal level Pd to be an absolute ground level (GND level, OV). Each of the DC restoration circuits 28 comprises a sample-hold circuit A3 to sample-hold an input signal Vi in synchronism with rises HD of a horizontal synchronization signal input from a horizontal amplifiers Ao, as shown in FIG. 5, a differential amplifier A4 to obtain a difference between the input signal Vi and an output signal Vref of the sample-hold circuit A3. In other words, the DC restoration circuit 28 is adapted to convert the input signal Vi into a DC component signal Vo from the absolute ground level. 
     According to the embodiment shown in FIGS. 3 to 5, the luminance signal Y and the color signals R and B are processed at the DC restoration circuits 28 prior to input to the multiplication circuit 30 and the comparison circuits 3 and 3&#39;. Therefore, the color signals are separated with high precision even if there are variations in the brightness of fruit under measurement. 
     An automatic stop control system may be added to the structure shown in FIGS. 3 to 5 in order to eliminate more perfectly the influence of the luminance fruits or other objects to be detected. 
     In FIG. 6 reference number 40 denotes a stop encoder operatively connected to a stop of the camera and reference number 42 denotes a motor for adjusting an opening degree of the stop. Signals from the encoder 40 are input to two comparators 44 and 44&#39;, while the luminance signals Y from the monitor camera 1 are also input to these comparators 44 and 44&#39;. Output signals from the comparators 44, 44&#39; are input to a motor drive circuit including switch circuits 48 and 48&#39;. When the switch circuit 48 is energized, for example, the motor 42 is put to forward rotation, and when the switch circuit 48&#39; is energized, the motor 42 is put to reverse rotation. Thus the opening degree of the stop is automatically adjusted in accordance with variations of the luminance signals Y. 
     It is of course possible to incorporate the construction of FIG. 6 into the apparatus of FIGS. 1 and 2.