Illuminant discrimination apparatus and method
BACKGROUND OF THE INVENTION 
     The present invention relates to improvements in devices and methods for discriminating among various types of illuminants, such as fluorescent light, incandescent light and natural daylight. 
     To produce faithful photographic reproductions of multicolored scenes, the color balance of the photographic film must be compatible with the spectral characteristics of the scene illuminant. Many photographic color emulsions are color balanced for use with natural daylight; others are color balanced for use with incandescent (i.e. tungsten) illumination. To properly expose a color film with an illuminant for which the film is not color balanced, it is necessary to use color compensating filters. 
     In the commonly assigned, copending U.S. application Ser. No. 729,624, now abandoned, filed in the name of Lee F. Frank on Oct. 5, 1976, apparatus is disclosed for detecting the type of illuminant which is illuminating a scene of photographic interest. Such apparatus discriminates among fluorescent light, incandescent light and steady-state light (e.g. natural daylight or artificial light emanating from a DC source) by detecting the so-called &#34;flicker ratio&#34; of the light (i.e. the ratio of the brightest to the dimmest intensities of the light during a given time interval). Natural daylight, like other light emanating from a source of constant brightness, has a flicker ratio of unity. Artificial light sources, being energized by ordinary household line voltage, has a brightness which flickers at approximately 120 hertz, twice the frequency of the line voltage. Owing to the different rates at which the energy-responsive elements of incandescent and fluoroescent lamps respond to applied energy such illuminants can be readily distinguished by their respective flicker ratio. The flicker ratio of fluorescent light has been found to be approximately 10 times that of incandescent light. The output of the Frank flicker ratio-detecting apparatus is used to control the position of color correction filters in a camera or, alternatively, to encode the film with the type of illuminant for use in controlling a subsequent printing process. 
     In utilizing the apparatus described above, one finds that it is quite effective in discriminating among the three types of illuminants mentioned, especially when the illuminant constitutes pure incandescent light, or pure fluorescent light, or pure daylight. However, when the illuminant comprises a certain mixture of daylight and fluorescent light, the Frank apparatus is unable to distinguish this mixture from pure incandescent light. One finds that as the DC component (i.e. the daylight component) of the mixture increases with respect to the AC component (i.e. fluorescent light component), the flicker ratio of the mixture decreases. When the DC component has the effect of reducing the flicker ratio by an order of magnitude, the flicker ratio of the mixture is indistinguishable from that of incandescent light. 
     SUMMARY OF THE INVENTION 
     In accordance with the present invention, there is provided improved apparatus which is capable of detecting which of a plurality of different illuminants, e.g. incandesent light, fluorescent light and natural daylight, is illuminating a region of interest, and in the event the illuminant comprises a mixture of individual illuminants, which of the individual illuminants is predominant. It has been found that incandescent light can be readily distinguished from fluorescent light, regardless of the existence of any daylight component, by their respective temporal signatures. When energized by a sinusoidal waveform, such as that which characterizes conventional household AC current, the respective brightness of incandescent and fluorescent sources vary according to a waveform which is a harmonically distorted sinusoid. It has been found that the harmonic distortion of the waveform which characterizes the instantaneous brightness of a fluorescent lamp is approximately 3.5 times the distortion which characterizes the same waveform of an incandescent lamp. According to the invention, this information is used to discriminate fluorescent lighting from incandescent and daylight lighting. The illuminant discrimination apparatus of the invention comprises a photoelectric circuit which produces an electrical signal having an amplitude which varies with the instantaneous intensity of an illuminant, means for detecting the amount of harmonic distortion in such signal, and means for indicating, based upon the output of the harmonic distortion detecting means, the type of illumination received by the photoelectric circuit. According to a preferred embodiment, this apparatus is combined with flicker ratio detecting circuitry to provide an apparatus which is capable of discriminating among fluoroescent light, incandescent light and natural daylight. 
     The method of the invention comprises the step of sensing the amount of harmonic distortion in a signal which varies in response to intensity variations of an AC energized artificial source. 
     The invention and its objects and advantages will become more apparent in the detailed description of the preferred embodiment presented below. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     In the Detailed Description of the Preferred Embodiment of the invention presented below, reference is made to the accompanying drawings wherein: 
     FIG. 1 illustrates the typical brightness fluctuation of a fluorescent light source during one cycle of applied power; 
     FIG. 2 shows the typical brightness fluctuation of a tungsten light source during one cycle of applied power; and 
     FIG. 3 is a schematic diagram of a circuit embodying the present invention. 
    
    
     DETAILED DESCRIPTION OF A PREFERRED EMBODIMENT 
     Referring now to the drawings, FIGS. 1 and 2 present waveforms which respectively illustrate the manner in which the brightness of fluorescent and incandescent light sources varies with time as a result of being energized by a sinusoidally varying voltage, e.g. the AC voltage characteristic of conventional household power. It will be noted that during both the positive and negative half-cycles of the applied power, the source intensity increases; thus, the fundamental frequency in which the source brightness varies is twice the frequency of the applied power. For conventional 60 hertz power, the fundamental frequency at which the brightness of AC energized artificial light sources will vary is 120 hertz. 
     In comparing the waveforms of FIGS. 1 and 2, it will be apparent that the peak brightness (i.e. the maximum brightness variation occurring during one cycle of applied power) of the fluorescent source is substantially greater than that of the incandescent source. Thus, pure flourescent light can be readily distinguished from pure incandescent light by merely determining the peak brignthess of the source. As mentioned above, apparatus for distinguishing fluorescent light from incandescent light by determining the &#34;flicker ratio&#34; (which is directly proportional to the peak brightness) of a light source is disclosed in the aforementioned Frank application. However, as mentioned above, the Frank apparatus is not capable of distinguishing from incandescent light, fluorescent light which is mixed with a certain amount of light from a steady-state source, such as natural daylight. 
     In further comparing the waveforms of FIGS. 1 and 2, it will be noted that the brightness curve of the incandescent source is more sinusoidal in shape than that of the fluorescent source; stated otherwise, the brightness curve of the fluorescent source contain more harmonic distortion (i.e. distortion due to the presence of harmonic frequency components other than the fundamental) than does the incandescent source. In determining the percent of harmonic distortion of the waveforms which characterize the respective time-varying brightness curves of incandescent and fluorescent sources, one finds that there is approximately 10% harmonic distortion in the brightness curve of incandescent light, whereas there is approximately 35% harmonic distortion in the brightness curve which characterizes the fluorescent source. The percent of harmonic distortion is numerically defined as 100 times the ratio of the square root of the sum of the squares of the root-mean-square voltages of each of the individual harmonic frequencies, to the root-mean-square voltage of the fundamental. It is this difference in harmonic distortion between the two brightness curves which is used by the apparatus and method of the present invention to distinguish incandescent light from fluorescent light, even fluorescent light which is mixed with varying amounts of natural daylight or with any other steady-state source so as to have a peak brightness characteristic identical to that of pure incandescent light. Using this same information, it is also possible to detect which light source is predominant in a mixture of fluorescent and incandescent light. 
     In FIG. 3, there is shown a circuit according to a preferred embodiment of our invention which includes a photosensor 12, preferably a photovoltaic cell, that responds to incident light by producing a voltage that is logarithmically related to the intensity of light impinging thereon. The light falling onto the photosensor 12 may be from a steady-state source (e.g. natural daylight), an artificial source whose brightness fluctuates as a function of time, or a combination of such sources. When the light is from an artificial source, such as a fluorescent or incandescent lamp driven by a line voltage operating at a predetermined frequency, photosensor 12 produces a voltage having a DC component (or average value) proportional to the average light intensity a, and an AC component having a fundamental frequency that is proportional to twice the frequency of the line voltage. Assuming that an artificial light source is operating at the conventional household line frequency of 60 Hz, the fundamental frequency at which the output signal from photosensor 12 will vary will be 120 Hz. 
     Assuming that the maximum intensity of light impinging upon the photosensor 12 during one cycle of applied power produces a voltage V b , and that the minimum intensity of light produces a voltage V d , the amplitude of the AC component of the voltage produced by photosensor 12, and seen by an AC coupling capacitor 14, would be proportional to log V b  minus log V d , or log (V b  /V d ). Thus, the amplitude of the AC component of the signal produced by the photosensor is proportional to the log of the &#34;flicker ratio&#34; (V b  /V d ). 
     Capacitor 14 blocks the DC component of the voltage produced by the photosensor and passes only the AC component to an amplifier, such as, operational amplifier 16. The AC signal is coupled to one input terminal of the amplifier 16 while the other input terminal receives a bias voltage V 1  from a reference voltage sensor. Amplifier 16 includes a resistive feedback loop 18. The voltage gain K of amplifier 16, as is well known, is given by: 
     
         K=R.sub.1 /Z                                               (1) 
    
     where R 1  is the value of resistor 20 and Z is the impedance of capacitor 14 and a resistor 22. The output of the amplifier 16 is coupled through a capacitor 30 and a gain stage (amplifier) 32, into the parallel combination of a high-pass filter 34 and a bandpass filter 36. The high-pass filter 34 passes all frequencies above the fundamental frequency of the artificial illumination (i.e. 120 Hz). The signal thus passed is proportional to the harmonic distortion present in the output of light-sensitive element 12. The bandpass filter 36 passes only a narrow band of the signals centered at the fundamental frequency (e.g. 120 Hz) of artificial illumination. 
     The output of filter 34 is coupled to a peak detector 50 which comprises a diode 52 and a capacitor 54, and the output of filter 36 is coupled to a peak detector 56, comprising a diode 60 and capacitor 62. 
     The peak-detectors 56 and 50 produce outputs that respectively represent the log of the flicker ratio at the fundamental 120 Hz frequency and the amount of harmonic distortion present in the fundamental frequency. Because the log of the flicker ratio of light from a fluorescent lamp is approximately ten times as high as the log of the flicker ratio of light from a tungsten lamp, the output from the peak detector 56 will vary between well-defined voltage values when the light-sensitive element 12 is exposed to fluorescent or tungsten light respectively. However, when the light falling on photosensor 12 consists of a combination of fluorescent light and daylight, the voltage output from peak detector 56 will approach that produced by incandescent light. Because the harmonic distortion present in the AC signal produced by fluorescent light is approximately three and one-half (3.5) times the distortion present in the signal caused by incandescent light, the output of the peak detector 50 will also assume distinct values characteristic of fluorescent and incandescent illumination. 
     The outputs from the peak detectors 50, 56 are fed to an analog comparator 63, which comprises threshold logic gates 70, 72 and 74 which produce outputs A, B and C, respectively. The threshold levels of gates 70, 72 and 74 are set by three reference voltage sources, V 2 , V 3  and V 4 , respectively. The threshold level of gate 70 is set so that a positive output (logical &#34;1&#34;) is produced on line A when the output from peak detector 50 exceeds the threshold established by reference voltage V 2 . Reference voltage V 2  is selected to be of a value between the voltage levels indicative of incandescent and fluorescent light; i.e. greater than the incandescent voltage level and greater than the fluorescent voltage level. The predominance of either incandescent or fluorescent light in a mixture of the two can be determined by setting the level of reference voltage V 2  midway between the voltage levels produced by peak detector 50 in the presence of pure incandescent and pure fluorescent light. 
     The threshold level of gate 74 is set so that a positive output (logical &#34;1&#34;) is produced on line C when the output from peak detector 56 reaches a level that is indicative of the high flicker ratio present in fluorescent light. Until this condition is met, the output of gate 74 is logical zero. Gate 72 is connected in such a manner that it produces a logical &#34;1&#34; output on line B until the output of peak detector 56 (i.e. the input to gate 74) exceeds the reference voltage V 3 . Reference voltage V 3  is set so that the positive output is terminated when the output from peak detector 56 reaches a level that is indicative of the flicker ratio present in tungsten or fluorescent light, or in fluorescent light combined with daylight. 
     To utilize the outputs A, B and C to generate an indication of the type of lighting present, the outputs A, B and C are combined in a first NOR gate 76 whose output, together with the output of gate threshold 72 is coupled to the input of a second NOR gate 78. The output of threshold 72 is coupled to the input of a second NOR gate 78. The output of threshold gate 72 is coupled to an indicator lamp 80 or the like. Outputs of NOR gates 76, 78 are respectively coupled to indicator lamps 82, 84. As explained below, lamps 80, 82 and 84 are selectively energized to indicate the type of illuminant incident upon the photosensor. Rather than being used to energize indicator lamps, the outputs of NOR gates and gate 72 could be used for other purposes, such as to control the positioning of corrective filters in photographic cameras and printers. 
     The outputs A, B and C assume positive (1) or zero (0) states when the following types of light are incident upon photosensor 12. 
     
         ______________________________________                                    
                Output States                                             
Type of Light     A        B        C                                     
______________________________________                                    
Fluorescent       1        0        1                                     
Fluorescent &amp; Daylight                                                    
                  1        0        0                                     
Tungsten          0        0        0                                     
Daylight          0        1        0                                     
______________________________________                                    
 
    
     Since the output of threshold gate 72 is coupled to lamp 80, lamp 80 will be energized, to indicate daylight, whenever the flicker ratio of the light incident on element 12 is less than that required to change the output of gate 72, from logical &#34;1&#34; to &#34;0&#34;. Similarly, lamp 82 will be energized to indicate the presence of incandescent light whenever the flicker ratio of the light shining on photosensor 12 is higher than that required to shut off the output of gate 72, less than that required to produce a logical &#34;1&#34; output from gate 74, and there is insufficient harmonic distortion in the incoming signal to produce a logical &#34;1&#34; output from gate 70. Lamp 84 will be energized to indicate that fluorescent light is shining on photosensor 12 whenever the output of gate 70 is logical &#34;1&#34;, indicating a high amount of harmonic distortion, and the flicker ratio is high enough to change the output of gate 72 from logical &#34;1&#34; to &#34;0&#34;. These conditions are met when the light incident on light-sensitive element 12 is either (1) pure fluorescent light or (2) a mixture of fluorescent light and daylight, the proportion of fluorescent light exceeding a certain value determined by the reference voltage applied to gate 70. 
     The invention has been described in detail with particular reference to a preferred embodiment thereof, but it will be understood that variations and modifications can be effected within the spirit and scope of the invention.