The present disclosure relates to a banknote inspection device, a banknote inspection method, and a banknote inspection program product.
A banknote handling device such as an automated teller machine (ATM) is provided with a banknote inspection device that inspects banknotes to discriminate banknote denominations and recognize banknote serial numbers.
Example of related-art is described in Japanese Patent Application Laid-open No. 2017-215859.
Because banknotes can be uniquely identified using serial numbers, serial numbers are used to find counterfeit banknotes, and so forth. Accurate recognition of serial numbers is thus important.
According to an aspect of an embodiment, a banknote inspection device includes a storage unit and a recognition unit. The storage unit stores a first learning model generated using an image of a character with a hole as training data, and a second learning model generated using an image of a character without a hole as training data. The recognition unit recognizes a serial number character that is a character forming a serial number of a banknote by using the first learning model when a character image, which is an image of the serial number character, has a hole, and recognize the serial number character by using the second learning model when the character image does not have a hole.
The object and advantages of the disclosure will be realized and attained by means of the elements and combinations particularly pointed out in the claims.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory and are not restrictive of the disclosure, as claimed.
Preferred embodiments of the present disclosure will be explained with reference to accompanying drawings. The following embodiments, however, are not intended to limit the technology of the present disclosure. In the following embodiments, identical constituent elements are denoted by identical reference signs.
Further, in a banknote handling device 1, there is a conveyance path branch point PJ at which a conveyance path P1 branches into two conveyance paths P2 and P3. In the banknote handling device 1, by connecting conveyance path P1 to either of conveyance paths P2 and P3 via the conveyance path branch point PJ, the conveyance path connection mode switches between a mode in which conveyance paths P1 and P2 are connected (sometimes referred to hereinbelow as “connection mode C1”) and a mode in which conveyance paths P1 and P3 are connected (sometimes referred to hereinbelow as “connection mode C2”). When the conveyance path connection mode is in connection mode C1, a conveyance path in which conveyance paths P1 and P2 are sequential is formed, and when the conveyance path connection mode is in connection mode C2, a conveyance path in which conveyance paths P1 and P3 are sequential is formed.
A center axle CA of the switching claw 12 is connected to the solenoid 13, and the switching claw 12 can be rotated by the solenoid 13 about the center axle CA. The switching claw 12 and solenoid 13 are arranged close to the conveyance path branch point PJ, and the conveyance path connection mode is switched between connection mode C1 and connection mode C2 due to the switching claw 12 being rotated by the solenoid 13. The switching of the conveyance path connection mode is carried out under the control of the control unit 17.
As illustrated in
When the conveyance path connection mode is in connection mode C1, a banknote BL which is inserted into the access port 11 passes via the conveyance path P2, is folded back in the opposite direction along a left side of the switching claw 12, is conveyed toward the banknote inspection device 14 via conveyance path P1, and is inspected by the banknote inspection device 14. The inspected banknote BL advances further along conveyance path P1 and is temporarily stored in the temporary holding part 15.
When the denomination is unable to be discriminated or the serial number is unable to be recognized by the banknote inspection device 14 and the inspection result is “NG”, the conveyance path connection mode is maintained in connection mode C1 and the banknote BL, which is being temporarily stored in the temporary holding part 15, is discharged from the temporary holding part 15, passes along conveyance path P1, and is folded back, at conveyance path branch point PJ, in the opposite direction along the left side of the switching claw 12 and returned to the access port 11 via conveyance path P2.
When the denomination has been discriminated and the serial number has been recognized by the banknote inspection device 14 and the inspection result is “OK”, a current I2 in the opposite direction to current I1 flows in the solenoid 13 and the switching claw 12 rotates to the right (clockwise) about the center axle CA such that the leftmost edge of the switching claw 12 is separated from the conveyance path branch point PJ, as illustrated in
When the conveyance path connection mode is in connection mode C2, the banknote PL, which has been temporarily stored in the temporary holding part 15, is discharged from the temporary holding part 15, passes along conveyance path P1, passes through the conveyance path branch point PJ so as to enter conveyance path P3, and advances along conveyance path P3 before being stored in any of stackers 16-1, 16-2, and 16-3 according to the discriminated denomination. For example, a ten-thousand yen note is stored in stacker 16-1, a five-thousand yen note is stored in stacker 16-2, and a one-thousand yen note is stored in stacker 16-3.
The banknote photographing unit 21 photographs banknote BL, which has been conveyed to the banknote inspection device 14, and outputs an image of the photographed banknote BL (sometimes referred to as “banknote image” hereinbelow) BLP to the serial number recognition unit 24.
The denomination discrimination unit 22 discriminates the denomination of the banknote BL conveyed to the banknote inspection device 14, and outputs information indicating the discriminated denomination (sometimes referred to hereinbelow as “denomination information”) to the serial number recognition unit 24. The denomination discrimination unit 22 discriminates the denomination on the basis of the horizontal and vertical lengths of banknote BL and the pattern on the face of the banknote, and so forth, for example.
The storage unit 23 stores a learning model generated using a convolutional neural network (CNN).
The serial number recognition unit 24 uses the denomination information inputted from the denomination unit 22 and the learning model stored in the storage unit 23 to recognize the serial number of banknote BL on the basis of the banknote image BLP inputted from the banknote photographing unit 21, and outputs a recognition result.
In
A serial number is represented by arranging numerical characters and alphabetic characters in a lateral direction, and hence the serial number presence region is a horizontally long, rectangular region. Furthermore, Bank of Japan banknotes, for example, have a serial number which is printed at a point in the bottom right of banknote BL when viewing banknote BL in a landscape orientation. Hence, when banknote BL is a Bank of Japan banknote, the serial number recognition unit 24 extracts the serial number presence region image SNP1, which has a horizontally long, rectangular shape, from a point in the bottom right of banknote image BLP, as illustrated in
Furthermore, in the case of a banknote of a specific foreign country, when banknote BL is viewed in a landscape orientation, the serial number is sometimes printed in a lateral direction along the right edge of banknote BL, as illustrated in
The serial number presence region images SNP1 and SNP2 are sometimes collectively called the “serial number presence region images SNP” hereinbelow.
Here, as illustrated in
Returning to
Thereafter, in Step S205, the serial number recognition unit 24 performs first binarization processing on the seral number presence region image SNP.
For example, as illustrated in
The serial number recognition unit 24 binarizes the serial number presence region image SNP by using a fixed binarization threshold value TH1. Thus, when. the binarization threshold value TH1 is “210”, for example, the serial number recognition unit 24 binarizes the serial number presence region image SNP by changing the grayscale values of the pixels with a grayscale value equal to or greater than 210 n
The serial number recognition unit 24 may also set a binarization threshold value TH1 which has a value corresponding to the denomination indicated by the denomination information outputted from the denomination discrimination unit 22.
First, as illustrated in
First binarization processing examples 1 and 2 have been described hereinabove.
Returning to
First, by applying boundary tracing to a serial number presence region image SNP which has undergone first binarization, the serial number recognition unit 24 detects an outline (sometimes called the “image outline” hereinbelow) CO of an image contained in the serial number presence region image SNP which has undergone first binarization, as illustrated in
Returning to
As illustrated in
As illustrated in
As illustrated in
As illustrated in
As illustrated in
As illustrated in
As illustrated in
In the example illustrated in
Here, the foregoing specific examples 7, 8, and 9 (
The serial number recognition unit 24 specifies, from among the candidates for the character presence region detected in Step S207, a character presence region in the serial number presence region image SNP by integrating two image outlines when the shortest distance between two image outlines in the character presence region is less than a predetermined value THL. For example, in the example illustrated in
When the quantity of candidates for the character presence region detected in Step S207 is less than the quantity of characters forming the serial number of banknote BL, the serial number recognition unit 24 specifies character presence regions in the serial number presence region image SNP by adding a new character presence region on the basis of the quantity of characters forming the serial number of banknote BL. For example, when the serial number of banknote BL is formed by six characters as illustrated in
Specific examples 1 to 10 of character presence regions have been described hereinabove. By applying any one or a plurality of the foregoing specific examples 1 to 10 to the plurality of character presence region candidates detected in Step S207, the character presence regions specified in Step S209 are each specified as a region where a character image is present.
Returning to
Thereafter, in Step S213, the serial number recognition unit 24 sets the value of a counter n as “n=1”.
By taking each of the plurality of character presence regions specified in Step S209 as a processing object, the processing of Steps S215 to S229 is carried out in order, starting with the leftmost character presence region in the serial number presence region image SNP and moving to the right, as counter n increases.
In Step S215, the serial number recognition unit 24 sets the character presence region CR specified in Step S209 as the banknote image BLP and extracts an image of the character presence region CR (sometimes called a “character presence region image” hereinbelow) from the banknote image BLP. The character presence region image includes a character image.
Thereafter, in Step S217, the serial number recognition unit 24 performs second binarization processing on the character presence region image extracted in Step S215. In the second binarization processing, the serial number recognition unit 24 binarizes the character presence region image by using “Otsu's binarization”, which is the typical binarization method, for example.
Next, in Step S219, the serial number recognition unit 24 uses “boundary tracing”, which is the same method as used in Step S207, for example, to detect a character image in the character presence region image which has undergone the second binarization, and detects “the quantity of holes” included in the detected character image (sometimes called the “hole count” hereinbelow). Here, characters likely to form the serial number of banknote BL include any characters among the ten numerical characters 0 to 9 and the twenty-six alphabet characters A to Z. Among these 36 characters, there are no holes among the characters which are the numerical characters 1, 2, 3, 5, and 7 or the alphabetic characters C, E, F, G, H, I, J, K, L, M, N, S, T, U, V, N, X, F, Z, one hole in each of the characters which are the numerical characters 0, 4, 6, and 9 and the alphabetic characters A, D, O, P, and R, and two holes in each of the characters which are the numerical character 8 and the alphabetic characters B and Q.
Next, in Step S221, the serial number recognition unit 24 uses a binarization threshold value THO, which is calculated when performing Otsu's binarization in Step S217, to correct the contrast of the character presence region image prior to the second binarization. As illustrated in
Returning to
Here, the storage unit 23 stores a first learning model and a second learning model. The first learning model is a learning model which is generated using a CNN by taking, as training data, only images of the characters 0, 4, 6, 8, 9, A, D, O, P, R, B, and Q with holes, among the characters 0 to 9 and A to Z, which will likely be used for the serial number of banknote BL, and while disregarding, as training data, images of the characters 1, 2, 3, 5, 7, C, E, F, G, H, I, J, K, L, M, N, S, T, U, V, W, X, Y, and Z without holes. Meanwhile, the second learning model is a learning model which is generated using a CNN by taking, as training data, only images of the characters 1, 2, 3, 5, 7, C, E, F, G, H, I, J, K, L, M, N, S, T, U, V, W, X, Y, and Z without holes, among the characters 0 to 9 and A to Z, which will likely be used for the serial number of banknote BL, and while disregarding, as training data, images of the characters 0, 4, 6, 8, 9, A, D, O, P, R, B, and Q with holes.
Hence, when the determination of Step S223 is “Yes”, the serial number recognition unit 24 uses the first learning model to perform, in Step S225, character recognition using a CNN on the contrast-corrected character presence region image. On the other hand, when the determination of Step S223 is “No”, the serial number recognition unit 24 uses the second learning model to perform, in Step S227, character recognition using a CNN on the contrast-corrected character presence region image. As a result of the processing of Steps S225 and S227, the serial number recognition unit 24 acquires characters recognized through character recognition and scores for the characters. After the processing of Step S225 or Step S227, the processing advances to Step S229.
In Step S229, the serial number recognition unit 24 specifies the characters contained in the character presence region image. For example, a case is assumed where, in the processing of Step S225 or Step S227, nine characters, namely 0 to 9, are recognized and a score of 0.9765 is assigned to “0”, a score of 0.005 is assigned to “1”, a score of 0.004 is assigned to “2”, a score of 0.003 is assigned to “3”, a score of 0.03 is assigned to “4”, a score of 0.04 is assigned to “5”, a score of 0.865 is assigned to “6”, a score of 0.06 is assigned to “7”, a score of 0.05 is assigned to “8”, and a score of 0.654 is assigned to “9”. In this case, the serial number recognition unit 24 specifies “0”, which has the largest score, as a character which contained in the character presence region image.
Here, the serial number recognition unit 24 may determine that the character contained in the character presence region image is unknown in a case where the absolute value of the difference in score between the character with the largest score and the character with the second largest score is less than a predetermined value THS. For example, when the threshold value THS is set at 0.15, in the foregoing example, the score assigned to character “0” with the largest score is 0.9765 and the score assigned to character “6” with the second largest score is 0.865, and thus the absolute value of the difference between the scores is 0.1115, which is less than threshold value THS, and hence the serial number recognition unit 24 determines that the character contained in the character presence region image is unknown.
In addition, for example, the serial number recognition unit 24 may determine that the character contained in the character presence region image is unknown in a case where the quantity of holes present in the character with the largest score does not match the hole count detected in Step S219.
The serial number recognition unit 24 may also, for example, detect the circumference of the character image by using boundary tracing, normalize the detected circumference according to equation (1), and when the character with the largest score is not present in the group of characters corresponding to the normalized circumference P, determine that the character contained in the character presence region image is unknown in equation (1), “D” denotes the circumference of the character image detected using boundary tracing, “W” denotes the width of the character image, and “H” denotes the height of the character image.
Normalized circumference P=D/SQRT(W×H) (1)
Thereafter, in Step S231, the serial number recognition unit 24 determines whether the value of counter n has reached a specific region count N. When the value of counter n has not reached the specific region count N (Step S231: No), the processing advances to Step S233, and when the value of counter n has reached the specific region count N (Step S231: Yes), the processing advances to Step S235.
In Step S233, the serial number recognition unit 24 increments the value of counter n. After the processing of Step S233, the processing returns to Step S215.
Meanwhile, in Step S235, the serial number recognition unit 24 outputs a recognition result for a serial number formed from a plurality of characters. For example, when the serial number of banknote BL is formed from six characters to l1 to l6 as illustrated in
However, the serial number recognition unit 24 outputs those characters determined to be unclear as described earlier by substituting same with “?”. For example, when “9” in serial number “BX3970” is determined to be unclear, the serial number recognition unit 24 outputs “BX3?70” as the recognition result.
As described earlier, in the first embodiment, the banknote inspection device 14 has a storage unit 23 and a serial number recognition unit 24. The storage unit 23 stores a first learning model generated using images of characters with holes as training data and a second learning model generated using images of characters without holes as training data. The serial number recognition unit 24 uses the first learning model to recognize a character forming the serial number of banknote BL when the character image has holes, but uses the second learning model to recognize a character forming the serial number of banknote BL when the character image does not have holes.
Because character recognition is performed in this way by using the learning models according to the features of the characters forming the serial number of banknote BL, the accuracy of seral number recognition can be improved.
Furthermore, according to the first embodiment, the serial number recognition unit 24 corrects the contrast of the character presence region image and, based on the contrast-corrected character presence region image, uses the first learning model or second learning model to recognize the characters forming the serial number.
Thus, because the ratio of the grayscale values of character portions in the character presence region image to the grayscale values of background portions therein is large, the accuracy of serial number recognition can be further improved.
Furthermore, according to the first embodiment, the serial number recognition unit 24 uses first binarization to binarize a banknote image, and uses the binarized banknote image to specify a character presence region in the banknote image. On the other hand, the serial number recognition unit 24 uses second binarization to binarize a character presence region image, and uses the binarized character presence region image to detect the quantity of holes in a character image. Although a higher computational complexity is involved in the binarization of the second binarization, same preferably has a higher binarization accuracy than the first binarization. For example, the serial number recognition unit 24 uses the binarization illustrated in processing example 1 or processing example 2 above for the first binarization, and uses Otsu's binarization for the second binarization.
Accordingly, first binarization of a low computational complexity can be applied to a banknote image formed from a large quantity of pixels, and highly accurate second binarization can be applied to a character presence region image formed from fewer pixels than the banknote image, and hence, overall, binarization that suppresses computational complexity while satisfying the requisite level of accuracy can be performed.
Moreover, according to the first embodiment, the serial number recognition unit 24 detects a plurality of candidates for the character presence region in banknote image BLP and specifies the character presence region on the basis of the plurality of detected candidates. For example, the serial number recognition unit 24 specifies the character presence region according to any one or a plurality of the foregoing specific examples 1 to 10.
Thus, the accuracy with which a character presence region is specified can be improved.
The banknote inspection device 14 can be realized by means of the following hardware configurations. The banknote photographing unit 21 is realized by a camera, for example. The denomination discrimination unit 22 is realized by various sensors such as an optical sensor and a magnetic sensor, for example. The serial number recognition unit 24 is realized by a processor, for example. The storage unit 23 is realized by memory, for example. Possible examples of a processor include a central processing unit (CPU), a digital signal processor (DSP), and a field programmable gate array (FPGA). Possible examples of memory include random access memory (RAM) such as synchronous dynamic random-access memory (SDRAM), read-only memory (ROM), and flash memory.
Furthermore, the respective processing in the foregoing description by the serial number recognition unit 24 may be implemented by causing a processor to execute programs corresponding to the respective processing. For example, the programs corresponding to the respective processing in the foregoing description by the serial number recognition unit 24 may be stored in the memory of the banknote handling device 1, and the programs may be read and executed by the processor of the banknote handling device 1. In addition, the programs may be stored on a program server, which is connected to the banknote handling device 1 via an optional network, and downloaded to the banknote handling device 1 from the program server and executed, or may be stored on a recording medium which can be read by the banknote handling device 1 and read from the recording medium and executed. Recording media which can be read by the banknote handling device 1 include, for example, portable storage media such as a memory card, USB memory, an SD card, a flexible disk, a magneto-optical disk, a CD-ROM, a DVD, and a Blu-ray (registered trademark) disk. Furthermore, programs are data processing methods described using an optional language or an optional descriptive method, and are in a source code and binary code-agnostic format. Moreover, the programs are not necessarily limited to being constituted as single units and may include programs which are configured distributed as a plurality of modules or a plurality of libraries, and programs that collaborate with another program represented by an operating system (OS) so as to achieve the functions thereof.
According to the disclosed embodiments, it is possible to improve the accuracy with which a serial number of a banknote is recognized.
Although the present disclosure has been described with respect to specific embodiments for a complete and clear disclosure, the appended claims are not to be thus limited hut are to be construed as embodying all modifications and alternative constructions that may occur to one skilled in the art that fairly fall within the basic teaching herein set forth.
This application is a continuation of International Application No. PCT/2018/039565, filed on Oct. 24, 2018, the entire contents of which are incorporated herein by reference.
Number | Date | Country | |
---|---|---|---|
Parent | PCT/JP2018/039565 | Oct 2018 | US |
Child | 17221454 | US |