SPECIFICATIONA colour detector systemThis invention relates to a colour detector system for sorting objects on the basis of their colour. It is used to make an accurate assessment of the similarity of the spectrum of an area of an object to be tested to the spectrum of a corresponding area of a standard object, buy a statistical comparison of wavebands of the spectra. This detector system has a wide range of applications, for example in the sorting of banknotes.
Colour detectors for recognizing the colour of an object are known in the art. British Patent No.
1478062 discloses a method and apparatus for recognising a coloured pattern, where light reflected from an element of the pattern is dispersed, and the intensity at each of a plurality of wavebands is compared simultaneously with the corresponding intensities of the spectrum of a standard colour. A bit pattern is produced indicating the result of this comparison, and an overall coloured pattern may be recognized on the basis of such bit patterns accumulated from comprisons performed on many elements of the pattern for any given colour, or for more than one colour.
However this apparatus is not suitable for the testing of an object for which the intensity of reflected or transmitted light has been modified by usage, e.g. a worn banknote. Furthermore, the apparatus is unable to compensate automatically for changes in the condition of the apparatus, for example as may be caused by the ageing of electronic components, deterioration of the optical system and by the settlement of dust.
A colour detector system according to the invention for comparing the spectrum of light reflected from an area of a test object with a standard spectrum comprises: a broad-band source of illumination for illuminating an object area; dispersive means for collecting light from the object area and dispersing it to form a spectrum; an optical sensor array responsive to the spectrum from the dispersive means for generating a plurality of electronic signals indicative of the light intensity within each of a plurality of wavebands respectively, the signals together indicating the shape of the spectrum of light from the object area; a memory for storing data respresentative of the intensity within corresponding wavebands of the standard spectrum; compensating means for comparing the intensity of light received from the test object with a reference signal to establish a compensation factor with which to modify either the electronic signals representing the test spectrum or signals from the memory representing the standard spectrum to compensate for any difference established by this comparison; a comparator for comparing the signals representing the said wavebands of the two spectra after the compensation, the comparator generating an error signal, for each waveband, indicative of whether the intensity represented by the electronic signal or modified electronic signal differs by more than a predetermined tolerance from the intensity represented by the modified standard spectrum or unmodified standard spectrum respectively, and means responsive to the comparator output for providing a signal indicative of the similarity of the spectrum received by the array to the standard spectrum or the modified standard spectrum.
Preferably, the said reference signal is derived from signals representing the level of light intensity in one or more wavebands of the standard spectrum, and the compensating means compares this reference signal with a corresponding signal derived in a similar manner from the test spectrum to establish the compensation factor.
In a preferred form of the invention, the said reference signal represents the light intensity within one predetermined reference waveband of the standard spectrum, and the compensating means compares this signal with a signal representative of the intensity of light within the corresponding waveband received from the test object, and modifies the standard spectrum according to the ratio between these intensities.
Preferably, the signal processing means also has a "write" mode, so that when a standard object is used in place of a test object to provide a standard spectrum for storing in the memory, the signal processing means is set to "write" mode and causes data represenative of the electronic signals generated from the standard object to be written onto memory.
In the preferred form of the invention, the system also comprises a digital comparator responsive to the error signals from the comparator and to a signal representing a predetermined allowable number of errors, for comparing the number of wavebands in which the intensity lies outside the tolerance band with the allowable number of errors, and for providing a "reject" or "accept" output signal accordingly.
The predetermined tolerance values for the wavebands are preferably defined as a given percentage of the waveband intensity on either side of the waveband intensity, but for some purposes it may be advantageous to define different percentage tolerances for different wavebands. Alternatively, the tolerance values may be independent of the intensity value, the width of the tolerance band being predetermined for each waveband; the tolerance values may still be dependent on the compensation factor.
Preferably also, optical filters are interposed in the light path between the source of illumination and the optical sensor array so as to compensate for the non-uniform spectral response of the system.
A preferred embodiment of the invention will now be described with reference to the accompanying drawings, in which:Figure lisa schematic diagram of the preferred colour detector system;Figure 2a is a typical standard spectrum formed from sensor output values within 16 different wavebands, showing the tolerance band limits set by these values for each waveband, andFigure 2b is a typical test spectrum to be compared with the standard spectrum of Figure 2a, showing the scaled-down tolerance band limits within which the sensor output values are to lie.
As shown in Figure 1, an object such as a document, a banknote or a coloured fabric is illuminated by a broad-band source, which may provide continuous or pulsed radiation. The object may be made to move relative to the detector. Light from a preselected area of the object is collected and dispersed in a standard proprietary spectroscope, from which light of different wavelengths emerges at different places. The object area is generally selected so that it contains only one colour, and is of a reflectivity which is substantially uniform over that area. Typical dimensions of this area are 1 mm x 3 mm. This emergent light from the spectroscope is collected by a photodiode array, each photodiode being responsive to light within a different waveband.The response of the array to light will vary over the spectrum, so there may be interposed between the light source and the array an optical filter to compensate for this variation.
The photodiode array provides signals representing the intensity within each waveband to a set of amplifiers 5, whose outputs are then combined in a multiplexing unit 6.
The scanning of the object is controlled by a- control unit 7. The scan may be performed at a preselected time after the edge of a document or banknote has been detected, for example, if the object is moving. In this case, a leading edge detector 8 supplies the necessary synchronizing signal to the control unit 7, which initiates the scan after the preselected delay. Alternatively, if the object is moving or stationary an external trigger may be used in place of the leading edge detector; either mode of triggering may be chosen by a trigger source selector 9. If the object is stationary, then it will be necessary to use only an external trigger.
When the correct area of the object is in line with the spectroscope and the control unit initiates the spectrum scan, the amplified intensity signals from each waveband are multiplexed and are then either stored in a memory 10 via an analogue-to-digital converter 11, or else sent to an analogue comparator 12, depending on the control unit being set to its "write" or its "read" mode, respectively.
if the object is to be used as a standard, whose spectrum is to establish tolerance limits for the testing of further, similar objects, then the control unit 7 is set to "write mode". Signals from the multiplexer 6 are then converted into digital form in the AID converter 11, and written into the memory 10.
If the object is to be tested, by comparing its spectrum with the standard spectrum already stored in the memory 10, the control unit 7 is set to "read" mode. The analogue comparator 12 then receives intensity signals from the multiplexer 6 and the memory 10. Signals from the memory 10 must first be reconverted to analogue form in a D/A converter 13. The comparison of spectral intensities of the test-and standard-objects is performed sequentially in the comparator 12, one waveband at a time, and the order in which different wavebands are treated is predetermined. The comparator 12 also receives as input the allowable tolerance data, for example the percentage error at each waveband which is to be tolerated. These data may provide for different tolerance factors at each waveband, or else the same factor over all the spectrum.For each waveband, the comparator tests whether the intensity as conveyed by the signal from the multiplexer 6 lies within the tolerance limits, determined by the intensity at that point of the standard spectrum as conveyed by the signal from the DIA converter 13, and by the allowable tolerance data. The result of each comparison is fed as a digital error signal to an error counter -2 14, which counts the number of wavebands for which the intensities of test-and standard-objects do not agree to within the allowable tolerance. This error count is then fed into a digital comparator 15, together with a signal indicating the allowable number of such errors; if there are too many errors, the comprator outputs a "reject" signal, and if not, an "accept" signal, these output signals being then used to determine the fate of the test object.
Figure 2a shows an example of a standard spectrum. This is a plot of the intensities marked "X", measured within 16 different wavebands. The allowable tolerance has been set at +20% for every waveband, and these tolerance limits are markedFigure 2b shows a test spectrum being compared with the standard spectrum of Figure 2a. All the intensity values lie within the tolerance limits, except for those at wavebands 4 and 16. The error counter would in this case register an error count of 2; if, for example, the allowable number of errors were 3, then the digital comparator 15 would output an "accept" signal, but if it were 1, the comparator would output a "reject" signal.
Figures 2a and 2b also illustrate a further feature of the colour detector system. As described above, the intensities of test-and standard-objects at each waveband are compared directly, the assumption being made that the test object has the same reflectivity (or transmissivity) as the standard object.
If this is not so, then a test object might be rejected because its intensity is above, or below, that of the standard object at all the wavebands, even though its colour is exactly the same. If the system is to be truly responsive to the colour of either bright or dull test objects, the comparison must be made on the basis of the shape of the intensity spectrum and not absolute intensity. To achieve this, the tolerance limits are scaled accoding to the ratio between the measured intensities of test-and standard-objects at a given waveband, to be called the reference waveband. The scaling of the tolerance limits then ensures that the spectra are compensated for any overall difference in intensity, and that the comparison is then done according to their relative shape. In the system illustrated in Figures 2a and 2b, waveband number 7 is the reference waveband. The value of the standard spectrum at this waveband is 5.1 and the corresponding value of the test spectrum is 3.06.
The reference waveband signals reach the comparator before all the others, so that this compensation may be performed before comparing the other wavebands. It is assumed in the example that the standard object is generally brighter than the test object by the ratio 5.1:3.06. The standard intensities from the memory 10 and DIA converter 13 are reduced by the factor (3.06+5.1 ),i.e. to 60% of their previous values, and the tolerance limits are correspondingly reduced. If the allowable tolerance data were given not as percentages of the intensities, but instead as differences of intensities, for example + 1.5 intensity units, then these data must also be reduced to 60%. Figure 2b shows the tolerance limits at 60% of their values in Figure 2a; this is still a ~20% tolerance, but of a spectrum reduced to 60%. If there were no such compensation, all the points in the spectrum, with the possible exception of those for wavebands 15 and 16, would fall outside the tolerances, and the test object might well be wrongly rejected.