Image processing method and apparatus

Abstract: An image processing apparatus comprises: a character area extractor to extract a character area from image information which is derived by reading an original document by an image scanner; a position/size information memory to derive position information and size information of the image information in the character area extracted by the extractor; a comparator to compare the position and size information which are stored in the memory with predetermined standard information; and a recognizer to decide a recognition character on the basis of a comparison result obtained by the comparator. The predetermined standard information indicates a ratio in the extracted character area. In the case of correcting the recognition character, the predetermined standard information is updated to a value which is compared by the comparator.

Description: The present invention relates to image processing method and apparatus for recognizing an input image and, more particularly, to image processing method and apparatus for correctly discriminating similar character and figure. Fig. 13 is a flowchart showing character recognizing processes in a conventional general character recognizing apparatus. In such a character recognizing apparatus, an original is read by using a photoelectric converter such as an image scanner and is converted into binary image data (step S141). In the next step S142, a character image of one character is cut out from the input image which has been converted into a binary image. The above process is executed by first extracting a line from a pixel distribution in the line direction and subsequently examining a pixel distribution in the direction perpendicular to the line. Then, a normalization is performed in step S146 in order to absorb a fluctuation in size of the cut-out character image. After that, a feature of the normalized character image is extracted in step S147. With respect to the normalized image whose feature has been extracted, a degree of similarity is calculated in step S148 with reference to a dictionary 53 which has been prepared. A character having the largest degree of similarity is selected as a result of the recognition. The result of the recognition is finally displayed in step S51. However, in the above conventional method, characters (including symbols) in which the character images after completion of the normalization are extremely similar such as "." (period) and "o" (small letter of O) or "," (comma) and " ' " (apostrophe) or the like as shown in Fig. 14 occur as a result of the normalization. Thus, there is a drawback such that an erroneous recognition occurs between such similar characters. However, in the above conventional method, since the size of cut-out character is normalized upon recognition, it is difficult to distinguish similar characters such as " "(reads "tsu" and " " (also reads "tsu") in which the shapes are the same and only the sizes are different. On the other hand, in the dictionary, those similar characters are handled as different categories. Therefore, there is a drawback such that " " is generated as a result of the recognition even if an input character is " " or, contrarily, "' " is generated as a recognition result even if an input character is " ". It is known from Patent Abstracts of Japan, vol.12, No. 309, (P-748), 23 August 1988, & JP-A-63 078 287 (Matsushita Electric Ind. Co. Ltd.) to provide a character recognition device which is able to distinguish between characters which are written in small and normal sizes, the size being determined using the size ratio and positional information of a target character image relative to a group of adjacent character images from which average values of length and width are measured. It is also known from Patent Abstracts of Japan, vol. 14, No. 76, (P-1005), 13 February 1990, & JP-A-12 91 394 (Ricoh Co. Ltd.) to provide a character recognition device using a dictionary in which characters having the same shape but different size or position are registered together with a character code indicating character size in order to reduce the number of dictionary registrations required. According to the present invention there is disclosed an image processing apparatus comprising: memory means operable to store a document image; character extraction means operable to extract a character image from the stored document image; means for obtaining a relative position characteristic of the character image with respect to a line of characters including the character image in the stored document image; recognition means operable to perform recognition-processing of the character image extracted by said character extraction means; and output means operable to output a recognised character based on the results obtained by said recognition means and said relative position characteristic, characterised by: similar character table means storing a plurality of image categories, each image category being representative of a plurality of similar candidate images different from each other in respect of at least one of (a) size of character and (b) position of character relative to the line and distinguishable according to said relative position characteristic; said recognition means being operable to obtain a candidate image category for the character image as a recognition result; determining means operable to determine whether the obtained candidate image category is included in one of the plurality of image categories stored in said similar character table means; and selection means responsive to a determination by said determining means that the candidate image category obtained for one character image is included in one of the stored image categories to select one candidate image from the plurality of candidate images based on the obtained candidate image category and the identified relative position characteristic; whereby the output means is operable to output a recognised character corresponding to the selected one candidate image selected by the selection means. Preferred embodiments of the preferred invention will now be described by way of example only and with reference to the accompanying drawings of which: Fig. 1 is a fundamental constructional diagram of an example in the case of embodying the invention by storing similar characters as one category; Fig. 2 is a block diagram showing a flow of processes and information in a recognizing apparatus in the embodiment in the case of storing similar characters as one category; Fig. 3 is an explanatory diagram for a cutting process of characters in an input image and an extracting process of position information; Fig. 4 is a diagram showing an example of a dictionary to store similar characters as one category; Fig. 5 is a diagram showing an example of a similar character table; Fig. 6 is a diagram for explaining a character cutting process and a position information extracting process by using "'" and ","; Fig. 7 is a diagram showing conditions when similar characters are selected; Fig. 8 is a flowchart showing processes for storing similar characters as one category and for discriminating " " and " "; Fig. 9 is a flowchart showing processes for storing similar characters as one category and for discriminating "'" and ","; Fig. 10 is a block diagram showing a construction of an image processing apparatus in an embodiment in the case of discriminating similar characters on the basis of information regarding sizes and positions of characters which have been cut out; Fig. 11 is a flowchart showing processes in the image processing apparatus shown in Fig. 10; Fig. 12 is a diagram for explaining size information and position information of characters in image information which has been cut out; Fig. 13 is a flowchart showing conventional character recognizing processes; and Fig. 14 is a diagram for explaining the normalization of image information which has been cut out. [Embodiment in the case where similar characters or figures are stored as one category and a recognition result is decided from position information in image information as an object to be recognized] Fig. 1 is a diagram showing a fundamental construction in the embodiment. Reference numeral 100 denotes a central processing unit (CPU) to execute arithmetic operations in flowcharts shown in Figs. 8 and 9 and the like; 101 a keyboard for inputting characters, symbols, or the like, for instructing a correction upon erroneous recognition, or the like; 102 a pointing device; 103 a read only memory (ROM) in which a dictionary or the like which is used when characters are recognized has been stored; 104 a memory to store data which has been read by a scanner 108; 105 a calculator for finding out candidate words or the like from the data which has been read by the scanner 108 and for calculating a degree of similarity of each word; 106 a CRT; 107 an interface of the scanner 108; and 108 the scanner to read image information. Fig. 2 is a block diagram most clearly showing features of the embodiment. In an image input section 1, an image is input from the image scanner 108 or the like. In a character cutting-out section 2, characters are cut out one by one from the input image by the CPU 100. In a normalization section 3, circumscribed rectangles of the characters which have been cut out by the CPU 100 are obtained and are normalized and are expanded or contracted to a predetermined size. In a feature extraction section 4, features of the character images which have been normalized by the CPU 100 are extracted. In a similarity calculation section 5, degrees of similarity are calculated by using the features extracted by the calculator 105 and a dictionary 9 stored in the ROM 103. In a similarity decision section 6, a check is made to see if similar characters exist or not by using a similar character table 11 stored in the ROM 103. In the character cutting-out section 2, the position information of the characters upon cutting-out has been stored into the memory 104 in a position information storage section 10. Therefore, in a similar character selection section 8, either one of the similar characters is selected by the CPU 100 on the basis of the character position information. In a result output section 7, a result of the recognition is supplied to the CRT 106. A flow of the processes for discriminating similar characters of different sizes such as " " (reads "a") and " " (also reads "a") which are executed by the CPU 100 will now be described in detail with reference to a flowchart shown in Fig. 8. An image is input from the scanner 108 (step S1). A line is extracted from the input image information (step S2). A height h of line as shown in Fig. 3 is obtained (step S3). Characters as shown in Fig. 3 are subsequently cut out (step S4). If the number of characters existing on the line has been known by cutting out the characters, bits indicative of a status of characters in the lower portion as many as the number of input characters are reserved in a position information storage section in the memory 104 (step S5). A check is made to see if a pixel in the top portion of the character exists below a height of h x x / 100 or not (step S6). If the pixels exist below a height of x%, it is decided that such a character is a lower character and a bit of the position information ("position bit") is turned on (step S7). If NO in step S6, the position bit is turned off (step S8). If there is a next character (step S9), the processing routine is returned to step S6. If a next character doesn't exist (step S9), the process advances to a next line. If there is a next line (step S10), the processing routine is returned to step S3 and the processes in steps S3 to S10 are repeated until the last line. If a next line doesn't exist (step S10), the smallest one of rectangles which enclose the cut-out character image is normalized (step S11). A feature of the character is extracted (step S12). A similarity is calculated by the calculator 105 (step S13). The dictionary 9 which is used for the similarity calculation has been stored in the ROM 103 as shown in Fig. 4. Category numbers (1 to n) are assinged to the characters whose sizes can be distinguished in a manner such that two characters are regarded as one category. If the cut-out character has been discriminated and the degree of similarity could be calculated (step S13), a check is made to see if the category of the maximum degree of similarity exists in the similar character table or not (step S14). The similar character table 11 has been stored in the ROM 103 as shown in Fig. 5. The categories when the position bit is on and when it is off are respectively included in the dictionary 9 with respect to the category number in which similar characters exist. An example of Fig. 3 will now be described. It is now assumed that the result of the similarity calculation section 5 indicates the category numbers "m, k, ℓ". At this time, the bits of "off, on, off" are stored in the position information storage section. Since the category number m is included in the similar character table 11, it is determined by the similarity decision section 6 that the similar characters are included. In the similar character selection section 8, the category number is m and the bit is off, that is, the character is recognized as " " (reads "yo". Similarly, in the case of the category number k as well, the similar characters are included and the bit is on, so that the character is recognized as " " (reads "tsu") of a small letter. In the case of the category number ℓ, it is decided by the similarity decision section 6 that no similar character exists, so that the character is recognized as " " (reads "to"). If it is determined in step S14 that the category of the maximum similarity doesn't exist in the similar character table, the category whose similarity has been discriminated to be maximum in step S13 is used as a recognition result. If YES in step S14, a check is further made in step S16 to see if the position bit in the memory 104 has been turned on or not. If it is decided in step S16 that the bit is on, a small letter of the category in the similar character table 11 is used as a recognition result. If NO in step S16, a capital letter of the category in the similar character table 11 is used as a recognition result. After the recognition results were obtained in steps S15, S17, and S18, a check is now made to see if a next character exists or not (step S19). If YES, the processing routine is returned to step S11 and the processes in steps S11 to S19 are repeated until the last character. If NO in step S19, the recognition result is displayed by the CRT 106 (step S20). A flow of the processes for discriminating similar characters such as "'" and "," whose positions are different which are executed by the CPU 100 will now be described in detail with reference to a flowchart shown in Fig. 9. Since the processes in steps S1 to S4, S11 to S13, S19, and S20 in Fig. 9 are similar to those in the first embodiment, their descriptions are omitted here. In a manner similar to the processes shown in Fig. 8, characters are cut out (step S4), a length u from the upper portion of a cutting frame of the cut-out character to the upper portion of the character and a length v from the lower portion of the character to the lower portion of the cutting frame as shown in Fig. 6 are obtained (step S31), and the values of u and v are stored into the position information storage section 10 in the memory 104 and are compared (step S32). If u is smaller than v in step S32, the position bit which has been reserved in step S5 is turned on (step S33). If u is equal to or larger than v in step S32, the position bit is turned off (step S34). A check is then made to see if a next character exists or not (step S35). If YES, the processing routine is returned to step S32 and the processes in steps S32 to S35 are repeated until the last character. If NO in step S35, step S36 follows and a check is made to see if there is a next line or not. If there is a next line, the processing routine is returned to step S3 and the processes in steps S3 to S36 are repeated until the last line. If NO in step S36, step S11 follows. After the similarity of the character was calculated in step S13, a check is made to see if the category of the maximum similarity belongs to the category of "'" or not (step S37). If NO in step S37, the category of the maximum similarity is used as a recognition result (step S38). If YES in step S37, a check is made to see if the position bit in the memory 104 has been turned on or not (step S39). If YES in step S39, "'" is used as a recognition result (step S40). If NO in step S39, "," is used as a recognition result (step S41). The discrimination regarding characters having the same feature and different character positions which is executed on the basis of the relation between u and v which are derived in a manner similar to the above can be also performed to characters other than "'" and "," by providing a table as shown in Fig. 7. [Embodiment in which information regarding a size and a position of image information which has been cut out is compared with standard information and a recognition result is determined] Fig. 10 is a block diagram showing a construction of a character recognizing apparatus which can automatically correct a character which has erroneously been recognized according to the embodiment. In Fig. 10, the character recognizing apparatus comprises an image reading section and a character detector/corrector. Further, the image reading section comprises: a photo-electric converter 32 such as an image scanner or the like; a scan controller 33; and an amplifier 34. The character detector/corrector comprises: a binarizer 35; a character cutter 36; a normalizer 37; a CPU 38; an ROM 39; an RAM 40; an input/output (I/O) controller 41; a feature extractor 42; a manual input section 43; a display section 44; and a CPU bus 45. In addition to the dictionary 53, processing programs for executing processes, which will be explained hereinlater, such as calculation of a standard character size, extraction of size and position information, calculation of a similarity, decision regarding the correction, automatic correction, and the like have been stored in the ROM 39. In the above character recognizing apparatus, an original document 31 is read by the photo-electric converter 32 such as an image scanner or the like. After that, an output of the converter 32 is amplified by the amplifier 34 and is converted from the analog signal into the binary digital data by the binarizer 35. Then, characters are cut out one by one by the character cutter 36. Size and position information of the cut-out characters, which will be explained hereinlater, are extracted. After that, the characters are normalized and features of the characters are extracted. Subsequently, by selecting the character which is most similar to the normalized character with reference to the dictionary stored in the ROM 39, the character is recognized. Processes for recognizing characters and for automatically correcting the erroneously recognized characters in the embodiment will now be described with reference to a flowchart shown in Fig. 11. In the flowchart shown in Fig. 11, the same processing steps as those in the conventional method are designated by the same step numbers and their descriptions are omitted here on the assumption that those processing steps are based on the conventional technique. First, in steps S110 to S114, image data which has been read by the image scanner or the like and amplified by the amplifier and binarized by the binarizer 35 is cut out every character by the character cutter 36. After that, a standard character size is calculated in step S118. The standard character size is calculated by, for instance, selecting the character having the maximum height in one line of the characters included in the image data which have been input and binarized. Subsequently, the height of character is set to a standard value (H) in step S120. The value of H is obtained every line. A height of character of each character image to be recognized is set to h. A value of h/H is calculated. The result is stored in a size information storage section 60 in the RAM 40. In step S122, a distance (t) from the upper portion of a character cutting frame 70 to the upper portion of the character image and a distance (b) from the lower portion of the frame 70 to the lower portion of the character image are obtained by using area data of the cutting frame 70 which has been cut out by the character cutter 36 as shown in Fig. 12 and the character height of each character image. The values of t/H and b/H are calculated and the results are stored into a position information storage section 62 in the RAM 40. Subsequently, for the image data which has been normalized and whose features have been extracted, the character of the maximum similarity is discriminated by using the dictionary 53. After that, a check is made in step S130 to see if such a character needs correction or not. In the discrimination about the necessity of the correction, the character having the maximum similarity which has been selected from the dictionary 53, the size information stored in the size information storage section 60, the position information stored in the position information storage section 62, and decision standard information stored in a decision standard information storage section 64 in the RAM 40 are used and the following discrimination is executed. For instance, with respect to the character (hereinafter, referred to as a first candidate) having the maximum similarity which has been selected from the dictionary 53, (1) in the case where there are similar characters in which only sizes are different (for instance, " " (reads "ya") and " " (also reads "ya", a threshold value U as decision standard information regarding the size of first candidate character is compared with the value of h/H stored in the size information storage section 60, and if h/H < U, such a character is determined to be a small letter, and if U ≦ h/H, such a character is decided to be a capital letter. In the subsequent step S132, if it is determined that the first candidate is a capital letter and the result of the decision indicates a small letter, the similarity decision result is corrected to a small letter. After that, the corrected recognition result is supplied to the display section 44 through the I/O controller 41. (2) In the case where there are similar characters in which only positions are different (for example, "'" (apostrophe) and "," (comma)), p = (t/H) - (b/H) is calculated by the values of t/H and b/H stored in the position information storage section 62, a standard value P (P > 0) and Q (Q < 0) as decision standard information regarding the position are compared, and if p > P, it is determined that the character exists in the lower portion of the character cutting frame 70, and if p < Q, it is decided that the character exists in the upper portion of the frame 70, and if Q ≦ p ≦ P, it is decided that the character exists in the middle portion of the frame 70. In the next step S132, if the first candidate is a character in the lower portion and the result of the decision indicates a character other than the character in the lower portion, the similarity decision result is corrected by the decision result. After that, the corrected recognition result is supplied to the display section 44 through the I/O controller 41. Further, after the corrected recognition result was displayed by the display section 44, the error of the recognition result after it was automatically corrected on the basis of the correction decision which had been executed in steps S130 to S132 is manually corrected in step S136. At this time, the user executes the correction of a small letter and a capital letter, the correction of similar characters due to a difference of positions, and the like on the basis of an input from the manual input section 43 while seeing the recognition result displayed by the display section 44. The result which has manually been corrected is again displayed by the display section 44. The decisions about the correction of the small letter and the capital letter which has manually been performed and about the correction of similar characters due to a difference of the positions are reflected to the values of U, P, Q, and the like of the decision standard information and are used in the subsequent processes. That is, if the manual correction has been performed in step S136, for example, the value of h/H used in step S130 is updated to a new value of U. Due to this, in the next decision, the correct recognition result is generated at the first recognition result display time and there is no need to manually correct the recognition result. In a manner similar to U, each time the correction is manually performed, the values of P and Q are also updated and stored into the decision standard information storage section 64. Thus, the decision standard is learned and there is an effect such that a recognition rate can be raised. According to the embodiment, for instance, the erroneous recognition can be automatically corrected with respect to not only the similar characters such as Japanese syllabary or alphabetic characters in which only sizes or positions are different but also characters such as " " and " " or the like in which although the positions and sizes are also different, the character images after completion of the normalization are similar. On the other hand, although the embodiment has been described with respect to the case where the size and position information in the height direction of the characters have been used as character information to correct the erroneous recognition, the invention is not limited to such a case. For example, the invention can be also applied to the case of using information of a character width in addition to the information in the height direction of the character. In this case, in the standard character size calculation in the embodiment, a character having the maximum width is selected as a standard value (W) from the characters of one line. With respect to characters such as "―" and "-" which cannot be distinguished by only the character height, the discrimination about the correction can be performed on the basis of the value of w/W for a character width (w) and a threshold value of the decision standard information. Further, for instance, the invention can be also applied to the case where the rate of the character height (h) and the character width (w) or an area (h x w) of the rectangle which encloses the character is used as a reference value. Due to this, the correction can be also automatically executed with respect to similar characters such as standard-width character and half-width character or the like in which character widths are different. Further, although the embodiment has been described with respect to the example in which the standard character size is defined by setting the character height of each line to be maximum, the invention is not limited to such an example. For instance, a character to obtain the standard character size can be also designated by an external input from a manual inputting section such as a mouse or the like. The invention can be applied to a system comprising a plurality of equipment or can be also applied to an apparatus comprising one equipment. The invention can be also obviously applied to the case where the invention is accomplished by supplying a program to a system or an apparatus.

Claims: An image processing apparatus comprising: memory means (104) operable to store a document image; character extraction means (S4) operable to extract a character image (12) from the stored document image; means for obtaining a relative position characteristic of the character image with respect to a line of characters including the character image in the stored document image; recognition means (5) operable to perform recognition-processing of the character image extracted by said character extraction means; and output means (106) operable to output a recognised character based on the results obtained by said recognition means and said relative position characteristic, characterised by : similar character table means (11; Fig. 5, Fig. 7) storing a plurality of image categories, each image category being representative of a plurality of similar candidate images different from each other in respect of at least one of size of character (Fig. 5) and position of character relative to the line (Fig. 7) and distinguishable according to said relative position characteristic; said recognition means being operable to obtain a candidate image category for the character image as a recognition result; determining means (6) operable to determine whether the obtained candidate image category is included in one of the plurality of image categories stored in said similar character table means; and selection means responsive to a determination by said determining means that the candidate image category obtained for one character image is included in one of the stored image categories to select one candidate image from the plurality of candidate images based on the obtained candidate image category and the identified relative position characteristic; whereby the output means is operable to output a recognised character corresponding to the selected one candidate image selected by the selection means. An apparatus according to claim 1, further comprising dictionary means (103) operable to store a plurality of feature data, each feature data including a character and a category code representative of said image category corresponding thereto. An apparatus according to claim 2, wherein said recognition means is operable to compare feature data of the character image with feature data stored in said dictionary means, said recognition means being operable to recognise the category code of the image information as being representative of the character image category. An apparatus according to any preceding claim, wherein said recognition means is operable to normalise character images to obtain normalised image data and to recognise character images by using features of said normalised image data. An apparatus according to any preceding claim, further comprising reception means (107) operable to receive the plurality of character images, to be stored in said memory means, from a scanner (108). An apparatus according to any preceding claim, further comprising display means (106) operable to display the recognised character on a display device. An apparatus according to any preceding claim, wherein said output means comprises a display device (106). An image processing method comprising the steps of: storing in a memory means (104) a document image; extracting a character image (Fig.6) from the document image stored in said memory means; obtaining a relative positional characteristic of the character image with respect to a line of characters including the character image in the stored document image; operating a recognition means (5) to perform recognition-processing of the extracted character image; and operating an output means to output a recognised character based on the results obtained by said recognition means and said relative positional characteristic; characterised in that : the recognised character is obtained by referring to a similar character table means (11; Fig. 5, Fig. 7) storing a plurality of image categories, each category being representative of a respective plurality of similar candidate images different from each other in respect of at least one of size of character (Fig. 5) and position of character relative to the line (Fig. 7) and distinguishable according to said relative position characteristic; determining whether the obtained candidate image category is included in one of the plurality of image categories stored in said similar character table means; and selecting, in response to a determination that the candidate character obtained for one character image is included in one of the stored image categories, one candidate image from the plurality of candidate images based on the candidate image category and the identified relative position characteristic; whereby the output means outputs the recognised character corresponding to the selected one candidate image. A method as claimed in claim 8 further comprising the step of storing in a dictionary means (103) a plurality of feature data, each feature data including a character and a category code representative of said image category corresponding thereto. A method as claimed in claim 9 including the step of operating said recognition means to compare feature data of the character image with feature data stored in said dictionary means, said recognition means recognising the category code of the image information as being representative of the character image category. A method as claimed in any of claims 8 to 10, including the step of normalising said character images to obtain normalised image data and wherein said recognition means recognises characters by using features of said normalised image data. A method as claimed in any of claims 8 to 11 further comprising the step of receiving the plurality of character images, to be stored from a scanner (108). A method as claimed in any of claims 8 to 12, comprising the step of displaying in a display means (106) the recognised character on a display device. A method as claimed in any of claims 8 to 13, wherein said output means comprises a display device (106). A computer program comprising program instructions for carrying out any one of the methods of claims 8 to 14.

Inventors: IKEDA HIROAKI, IKEDA, HIROAKI, IKEDA, HIROAKI, CANON KABUSHIKI KAISHA
Applicants: CANON KK, CANON KABUSHIKI KAISHA
Application year: 1991
Main classification: G06K9
IPC codes: G06K9