Character recognition apparatus

Abstract: A character recognition apparatus is provided which, even when there occurs a local positional deviation of a character to be recognized, can stably recognize the character with high accuracy. For each contour point of a character image, a contouring direction code imparting unit 15 obtains a contouring direction code in which a contouring line direction of the character is quantized in four directions. A contouring direction code frequency calculation unit 16 calculates the frequency of each contouring direction code for each subregion of the character image. A contouring direction code density calculation unit 17 calculates the density of the contouring direction codes of each subregion, by using the frequency of the direction codes and the size of the respective subregion. A contouring direction code space blurring unit 18 conducts a weighted addition on each of the obtained contouring direction codes by adding, with a predetermined weight coefficient, the contouring direction code densities of neighbor subregions which are adjacent to the respective subregion with the subregion as the center and in a direction perpendicular to that of each of the contouring direction codes.

Description: BACKGROUND OF THE INVENTION 1.Field of the Invention The invention relates to a character recognition apparatus which recognizes printed characters of a newspaper, a magazine or the like, and hand-written characters, as set forth in the preamble of claim 1. An apparatus of this kind is known from GB-A-2 190 778. 2.Related Art of the Invention Another character recognition apparatus of the prior art is disclosed in, for example, Japanese patent publication (Kokai) No. SHO61-125688. Fig. 16 is a diagram showing the configuration of the prior art character recognition apparatus. In Fig. 16, 101 designates an image input unit through which an image including a recognition object character is input, and 102 designates a character segmentation unit which separates a rectangular segment of a character image of the recognition object from the image input to the image input unit 101. The reference numeral 103 designates a contour direction feature extraction unit which obtains a contour direction feature matrix for detecting a character from the rectangular character image segment obtained by the character segmentation unit 102. A contouring direction feature matrix indicates a feature of a character by means of the directionality of a contour line of the character. The reference numeral 104 designates a recognition dictionary which stores contouring direction feature matrices for all character categories of recognition objects, and 105 designates a character recognition unit which checks the contour direction feature matrix obtained by the contour direction feature extraction unit 103 with the contour direction feature matrices stored in the recognition dictionary 104, to extract recognition candidate characters. The contouring direction feature extraction unit 103 consists of a contour direction code imparting unit 106, and a contouring direction code frequency calculation unit 106. The contour direction code imparting unit 106 determines contour direction codes (including four kinds of codes respectively indicative of horizontal, vertical, upper right, and lower right directions) of contour points of the character image of the recognition object separated by the character segmentation unit 102. The contour direction code frequency calculation unit 107 calculates the frequencies of the contour direction codes obtained by the contour direction code imparting unit 106, in each of subregions obtained by dividing the rectangle which is separated by the character segmentation unit 102 into M and N sections in horizontal and vertical directions (where M and N are arbitrary natural numbers). The operation of the thus configured prior art character recognition apparatus will be described. First the image input unit 101 receives an image including a recognition object character and binarizes the image. As shown in Fig. 2, the character segmentation unit 102 then separates a rectangular pattern circumscribing the character from the binarized input image, as a character image. From the character image separated by the character segmentation unit 102, the contour direction feature extraction unit 103 then obtains contour direction feature vector which is required for character recognition in the character recognition unit 105. The contour direction feature extraction unit 103 operates in the following manner: First the contour direction code imparting unit 106 compares the polarity of each pixel point of the character image separated by the character segmentation unit 102 (i.e., whether the pixel point is a black pixel or a white pixel) with the polarities of 8 pixel points adjacent to the pixel point under examination. When at least one of these pixel points has a different polarity, this pixel point is regarded as a contour point, and determines the contouring direction code of each of the contour points of the character image in accordance with the relationship between the contour point and the eight adjacent pixel points such as shown in Fig. 3. For each of 16 subregions obtained by dividing the character image into 4 sections (M = 4) in a horizontal direction and 4 sections (N = 4) in a vertical direction, as shown in Fig. 4, the contour direction code frequency calculation unit 107 then calculates the contour direction codes of the contour points obtained by the contour direction code imparting unit 106, and obtains the frequencies of the contour direction codes of the four kinds. The frequencies are used as a contour direction feature matrix. In other words, the contouring direction feature matrix has 4 (M) × 4 (N) × 4, or 64 dimensions. Next the character recognition unit 105 checks the contour direction feature matrix obtained by the contour direction feature extraction unit 103 with typical contouring direction feature matrices of character categories which have been obtained by feature extraction in the same manner as described above and stored in the recognition dictionary 104, and extracts recognition candidate characters. The apparatus of GB-A-2 190 778 supra is very similar to the afore explained apparatus so that a description thereof may be dispensed. Recently, the directional feature of a character line has been recognized to be effective as a feature of a character in a character recognition process, as described by, for example, Saito, Yamada, and Yamamoto, Analysis of hand-written characters in accordance with direction pattern matching, Journal of Institute of Electronics and Communication Engineers of Japan (D), Vol. J65-D, No. 5, pp 550-557, May, 1982. Also the above-mentioned character recognition apparatus of the prior art is configured on the basis of the effectiveness of a directional feature, and uses a local directional feature of a character contour line as a feature amount of the character. When a hand-written character, the shape of which varies depending on a writer and a writing instrument, is to be recognized, for example, a character line locally varies in a greater degree in position or thickness. Therefore, there frequently occurs the case where the character line is positionally deviated into a neighbor subregion. This produces a problem in that a prior art character recognition apparatus in which a directional feature of a local contour line of a character is used as a feature amount cannot exhibit a sufficient recognition performance. When a kanji (Chinese character) is to be recognized, such a character has a complex shape and there are many characters similar to the character (for example, " ", " ", " ", and " "). In order to discriminate these characters from each other, therefore, a character image must be divided into subregions in a certain fine degree. As the number of subregions is larger, the above-mentioned positional deviation of a character line into a neighbor subregion occurs more frequently, thereby producing a problem in that a sufficient recognition performance cannot always be attained. SUMMARY OF THE INVENTION In view of these problems of a character recognition apparatus of the prior art, the invention has an object of providing a character recognition apparatus which, even when there occurs a local positional deviation of a character to be recognized, can stably recognize the character with high accuracy. The character recognition apparatus of the invention comprises: the features set forth in claim 1. Preferred embodiments of the invention are subject matter of the dependent claims. According to the invention, for each of contour points of an input character image, the contour direction code imparting means obtains contour direction codes in which a direction of a contour line of a character is quantized in at least four directions, from at least a pattern of pixels adjacent to the contour point. The contour direction code frequency calculation means obtains a frequency of each of the obtained contour direction codes, for each of subregions obtained by dividing the character image into M sections in a horizontal direction and N sections in a vertical direction. On the basis of the obtained frequency or density in the subregion, the contour direction code space blurring means conducts, for each of the contouring direction codes, a weighted addition on the frequency or the direction code density of each subregion (A) by adding, with a predetermined weight coefficient, the frequency or the direction code density of a subregion in the vicinity of the subregion (A). The character recognition means extracts recognition candidate characters on the basis of the obtained result. BRIEF DESCRIPTION OF THE DRAWINGS Fig. 1 is a block diagram of a character recognition apparatus of a first embodiment of the invention. Fig. 2 is a diagram showing a character image in which a recognition object character " " is binarized. Fig. 3 is a diagram showing mask patterns for determining a contour direction code of a contour point in the character recognition apparatus of the first embodiment. Fig. 4 is a diagram showing an example in which contour points of the recognition object character " " are respectively provided with contour direction codes in the first embodiment. Fig. 5 is a diagram showing contour direction code frequency matrices of the recognition object character " " in the first embodiment. Fig. 6 is a diagram showing contour direction code density matrices of the recognition object character " " in the first embodiment. Fig. 7 is a diagram showing direction blurring process masks used in a contour direction code space blurring unit of the first embodiment. Fig. 8 is a diagram showing contour direction code density matrices of the recognition object character " " obtained from the contour direction code space blurring unit of the first embodiment. Fig. 9 is a block diagram of a contour direction feature extraction unit of a second embodiment of the invention. Fig. 10 is a diagram showing 3 × 3 mask patterns for determining a contour direction code of a contour point in the second embodiment. Fig. 11 is a diagram showing an example in which contour points of the recognition object character " " are respectively provided with contour direction codes in the second embodiment. Fig. 12 is a diagram showing contour direction code frequency matrices of the recognition object character " " in the second embodiment. Fig. 13 is a diagram showing direction blurring filters used in a contour direction code space blurring unit of the second embodiment. Fig. 14 is a diagram showing contour direction code frequency matrices of the recognition object character " " obtained from the contour direction code direction blurring unit of the second embodiment. Fig. 15 is a block diagram showing a contour direction feature extraction unit of a third embodiment of the invention. Fig. 16 is a block diagram showing a character recognition apparatus of the prior art. [Legend of Reference Numerals] 10 image input unit 11 character segmentation unit 12 contouring direction feature extraction unit 14 character recognition unit 15, 21 contour direction code imparting unit 16, 22 contouring direction code frequency calculation unit 17, 24 contour direction code density calculation unit 18, 25 contour direction code space blurring unit 23 contour direction code direction blurring unit 26 contour direction code density weighted average unit PREFERRED EMBODIMENTS Hereinafter, the invention will be described with reference to the drawings showing its embodiments. Fig.1 is a block diagram of a character recognition apparatus of a first embodiment of the invention. In Fig. 1, 10 designates an image input unit such as an image-scanner through which an image including a recognition object character is input, and 11 designates a character segmentation unit which separates a rectangular segment of a character image of the recognition object from the image input to the image input unit 10. The reference numeral 12 designates a contour direction feature extraction unit which obtains a contouring direction feature matrix for detecting a character from the rectangular character image segment obtained by the character segmentation unit 11. A contour direction feature matrix indicates a feature of a character by means of the directionality of a contour line of the character. The reference numeral 13 designates a recognition dictionary which stores contouring direction feature matrices for all character categories of recognition objects. The reference numeral 14 designates a character recognition unit which compares the contour direction feature matrix obtained by the contour direction feature extraction unit 12 with the contour direction feature matrices stored in the recognition dictionary 13, to extract recognition character candidates. In the contouring direction feature extraction unit 12, 15 designates a contour direction code imparting unit which determines contour direction codes for four directions (respectively indicative of horizontal, vertical, upper right, and lower right directions) of contour points of the character image of the recognition object separated by the character segmentation unit 11. The reference numeral 16 designates a contour direction code frequency calculation unit which calculates the frequencies of the contouring directions obtained by the contour direction code imparting unit 15, in each of subregions obtained by dividing the rectangle which is separated by the character segmentation unit 11, into M and N sections in horizontal and vertical directions (where M and N are arbitrary natural numbers). The reference numeral 17 designates a contour direction code density calculation unit which calculates the density of the contour direction codes of each of the subregions, by using the frequencies of the direction codes obtained by the contour direction code frequency calculation unit 16, and the size of the respective subregion. The reference numeral 18 designates a contour direction code space blurring unit which conducts a weighted addition on each of the contour direction codes of the subregions by adding, with an arbitrary weight coefficient, the contouring direction code densities of neighbor subregions which are adjacent to the respective subregion with this subregion as the center and in a direction perpendicular to that of each of the contour direction codes, thereby obtaining a contour direction feature matrix of (M × N × 4) dimensions. The operation of the thus configured character recognition apparatus of the invention in the case where the recognition object character is " " will be described. First the image input unit 10 receives an image including the recognition object character " " and digitizes it. As shown in Fig. 2, the character segmentation unit 11 then separates a rectangular pattern circumscribing the character from the binarized input image, as a character image. Thereafter, the contour direction feature extraction unit 12 obtains a contour direction feature matrix which is required for character recognition in the character recognition unit 14. The contouring direction feature extraction unit 12 operates in the following manner: First the contour direction code imparting unit 15 extracts contour points existing on a contour line of the character image separated by the character segmentation unit 11, and determines contour direction codes of the extracted contour points. In this determination, the judgment on a contour point is conducted by using a mask of, for example, 3 × 3. More specifically, the polarity of each pixel point (i.e., whether the pixel point is a black pixel or a white pixel) is compared with the polarities of 8 pixel points adjacent to the pixel point under examination. When at least one of these pixel points has a different polarity, the pixel point under examination is judged to be a contour point. The contour direction code of each contour point is determined by scanning the character image by using a mask of 2 × 2, and checking whether the character image coincides with one of mask patterns such as shown in Fig. 3, thereby providing each contour point with a contouring direction code in which a contour line direction of the character is quantized in the four directions. When a mask of 2 × 2 wherein a certain contour point is used as a point of attention coincides with a mask pattern M1 or M2 shown in Fig. 3, for example, the contour point in attention is provided with a horizontal contour direction code "H". Similarly, the contour point is provided with a vertical contour direction code "V" when the mask coincides with a mask pattern M5 or M6, with an upper left contouring direction code "L" when the mask coincides with a mask pattern M7 or M8, and with an upper right contour direction code "R" when the mask coincides with a mask pattern M3 or M4. Fig. 4 shows an example in which the contour points of the recognition object character " " of Fig. 2 are provided with such contour direction codes in the manner described above. For each of 16 subregions obtained by dividing the character image into 4 sections (M = 4) in a horizontal direction and 4 sections (N = 4) in a vertical direction, as shown in Fig. 4, the contour direction code frequency calculation unit 16 then counts the contour direction codes of the contour points obtained by the contour direction code imparting unit 15, and obtains the frequencies of the contour direction codes of the four kinds. Fig. 5 shows the frequencies of the contour direction codes of the subregions of the recognition object character " ", in the form of 4 × 4 matrices of contour direction code frequency with respect to the four directions of "H", "V", "L", and "R". In the embodiment, the character image is divided into the subregions by barycentric division on the basis of the marginal distribution of the character (the distribution of the numbers of black pixel points in the case where the character image is projected to horizontal and vertical sides of a frame circumscribing the image). Alternatively, the division may be conducted by another method. For example, a simple division method in which the width and height of a character are equally divided may be employed. In the embodiment, the contour direction codes of the four directions are obtained. Alternatively, contouring direction codes of eight directions may be obtained. After the calculation of the contour direction code frequency, for each of the subregions, the contour direction code density calculation unit 17 calculates the density of the contour direction codes (hereinafter, referred to as "contour direction code density") of each subregion by normalizing (dividing) the frequencies of the contour direction codes obtained by the contour direction code frequency calculation unit 16, by the size of the respective subregions (e.g., the area, horizontal width, or vertical width of the subregion). Fig. 6 shows the contour direction code densities of the subregions of the recognition object character " ", in the form of matrices in the same manner as Fig. 5. In Fig. 6, however, the contouring direction codes "H" were normalized by the horizontal width of the respective subregions, the contouring direction codes "V" by the vertical width of the respective subregions, and the contour direction codes "L" and "R" by the horizontal width or vertical width of the respective subregions whichever is smaller than the other. The contouring-direction code space blurring unit 18 then conducts a weighted addition on the contour direction code density of each subregion by adding, with a predetermined weight coefficient, the contour direction code densities of neighbor subregions which are adjacent to the subregion with the subregion as the center and in a direction perpendicular to that of each of the contouring direction codes. As a result, the contour direction code densities are spatially blurred. Specifically, contour direction code density matrices F k (i, j) (where i and j indicate the subregions, k indicates the direction of a direction code, and, in the embodiment, 0 ≦ i, j, and k ≦ 3) for the directions of each contour direction code shown in Fig. 6 are subjected to a blurring process by using direction blurring process masks B k (i, j) (0 ≦ i, j, and k ≦ 3) such as shown in Fig. 7. That is, as shown in (Ex. 1), the contouring-direction code density matrices F k (i, j) are converted into G k (i, j) by using the blurring process masks B k (i, j). When setting p = 0.25, q = 0.1071, and r = 0.03571 and using the direction blurring process masks shown in Fig. 7, for example, the contour direction code density matrices G k (i, j) of the recognition object character " " which has been subjected to the blurring process are as shown in Fig. 8. A collection of the thus obtained contour direction code density matrices G k (i, j) constitutes a contouring direction feature matrix. In the embodiment, the contour direction feature matrix has 4 (M) × 4 (N) × 4 or 64 dimensions. Finally the character recognition unit 14 checks the contouring direction feature matrix for the recognition object character " " and obtained in the contour direction feature extraction unit 12, with contour direction feature matrices of character categories which have been obtained by feature extraction in the same manner as described above and stored in the recognition dictionary 13, to obtain similarities between the recognition object character and the character categories. A plurality of characters having a larger similarity are extracted as recognition character candidates. Results of the character recognition according to the embodiment which were experimentally obtained will be described. In the recognition experiments, the database of JIS first level hand-written kanjis of DENSOKEN (ETL9B: 71 kinds of hiraganas, and 2,965 kinds of JIS first level hand-written kanjis (total: 3,036 kinds of characters) was used. The initial 10 sets (30,360 characters) were used as learning data of the recognition dictionary 13, and the subsequent 10 sets as evaluation data. The recognition dictionary 13 is prepared by averaging contour direction feature matrices obtained on the learning data, for each character category. In the embodiment described above, the parameters M and N of the region division number for a character image are set to be 4 (i.e., M = 4, and N = 4). In the experiments, M = 8, and N = 8 were set so that a character image was divided into 64 subregions. Namely, a feature matrix has 256 dimensions. For comparison, recognition experiments were conducted on a prior art character recognition apparatus under the same conditions. As a result of the experiments, the embodiment attained a recognition rate of 93.0 %, and the prior art character recognition apparatus a recognition rate of 91.1 %, showing that the embodiment can improve the recognition performance. According to the embodiment, as described above, for each direction of each direction code, the contouring direction code space blurring unit 18 conducts the blurring process in a direction perpendicular to the direction of the direction code, on the character feature amount obtained as the density of directional components of a contour line of a character of each local region. As compared with a feature amount which is used in the prior art example and has not been subjected to a blurring process, a feature amount which has been subjected to such a blurring process has a very small variation amount or is stable even when a character line is positionally deviated into a neighbor subregion by a local variation in position or thickness of the character line. It is often that such a positional deviation of a character line independently occurs for each character line. Particularly, a fatal positional deviation of a character line frequently occurs in a direction perpendicular to that of the character line. Consequently, the blurring process perpendicular to a directional component is very effective. Namely, the blurring process causes the variation of a feature amount to be insensitive to a positional deviation of a certain degree of a character line, with the result that a stable feature amount is obtained. Even when the recognition object is a character such as a hand-written kanji which has a complex structure and in which positions of character lines locally vary in a very large degree, therefore, the embodiment can attain a highly accurate and stable recognition performance. Fig. 9 is a block diagram of the contour direction feature extraction unit 12 of a second embodiment of the invention. In Fig. 9, 21 designates a contour direction code imparting unit which determines contouring direction codes for eight directions (respectively indicative of horizontal, vertical, upper right, and lower right directions, and four directions which equally divide two adjacent ones of the directions) of contour points of the character image of the recognition object separated by the character segmentation unit 11. The reference numeral 22 designates a contouring direction code frequency calculation unit which calculates the frequencies of the contour directions obtained by the contour direction code imparting unit 21, in each of subregions obtained by dividing the rectangle which is separated by the character segmentation unit 11, into M and N sections in horizontal and vertical directions (where M and N are arbitrary natural numbers). The reference numeral 23 designates a contour direction code direction blurring unit which, for each of the subregions, conducts a weighted addition with an arbitrary weight coefficient on the frequency of contour direction codes which are adjacent in direction to the respective contour direction code with using the four directions of horizontal, vertical, upper right, and lower right directions as the center, thereby compressing the frequencies of the contour direction codes of the eight directions into the frequencies of the contour direction codes of the four directions. The reference numeral 24 designates a contour direction code density calculation unit which calculates the density of the contour direction codes of each of the subregions, by using the frequencies of the four direction codes obtained by the contour direction code direction blurring unit 23, and the size of the respective subregion. The reference numeral 25 designates a contour direction code space blurring unit which conducts a weighted addition with an arbitrary weight coefficient on each of the contour direction codes of the subregions by adding the contouring direction code densities of neighbor subregions which are adjacent to the respective subregion with the subregion as the center and in a direction perpendicular to that of each of the contour direction codes, thereby obtaining a contour direction feature matrix of (M × N × 4) dimensions. The operation of the thus configured character recognition apparatus of the second embodiment in the same case as the first embodiment or where the recognition object character is " " will be described. In the contouring direction feature extraction unit 12, in a similar manner as the first embodiment, the contour direction code imparting unit 21 extracts contour points existing on a contour line of the character image separated by the character segmentation unit 11, and determines contour direction codes of the extracted contour points. In this determination, the judgment on a contour point is conducted by using a mask of 3 × 3. More specifically, when at least one of pixel points which are adjacent to one black pixel point of the character area in the upper, lower, left, and right directions is a white pixel point, this black pixel point is judged to be a contour point. The contour direction code of each contour point is determined by scanning the character image which has been subjected to the contour point extraction, by using a mask of 3 × 3 which is centered at the respective contour point and checking whether the character image coincides with one of mask patterns such as shown in Fig. 10, thereby providing each contour points with a contour direction code in which a contour line direction of the character is quantized in eight directions. When a mask of 3 × 3 centered at a certain contour point coincides with a mask pattern M1 shown in Fig. 10, for example, the contour point in attention is provided with a horizontal contour direction code "0". Similarly, the contour point is provided with a vertical contouring direction code "4" when the mask coincides with a mask pattern M3, with a lower right contour direction code "2" when the mask coincides with a mask pattern M2, and with a upper right contour direction code "6" when the mask coincides with a mask pattern M4. In the same manner, the contour points are provided with contour direction codes "1", "3", "5", or "7" by using mask patterns M5 to M12. Fig. 11 shows an example in which the contour points of the recognition object character " " are provided with these contour direction codes in the manner described above. For each of 16 subregions obtained by dividing the character image into 4 sections (M = 4) in a horizontal direction and 4 sections (N = 4) in a vertical direction, as shown in Fig. 11, the contour direction code frequency calculation unit 22 then counts the contour direction codes of the contour points obtained by the contour direction code imparting unit 21, and obtains the frequencies of the contour direction codes of the eight kinds. Fig. 12 shows the frequencies of the contour direction codes of the subregions of the recognition object character " " shown in Fig. 11, in the form of 4 × 4 matrices of contour direction code frequency with respect to the eight directions of "0" to "7". In the same manner as the first embodiment, the character image was divided into the subregions by barycentric division. For each of the subregions, the contour direction code direction blurring unit 23 then conducts a weighted addition with a predetermined weight coefficient on the frequencies of contour direction codes which are adjacent in direction to the respective contour direction code with using "0" (horizontal), "4" (vertical), "6" (upper right), and "2" (lower right) directions as the center, thereby compressing the frequencies of the contour direction codes of the eight directions into the frequencies of the contour direction codes of the above-mentioned four directions of "0", "2", "4", and "6". Specifically, the frequencies of the contour direction codes of the eight directions are compressed into those of the four directions by aggregating the frequencies by using a filter having weight coefficients shown in Fig. 13 with an even-numbered contouring direction code as the center. That is, when the frequencies of the contour direction codes of the eight directions are indicated by h d , the weight coefficients by b d (d indicates the direction of each contouring-direction code and is 0 to 7), and the frequencies of the contour direction codes compressed into the four directions by H k (k indicates the direction of each contour direction code and is 0, 2, 4, or 6), H k is shown by (Ex. 2) below. In (Ex. 2), when K = 0, d is -1 (d = -1). In this case, (Ex. 2) is calculated with setting d to be 7 (d = 7). Fig. 14 shows the frequencies of the contouring-direction codes compressed into the four directions in the subregions of the recognition object character " " shown in Fig. 11, in the form of matrices in the same manner as Fig. 12. In the same manner as the first embodiment, for each of the subregions, the contour direction code density calculation unit 24 then calculates the density of the contour direction codes (hereinafter, referred to as "contouring direction code density") of each subregion by normalizing (dividing) the frequencies of the contour direction codes obtained by the contour direction code direction blurring unit 23, by the size of the respective subregion (e.g., the area, horizontal width, or vertical width of the subregion). In the same manner as the first embodiment, the contour direction code space blurring unit 25 then conducts a weighted addition on the contour direction code density of each of the subregions by adding, with a predetermined weight coefficient, the contour direction code densities of neighbor subregions which are adjacent to the respective subregion with the subregion as the center and in a direction perpendicular to that of each of the contour direction codes, thereby spatially blurring the contour direction code density. The specific operation of the unit-is the same as that of the first embodiment, and therefore its description is omitted. A collection of the thus obtained contour direction code density matrices constitutes a contour direction feature matrix which has 4 (M) × 4 (N) × 4, or 64 dimensions. Results of the character recognition conducted in the character recognition apparatus having the contour direction feature extraction unit 12 of the second embodiment will be described. Experiments were conducted in the same manner as the first embodiment. Experimental results show that the embodiment attained a recognition rate of 93.5 % which is higher than that of the first embodiment by 0.5 %. As described above, in the second embodiment, the contour direction code direction blurring unit 23 is added to the configuration of the contour direction feature extraction unit 12 of the first embodiment. In the same manner as the first embodiment, therefore, a positional deviation of a character line into a neighbor subregion can be absorbed by spatially blurring a character feature amount obtained as directional components of a character contour line in each local area. In the embodiment, furthermore, the contour direction code direction blurring unit 23 conducts also the direction blurring process, and therefore also a slant variation of a character line in each local area can be absorbed. Consequently, a stable feature amount can always be obtained not only in the case of a positional variation of a character line but also in that of a slant variation, resulting in that the embodiment can attain a recognition performance which is higher in accuracy than that attained by the first embodiment. Fig. 15 is a block diagram of the contour direction feature extraction unit 12 of a third embodiment of the invention. In Fig. 15, portions indicated by 21 to 25 are the same as those used in the contour direction feature extraction unit 12 of the second embodiment. The reference numeral 26 designates a contour direction code density weighted average unit which, for each of the directions of the contour direction codes, conducts a weighted average operation on the contour direction code density of each subregion obtained by the contour direction code space blurring unit 25 in neighbor subregions adjacent to the subregion, whereby an (M × N) number of contour direction code densities are spatially compressed into a (P × Q) number of contour direction code densities (M > P, and N > Q) to obtain a contouring direction feature vector. The operation of the thus configured contour direction feature extraction unit 12 will be described. In the embodiment, the contour direction code density weighted average unit 26 is added to the configuration of the contour direction feature extraction unit 12 of the second embodiment shown in Fig. 9, and the series of operations of the portions 21 to 25 starting from the input of a character image separated by the character segmentation unit 11 to the contour direction code imparting unit 21 and ending at the obtainment of the contour direction code densities for the subregions of the character image in the contour direction code space blurring unit 25 are the same as those of the second embodiment. In the following, therefore, the description of these portions is omitted and the operation of the contour direction code density weighted average unit 26 will be described. Unlike the second embodiment, the contour direction code frequency calculation unit 22, the contour direction code direction blurring unit 23, the contour direction code density calculation unit 24, and the contour direction code space blurring unit 25 obtain contour direction code densities for 64 subregions while dividing the character image into 8 sections (M = 8) in a horizontal direction and 8 sections (N = 8) in a vertical direction in place of 4 × 4 division. For each of the directions of the contour direction codes, the contour direction code density weighted average unit 26 conducts a weighted average operation on the contour direction code density of each subregion obtained by the contour direction code space blurring unit 25 in neighbor subregions of, for example, 2 × 2 adjacent to the subregion, whereby an (8 × 8) number of contour direction code densities are spatially compressed into a (4 × 4) number of contour direction code densities. Specifically, contouring direction code density matrices G k (i, j) (i and j indicate subregions, k indicates the direction of each contour direction code, and, in the embodiment, 0 ≦ i and j ≦ 7, and 0 ≦ k ≦ 3) obtained by the contouring direction code space blurring unit 25 are converted into spatially compressed contour direction code density matrices A k (i, j) (0 ≦ i, j, and k ≦ 3), by using an average filter of 2 × 2. When using a mathematical expression, this can be indicated by (Ex. 3) as follows: [Ex. 3] A k (i, j) = G k (i, j) + G k (i+l, j) + G k (i+l, j) + G k (i+l, j+l) A collection of the thus obtained contour direction code density matrices A k (i, j) constitutes a contouring direction feature matrix which has 4 × 4 × 4, or 64 dimensions. Generally, a kanji has a complex shape and there are many characters similar to the kanji. In order to discriminate these kanjis from each other, therefore, a character image must be divided into subregions in a certain fine degree. As the number of subregions is larger, a feature matrix has a larger number of dimensions. When the dimension number of a feature matrix is increased, therefore, a recognition rate of kanjis or the like can be improved, but the period required for comparing an input character with the recognition dictionary 13 is usually prolonged and also the capacity of the recognition dictionary 13 is increased. Consequently, a character recognition apparatus requires a character feature amount in which a feature matrix has a small number of dimensions and which has an excellent recognition performance. In view of the above consideration, according to the embodiment, the contour direction code density weighted average unit 26 is added to the configuration of the contour direction feature extraction unit 12 of the second embodiment. A 64-dimensional feature matrix obtained by the embodiment has a lower recognition performance than that of a 256-dimensional feature matrix which is obtained by the contour direction feature extraction unit 12 described in conjunction with the first and second embodiments, with setting the region division number to be 8 × 8. Among feature matrices of the same dimension number or of 64 dimensions obtained with setting the region division number to be 4 × 4 and including those obtained in the prior art example, however, a 64-dimensional feature matrix obtained by the embodiment has the highest recognition performance because a contour direction feature matrix which is obtained by the second embodiment and in which a local positional variation and a slant variation of a character line are absorbed is further spatially compressed in an efficient manner by spatially and directionally blurring directional components of a character contour line in each local area. Finally results of the character recognition which were experimentally obtained in the character recognition apparatus using the contour direction feature extraction unit 12 of the third embodiment will be described. The experiment was conducted in the same manner as that of the first embodiment. For comparison, with setting the parameters M and N of the region division number for a character image to be 4 (M = 4, and N = 4), recognition experiments were conducted on the character recognition apparatuses of the prior art example, and the first and second embodiments (i.e., character recognition apparatuses using a 64-dimensional feature vector). As a result of the experiment, the embodiment attained a recognition rate of 87.2 %. The comparison experiments on the character recognition apparatuses of the prior art example, and the first and second embodiments show results of 85.1 %, 80.5 %, and 81.1 %, respectively. As seen from the above, although the embodiment is inferior in recognition performance than the character recognition apparatuses which use the contour direction feature extraction unit 12 of the first and second embodiments and a feature matrix of 256 dimensions (M = 8, and N = 8), the embodiment attained the highest recognition rate as compared with the comparison experiments on the prior art example, and the first and second embodiments in which a feature matrix of the same dimension number (64 dimensions) is used. As described above, in the character recognition apparatus of the invention, for each direction of each direction code, the contour direction code space blurring unit conducts a blurring process in a direction perpendicular to the direction of the direction code, on the character feature amount obtained as the density of directional components of a contour line of a character of each local region. As compared with a feature amount which is used in the prior art example and has not been subjected to the blurring process, therefore, the feature amount has a very small variation amount or is stable even when a character line is positionally deviated into a neighbor subregion by a local variation in position or thickness of the character line. Even when the recognition object is a character such as a hand-written kanji which has a complex structure and in which positions of character lines locally vary in a very large degree, therefore, the apparatus of the invention can attain a highly accurate and stable recognition performance. In the first to third embodiments described above, the region division number of a character image, the direction blurring process masks, and the weight coefficient of the filter for direction blurring are not restricted to those used in the embodiments, and may be set to be various values. In the embodiments described above, the density of frequency is used as information relating to the frequency. The invention is not restricted to this, and other kinds of information relating to the frequency may be used. Alternatively, the frequency may be used as it is. In the embodiments described above, the contour lines of four or eight directions are used. The invention is not restricted to this. In the embodiments described above, in order to obtain the directions of contour lines, 8 pixels adjacent to a contour point are used. It is a matter of course that the invention is not restricted to this and the range for obtaining the directions may be widened by, for example, adding adjacent pixels to the 8 pixels. In the embodiments described above, the processing units are configured by dedicated hardware. In place of the hardware, the same functions may be realized in a software manner by using a computer.

Claims: A character recognition apparatus comprising contour direction feature extraction means (12) for obtaining a contour direction feature matrix for detecting a character from an input character image, a recognition dictionary (13) for storing said contour direction feature matrices for all character of recognition objects, and character recognition means (14) for selecting a plurality of characters having a larger similarity as recognition candidate characters from said recognition dictionary (13) by comparing said contour direction feature matrix obtained from said contour direction feature extraction means (12) with said contour direction feature matrix stored in said recognition dictionary (13), characterized in that said contour direction feature extraction means (12) comprises contour direction code imparting means (15) for obtaining, for each of the contour points of said character image, contour direction codes, each representing one of at least four directions, which codes quantize the set of all possible directions and are obtained from a pattern of pixels adjacent to contour points of said character image, contour direction code frequency calculation means (16) for calculating a frequency of each of said obtained contour direction codes, for each of the subregions obtained by dividing said character image into M sections in horizontal direction and N sections in a vertical direction, and contour direction code space blurring means (18) for, on the basis of said obtained frequency, conducting, for each of said contour direction codes, a weighted addition on said frequency of said each subregion (A) by adding, with a predetermined weight coefficient, said frequencies of subregions (A) which are adjacent in a direction perpendicular to a direction of said contouring direction mode, thereby obtaining said contour direction feature matrix. A character recognition apparatus according to claim 1, wherein said contour direction feature extraction means (12) has contour direction code density calculation means (17) for calculating density of said contour direction, for each of said subregions obtained by said contour direction code frequency calculation means (16), by using said frequencies of each of the direction codes, and size of said respective subregion, wherein said contour direction code space blurring means (18) conducts, on the basis of said obtained density, for each of said contour direction codes, a weighted addition on said density of said each subregion (A) by adding, with a predetermined weight coefficient, said densities of subregions (A) which are adjacent in a direction perpendicular to a direction of said contour direction code, thereby obtaining said contour direction feature matrix. A character recognition apparatus according to claim 1 or 2, wherein said contour direction feature extraction means (12) has contour direction code imparting means (21) for determining a contour direction code for an input character image, wherein said contour direction code space blurring means (23) conduct, for each of said subregions obtained by said contour direction code frequency calculation means (22), a weighted addition by, with a predetermined weight coefficient, adding said contour direction code frequencies of L directions among K directions, K being at least 4 and said L being a predetermined number and less than said K, and said frequencies of said contour direction codes which are adjacent in direction to said respective contour direction code with said respective direction as a center, thereby compressing said frequencies of said contour direction codes of said K directions into said frequencies of said contour direction codes of said L directions, and said contour direction codes quantize the set of all possible directions and are obtained from a pattern of pixels adjacent to contour points of said character image. A character recognition apparatus according to claim 1, 2 or 3, wherein said apparatus further comprises contour direction code combining means for conducting, for each direction of the contour direction codes, a weighted average operation on frequencies or densities of adjacent subregions which are obtained by said contour direction code space blurring means, with each other, thereby spatially compressing frequencies or densities of an (M x N) number of contour direction codes into frequencies or densities of a (P x Q) number of contour direction codes (M > P, and N > Q).

Inventors: KOJIMA YOSHIHIRO, MARUNO SUSUMU, SHIMEKI YASUHARU, YAMAMOTO HIROSHI, KOJIMA, YOSHIHIRO, MARUNO, SUSUMU, SHIMEKI, YASUHARU, YAMAMOTO, HIROSHI
Applicants: MATSUSHITA ELECTRIC IND CO LTD, MATSUSHITA ELECTRIC INDUSTRIAL CO., LTD.
Application year: 1994
Main classification: G06K9
IPC codes: G06K9