CHARACTER PITCH DETECTING APPARATUS

Abstract: A character pitch detecting apparatus is provided for use in a character segmenting system, and more particularly a character pitch detecting apparatus for detecting whether a character block which is a group of substantially lined characters printed on a paper and including merged charac­ ters is of a variable-pitch type or a fixed-pitch type. The character pitch detecting apparatus comprises a scanner (1), a character memory (2), a character block extractor (3), a character block register (4), a controller (6), a frequency table memory (5), an adder (11), an average-height detector (7), a multiplier (10), a width-range register (12), a width detector (13), a constant register (16), a register (8), and a decision circuit (9), which detects whether the character pitch in the character arrays stored in the memory (2) is variable or fixed.

Description: CHARACTER PITCH DETECTING APPARATUS This invention relates to a character pitch detecting apparatus for use in a character segmenting system, and more particularly to a character pitch detecting apparatus for detecting whether a character block (which is a group of substantially aligned characters) printed on a paper and including merged characters is of a variable-pitch type or a fixed-pitch type. There has been proposed and used in practice an optical character recognition (OCR) system for recognizing characters such as alphabets, numerals and Katakana (Japanese character) which are machine-printed or hand-written. However, a scope of the characters to be recognized by the OCR system is expanded to mail articles and documents in which the characters are touching or partially merging with each other. For performing the character segmentation in the character block including the merged characters, it is first necessary to detect whether the character block is of variable-pitch type or fixed-pitch type. To detect whether the character block is of the variable-pitch type or the fixed-pitch type, there is a statistical method in which the character pitch is detected with reference to a frequency distribution of all widths of the character blocks including the merged characters. According to the statistical method, as a number of characters merged with each other is increased, an accuracy in the detection is deteriorated. It is, therefore, an object of this invention to provide a character pitch detecting apparatus capable of stably detecting a character pitch in various kinds of prined characters ha:ig unlhnown charcter pitches. According to this invention, there is provided a characterpitch detecting apparatus for use in a character segmenting system for scanning character arrays on a paper and for segmenting to individual charcters, comprising: means for producing a binary character image having white and black bits by scanning said character arrays; means responsive to said binary character image for extracting character blocks which are surrounded by said white bits; means responsive to said character blocks for generating height data and width data for said character blocks; means for storing frequency information with respect to said width data; means responsive to said height data for providing an average height data; means responsive to said average height data for providing a possible range of the character-block width in which one-character can be existed; means responsive to said frequency information stored in said storing means for providing upper and lower limit values in width of a character block which is most frequently appeared within said possible range; means for renewing said upper limit value in response to said frequency information stored in said storing means to provide upper and lower limit values with respect to one-character width class; and means responsive to said lower and upper limit values with respect to said one-character width class for detecting whether character pitch in said charcter block is variable or fixed. Other features and advantages of this invention will be apparent form the following description of preferred embodiments of this invention taken in conjunction with the accompanying drawings, wherein: Fig. 1 is a block diagram of a first embodiment of this invention; Fig. 2 is a block diagram of a second embodiment of this invention; and Fig. 3 is a block diagram of a decision circuit used in the second embodiment shown in Fig. 2. In the following description, signals on signal lines are represented by adding a symbol S at the end of reference numerals representative of the signal lines. Referring to Fig. 1, a scanner 1 optically scans a character array printed or hand-written on paper to produce an electric signal, which is converted to a binary character image and then written into a character memory 2. A character-block extractor 3 detects character images, i.e., character blocks which are surrounded by white (binary "0") bits in the stored binary character image in the memory2, and supplied to a character block register 4 characterblock data including biginning point, width and height thereof. The character block extracter 3 is disclosed in JP -A- 57/1 41 779. The width data of a plurality of character blocks stored in the charcter block register 4 are sequentially transferred to a controller 6. The controller 6 converts sequentially transferred width data to address for a frequency table memory 5 from which stored contents are read out and incremented by +1 in adder 11. The incremented contents are then stored at the same addresses in the frequency table memory 5. Thus, the frequency values of the character blocks having the width Vi are stored at the address Vi in the frequency table memory (The frequency table memory 5 has been reset to "0" at a start of the operation). The height data of the plurality of character blocks stored in the character block register 4 are sequentially transferred to an average-height detector 7. The average-height detector 7 calculates an average-value Hm in the height of the plurality of character blocks. The detector 7 may be of a circuit for producing as the average height the most frequently appeared height. The average height data Yam is supplied to a multiplier 10 which is also supplied with constants C1, C2 and C3 (C1 < C2, C3 < C2) from a constant register 15, and calculates values C1Hm, C2Hm and C3Hm. The values C1Hm- and C2Hm (C1Hm < C2Hm) are stored as lower limit and upper limit of a width range for a possible one-character in a one-character widthrange register 12, respectively. The value C3 is stored in a threshold value register 17. The values C1Em and C2 are supplied through the controller 6 to the frequency table memory 5, whereby the frequency values for the character widths within the width range from C1} to C2Hm are read out from the frequency table memory 5 and then supplied to a mostfrequently appeared width detector 13 which is also supplied with a constant eT from a constant register 16. The detector 13 counts the frequency values at a interval #T to detect the lower and upper limit values VL and Vu representative of the most-frequently appeared width range; where CnHm o VLE C2Hm -2eT ClHm +a TC Vut- C2Hm VU - VL =6T. The lower and upper limit values VL and Vu, and the frequency value Ns counted within the interval are supplied to a one-character initial class register 14 in a one-character class register 8. The register 8 renews the upper limit value VU in response to the frequency information stored in the memory 5 to provide a onecharacter width section, i.e., upper value and lower value of the width of the one-character. The register 8 comprises the onecharacter initial class register 81, a counter 82, a frequency value register 83, a zero detector 84, a subtractor 85, a comparator 86 and an OR-circuit 87. The upper limit value VU stored in the register 81 is set in the counter 82 and counted up by +1. The frequency value corresponding to the width of the character block which is the content of the counter 82 is read out from the table memory 5 by the controller 6 and stored in the frequency value register 83. The zero detector 84 detects whether the content of the register 83 is zero or not. When zero is detected, an output signal 841S on a signal line 841 becomes to binary "1", which is supplied through the OR-circuit 87 to the counter 82, whereby the content of the counter 82 is counted up by +1. When the content of the zero detector 84 is not zero, the upper limit value of the character block width, which is the content of the register 81, and the content of the counter 82 are transferred to the subtractor 85 by the operation of the controller 6. The subtractor 85 subtracts the upper limit value in the register 81 from the content of the counter 82. The subtracted value is transferred to the comparator 86 and compared with the content of the threshold register 17. When the content of the register 17 is greater than the subtracted value form the comparator 85, an output signal 861S on a signal line 861 becomes to binary "lot, whereby the upper limit value stored in the register 81 is renewed and the content of the counter 82 is counted up by +1 by the operation of the controller 6. When the content of the register 17 is less than or equal to the subtracted value, the lower limit value stored in the register 81 and the upper limit value renewed in the above-mentioned manner are transferred to the one-character width class register 18. A decision circuit 9 detects whether the character pitch in the character arrays stored in the memory 2 is variable or fixed. A subtractor 91 subracts the lower limit value from the upper limit value and supplies the resulted value to the comparator 93, which is also supplied with a predetermined threshold value from a register 92. The threshold value in the register 92 may be determined depending upon the average height detected by the average height detector 7 as in the register 17. When the threshold value from the register 92 is greater than the output value from the subtractor 91, the comparator 93 produces an output signal 9315 of binary nl't representative of the fixed pitch. When the threshold value is less than or equal to the output value from the subtractor 91, the comparator 93 produces an output signal 931S of binary "0" representative of the variable pitch. Referring to Fig. 2, the second embodiment is identical to the first embodiment except that the first embodiment conprises the one character width class detector 8 and the decision circuit 9, while the second embodiment comprises a one-character width class detector 80 and a decision circuit 90. The detector 80 comprises a one-character initial class register 800, an upper limit value register 810, a counter 820, a frequency value register 830, a zero detector 840, a subtractor 850, a comparator 960, the threshold register 17, an increased frequency register 880, an adder 890 and an OR-circuit 870. The register 800 is identical to the register 81 in the first embodiment. The upper limit value stored in the register 800 is transferred to the upper limit value register 810. The upper limit value stored in the register 810 is set in the counter 820 and counted up by +1. The frequency value corresponding to the width of the character block which is the content of the counter 820 is read out from the table memory 5 by the controller 6 and stored in the frequency value register 830. The zero detector 840 detects whether the content of the register 830 is zero or not. When zero is detected, an output signal 8410S on a signal line 8410 becomes to binary "1", which is supplied through the OR-circuit 870 to the counter 820, whereby the content of the counter 820 is counted up by +1. When the content of the zero detector 840 is not zero, the upper limit value of the character block width, which is the content of the register 810, and the content of the counter 820 is transferred to the subtractor 850 by the operation of the controller 6. Further, the content of the frequency register 830 is transferred to the adder 890, in which the contents in the registers 830 and 880 are added to each other to produce an increased frequency value which is stored in the register 880 (The register 880 has been reset to "0" at a start of the operation). The subtractor 850 subtracts the upper limit value in the register 810 from the content of the counter 820 to produce the subtracted value, which is transferred to the comparator 860, and compared with the content of the threshold register 17. When the content of the register 17 is greater than the subtracted value from the comparator 850, an output signal 86105 ona signal line 8610 becomes to binary "1", whereby the upper limit value stored in the register 810 is renewed and the content of the counter 820 is counted up by +1 by the operation of the controller 6. When the content of the register 17 is less than or equal to the subtracted value, the lower limit value stored in the register 800, the content of the register 810 and the content of the register 880 are transferred to the dicision circuit 90. The decision circuit 90 produces a decision function in response to the upper and lower limit values Vu and VL and the frequency value N5 (which are the contents of the register 800), the upper limit value VCU for the one-character width class (which is the content of the register 810), and the frequency value incremental component dNS from the frequency value NS (which is the content of the register 880), and then decides whether it is the variable-pitch type or the fixed-pitch type in response to the decision function. instead of using the incremental component tNs, the sum of the frequency value NS and the incremental componentN3. Referring to Fig. 3, a subtractor 930 subtracts the lower value VL from the upper limit value Vu supplied from the register 800 to produce a difference (Vu - VL), which is transferred to a divider 960. A subtracter 940 subtracts the lower value VL supplied from the register 800 from the upper limit value VCU for the one-character width class supplied from the register 810 to produce a difference (VCU - VL), which is transferred to the divider 960. The divider 960 divides the difference (VCU - VL) supplied from the subtracter 940 by the difference (VU - VL) supplied from the subtracter 930 to produce a value (VCU - VL)/(VU - VL), which is transferred to a multiplier 970. The value (VCU - VL)/(VU - VL) represents a ratio of. increment of the width of the character block. In case where the variation in width of the character block is great as in case of the variablepitch type, the value VCU is sufficiently greater than the value Vu, whereby the value (Vcu - VL)/(VU - VL) is greater than that in case of the fixed-pitch type. A divider 910 divides the frequency value incremental componentNs by the frequency value N5 to produce a value aNs/Ns, which is transferred to the multiplier 970. The value ANS/NS in the variable-pitch type is greater than that in case of the fixed-pitch type. The multiplier 970 produces the output value hNs/Ns (Vcu VL)/(VU VL), which is transferred to a comparator 980. The comparator 980 compares the output value from the multiplier 970 with the content of a threshold register 970. When the content of the register 920 is greater than the output value from the multiplier 970, an output signal 9810S on a signal line 9810 becomes binary "O" representative of the variable-pitch type. When it is less than or equal to the output value, the output signal 98103 becomes binary "1" representative of the fixed-pitch-type,

Claims: WHAT IS CLAIMED IS: 1. A character-pitch detecting apparatus for use in a character segmenting system for scanning character arrays on a paper and for segmenting to individual charcters, comprising: means for producing a binary character image having white and black bits by scanning said character arrays; means responsive to said binary character image for extracting character blocks which are surrounded by said white bits; means responsive to said character blocks for generating height data and width data for said character blocks; means for storing frequency information with respect to said width data; means responsive to said height data for providing an average height data; means responsive to said average height data for providing a a possible range of the character-block width in which/one-cnaracter can exist; ; means responsive to said frequency information stored in said storing means for providing upper and lower limit values in width of has a character block which / most frequently appeared within said possible range; means for renewing said upper limit value in response to said frequency information stored in said storing means to provide upper and lower limit values with respect to one-character width class; and means responsive to said lower and upper limit values with respect to said one-character width class for detecting whether character pitch in said charcter block is variable or fixed.

Inventors: TSUJI, YOSHITAKE C/O NEC CORPORATION
Applicants: NEC CORPORATION
Application year: 1983
Main classification: G06K9
IPC codes: G06K9