Parameter set optimization apparatus, parameter set optimization program, and paper sheet handling system
12541987 ยท 2026-02-03
Assignee
Inventors
Cpc classification
G07D7/0047
PHYSICS
G06V10/25
PHYSICS
G06N3/126
PHYSICS
G06V30/19093
PHYSICS
International classification
Abstract
A serial number recognition parameter determination apparatus includes: a generation unit, an identification unit, and an evaluation index calculation unit. The generation unit generates a parameter set of a program, the program being used when a paper sheet handing apparatus identifies, from an image of a paper sheet, character present regions in which characters that form a serial number are present. The identification unit identifies, from an image of the paper sheet, the character present regions by using the parameter set that is generated by the generation unit. The evaluation index calculation unit calculates an evaluation index of the parameter set based on the character present regions that are identified by the identification unit.
Claims
1. A parameter set optimization apparatus comprising: a processor, wherein the processor executes: a first generation process that generates a parameter set of a program by using a Genetic Algorithm, the program being used when character present regions in which characters that form a serial number are present are identified, an identification process that identifies, from an image of a paper sheet, the character present regions by using the generated parameter set, a first calculation process that calculates a first evaluation value related to the number of characters in the identified character present regions, a second evaluation value related to character spacing in the identified character present regions, and a third evaluation value related to a character string width in the identified character present regions, a second calculation process that calculates a fitness of the parameter set based on the first evaluation value, the second evaluation value and the third evaluation value, a determination process that determines a parent parameter set of the Genetic Algorithm based on the calculated fitness, a second generation process that generates a child parameter set of the Genetic Algorithm by performing crossover and mutation to the parent parameter set, and an optimization process that optimizes the parameter set by repeating the identification process, the first calculation process and the second calculation process until a predetermined termination condition is met when the number of generations of the Genetic Algorithm reaches a predetermined value.
2. The parameter set optimization apparatus according to claim 1, wherein the parameter set includes a value that indicates a binarization type used when a serial number region image including the serial number is binarized, a binarization threshold, a value indicating a dilation amount in a dilation process performed on a binarized character present region, a black-to-white ratio threshold that is used when excluding a character present region in which a predetermined percentage or more of black pixels are present from among binarized character present regions, outer edge designation that is used when excluding the character present region that is located within a first predetermined distance from an outer edge of a binarized serial number region image, and a distance threshold that is used when excluding a character present region for which a distance from an adjacent character present region is equal to or larger than a predetermined distance.
3. A non-transitory computer-readable recording medium having stored therein a parameter set optimization program that causes a computer to execute a processes, the processes comprising: a first generation process that generates a parameter set of a program by using a Genetic Algorithm, the program being used when character present regions in which characters that form a serial number are present are identified; an identification process that identifies, from an image of a paper sheet, the character present regions by using the generated parameter set; a first calculation process that calculates a first evaluation value related to the number of characters in the identified character present regions, a second evaluation value related to character spacing in the identified character present regions, and a third evaluation value related to a character string width in the identified character present regions; a second calculation process that calculates a fitness of the parameter set based on the first evaluation value, the second evaluation value and the third evaluation value; a determination process that determines a parent parameter set of the Genetic Algorithm based on the calculated fitness; a second generation process that generates a child parameter set of the Genetic Algorithm by performing crossover and mutation to the parent parameter set; and an optimization process that optimizes the parameter set by repeating the identification process, the first calculation process and the second calculation process until a predetermined termination condition is met when the number of generations of the Genetic Algorithm reaches a predetermined value.
4. A paper sheet handling system comprising: a paper sheet handling apparatus that, by executing a program, identifies, from an image of a paper sheet, character present regions in which characters that form a serial number are present; and a parameter set optimization apparatus that optimizes a parameter set of the program, wherein the parameter set optimization apparatus includes a processor, wherein the processor executes: a first generation process that generates the parameter set by using a Genetic Algorithm; an identification process that identifies, from an image of the paper sheet, the character present regions by using the generated parameter set; a first calculation process that calculates a first evaluation value related to the number of characters in the identified character present regions, a second evaluation value related to character spacing in the identified character present regions, and a third evaluation value related to a character string width in the identified character present regions, a second calculation process that calculates a fitness of the parameter set based on the first evaluation value, the second evaluation value and the third evaluation value; a determination process that determines a parent parameter set of the Genetic Algorithm based on the calculated fitness; a second generation process that generates a child parameter set of the Genetic Algorithm by performing crossover and mutation to the parent parameter set; and an optimization process that optimizes the parameter set by repeating the identification process, the first calculation process and the second calculation process until a predetermined termination condition is met when the number of generations of the Genetic Algorithm reaches a predetermined value.
Description
BRIEF DESCRIPTION OF DRAWINGS
(1)
(2)
(3)
(4)
(5)
(6)
(7)
(8)
(9)
(10)
(11)
(12)
(13)
(14)
(15)
(16)
(17)
(18)
(19)
(20)
(21)
(22)
(23)
(24)
(25)
(26)
(27)
(28)
DESCRIPTION OF EMBODIMENTS
(29) Embodiments of a serial number recognition parameter determination apparatus, a serial number recognition parameter determination program, and a paper sheet handling system disclosed in the present application will be described in detail below based on the drawings. Meanwhile, the embodiments do not limit the disclosed technology.
Embodiment
Configuration of Paper Currency Handling Apparatus
(30)
(31) Further, in the paper currency handling apparatus 1, a conveying path branch point PJ at which the conveying path P1 is branched into the two conveying paths P2 and P3 is present. In the paper currency handling apparatus 1, the conveying path P1 and one of the conveying paths P2 and P3 are connected to each other via the conveying path branch point PJ, so that a conveying path connection form is switched between a form (hereinafter, may be referred to as a connection form C1) in which the conveying path P1 and the conveying path P2 are connected to each other and a form (hereinafter, may be referred to as a connection form C2) in which the conveying path P1 and the conveying path P3 are connected to each other. When the conveying path connection form is set to the connection form C1, the conveying path P1 and the conveying path P2 form a continuous conveying path, and when the conveying path connection form is set to the connection form C2, the conveying path P1 and the conveying path P3 form a continuous conveying path.
(32) A central axis CA of the switching claw 12 is connected to the solenoid 13, and the switching claw 12 is caused to rotate about the central axis CA by the solenoid 13. The switching claw 12 and the solenoid 13 are arranged in the vicinity of the conveying path branch point PJ, and the switching claw 12 is caused to rotate by the solenoid 13, so that the conveying path connection form is switched between the connection form C1 and the connection form C2. The conveying path connection form is switched under the control of the control unit 17.
(33)
(34) As illustrated in
(35) When the conveying path connection form is set to the connection form C1, a paper currency BL that is inserted in the cash slot 11 passes through the conveying path P2, is turned in the opposite direction along the left side of the switching claw 12, is conveyed to the paper currency inspection apparatus 14 through the conveying path P1, and is inspected by the paper currency inspection apparatus 14. The inspected paper currency BL is further conveyed through the conveying path P1 and is temporarily stored in the temporary hold unit 15.
(36) If the paper currency inspection apparatus 14 fails to identify denomination or recognize a serial number and an inspection result indicates NG, the conveying path connection form is maintained as the connection form C1, the paper currency BL that is temporarily stored in the temporary hold unit 15 is discharged from the temporary hold unit 15, passes through the conveying path P1, is turned in the opposite direction along the left side of the switching claw 12 at the conveying path branch point PJ, and is returned to the cash slot 11 through the conveying path P2.
(37) If the paper currency inspection apparatus 14 succeeds in identifying the denomination and recognizing the serial number and the inspection result indicates OK, as illustrated in
(38) When the conveying path connection form is set to the connection form C2, the paper currency BL that is temporarily stored in the temporary hold unit 15 is discharged from the temporary hold unit 15, passes through the conveying path P1, enters the conveying path P3 while passing by the conveying path branch point PJ, is conveyed through the conveying path P3, and is stored in any of the stackers 16-1, 16-2, and 16-3 in accordance with the identified denomination. For example, ten thousand yen bills are stored in the stacker 16-1, five thousand yen bills are stored in the stacker 16-2, and thousand yen bills are stored in the stacker 16-3.
Configuration of Paper Currency Inspection Apparatus
(39)
(40) The paper currency imaging unit 21 captures an image of the paper currency BL that is conveyed to the paper currency inspection apparatus 14, and outputs a captured image BLP (hereinafter, may be referred to as a paper currency image) of the paper currency BL to the serial number recognition unit 24.
(41) The denomination identification unit 22 identifies the denomination of the paper currency BL that is conveyed to the paper currency inspection apparatus 14, and outputs information (hereinafter, may be referred to as denomination information) indicating the identified denomination to the serial number recognition unit 24. The denomination identification unit 22 identifies the denomination on the basis of, for example, a length and a width of the paper currency BL, a pattern on a face of the paper currency, or the like.
(42) The storage unit 23 stores therein a learning model that is generated by using a Convolutional Neural Network (CNN).
(43) The serial number recognition unit 24 recognizes the serial number of the paper currency BL on the basis of the paper currency image BLP, which is input from the paper currency imaging unit 21, by using the denomination information that is input from the denomination identification unit 22 and the learning model that is stored in the storage unit 23, and outputs a recognition result.
Process and Operation Performed by Serial Number Recognition Unit
(44)
(45) The serial number is represented by numbers and alphabets that are arranged in a lateral direction, and therefore, the serial number present region is a region that has a horizontally long rectangular shape. Further, for example, in the case of Bank of Japan Notes, the serial number is printed in a lower right portion in the paper currency BL when the paper currency BL is viewed in a landscape orientation. Therefore, if the paper currency BL is the Bank of Japan Note, the serial number recognition unit 24 extracts the serial number present region image SNP1 that has a horizontally long rectangular shape from the lower right portion of the paper currency image BLP as illustrated in
(46) Furthermore, in a paper currency of a specific foreign country, as illustrated in
(47) In the following, the serial number present region images SNP1 and SNP2 may be collectively referred to as a serial number present region image SNP.
(48) Here, as illustrated in
(49) As illustrated in
(50) Subsequently, at Step S202, the serial number recognition unit 24 performs a binarization process on the serial number present region image SNP.
(51) For example, as illustrated in
(52) In the first example of the binarization process, the serial number recognition unit 24 binarizes the serial number present region image SNP by using a fixed binarization threshold TH1. Therefore, for example, if the binarization threshold TH1 is 210, as illustrated in
(53) Furthermore, the serial number recognition unit 24 may set the binarization threshold TH1 to a certain value corresponding to the denomination that is indicated by the denomination information output from the denomination identification unit 22.
(54) In the second example of the binarization process, as illustrated in
(55) Referring back to
(56) Specifically, at Step S203, the serial number recognition unit 24 performs a dilation (dilate) process. More specifically, the serial number recognition unit 24 extends an outline CO (hereinafter, may be referred to as an image outline) of an image illustrated in
(57) Further, at Step S204, the serial number recognition unit 24 performs character candidate position detection. Specifically, a rectangular region with an upper left corner at the coordinate C21 and a lower right corner at the coordinate C22 is detected as a candidate for the character present region CR. The serial number recognition unit 24 performs the dilation process and the character candidate position detection a plurality of number of times, and detects the plurality of candidate character present regions in the serial number present region image SNP.
(58) At subsequent Step S205 to Step S209, the serial number recognition unit 24 performs a process of narrowing down a character present region from the plurality of candidate character present regions.
(59) Specifically, at Step S205, the serial number recognition unit 24 excludes a candidate based on a black-to-white ratio. More specifically, as illustrated in
(60) Further, at Step S206, the serial number recognition unit 24 excludes a candidate in the vicinity of an outer edge. Specifically, as illustrated in
(61) Furthermore, at Step S207, the serial number recognition unit 24 performs a process of integrating the candidate character present regions CR located at a close distance.
(62) Moreover, at Step S208, the serial number recognition unit 24 performs a process of performing sorting in the X direction and excluding a candidate for which a distance from an adjacent candidate is large, and performs a process of performing sorting in the Y direction and excluding a candidate for which a distance from an adjacent candidate is large. Specifically, as illustrated in
(63) Similarly, as illustrated in
(64) Furthermore, at Step S209, the serial number recognition unit 24 performs a candidate re-extraction process. Specifically, as illustrated in
(65) Referring back to
Hardware Configuration of Paper Currency Inspection Apparatus
(66) The paper currency inspection apparatus 14 may be implemented by a hardware configuration as described below. The paper currency imaging unit 21 is implemented by, for example, a camera. The denomination identification unit 22 is implemented by, for example, various sensors, such as an optical sensor or a magnetic sensor. The serial number recognition unit 24 is implemented by, for example, a processor. The storage unit 23 is implemented by, for example, a memory. Examples of the processor include a central processing unit (CPU). Examples of the memory include a Random Access Memory (RAM), such as Synchronous Dynamic Random Access Memory (SDRAM), and a flash memory.
(67) Furthermore, the serial number recognition unit 24 is implemented by causing a processor to execute a serial number recognition program. For example, the serial number recognition program is stored in a memory included in the paper currency handling apparatus 1, is read from the memory by a processor included in the paper currency handling apparatus 1, and is executed by the processor.
Configuration of Paper Currency Handling System
(68)
(69) The firmware development apparatus 3 is used to develop a control program for controlling the paper currency handling apparatus 1. The control program includes the serial number recognition program. The distribution apparatus 4 distributes a load module of the control program that is developed by the firmware development apparatus 3 to the paper currency handling apparatus 1.
(70) The firmware development apparatus 3 includes a parameter determination apparatus 30. The serial number recognition program is parameterized, and the parameter determination apparatus 30 determines a value of a parameter of the serial number recognition program. The parameter determination apparatus 30 optimizes the parameter by using the Genetic Algorithm (GA). The firmware development apparatus 3 generates the load module from the parameter value that is determined by the parameter determination apparatus 30 and an object module of the control program.
(71) Meanwhile, the case is illustrated in
Parameters
(72)
Configuration of the Parameter Determination Apparatus
(73)
(74) The generation unit 31 generates a parameter value on the basis of the GA. The generation unit 31 uses the Real-Coded GA (RCGA). The generation unit 31 adopts a set of parameter values as a single individual. The generation unit 31 generates 30 individuals for a single generation, for example. The number of individuals generated for a single generation is changeable.
(75)
(76) The identification unit 32 identifies the character present regions by using the individuals generated by the generation unit 31. The identification unit 32 identifies the character present regions for each of the individuals. The identification unit 32 identifies the character present regions by simulation.
(77) The evaluation index calculation unit 33 evaluates the individuals by calculating fitness of the character present regions that are identified by the identification unit 32.
(78) The evaluation function is a function based on an evaluation function f.sub.num related to the number of characters, an evaluation function f.sub.dis related to character spacing, and an evaluation function f.sub.str_w related to a character string width. f.sub.num, f.sub.dis and f.sub.str_w are, for example, functions as described below.
(79)
(80) Here, n is the number of identified characters, d.sub.i (I=1 to n1) is an identified character spacing, and w is an identified character string width.
(81) N, D, and W are the number of characters, the character spacing, and the character string width that are set as correct answers. A unit of each of D and W is a pixel.
(82) .sup.2 represents dispersion of a normal distribution.
(83) Fitness f.sub.total is, for example, f.sub.total=w.sub.numf.sub.num+w.sub.disf.sub.dis+w.sub.str_wf.sub.str_w. Here, w.sub.num, w.sub.dis, and w.sub.str_w are weights.
(84) The generation unit 31 selects a parent based on the fitness f.sub.total, and generates a child population by using crossover or mutation. The parameter determination apparatus 30 repeats the processes performed by the generation unit 31, the identification unit 32, and the evaluation index calculation unit 33 until a predetermined termination condition is met. The termination condition is met when the number of generations reaches a predetermined value (for example, 30), for example.
(85)
Flow of Process Performed by Parameter Determination Apparatus
(86)
(87) Subsequently, the parameter determination apparatus 30 calculates fitness of the child population at Step S305, and determines whether the termination condition is met at Step S306. Further, if the termination condition is not met, the parameter determination apparatus 30 selects a survivor at Step S307, exchanges an individual of a current generation based on the selected survivor at Step S308, and returns to Step S303. In contrast, if the termination condition is met, the parameter determination apparatus 30 terminates the process.
(88) As described above, in the embodiment, the serial number recognition program is parameterized. Further, the generation unit 31 generates the parameter set of the serial number recognition program, and the identification unit 32 identifies the character present regions by simulation using the parameter set that is generated by the generation unit 31. Furthermore, the evaluation index calculation unit 33 calculates the fitness f.sub.total of the parameter set based on the character present regions identified by the identification unit 32. Moreover, the generation unit 31 selects a parent based on the fitness f.sub.total and generates a child population by using crossover or mutation. The parameter determination apparatus 30 repeats the processes performed by the generation unit 31, the identification unit 32, and the evaluation index calculation unit 33 until the predetermined termination condition is met, and optimizes the parameter set. Therefore, the parameter determination apparatus 30 is able to eliminate trial and error for determining the optimal parameter set, so that it is possible to reduce man-hours needed to develop the serial number recognition program.
(89) Furthermore, in the embodiment, the evaluation index calculation unit 33 calculates the fitness f.sub.total based on the number of characters, the character spacing, and the character string width, so that it is possible to appropriately evaluate the parameter set.
(90) Moreover, in the embodiment, the parameter set includes the binarization threshold TH1, the binarization type BTYPE, the dilation amount DPXL, the black-to-white ratio threshold THR, the outer edge designation UDLR for removing a candidate at the edge of the serial number present region image, the X-distance threshold THX, and the Y-distance threshold THY. Therefore, the parameter determination apparatus 30 is able to optimize the serial number recognition program.
(91) Meanwhile, while the parameter determination apparatus 30 is explained in the embodiment, it is possible to implement the parameter determination program with the same functions by implementing the configurations of the parameter determination apparatus 30 by software. Therefore, a computer that executes the parameter determination program will be described below.
(92)
(93) The memory 61 is a RAM for storing a program, an interim result of the program, and the like. The CPU 62 is a central processing device that reads the program from the memory 61 and executes the program. The CPU 62 includes a chipset including a memory controller.
(94) The LAN interface 63 is an interface for connecting the computer 60 to a different computer via a LAN. The HDD 64 is a disk device for storing therein a program and data, and the input device 65 is a mouse, a keyboard, or the like. The display device 66 is a liquid crystal display device, and the ODD 67 is a device for performing reading and writing with respect to a digital versatile disk (DVD).
(95) Furthermore, the parameter determination program executed by the computer 60 is stored in a DVD that is one example of a recording medium that is readable by the computer 60, is read from the DVD by the ODD 67, and installed in the computer 60. Alternatively, the parameter determination program is stored in a databased or the like of a different computer system that is connected via the LAN interface 63, is read from the database, and is installed in the computer 60. Moreover, the installed parameter determination program is stored in the HDD 64, is loaded onto the memory 61, and is executed by the CPU 62.
(96) Meanwhile, while the paper currency handling apparatus 1 is explained in the embodiment, the present invention is similarly applicable to a different paper sheet handling apparatus that handles a paper sheet including a character string that is similar to the serial number. Furthermore, while the parameter set is optimized by using the GA in the embodiment, the parameter determination apparatus may optimize the parameter set by using a different optimization method.
(97) According to one aspect, the present invention is able to reduce man-hours needed to develop a serial number recognition program.