Character recognition method and apparatus

Abstract: A character recognition method and apparatus realizing a high-speed character recognition by using small capacity memories. A character in an original image is read as an input character pattern in an image input process. A n-th calculator 109 in a similarity calculation unit 6 inputs the input character pattern into an input pattern memory 110 and compares the input character pattern with a standard character pattern ( m : m = 0,M) stored in a dictionary memory 101 sequentially, thus calculating similarities between the input character pattern and the respective standard character patterns. If a CPU 1 issues a similarity calculation request instruction while a n-th calculator 109 is operating, another one of the calculators in a standby status, a n′-th calculator is used so that another similarity calculation can be performed avoiding access conflict in the memory 101.

Description: The present invention relates to a character recognition method and apparatus, and more particularly, to a character recognition method and apparatus for calculating similarity between an input pattern and standard patterns. A typical conventional character recognition apparatus such as an OCR (Optical Character Reader) optically reads a character and converts the read data into a character pattern (input pattern). A pattern similarity calculation circuit incorporated in the apparatus calculates similarity between the character pattern and standard patterns stored in an internal dictionary. The apparatus outputs a standard pattern having the highest similarity in the calculation results as a recognition result. Usually, the pattern similarity calculation circuit requires a plurality of nonvolatile memories in order to raise the process speed. A standard pattern data for one character is divided into a plurality of portions and stored into these memories as described in Japanese Patent Publication (Kokoku) No. 58-56911. The data from the memories are latched into the pattern similarity calculation circuit, which selectively outputs a data by a predetermined number of bits. Fig. 8 shows a configuration of a pattern similarity calculation circuit according to the conventional character recognition apparatus, in which a standard pattern data for one character is discretely stored into a plurality of memories. According to Fig. 8, the standard pattern data for one character is divided into 9 segments ( N1 -  N9 ) and stored in the memories 81 to 83. More specifically,  N1 ,  N4 and  N7 are stored in the memory 81;  N2 ,  N5 and  N8 , in the memory 82; and  N3 ,  N6 and  N9 , in the memory 83. However, the above conventional character recognition apparatus has the following drawbacks: (1) The number of the memories should increase as calculation speed becomes higher. This results in raising cost of memory packaging. (2) If input speed of an input pattern exceeds the calculation speed of the pattern similarity calculation circuit, the input pattern had to queue up to be calculated. For this reason, in order to control the input speed and input timing, a circuit for controlling the input speed must be added. Accordingly, the total throughput is limited by the input speed. (3) In case where a standard pattern in a specific address area in a ROM where the dictionary is stored is used, e.g., in a dictionary ROM in which Chinese characters, alphabets and numerals are stored, if the numerals are required for recognition but the corresponding address area is being accessed, the process should wait for the termination of the current process accessing the address area, causing time loss. (4) If calculation is performed using a different similarity calculation algorithm, the current algorithm for driving the calculation circuit must be changed. This prolongs the processing time. Accordingly, it is an object of the present invention to provide a character recognition method and apparatus which prevents an increase of necessary memory capacity and improves total throughout. According to one aspect, the present invention provides a character recognition method for reading a character in an original image, comparing the read character with standard character patterns stored in a storage medium and performing character recognition, the method comprising: an input step of reading the character in the original image; a character recognition step of reading out one standard character pattern from the storage medium, comparing the read character with the read standard character pattern, and performing recognition of the read character; and an output step of outputting a character recognized in said character recognition step; characterised in that said character recognition step additionally provides: comparing an access start address in a plurality of calculation circuits for access to the storage medium; sequentially reading out the standard character pattern from the access start address for the storage medium and comparing the read character with the read standard character pattern in one of the calculation units determined by the address comparison, and if character recognition with respect to a second character read in said input step is to be performed: managing shift of the access start address for access to the storage medium; and using a second one of said plurality of calculation circuits for performing recognition of the read character. According to another aspect, the present invention provides a character recognition apparatus for reading a character in an original image, comparing the read character with standard character patterns stored in a storage means and performing character recognition, the apparatus comprising: input means for inputting the character in the original image; a plurality of calculation means for reading out one standard character pattern stored in said storage means, comparing the standard character pattern with the character read by said input means and performing character recognition of the read character; and output means (OUT1, OUT2, OUTN, 9) for outputting a character recognized by said calculation means; characterised in that: a first one said plurality of calculation means is operative to sequentially read out one standard character pattern stored in said storage means from an access start address, compare the standard character pattern with the character read by said input means and perform character recognition, and the apparatus includes: management means for manage shifting of the access start address for access to the storage means when character recognition with respect to a second character inputted by said input means is to be performed; wherein a second one of said plurality of calculation means is operative to perform recognition of the second inputted character. In accordance with the present invention as described above, the apparatus performs character recognition to a character in an original image by managing access start addresses in a plurality of calculation means for access to storage media and using the plurality of calculation means. In other words, the character recognition to a character of the original image is performed by managing shift of the access start addresses for access to storage media in which standard character patterns are stored and using the plurality of calculation means. This invention is particularly advantageous since the recognition processes are sequentially started in accordance with calculation requests, realizing a smooth character recognition in which process waiting status does not occur even though input speed of a character is fast. Further, high-speed total throughput can be attained. Embodiments of the present invention will now be described with reference to the accompanying drawings, in which: Fig. 1 is a block diagram showing a configuration of a character recognition apparatus embodying the present invention; Figs. 2A and 2B are block diagrams showing in detail a construction of a similarity calculation unit 6; Fig. 3 is a diagram showing an internal structure of a dictionary memory; Fig. 4A is a time chart showing a total throughput of a pattern similarity calculation; Fig. 4B is a time chart showing a total throughput of a conventional pattern similarity calculation; Fig. 5 is a diagram showing an access sequence of the dictionary memory in case where a calculation start signal is inputted during access of the dictionary memory; Fig. 6 is a diagram showing another construction of a n-th calculator; Fig. 7 is a diagram showing still another construction of the n-th calculator; and Fig. 8 is a block diagram showing a construction of a conventional (prior art) type of similarity calculation unit; [Configuration of the Apparatus (Fig. 1)] Fig. 1 shows a configuration of a character recognition apparatus embodying the present invention. In Fig. 1, reference numeral 1 denotes a CPU which controls the overall apparatus and controls processes such as input of an image and segmentation of a character image; 2, a keyboard (KB) for inputting a character and for performing collection of the inputted character; 3, a pointing device (PD) such as a mouse; 4, a ROM in which programs executed by the CPU 1 are stored; 5, a RAM in which a character image, segmentation results and recognition results and the like are stored; 6, a similarity calculation unit which calculates similarity between a character image and respective standard patterns; 7, an image scanner (SCAN) which reads images; 8, an inter face (I/F) of the image scanner 7; and 9, a display for displaying such as character recognition results. [Construction of Similarity Calculation Unit 6 (Fig. 2)] Figs. 2A and 2B show a construction of the similarity calculation unit 6 which is the most significant part of this embodiment. In Fig. 2A, reference numeral 101 denotes a dictionary memory in which standard patterns are stored. In this embodiment, the dictionary memory 101 is a ROM, however, a RAM can be employed for the ROM. In such case, a standard pattern is loaded from an external auxiliary storage unit. Numeral 102 denotes a counter for access to the dictionary memory 101. The counter 102 is connected to an address line of the dictionary memory 101. Numeral 103 denotes a flip-flop register in which a start address from the counter 102 is stored. Numeral 104 denotes a flip-flop register in which an end address from the counter 102 is stored. Numeral 105 denotes a comparator which determines whether output from the counter 102 coincides with an end address set in the register 104. If the output from the counter 102 coincides with the end address, the content of the register 103 is loaded in the counter 102. Numeral 106 denotes a first calculator; 107, a second calculator; and 108, a N-th calculator. The calculators respectively have a construction as shown in Fig. 2B. More specifically, a n-th calculator 109 (n = 1, N) comprises an input pattern memory 110, a calculation circuit 111 which compares a data from the input pattern memory 110 with a data from the dictionary memory 101 and calculates similarity between the two data, a flip-flop latch 112 and a comparator 113 which compares output from the latch 112 with output from the counter 102 and terminates the process by the calculation circuit 111 if the two signals coincide. [Operation of Similarity Calculation Unit 6 (Figs. 3 to 5)] The operations of the similarity calculation unit 6 having the above construction are as follows on condition that standard patterns have been stored in the dictionary memory 101 in advance: (1) An access start address is set to the register 103, an access end address is set to the register 104 and the content of the register 103 is loaded onto the counter 102 for access to the dictionary memory 101. Access addresses are start addresses of the respective standard patterns stored in the dictionary memory 101. These addresses are counted up every time a standard pattern to be the object of similarity calculation is changed. Fig. 3 illustrates storage addresses in case where a standard pattern is stored into the dictionary memory 101. In this embodiment, a standard pattern for one character ( m : = 0, M) consists of eight words, and written by one-character unit. More specifically, if the data of standard patterns are continuously stored in the memory, an access address is counted up by eight words every time a standard pattern for one character is changed. The respective standard pattern have a dictionary memory address (b 0 , b 1 , b 2 ...b k ) for one word accessible by one-word unit. In this embodiment, as a standard pattern for one character consists of 8 words, lower three bits (b 0 , b 1 and b 2 ) of the respective dictionary memory address mean an address for access of a standard pattern for one character, and b 3 , b 4 ...b k of the memory address mean a start address for one character. (2) When the CPU issues a pattern similarity calculation request instruction, an input pattern read by the SCAN 7 is set to the input pattern memory 110 and the first calculator 106 is activated by a calculation start signal START 1. (3) Upon inputting of the START 1 into the first calculator 106, an output value from the counter 102 at the time is set to the latch 112 and the calculation circuit 111 is activated. The output value from the counter 102 is a standard pattern address to the object of the similarity calculation, i.e., a dictionary memory address. (4) The calculation circuit 111 performs the calculation of similarity between the input pattern stored in the input pattern memory 110 and the standard patterns stored in the dictionary memory 101. Every time the calculation circuit 111 performs calculation for one pattern, the counter 102 counts up by + 8. When output from the counter 102 reaches a value indicative of the end address stored in the register 104, the comparator 105 starts to re-load the start address stored in the register 103 onto the counter 102 which cyclically repeats the count-up operation till all the calculation start signals START n (n = 1, N) become inactive. (5) The calculation process by the first calculator 106 is terminated by a signal outputted from the comparator 113 to the calculation circuit 111 when an output value from the latch 112 and an output value from the counter 102 coincide. Further, the output from the comparator 113 is outputted as a signal END 1 to outside of the first calculator 106 to notify the termination of the calculation process. (6) In case where the CPU 1 issues a next pattern similarity calculation request while the calculation started by the calculation request issued in the operation (2) is being performed by the first calculator 106, the similarity calculation circuit 6 performs a next similarity calculation using one of the second to N-th calculators in a standby status according to a similar procedure described in (2) to (5). Fig. 4A is a time chart showing a total throughput of the pattern similarity calculation. T 1 is an interval between the pattern similarity calculation request instructions issued by the CPU 1; T 2 , similarity calculation time; and T 3 , an interval between outputs of calculation results. As shown in Fig. 4A, it is possible to perform continuous calculation processes in response to the instruction from the CPU 1 if following three conditions are satisfied: 1 ○ 2T 1 < T 2 < 3T 1 (the similarity calculation is completed between the instructions from the CPU 1) 2 ○ T 3 ≒ T 1 (the interval between the calculation request instructions and the interval between the outputs of calculation results are nearly equal) 3 ○ N = 3 (the number of the calculators is three) In this case, a time period from a calculation request to output of the calculation results is always T 2 . Compared with Fig. 4B showing a time chart of a conventional similarity calculation where the number of calculators is only one, it is apparent from Fig. 4A that there is no execution-waiting and that the total throughput is apparently raised. The improvement of the total throughput in this embodiment will be described in detail from the point of memory access conflict with reference to Fig. 5 showing relationship between activation/deactivation of the calculation unit 6 and access to the dictionary memory 101. In Fig. 5, the situation that the dictionary memory 101 has been accessed and that a calculation start signal START n inputs an i -th calculator while the i -th calculator is calculating similarity between an input pattern and a standard pattern with respect to a second character ( 1 ) will be considered. The i-th calculator which received the START n latches a dictionary memory address (b 3 , b 4 ...b k ) in the latch 112. It should be noted that "0" is set to the lower three bits (b 0 , b 1 and b 2 ). The addresses to be latched are respectively 1, 0...0 with respect to b 3 , b 4 ...b k . In this embodiment, if a latched address (in Fig. 5, the second character ( 1 )) is an address of an accessed pattern in the dictionary memory, actual calculation starts from the first one of standard patterns for the next character (the third character ( 2 ) having addresses 0, 1...0 with respect to b3, b 4 ...b k ). More specifically, the calculation starts from the third character, then returns to the first character ( 0 ) through the last character ( M ) and ends at the second character ( 1 ). When the address of the character to be the last object of the calculation ( 1 ) is set, the comparator 113 becomes active and determines that the calculation process has cycled from the first character to the last character. The operation of the calculation circuit 111 stops at the point in time where the calculation for the second character ( 1 ) is completed (at the point in time where the output from the comparator 113 has changed from active to inactive). As described above, by managing the addresses for starting the similarity calculation, even though a character from which the similarity calculation starts have to be shifted, the calculation unit is able to perform the similarity calculation accessing all of the addresses in the dictionary, regardless of wherever the starting address is. According to this embodiment, as the similarity calculation unit incorporates the plurality of calculators, it can avoid execution-waiting to a similarity calculation request instruction from the CPU. Further, even though an address for reading a standard pattern in the respective calculators is shifted, all the standard patterns in one storage medium can be accessed. Thus faster similarity calculation can be performed. It should be noted that in this embodiment, the comparator 113 is employed for determining whether the similarity calculation has been performed to the standard patterns in the dictionary memory 101 in a cyclic manner, however, the present invention is not limited to this arrangement. For example, as shown in Fig. 6, a decrement counter 121 in which a number of characters in the dictionary memory 101 is set and a decoder 122 which indicates termination of access to a standard pattern for one character may be combined. In this case, every time access to one standard pattern terminates, the decoder 122 decodes an access address in the dictionary memory 101 and generates a pulse signal, and the decrement counter 121 counts down the set number. When the counter value becomes zero, the calculation circuit 111 stops the calculation and the termination of the calculation is notified to the outside. Similarly to the abovementioned embodiment, the latch 112 in Fig. 6 latches an address for access to the dictionary memory 101 and instructs the calculation circuit 111 to start the calculation upon input of a calculation start signal START n into the calculator 109. In this embodiment, range of addresses accessible to the standard patterns stored in the dictionary memory 101 is not limited, however, the present invention s not limited to this arrangement. For example, as shown in Fig. 7, it can be arranged such that the range of addresses accessible to the standard patterns in the dictionary memory 101 is designated in the respective calculators 109. In Fig. 7, reference numeral 131 denotes a latch to which a start address of the dictionary memory 101 is set; 132, a latch to which a dictionary address of the dictionary memory 101 is set; and 133 and 134, comparators. The n-th calculator 109 refers the start addresses of the dictionary memory 101 at calculation starting time and refers the end addresses of the dictionary memory 101 immediately before termination of the calculation. The comparator 133 determines whether an output value from the start address latch 131 coincides with output from the counter 102 for access to the dictionary memory 101. The calculation circuit 111 is started if a calculation start signal START n is active and the two inputs in the comparator 133 coincide. The comparator 134 determines whether an output value from the latch 132 coincides with an output from the counter 102 for access to the dictionary memory 101. When the two inputs in the comparator 134 coincide, the calculation circuit 111 terminates the calculation. In the above example, an algorithm of the calculation by the calculation circuit 111 is not especially defined. However, it can be arranged in the present invention such that the respective calculators operate with different algorithms. In this arrangement, one input pattern can enter the plurality of calculators and calculation results from the calculations in the different algorithms can be obtained. The present invention can be applied to a system constituted by a plurality of devices, or to an apparatus comprising a simple device. Furthermore, it goes without saying that the invention is applicable also to a case where the object of the invention is attained by supplying a program to a system or apparatus. As many apparently widely different embodiments of the present invention can be made without departing from the scope thereof, it is to be understood that the invention is not limited to the specific embodiments thereof except as defined in the appended claims.

Claims: A character recognition method for reading a character in an original image, comparing the read character with standard character patterns stored in a storage medium (101) and performing character recognition, the method comprising: an input step of reading the character in the original image; a character recognition step of reading out one standard character pattern from the storage medium (101), comparing the read character with the read standard character pattern, and performing recognition of the read character; and an output step of outputting a character recognized in said character recognition step; characterised in that said character recognition step additionally provides: comparing an access start address in a plurality of calculation circuits (106, 107, 108) for access to the storage medium (101); sequentially reading out the standard character pattern from the access start address for the storage medium (101) and comparing the read character with the read standard character pattern in one of the calculation units (106, 107, 108) determined by the address comparison, and if character recognition with respect to a second character read in said input step is to be performed: managing shift of the access start address for access to the storage medium (101), and using a second one of said plurality of calculation circuits (106, 107, 108) for performing recognition of the second read character. The method according to claim 1, wherein the address of the standard character pattern read in said character recognition step reaches a reading end address, the address of the character pattern is reset to a reading start address of the storage medium. The method according to claim 1, wherein the number of the plurality of calculation circuits is a number necessary to at least prevent the recognition of the character read in said input step from being delayed by the calculation speed of the calculation circuits. The method according to claim 1, wherein when the standard character pattern is read out, access to the storage medium is controlled to avoid access conflict from the plurality of calculation circuits to an address of the storage medium. The method according to claim 1, wherein in said character recognition step, while the character recognition is being performed in one of the plurality of calculation circuits, if character recognition with respect to another character read in said input step is performed, another one of the calculation circuits which are not used is activated to perform character recognition. A character recognition apparatus for reading a character in an original image, comparing the read character with standard character patterns stored in a storage means (101) and performing character recognition, the apparatus comprising: input means (7, 8) for inputting the character in the original image; a plurality of calculation means (106, 107, 108) for reading out one standard character pattern stored in said storage means (101), comparing the standard character pattern with the character read by said input means and performing character recognition of the read character; and output means (OUT1, OUT2, OUTN, 9) for outputting a character recognized by said calculation means (106, 107, 108); characterised in that: a first one said plurality of calculation means (106, 107, 108) is operative to sequentially read out one standard character pattern stored in said storage means (101) from an access start address, compare the standard character pattern with the character read by said input means (7,8) and perform character recognition, and the apparatus includes: management means (102, 103, 112) for manage shifting of the access start address for access to the storage means (101) when character recognition with respect to a second character inputted by said input means (7,8) is to be performed; wherein a second one of said plurality of calculation means (106, 107, 108) is operative to perform recognition of the second inputted character. The apparatus according to claim 6, wherein said management means includes control means for controlling access to said storage means in order to avoid access conflict from said plurality of calculation means to said storage means. The apparatus according to claim 6, wherein said plurality of calculation means start access to said storage means from the access tart address managed by said management means, and if the access reaches a reading end address of said storage means, by returning the access to a reading start address of said storage means, thus perform the access in a cyclic manner. The apparatus according to claim 6, wherein the number of said plurality of calculation means is a number necessary to at least prevent character recognition of the character read by said input means from being delayed by calculation speed by said calculation means. The apparatus according to claim 6, wherein said plurality of calculation means respectively include: input character storage means for storing, as the object of character recognition, the character read by said input means; a calculation circuit for performing the character recognition; and termination means for terminating the character recognition by the calculation circuit using the standard character patterns. The apparatus according to claim 10, wherein the character recognition performed by the calculation circuit includes calculation of similarity between the character read by said input means and the standard character patterns. The apparatus according to claim 6, wherein the standard character patterns include patterns such as numerals, alphabets, Chinese characters, kana characters (Japanese syllabaries) and katakana characters (square form of Japanese syllabaries). The apparatus according to claim 6, wherein said management means can set addresses accessible to said storage means with respect to each of said plurality of calculation means. The apparatus according to claim 6, wherein said plurality of calculation means operate in accordance with the same calculation algorithm. The apparatus according to claim 6, wherein said plurality of calculation means respectively operate in accordance with different calculation algorithms. The apparatus according to claim 6, wherein said plurality of calculation means respectively include: a counter for setting the number of the standard character patterns stored in said storage means; decrement means for, each time a reading out of the standard character pattern occurs, decrementing the number of the standard character patterns set in the counter; and termination means for, when the number of the standard character patterns decremented by said decrement means becomes zero, terminating the character recognition. The apparatus according to claim 6, wherein pattern data of the respective standard character patterns are stored in continuous areas in said storage means. The apparatus according to claim 6, further comprising parallel processing control means for, while the character recognition with respect to the character read by said input means is being performed by one of said plurality of calculation means, activating another one of said plurality of calculation means which is not used so that character recognition with respect to another character read by said input means can be performed in parallel. A storage medium storing instructions for controlling the processor to carry out the method of any one of claims 1 to 5.

Inventors: UENO SHUGORO, UENO, SHUGORO, Ueno, Shugoro, c/o Canon Kabushiki Kaisha
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1992
Main classification: G06K9
IPC codes: G06K9