Recognition of Banknote Denominations in Automatic Money Processing
Devices
CROSS-REFERENCE TO RELATED APPLICATIONS
This application claims the benefit of Provisional Application No. 60/395,086, filed July 10, 2002.
BACKGROUND OF THE INVENTION
The invention relates to banknote identification. More particularly, this invention relates to optical methods and systems for the automatic identification of paper currency from different issuers and in different denominations. A variety of optical systems for automatic currency discrimination are used in conjunction with currency counting machines. Pattern recognition techniques have been proposed, based on reflectance or transmittance images, typically including correlation of an unknown pattern with a reference pattern.
A common feature of existing algorithms for currency identification is the use of prede- fined strips selected on a banknote image. The strips may be extracted from different regions of the banknote, e.g., edges, central areas, or areas having particular ranges of reflectance or transmittance. While such algorithms are effective and robust, they require research of banknote properties, and must take into account subtle differences among the banknotes from different issues of the same denomination. For example, the algorithms must meet permit identi- fication of mutilated, but still acceptable banknote, etc. Typically, denomination algorithms use reflectance data in grey-scale or color formats at high spatial resolution, which requires large amounts of memory. Processing such data requires the inclusion of a computer, in the currency counting machine having large amounts of memory, both RAM and EPROM, and a powerful processor. Furthermore, relatively complex software must be provided. For example, U.S. Patent No. 5,680,472 proposes a currency recognition system, which consists of defining a side edge and a top edge of a banknote that is being scanned and obtaining a deskewed image, and a recognition algorithm is applied, relying on edge detection routines to determine the printing edges of the node, and the application of linear discriminant functions and correlation measurements with known patterns to classify the banknote. Another example is U.S. Patent No. 5,467,405, which proposes a currency classification technique, in which banknotes are scanned along their narrow dimension, and analog reflec-
tance images obtained. The analog images are subjected to digital processing. A normalization process is then applied, in order to deaccentuate contrast variations in the printed pattern of the banknote being scanned. Reference patterns are memorized, and are correlated with scans from unknown images, using two levels of correlation in order to establish identification. Most conventional optical techniques are based on well known methods of pattern recognition. In general, there is a tradeoff between the amount of test data obtained for each banknote and the depth of analysis of the test data to assure correct currency identification, and the throughput of the processing and counting system. In systems that acquire large amounts of data, at a high pixel resolution, for example, it is necessary to dedicate more computer re- sources to its analysis. Thus, it would be advantageous to develop a system capable of reliably identifying banknotes at a lower pixel resolution. Some systems employ large numbers of optical samples of each banknote, which can slow system operation. Additionally or alternatively, complex algorithms may be employed to evaluate the scanned data. Assuring adequate registration of the banknotes with the scanner and the collection of the scanned data are time consuming.
SUMMARY OF THE INVENTION
It is therefore a primary object of some aspects of the present invention to provide improved automatic currency classification method and system that operates using images of low brightness and spatial resolution. It is another object of some aspects of the present invention to provide improved automatic currency classification methods and systems that do not require prior knowledge of banknote structure.
It is a further object of some aspects of the present invention to provide improved automatic currency classification that is capable identifying new currency issues in the absence of prior experience therewith.
In some aspects of the invention, identification of currency is based on a process that comprises two stages: a training or learning phase, and an operational phase. During training, which may be performed on any workstation, a set of discriminators is developed using a training set of banknotes, which is representative of banknotes of different issuers and de- nominations. Then, during the operational phase a scanned image of a banknote to be identified is correlated or compared with different members of the set of discriminators. The results of the correlations and comparisons are fed to a decision making module that either generates
an identification code for the banknote, or reports an unknown banknote. The identification code can include detailed information about the currency, e.g., the issuer, denomination, facing, and orientation in the counting machine.
Members of the set of discriminators may include look up values in reference tables that are derived from the images of the training set. Some discriminators rely, for instance, on bank note size, while others employ correlation of other characteristics of an unknown banknote using the reference tables. As another example, a table derived from the training set may indicate the probability of a given brightness for every pixel, or group of pixels. These probabilities are obtained during training by statistical analysis of the images of the training set. During operation, the brightness of a particular pixel or group of pixels in a scanned image of an unknown banknote is compared with that of different known banknotes. This comparison may be accomplished, for example, using probability analysis to calculate a conditional probability that a particular pixel or group of pixels has a measured brightness. The condition is a hypothesis that the subject banknote has a certain denomination. If this probability is high enough, or if it is significantly larger for one assumed denomination than for all others, the hypothesis is accepted.
In another aspect of the invention, grey-scale images of the banknotes are acquired at a low spatial resolution, which can be as low as 10 dots per inch (dpi). At this resolution, the discrimination tables may be processed without need for reduction to binary masks and dis- crimination process is rapidly completed using simple logical or integer arithmetic operations.
The invention provides a method for identifying a denomination of a currency bill, which is carried out by providing a mask for each denomination among a plurality of different currency denominations. The mask indicates expected brightness levels of pixels in images of bills of the given denomination. The method is further carried out by capturing an image of the currency bill, correlating brightness levels in pixels of the captured image with the mask so as to determine matching scores for the different currency denominations, and comparing the matching scores so as to assign one of the different currency denominations to the currency bill.
In an aspect of the method the matching scores are compared by selecting a highest one of the matching scores, determining whether the highest one of the matching scores exceeds a threshold, and responsively thereto, identifying the currency bill with the currency denomination corresponding to the highest one of the matching scores.
According to another aspect of the method, the threshold has a predetermined value.
According to an additional aspect of the method, the threshold depends on whichever of the different currency denominations corresponds to the highest one of the matching scores.
According to yet another aspect of the method, the matching scores are correlation coefficients. According to yet another aspect of the method, the spatial resolution of the captured image does not exceed 10 dpi.
According to one aspect of the method, the captured image is a grey-scale image.
According to another aspect of the method, the spatial resolution of the captured image does not exceed 10 dpi. According to a further aspect of the method, the brightness resolution of the captured image does not exceed 12 bits per pixel.
According to an additional aspect of the method, the brightness resolution of the captured image does not exceed 6 bits per pixel.
According to yet another aspect of the method, there are a plurality of captured images corresponding to different facings and orientations of the currency bill.
The invention provides a computer software product, including a computer-readable medium in which computer program instructions are stored, which instructions, when read by a computer, cause the computer to perform a method for identifying a denomination of a currency bill, which is carried out by generating a mask for each given denomination among a plurality of different currency denominations. The mask indicates expected brightness levels of pixels in images of bills of the given denomination. The method is further carried out by capturing an image of the currency bill, correlating brightness levels in pixels of the captured image with the mask so as to determine matching scores for the different currency denominations, and comparing the matching scores so as to assign one of the different currency de- nominations to the currency bill.
The invention provides an apparatus for identifying a denomination of a currency bill, including a transport mechanism for conveying the currency bill along a transport path, an imaging subsystem for capturing an image of the currency bill while the currency bill is on the transport path, and a decisional logic subsystem that evaluates the captured image for identifi- cation thereof. The decisional logic subsystem is adapted to compare the captured image to masks indicating expected brightness levels of pixels in images of bills of the given denomination, so as to determine respective matching scores for different currency denominations, and
to compare the matching scores so as to assign one of the different currency denominations to the currency bill.
According to a further aspect of the apparatus, the imaging subsystem includes a light source and a light detector that is responsive to the light source, and is positioned relative the light source such that the captured image is a reflectance image.
According to still another aspect of the apparatus, the light source produces a beam of visible light, wherein the currency bill is in a path of the beam.
According to yet another aspect of the apparatus, the light source produces a beam of infrared light, wherein the currency bill is in a path of the beam. According to one aspect of the apparatus, the captured image is a grey-scale image has a brightness resolution that does not exceed 12 bits per pixel.
According to an additional aspect of the apparatus, the captured image is a grey-scale image has a brightness resolution that does not exceed 6 bits per pixel.
According to another aspect of the apparatus, the imaging subsystem also includes a light source and a light detector that is responsive to the light source, and is positioned relative the light source such that the captured image is a transmittance image.
According to one aspect of the apparatus, the light source produces a beam of visible light, wherein the currency bill is in a path of the beam.
According to a further aspect of the apparatus, the captured image is a grey-scale image has a brightness resolution that does not exceed 12 bits per pixel.
According to another aspect of the apparatus, the captured image is a grey-scale image has a brightness resolution that does not exceed 6 bits per pixel.
According to an additional aspect of the apparatus, the decisional logic subsystem is adapted to compute a correlation coefficient between the captured image and the masks. According to a further aspect of the apparatus, the captured image includes a plurality of captured images corresponding to different facings and orientations of the currency bill.
The invention provides a method for determining a denomination of a currency bill, which is carried out by providing a white mask and a black mask for each given denomination among a plurality of different currency denominations, the white mask for the given denomi- nation indicating pixels that are likely to appear bright in images of bills of the given denomination, and the black mask for the given denomination indicating pixels that are likely to appear dark in the images of the bills of the given denomination. The method is further carried out by capturing an image of the currency bill, comparing the captured image to the white
mask and the black mask for each of the plurality of different currency denominations so as to determine respective matching scores for the different currency denominations, and comparing the matching scores so as to assign one of the different currency denominations to the currency bill. According to one aspect of the method, the captured image is a reflectance image that is captured using visible light at a spatial resolution that does not exceed 10 dpi.
According to yet another aspect of the method, the captured image is a reflectance image that is captured using infrared light at a spatial resolution that does not exceed 10 dpi.
According to another aspect of the method, the captured image is a transmittance image that is captured using visible light at a spatial resolution that does not exceed 10 dpi.
According to still another aspect of the method, the captured image is a transmittance image that is captured using infrared light at a spatial resolution that does not exceed 10 dpi.
According to still another aspect of the method, the currency bill is assigned to one of the different currency denominations by associating an identification code therewith. An additional aspect of the method includes presenting the identification code on a display device.
According to a further aspect of the method, the image of the currency bill includes an entire area thereof.
According to yet another aspect of the method, the image of the currency bill includes at least one selected sub-area thereof.
According to a further aspect of the method, the captured image has a brightness resolution of 1 bit per pixel.
One aspect of the method comparing the captured image is accomplished by performing a pixel-by-pixel logical AND operation between the captured image and the white mask and between an inversion of the captured image and the black mask, and determining a number of pixels in which there is concordance between pixels of the captured image and corresponding pixels of the white mask, and between pixels of the inversion of the captured image and corresponding pixels of the black mask.
According to yet another aspect of the method, the image has a brightness resolution that exceeds 1 bit per pixel.
According to still another aspect of the method, the pixels in the white mask and in the black mask that are likely to be white and black, respectively, are white and black, respectively, on at least a predetermined proportion of specimens of the given denomination.
An additional aspect of the method includes assigning a brightness level of the pixels by binarization.
In another aspect of the method, the captured image are compared by identifying a highest one of the matching scores, identifying a second highest one of the matching scores, calcu- lating a difference between the highest one of the matching scores and the second highest one of the matching scores, and responsively to the difference therebetween, identifying the currency bill as the currency denomination that corresponds to the highest one of the matching scores.
The invention provides a method for identifying a currency bill, which is carried out by providing a plurality of discriminators for each given denomination among a plurality of different currency denominations, capturing an image of the currency bill, scoring the captured image according to the discriminators for each of the plurality of different currency denominations so as to determine respective matching scores for the different currency denominations, and comparing the matching scores so as to assign one of the different currency denominations to the currency bill.
In an aspect of the method scoring is performed by determining a correlation coefficient between the captured image and the discriminators for each the given denomination.
According to one aspect of the method, the discriminators comprise tables, wherein each entry of the tables is associated with a corresponding pixel of the captured image, and repre- sents a probability that the corresponding pixel is either black or white on the given denomination.
According to another aspect of the method, elements of one of the discriminators and elements of another of the discriminators each comprise one of a first value and a second value, wherein the first value signifies that the probability is higher than a first threshold value, and the second value signifies that the probability is lower than a second threshold value.
According to a further aspect of the method, the first threshold value is equal to the second threshold value.
The invention provides a computer software product, including a computer-readable medium in which computer program instructions are stored, which instructions, when read by a computer, cause the computer to perform a method for determining a denomination of a currency bill, which is carried out by generating a white mask and a black mask for each given denomination among a plurality of different currency denominations, the white mask for the given denomination indicating pixels that are likely to appear bright in images of bills of the
given denomination, and the black mask for the given denomination indicating pixels that are likely to appear dark in the images of the bills of the given denomination. The method is further carried out by memorizing a captured image of the currency bill, comparing the captured image to the white mask and the black mask for each of the plurality of different currency de- nominations so as to determine respective matching scores for the different currency denominations, comparing the matching scores, and responsively thereto assigning one of the different currency denominations to the currency bill.
The invention provides an apparatus for identifying a denomination of a currency bill, including a transport mechanism for conveying the currency bill along a transport path, an im- aging subsystem for capturing an image of the currency bill, while the currency bill is on the transport path, and a decisional logic subsystem that evaluates the captured image for identification thereof. The decisional logic subsystem maintains a white mask and a black mask for each given denomination among a plurality of different currency denominations, the white mask for the given denomination indicating pixels that are likely to appear bright in images of bills of the given denomination, and the black mask for the given denomination indicating pixels that are likely to appear dark in the images of the bills of the given denomination. The decisional logic subsystem is adapted to compare the captured image to the white mask and the black mask for each of the plurality of different currency denominations so as to determine respective matching scores for the different currency denominations, and to compare the matching scores so as to assign one of the different currency denominations to the currency bill.
BRIEF DESCRIPTION OF THE DRAWINGS
For a better understanding of these and other objects of the present invention, reference is made to the detailed description of the invention, by way of example, which is to be read in conjunction with the following drawings, wherein like elements are given like reference numerals, and wherein:
Fig. 1 is a partially schematic side elevation of a currency identification apparatus in accordance with a disclosed embodiment of the invention;
Fig. 2 is a flow chart that schematically illustrates a method for generating discrimina- tors of one type, in accordance with a disclosed embodiment of the invention;
Fig. 3 is a flow diagram illustrating a method of processing of an image of an unknown banknote in accordance with a disclosed embodiment of the invention;
Fig. 4 is a flow diagram illustrating a method of binary mask creation in accordance with a disclosed embodiment of the invention;
Fig. 5 schematically shows details of an exemplary white binary mask in accordance with a disclosed embodiment of the invention; Fig. 6 schematically shows details of an exemplary black binary mask in accordance with a disclosed embodiment of the invention; and
Fig. 7A and Fig. 7B, collectively referred to herein as Fig. 7, are a flow diagram illustrating processing of an image of an unknown banknote in accordance with a disclosed embodiment of the invention.
DETAILED DESCRIPTION OF THE INVENTION
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present invention. It will be apparent to one skilled in the art, however, that the present invention may be practiced without these specific details. In other instances well-known circuits, control logic, and the details of computer program instructions for conventional algorithms and processes have not been shown in detail in order not to unnecessarily obscure the present invention.
Software programming code, which embodies aspects of the present invention, is typically maintained in permanent storage, such as a computer readable medium. In a client/server environment, such software programming code may be stored on a client or a server. The software programming code may be embodied on any of a variety of known media for use with a data processing system, This includes, but is not limited to, magnetic and optical storage devices such as disk drives, magnetic tape, compact discs (CD's), digital video discs (DVD's), and computer instruction signals embodied in a transmission medium with or without a carrier wave upon which the signals are modulated. For example, the transmission me- dium may include a communications network, such as the Internet.
Turning now to the drawings, reference is initially made to Fig. 1, which is a partially schematic side elevation of a currency identification apparatus (10) in accordance with a disclosed embodiment of the invention. The currency identification apparatus (10) has a banknote transport mechanism (12), which is conventional. For example, the apparatus described in U.S. Patent No. 5,680,472 or in U.S. Patent No. 5,966,456 is suitable for the transport mechanism (12). A hopper (14) contains a stack of banknotes (16) to be identified. Individual banknotes are removed from the stack of banknotes (16) by a pick-off roller (18), and are directed
between a fixed main roller (20) and a free roller (22) along a transport path that extends generally around the main roller (20) beneath a guide (24). The guide (24) is provided with apertures (26, 28), which permit transmission of light by an imaging subsystem (30). After traversing the apertures (26, 28), the banknotes are directed by a switch (32) into one or more collec- tion receptacles, represented by hoppers (34, 36). The switch (32) operates responsively to a decisional logic subsystem (38), which processes samples obtained by the imaging subsystem (30). In some embodiments, the transport path of the banknotes may be ramified by increasing the number of the switches and collection receptacles. These can be linked in many different combinations, either on one level or as a multilevel hierarchy in order to subclassify the banknotes. An operator may control the operation of the currency identification apparatus (10) using a workstation (40).
The imaging subsystem (30) comprises a light source (42), which directs a beam (44) via scanning and collection optics (46) through the aperture (26) onto a banknote (48) passing the- reacross. The beam (44) is then reflected toward a detector (50), which is typically an array, such as a CCD array. The imaging subsystem (30) includes a light source (52), which directs a beam (54) through the aperture (28). The beam (54) is transmitted through the banknote (48) as it passes thereacross, continuing via scanning and collection optics (56) to a detector (58), which can be of the same construction as the detector (50). The output of the detector (58) is linked to a conventional signal processing unit (60), which includes an analog-to-digital con- verter (62). A calibration module (64) includes circuitry for converting signals received from the detectors (50, 58) to signal levels, which are appropriate for the further processing, as explained hereinbelow. It has been found that the calibration module (64) provides sufficient signal conditioning to process the signals without resort to equalization or other image enhancement techniques. Skew correction may be employed, however. A multiplexer (66) may be included in embodiments in which both the detector (50) and the detector (58) are used. The digitized output of the signal processing unit (60) is linked to the decisional logic subsystem (38). Some or all of the components of the signal processing unit (60) may be implemented in hardware, for example using a field programmable gate array (FPGA). Alternatively, such components can be realized as a software implementation using a general purpose computer or a digital signal processor (DSP). The choice is typically based on price- performance requirements, which may differ in particular applications. In any case, reflectance and transmittance samples of the banknote (48) are acquired using the detector (50) and the detector (58), respectively. Alternatively, the imaging subsystem (30) may acquire only reflec-
tance samples using the light source (42) and the detector (50), or only transmittance samples using the light source (52) and the detector (58), in which case the superfluous light source, detector and optics are eliminated from the currency identification apparatus (10). The output of the detector (50) is coupled to the signal processing unit (60). The light source (42) and the light source (52) preferably may generate infrared light, having a wavelength of at least 650 nm, in order to detect features of banknotes that are visible in infrared light, but not in visible light. Alternatively, it is possible to use visible light of any wavelength, with some loss of sensitivity and accuracy.
The imaging subsystem (30) typically acquires banknote images at a brightness resolu- tion of 1 bit per pixel, in order to achieve the advantages of binary techniques, as disclosed herein. However, in some embodiments the imaging subsystem (30) may be modified to acquire images at more than 1 bit per pixel brightness resolution.
The decisional logic subsystem (38) comprises a processor (68) and a memory (70). The memory (70) holds discriminators, such as masks described hereinbelow. The processor (68) typically comprises a combination of hard-wired and programmable components, which may be contained together in a single integrated circuit chip or implemented using a number of different chips. Hard-wired logic (72), typically in the form of a custom, semi-custom or programmable logic array, compares the output of the signal processing unit (60) to the discriminators stored in the memory (70) and outputs numerical values indicative of the quality of the match between the image of each unknown bill captured by the signal processing unit (60) and each of the discriminators. The processor (68), typically a microprocessor, evaluates the numerical values to choose the denomination to assign to the bill, and controls the switch (32) accordingly. The processor (68) is also capable of energizing the switch (32) so as to halt operation of the transport mechanism (12). Alternatively, all of the functions of the decisional logic subsystem (38) may be performed using computer software to control the processor (68), or by hard-wired logic, or by a microprocessor. Alternatively, the decisional logic subsystem (38) can be realized as an ASIC or other form of programmable logic, such as a FPGA, or programmable logic array (PLA).
In some embodiments, the currency identification apparatus (10) can be programmed to scan an entire banknote. However in some cases throughput may be improved by scanning selected regions, such as predefined strips, in which case the discriminators described hereinbelow are accordingly adjusted to correspond to the selected regions.
When an unknown banknote is scanned in the currency identification apparatus (10), the discriminators are applied by the decisional logic subsystem (38) to make an identity determination. When more than one discriminator is used, an arbitration scheme may be used to resolve disagreements. This may be accomplished by simple voting, or by a more complex scheme, such as weighted rules of decision.
In other embodiments the decisional logic subsystem (38) is rule based, as explained hereinbelow.
Embodiment 1.
Continuing to refer to Fig. 1, in one embodiment of the invention, during a learning phase a grey-scale image is produced for each banknote issue in the training set. Image acquisition at 10 dpi and 12 bits per pixel is satisfactory. Image acquisition at 10 dpi and 6 bits per pixel also has been successfully accomplished. Many specimens of each banknote issue are included in the training set in order that variations in printing, and changes that commonly occur in used banknotes can be learned. Reference is now made to Fig. 2, which is a flow chart that schematically illustrates a method used by the workstation (40) (Fig. 1) for generating discriminators of one type, in accordance with an embodiment of the present invention.
For clarity of presentation, the construction of one form of discriminator is presented herein. However, in some embodiments it is desirable to employ an enhanced set of discrimi- nators. For example, for each denomination, masks or other discriminators may be developed for each facing of the banknote. Furthermore, masks or other discriminators can be generated for different orientations of each facing. This enables more extensive correlations to be determined for each unknown specimen. However, the generation and processing of enhanced masks or other discriminators requires computational resources. Thus, a consideration in the use of enhanced masks involves cost-performance tradeoffs.
The process begins at initial step (74), in which denominations are chosen for training the system, and a representative set of banknotes is obtained for each of the denominations. Control now proceeds to step (76), where one of the denominations chosen in initial step (74) is selected for processing as a current denomination. Next, at step (78), a banknote from the training set of the current denomination is selected.
Next, at step (80) the banknote selected in step (78) is scanned. A grey-scale image, which can have a spatial resolution as low as 10 dpi, is prepared. The image is calibrated, us-
ing appropriate skew correction, and signal processing as disclosed hereinabove with respect to Fig. 1.
Control now proceeds to decision step (82), where it is determined if there are more banknotes from the training set of the current denomination to be processed. If the determina- tion at decision step (82) is affirmative, then control returns to step (78).
If the determination at decision step (82) is negative, then control proceeds to step (84), which begins a sequence in which a mask is constructed for the current denomination. This is typically done pixel-by-pixel. Alternatively, a region comprising a plurality of pixels may be treated as a unit for purposes of constructing the mask. The process of constructing the mask for the current denomination is explained in terms of pixels. However, those skilled in the art can readily adapt the method for regions that are larger than a pixel. A pixel is now selected for processing.
Next, at step (86) an average value for the pixel that was selected in step (84) is computed, using the brightness value measured for this pixel for each scan obtained in step (80) for the current denomination.
Next, at step (88), the average value that was computed in step (86) is memorized as the value for the current pixel in the mask.
Control now proceeds to decision step (90), where it is determined if more pixels remain to be processed. If the determination at decision step (90) is affirmative, then control returns to step (84).
If the determination at decision step (90) is negative, then control proceeds to decision step (92). Here it is determined if more denominations remain to be processed. If the determination at decision step (92) is affirmative, then control returns to step (76).
If the determination at decision step (92) is negative, then control proceeds to final step (94), and the process terminates.
Reference is now made to Fig. 3, which is a flow diagram illustrating a method of processing of an image of an unknown banknote in accordance with embodiment 1 of the invention. It is assumed that training was carried out previously in accordance with the method disclosed above with respect to Fig. 2. At initial step (96), a calibrated image of an unknown banknote is acquired, using the same technique that was used during the learning phase in step (80) (Fig. 2).
Next, at step (98) a mask is selected from the set of masks prepared during the learning phase.
Next, at step (100), the coefficient of correlation is computed pixel-by-pixel between the image that was scanned in initial step (96) and the current mask. As is well-known in the art, The coefficient of correlation of a set of pairs of quantities is equal to the sum of the products of the deviation of each quantity in the pairs from its respective mean, divided by the product of the number in the set and the standard deviations. Thus,
N dχ y 15
where R is the coefficient of correlation, N is the number of pairs, xn and Yn each represent members of a pair, x and y are the means for the sets, and dx and dy are standard deviations for the sets, given by
and
Control now proceeds to decision step (102), where it is determined if there are more masks to be correlated with the image of the unknown banknote. If the determination at decision step (102) is affirmative, then control returns to step (98).
If the determination at decision step (102) is negative, then control proceeds to step (104). Here the mask having the highest coefficient of correlation with the scanned image of the unknown banknote is selected.
Control now proceeds to step (106), which is an optional step. The coefficient of correlation of with the mask selected at step (106) is to be compared to a threshold value of significance. This threshold can be preset, in which case step (106) is omitted. However, it is also possible to vary the threshold as a function of the mask selected in step (106). For example, if the mask corresponds to a €10 note, then the threshold could be assigned a particular value Tl . However, if the mask corresponds to a €100 note, then the threshold would be assigned a different value T2. These threshold values reflect confidence levels required to identify particular banknote series and denominations, and are empirically derived. Control now proceeds to decision step (108), where it is determined if the coefficient of correlation for the mask selected in step (104) exceeds the current threshold, either a predetermined threshold, or the value established in step (106), whichever is applicable. If the determination at decision step (108) is affirmative, then control proceeds to final step (110). The unknown banknote has been successfully identified, and is assigned an identification corre- sponding to that of the mask selected in step (104).
If the determination at decision step (108) is negative, then control proceeds to final step (112). The banknote is classified as unknown.
Embodiment 2.
Referring again to Fig. 1 , in an alternate embodiment of the invention two binary masks are produced for each banknote issue in the training set during the learning phase. As in embodiment 1, many specimens of each banknote issue are included in the training set. A "black mask" consists of "mostly black" pixels, and a "white mask" consists of "mostly white" pixels. White and black pixels in the context of binary images are pixels having brightness levels of 1 and 0. These brightness levels are used arbitrarily herein to distinguish light and dark ar- eas, and have no physical meaning with respect to the actual configuration of the decisional logic subsystem (38). Mostly black pixels and mostly white pixels are those pixels that are determined to be black and white, respectively, on at least a predetermined proportion of the specimens of a particular banknote issue in the training set. The masks are not complementary,
and there may be some pixels that do not appear in either mask. The predetermined percentage is application dependent, and typically varies with different banknotes. A proportion of (90) per cent is typical. As the training set is processed, these masks are memorized for later use during the operational phase. The brightness levels are assigned using binarization, that is, by choosing a threshold value, and classifying all pixels with values above this threshold as white, and all other pixels as black. The binarization threshold may be set during a calibration procedure or even varied adaptively during operation.
As noted above, the decisional logic subsystem (38) uses discriminators that are stored in the memory (70) in order to identify the denomination of bills received by the currency identification apparatus (10). These discriminators are determined in the learning phase, using a collection of reference banknotes. The banknotes are scanned, and their images are input to the workstation (40), typically a general purpose computer with suitable software, which processes the images to derive the discriminators and transmits them to the decisional logic subsys- tern (38).
Reference is now made to Fig. 4, which is a flow chart that schematically illustrates a method used by the workstation (40) (Fig. 1) in generating discriminators of one type, in accordance with an embodiment of the present invention. The discriminators in this embodiment are referred to as black and white binary masks. It will be understood that although compo- nents of the currency identification apparatus (10) (Fig. 1), are referred to herein for clarity of presentation, the method is not limited to the currency identification apparatus (10), and may be used with many different types of currency identification apparatus.
The method begins at initial step (114), where a training set of sample bills of a given denomination are scanned and data collected by the workstation (40) via the imaging subsys- tern (30). It may be noted that as new currency issues are recognized, it is only necessary to add them to the data collection by repeating initial step (114).
Next, at step (116), a binarization threshold is set. This threshold is empirical. However, values in the range of 40 - 60 per cent are generally suitable.
Next, at step (118), binary images are prepared, using the binarization threshold that was established at step (116). In subsequent steps of the method, each of these binary images is evaluated pixel-by-pixel, and composite statistics are computed.
Control now proceeds to step (120), where a pixel is selected and evaluated in each of the binary images that were prepared in step (118).
Next, at decision step (122) a determination is made whether the pixel selected in step (120) has a value corresponding to white on a predetermined proportion of the binary images. A value of 90 per cent is typical for the predetermined proportion.
If the determination at decision step (122) is affirmative, then control proceeds to step (124), where the pixel is added to the white mask. Control then proceeds to decision step (126), which is described hereinbelow.
If the determination at decision step (122) is negative, then control proceeds to decision step (128). A determination is made whether the pixel selected in step (120) has a value corresponding to black on a predetermined proportion of the binary images. A value of 90 per cent is typical for the predetermined proportion.
If the determination at step (128) is affirmative, then control proceeds to step (130), where the pixel is added to the white mask. Control then proceeds to decision step (126).
If the determination at step (128) is negative, then control proceeds directly to decision step (126). Here a determination is made if more pixels remain to be evaluated. If the determination at decision step (126) is affirmative, then control returns to step (120).
If the determination at decision step (126) is negative, then control proceeds to final step (132). The binary masks are now output. In the case of the currency identification apparatus (10) (Fig. 1), they are received in the decisional logic subsystem (38) and stored in the memory (70).
Reference is now made to Fig. 5 and Fig. 6, which schematically show details of an exemplary white binary mask (134) and a black binary mask (136), respectively, as generated by the process of Fig. 4. Only a small portion of each mask, corresponding to the upper left corner of a particular currency bill, is shown in Fig. 5 and Fig. 6. Each mask comprises a matrix of pixels (138). The size of the matrix depends on the scanning resolution of the currency identification apparatus (10) (Fig. 1). The methods of the present invention are suitable for use at low resolution, thus reducing requirements for memory and processing capacity. As mentioned above, the inventors have obtained good results in discriminating currency denominations at resolution as low as 10 dpi. Using this resolution for identifying currency of the United States of America, the white binary mask (134) and the black binary mask (136) may each comprise as few as 1500 pixels.
The value of each of the pixels (138) in the white binary mask (134) is "1" if the pixel value was found to be "1" (white) in at least 90% of the sample images of the bill in question,
and "0" otherwise. Similarly, the value of each of the pixels (138) in the black binary mask (136) is "1" if the pixel value was found to be "0" (black) in at least 90% of these sample images. The masks are not complementary. In other words, if a given pixel has the value "1" in one of the masks, it need not be "0" in the other mask. Rather, a pixel may alternatively have the value "0" in both masks, as illustrated by pixels (140, 142), located in corresponding positions in the white binary mask (134) and the black binary mask (136), respectively. Alternatively, methods other than that illustrated in Fig. 4 may be used to generate the white binary mask (134) and the black binary mask (136), as will be apparent to those skilled in the art. Generally speaking, the white binary mask (134) for a given currency denomination indicates pixels that have a high likelihood of appearing bright in an image of a bill of that denomination, while the black binary mask (136) indicates pixels that have a high likelihood of appearing dark in such an image.
Other types of discriminators may also be used in the currency identification apparatus (10) (Fig. 1). For example, the discriminators can be tables corresponding to the size of the scanned image in pixels, wherein each entry represents the probability of a corresponding pixel brightness being less than a threshold value. Alternatively, the entries of the tables may represent probabilities that corresponding pixels have brightnesses exceeding a high threshold value for a particular species of banknotes, or that the corresponding pixels have brightnesses less than a low threshold value. The high and low threshold values may be equal. The thresh- old values may be global, or may be assigned for different regions. Indeed, threshold values may be assigned to each table entry individually.
In some cases, it is desirable to apply a plurality of discriminators. For example, a plurality of tables may be constructed for each banknote species, each based on a different threshold or different sets of thresholds for different pixels. The use of two to four different dis- criminators has been found to be suitable for some applications. Indeed, there is no limit to the number of discriminators that may be applied in order to increase the accuracy of currency identification, except what is imposed by the processing hardware in the decisional logic subsystem (38).
For the sake of simplicity, however, the operation of the currency identification appara- tus (10) is described below in detail only with respect to discriminators of the type exemplified by the white binary mask (134) and the black binary mask (136). This embodiment implements a simple algorithm in the decisional logic subsystem (38), which uses thresholds that are set during the learning stage. The rule of decision can be expressed as follows:
If the ratio of mostly white pixels (or mostly black pixels) of a specimen to mostly white pixels (or mostly black pixels) of a reference banknote is high enough and is the highest in a set of ratios computed in like manner against other reference banknotes; and the difference between the ratio and the next highest value taken from the set of ra- tios is high enough, then the specimen is identified as the reference banknote.
Otherwise, the specimen is classified as an unknown banknote. Further details are disclosed hereinbelow in the operation section. Identity codes are output by the decisional logic subsystem (38), including an identity code for an unknown banknote. The identity code may embody a confidence in the identifica- tion, as well as many other details of the banknote. For example, in embodiments where more than one discriminator is used, the identity code may indicate whether or not arbitration was required. In some embodiments, the identity codes can be presented on a remote display device, or can be accessed by a remote user, for example over a data network such as the Internet. In an alternate embodiment of the invention, t the scanned image is correlated with the stored masks or other discriminators, and a correlation coefficient is calculated, using a standard correlation function. Then the above-noted procedure is invoked, substituting the correlation coefficients for the pixel ratios.
Reference is now made to Fig. 7, which is a flow diagram illustrating a method of proc- essing of an image of an unknown banknote in accordance with embodiment 2 of the invention. The steps of the method are presented in an exemplary order. However, it will be understood that many of the steps can be performed in different orders or even simultaneously, in order to achieve an efficient implementation using techniques known to the computer and electronic arts. At initial step (144) an image of an unknown banknote or sample is acquired as disclosed above with reference to Fig. 1. The image is binarized as disclosed hereinabove. Next, at step (146), the acquired image is duplicated, and one instance is inverted.
The method now proceeds independently as two branches (148, 150). These branches may be performed serially or in parallel. The branch (148) is performed using the non-inverted image that was acquired in initial step (144), applied to a white binary mask, and is now disclosed in further detail.
Control proceeds to step (152), where a candidate denomination is selected from the set of banknote issues that were processed during the training phase disclosed hereinabove.
The method now continues at step (154), where the non- inverted image of the unknown banknote is masked by a logical AND operation, pixel-by-pixel, with the reference mask of mostly white pixels (white mask) developed with respect to the banknote issue that was selected at step (152).
Next, at step (156) the number of "l 's" in the masked image that was output in step (154) is counted or otherwise determined. Then, at step (158), the ratio of the number of 1 's in the masked image to the number of 1 's in the white mask is determined. This ratio may be inteφreted as a measure of equality (distance) between the scanned banknote image and the reference images of a particular banknote issue. The closer the ratio is to unity, the more likely the unknown banknote can be identified with the reference banknote.
Control now passes to decision step (160). Here a determination is made whether all candidate denominations have been processed. If the determination at decision step (160) is negative, then control returns to step (152).
Otherwise, the procedure continues at step (162), which is disclosed hereinbelow.
Branch (150) is performed using the inverted image that was acquired in step (146). The branch (150) consists of steps (164, 166, 168), which are performed in the same manner as steps (154, 156, 158), respectively, except that a black binary mask is taken from the candidate denomination. The details are not repeated in the interest of brevity.
At step (162), ratio pairs are associated for each candidate denomination, using the ratios computed in step (158) and step (168). These ratio pairs are ranked. This may be done by summing the ratios of each member of the pair, and ranking the sums. Alternatively, other figures of merit may be chosen in order to rank the ratio pairs. The highest ranking ratio pair is identified.
Control now passes to decision step (170), where a determination is made whether the figure of merit of the highest ratio pair that was determined in step (162) exceeds a predetermined minimum value.
If the determination at decision step (170) is negative, then control proceeds to final step (172). Here the sample is classified as an unknown banknote.
If the determination at decision step (170) is affirmative, then control proceeds to step (174), where the second highest ranking ratio pair is identified, using the ranking that was established in step (162).
Control now passes to decision step (176), where the difference between the highest and second highest ranking ratio pairs is calculated, and a determination made whether the difference exceeds a predetermined threshold.
If the determination at decision step (176) is affirmative, then control proceeds to final step (178), where the sample is identified as the banknote corresponding to the highest ranking ratio pair. If the determination at decision step (176) is negative, then control proceeds to final step (172).
It will be appreciated by persons skilled in the art that the present invention is not limited to what has been particularly shown and described hereinabove. Rather, the scope of the present invention includes both combinations and sub-combinations of the various features described hereinabove, as well as variations and modifications thereof that are not in the prior art, which would occur to persons skilled in the art upon reading the foregoing description.