Character pitch detector apparatus and method for optical character reader systems

Abstract: The present character pitch detector apparatus and method detects a plurality of character lumps from series of character string images. Then the distance between character lumps is calculated and a frequency distribution of said distance between character lumps is stored. Further a presence section of the candidate character pitches is forecasted by means of the mean height of said character lumps and said frequency distribution is divided into a plurality of errors by means of said candidate character pitch included in said presence section. By calculating a character pitch estimation error and an estimation error appreciation standard constituted of an optimum linear sum of said character pitch estimation error and further selecting a candidate character pitch minimizing said estimation error appreciation standard an optimum character pitch is selected.

Description: The present invention relates to optical character reader systems. More particularly, it is concerned with a character pitch detector apparatus for detecting a character pitch of a series of character string images given on paper. In order to recognize a series of printed characters, the optical character reader systems are required to separate the characters one by one. Further, the optical character reader systems are desirable to manage printed characters of many font types and poor print quality which are printed on general mails and documents. In a character string printed on general documents, there is a case where the characters to be separated touch each other, or one character is separated into more than one images due to the poor print quality. Further, in the case of alphabet, each character width varies according to a variance in the font or character category. Therefore, a sectioning apparatus is necessary, which can properly section the character string into individual characters under the above-mentioned conditions. This type of sectioning apparatus has been proposed in U.S. Patent No. 3,629,826. The proposed sectioning apparatus scans a character image vertically and sets a character segmentation position by detecting a position where a vertical scan bit is minimized. Besides, in order to segment the touching characters, this apparatus stores many touching images for every characters in advance, and a segmentation position is determined by comparing the touching character image with the stored touching images. That is, this apparatus performs the character segmentation referring to the local images of the character string. However, such sectioning apparatus cannot properly segment the character splited into two or more images as one character. Additionally, this apparatus requires a vast memory capacity for storing many touching images of every characters touching other characters. Furthermore, a special function for character segmentation in accordance with an individual case may invite a considerable deterioration in precision and speed of the character segmentation. Besides, this type of sectioning apparatus can use a character pitch as information for segmenting a character string. The character pitch can be given to the sectioning apparatus as known information by limiting printed matters to be read by an optical character reader. However, since characters printed or written on a general document have an unspecified character pitch as described above, the character pitch cannot be known beforehand. Accordingly, the character pitch must be estimated from a character string image on the paper. Heretofore, a mean value of character widths of various characters is used as estimated value for the character pitch. However, in the case that an individual character width largely varies according to a font or a character category, or touching characters increase in number, an error between the mean value of character widths and an actual character pitch can no more be negligible. Due to the error, the sectioning apparatus mistakes the number of touching characters or cuts off the character string at an incorrect position for segmentation. Further, as described above, the optical character reader is desired to manage both the characters printed at constant pitch and printed at variable pitch including hand-written characters. In such a case, the sectioning apparatus must change the algorithm for character segmentation according to the constant pitch-printed characters and the variable pitch-printed characters. Therefore, it is also important to identify whether the pitch of the obtained character data is constant or variable before performing segmentation of character string. Therefore, an object of the present invention is to provide a character pitch detector apparatus capable of detecting a character pitch of a series of character string images with precision even in the case that the character string includes touching characters, or one character is splited into two or more images. Another object of the present invention is to provide a novel character pitch detecting method. Still further object of the present invention is to provide an apparatus capable of identifying whether an obtained character data has a constant pitch or variable pitch. The above objects are achieved by an apparatus and method as defined in the claims. The above-mentioned and other objects, features and advantage of the present invention will be better understood from the following detailed description of preferred embodiments of the present invention taken in conjunction with the accompanying drawings, wherein; Figs. 1 (a) to 1 (e) illustrate character segmentation candidate positions set on a character string image. Figs. 2 (a) and 2 (b) illustrate trailing end positions set on the character string image. Fig. 3 illustrates a principle for extracting optimal character segmentation positions from a plurality of character segmentation candidate positions. Fig. 4 is a block diagram of a sectioning apparatus. Fig. 5 is a block diagram of the appreciation standard arithmetic operation unit shown in Fig. 4. Fig. 6 illustrates a distance between character lumps set on the character string image. Fig. 7 illustrates one example of a frequency distribution of the distance between character lumps obtained from a series of character string image. Figs. 8 (a) and 8 (b) illustrate one example of a frequency distribution of the distance between character lumps having a constant character pitch and a variable character pitch, respectively. Fig. 9 is a block diagram of the character pitch detection unit shown in Fig. 4. Fig. 1 (a) shows a character string image including touching characters and one character splited into two images in oblique lines. A character pitch P may be obtained by a character pitch detector described hereinafter, but if it is known already, then the known value can be used. A projection distribution shown in Fig. 1 (b) is obtained through projecting vertically the character string image of Fig. 1 (a). In order to separate the touching characters (a m u) and the split character (h) into a correct unit of individual character, a segmenting start position of the character must be predicted correctly. For example, in the touching character images "a" and "m", "a" is slightly smaller. Therefore, the segmenting start position should be set slightly leftward from a leading end of the touching character images (a m u). First of all, positions and sizes of a white area (hereinafter called a blank space) and a black area (hereinafter called a character lump) are extracted from the projection distribution shown in Fig. 1 (b). A plurality of character lump width Vi (i = 1, .... 4), blank space Wi (i = 0, .... 4) and position information thereof are obtained from the projection distribution, as shown in Fig. 1 (c). Next, sections for setting the character segmentation positions (hereinafter called permissible section) are set by means of the character pitch P and preset thresholds T₁ and T₂ under following conditions (1) and (2). Condition (1) A section of the blank spaces is set as the permissible section. Condition (2) A section of the character lumps whose width Vi satisfy Vi > P + T₁, and which is excepted the section T₂ at both end of the width Vi is set as the permissible section. The permissible section satisfying the above conditions (1) and (2) comes in, as shown in Fig. 1 (d), sections A₀, A₁, A₂, A₃, A₄ and A₅. Here, the above thresholds T₁ and T₂ may be given as functions of the character pitch P. Moreover, the threshold T₁ may be set according to an estimate error arising from estimating the character pitch P as described later. Next, segmentation candidate sections k (k ≧ 0) shown in Fig. 1 (e) are set in the permissible sections A₁, A₂, A₃, A₄ and A₅ by using the character pitch P and preset threshold T₃. Referring to Fig. 1 (e), first scan bits W₀' (indicated by white dots) are set in the blank space W₀. Next, a section k'=0 in which a distance from the arbitrary scan bit W₀' satisfies(P±T₃)is set. Next, the section included both the permissible section A₁ and the section k'=0 is set as the segmentation candidate section k=0. In the embodiment, only one scan bit (indicated by a blank dot) exists in the first segmentation candidate section k=0. The scan bit indicated by a black dot is called a segmentation candidate position hereinafter, which is expressed as x(k, i k ). Here, i k is an integer starting from 1, which is a relative number in the segmentation candidate section k. That is, the first segmentation candidate position x(0, 1) is detected in this stage. Next, a section k'=1 in which the distance from the segmentation candidate position x(0, 1) is within(P±T₃) is set, and the section included both the permissible section A₃ and the section k'=1 is set as a segmentation candidate section k=1. The segmentation candidate section k=1 includes two segmentation candidate positions x(1, 1) and x(1, 2). Then, the section in which the distance from a segmentation candidate position x(1, i₁) is(P±T₃), namely, the section from x(1, 1)+P-T₃ to x(1, 2)+P+T₃ is set as a section k'=2. All the section k'=2 is included in the permissible section A₄, therefore, the segmentation candidate section k=2 is identical with the section k'=2. The segmentation candidate section k=2 includes four segmentation candidate positions x(2, 1), x(2, 2), x(2, 3) and x(2, 4). A section k'=3 is then set according to the segmentation candidate section k=2 likewise, and a segmentation candidate section k=3 and a segmentation candidate position x(3, i₃) (i₃ = 1, 2, 3, 4, 5, 6) are set by a logical product with the permissible section A₄. A segmentation candidate section k=4 and a segmentation candidate position x(4, i₄) (i₄ = 1, 2, 3, 4) are set according to the segmentation candidate section k=3. Then, a segmentation candidate position x(4, 1) is created by a logical product of a section k'=4 and the permissible section A₄, and positions x(4, 2) x(4, 3) and x(4, 4) are created by a logical product of the section k'=4 and the permissible section A₅. As will be apparent from the above description, if the distance {x(k+1, i k+1 ) - x(k, i k )} between segmentation candidate positions x(k, i k ) and x(k+1, i k+1 ) be expressed as d(k, k+1; i k , i k+1 ), all the segmentation candidate positions x(k, i k ) and x(k+1, i k+1 ) within the adjacent segmentation candidate sections k and k+1 will satisfy the following formula: |d(k, k+1; i k , i k+1 ) - P | ≦ T₃ For example, the distance d(1,2; 1,2) between the segmentation candidate positions x(1, 1) and x(2, 2) satisfies the following formula: |d(1, 2; 1, 2) - P| ≦ T₃ In other words, the position satisfying the formula (1) with respect to the segmentation candidate position x(0, 1) are three points as indicated by white dots (the section k'=1 of Fig. 1 (e)). However, in these white dots, the white dots existing within the permissible section A₃ are two, and a segmentation candidate position x(1, i k ) is obtainable as two positions x(1, 1) and x(1, 2). Here, the above-described threshold T₃ can be given as a function of the character pitch P like the threshold T₁. Further, the segmentation candidate section k can also be set under another condition by means of the character pitch P, the character lump width Vi, and the blank space Wi. A method for detecting a trailing end of the character string image will be described hereinafter. As will be described later, the trailing end detection is necessary for determining a segmentation position of the character string. Referring to Figs. 2 (a) and 2 (b), the character image is disintegrated into the character lump Vi and the blank space Wi. Each blank space Wi is compared with the product T₄·P, i.e., the product of a preset parameter T₄ and the character pitch P. In the blank spaces W i , a blank space W j greater than the product T₄·P is set as a first trailing end candidate section. Next, the product T₅·P, i.e., the product of a preset parameter T₅ (T₅ ≦ T₄) and the character pitch P is calculated. The section from a leading end of trailing end candidate section W j to the position determined by the product T₅·P is set as a first trailing end permissible section. Next, the section from a leading end of a character lump V j present immediately before the candidate section W j to the position determined by the sum P+T₁ (the sum of the character pitch P and the parameter T₁) is set as a second trailing end permissible section. Further, a logical sum of the first and second trailing end permissible sections T₅·P and P+T₁ is set as a second trailing end candidate section Q. A trailing end section E is determined by working out the logical product of the first candidate section W j and the second candidate section Q. That is, in Fig. 2 (a), the trailing end section E is equal to the section T₅·P, and in Fig. 2 (b), the trailing end section E is equal to the section W j . A trailing end section E of the character image shown in Fig. 1 (a), which is obtained through the similar method, becomes the section indicated by an arrow E shown in Fig. 1 (e). The trailing end section E of the Fig. 1 (e) includes the segmentation candidate positions x(4, 2), x(4, 3) and x(4, 4). The trailing end section can be set in other manner. For example, the blank space of a trailing end of the character line may be set as a trailing end section. Further, when a segmentation candidate section (k+1) is set by using of the segmentation candidate section k, and if the segmentation candidate position x(k+1, i k+1 ) satisfying the formula (1) is not in a permissible section A i , then the segmentation candidate section k may be set as the trailing end section. On the other hand, the leading end of the segmentation candidate section can be set according to the position of the trailing end section which has already detected. Next, a process for determining the character segmenting position will be described hereinafter. In Fig. 3, positions indicated by a black dot represent each segmentation candidate position x(k, i k ) shown in Fig. 1 (e) with the scan pitch given at 1 and the position x(0, 1) working as an origin. The character pitch P is set at "20". Further, for simplicity of describing a principle of the character segmentation, the character string image for segmentation shall cover from the segmentation candidate section k=0 to the segmentation candidate section k=4 as shown in Fig. 1 (e). First, symbols to be used for the description will be defined: A symbol µ d (r, n; i r , i n ) (0 ≦ r < n) denotes a mean value of (n - r) pieces of distances d(r, r+1; i r , i r+1 ), d(r+1, r+2; i r+1 , i r+2 ), ...., d(n-1, n; i n-1 , i n ) obtained through (n - r + 1) pieces of segmentation candidate positions x(r, i r ), x(r+1, i r+1 ), ...., x(n, i n ). The positions x(r, i r ), x(r+1, i r+1 ), ...., x(n, i n ) are selected arbitrarily in each segmentation candidate section from k=r to k=n. A symbol σ 2 / d(r, n; i r , i n ) (0≦r<n) denotes a variance in the mean value µ d (r, n; i r , i n ) of (n - r) pieces of distances d(r, r+1; i r , i r+1 ), d(r+1, r+2, i r+1 , i r+2 ), .... d(n-1, n; i n-1 , i n ). Character segmenting positions from the segmentation candidate section r (r = 0 in Fig. 3) working as a leading end to the segmentation candidate section n (n = 4 in Fig. 3) working as a trailing end are obtained by determing segmentation candidate positions x(r, i r ), x(r+1, i r+1 ), ...., x(n, i n ) whereat an appreciation standard U indicated following formula (2) is minimized. U(r, n) = β·σ 2 d (r, n; i r , i n ) + (1-β)·(µ d (r, n; i r , i n )-P)² The weighting factor β in the formula (2) satisfies 0 ≦ β ≦ 1. The segmentation candidate position for minimizing the formula (2) can be determined according to the following dynamic programming. An optimum segmentation candidate position x(k, i k ) in the segmentation candidate section k is obtained according to the following recurrence formulas (3-1), (3-2) and (3-3). Arbitrary segmentation candidate positions x(k, i k ) (i k = i, 2, .... h k ) and segmentation candidate positions x(k+1, i k+1 ) (i k+1 = 1, 2, .... h k+1 ) are used in these formulas. That is, a distance d(k, k+1; i k , i k+1 ) is calculated first, and then the following formulas (3-1), (3-2) and (3-3) are calculated. µ d (0, k+1; i₀, i k+1 ) = 1 k+1 {k·µ * d (0, k; i₀, i k ) + d(k, k+1; i k ·i k+1 )} D(k+1) = D*(k) + d²(k, k+1; i k , i k+1 ) U(0, k+1) = β·( D(k+1) k+1 -µ 2 d (0, k+1; i₀, i k+1 )) + (1-β) (µ d (0, k+1; i₀, i k+1 ) - p)² The segmentation candidate position x*(k, i k ) minimizing the appreciation standard U(0, k+1) of the formula (3-3) becomes an optimum segmentation candidate position to the arbitrary segmentation candidate position x(k+1, i k+1 ) of the segmentation candidate section (k+1) in h k pieces of segmentation candidate positions x(k, 1), .... x(k, h k ) of the segmentation candidate section k. Here, with reference to each segmentation candidate position x(0, i₀) (i₀ = 1 in Fig. 3) of the segmentation candidate section k=0 working as a leading end, the optimum mean value µ * / d(0, 0; i₀, i₀) indicated in the formula (3-1) is zeroised, and a square cumulative sum D*(0) of the optimum distance d(-1, 0; i₋₁, i₀) indicated in the formula (3-2) is zeroised. An optimum segmentation candidate position x(k; i k ) of the segmentation candidate section k in each segmentation candidate position x(k+1, i k+1 ) of the next segmentation candidate section (k+1) can be obtained by storing an optimum mean value µ * / d(0, 1; i k , i₀) and a square cumulative sum D*(k-1, k) of the optimum distance d(k-1, k; i k-1 , i k ) at each segmentation candidate position x(k, i k ) of the segmentation candidate section k. Here, the first term of the formula (3-3) represents another method for expressing the variance σ 2 / d (0, k+1; i₀, i k+1 ) shown in the formula (2). Next, a calculating process of the formulas (3-1) and (3-3) is described referring to Fig. 3. In the drawing, R(µ, U) represents the mean value µ * / d(0, 1; i₀, i k ) and the appreciation standard U(0, k) shown in the recurrence formulas (3-1) and (3-3) in each segmentation candidate position x(k, i k ) of each segmentation candidate section k (k = 0, 1, 2, 3, 4). These are so calculated as optimum values from the segmentation candidate position x*(k-1, i k-1 ). Then, in this embodiment, the weighting factor β in the formula (3-3) is specified at 0.5. Further, in Fig. 3, arrows indicate a sequence of the optimum segmentation candidate positions. For example, the segmentation candidate position x(2, 1) exists a position 39, and a distance d(1, 2;, 1, 1) from the segmentation candidate position x(1, 1) is 19. Accordingly, a mean value µ d (0, 2) from the segmentation candidate position x(0, 1) to the segmentation candidate position x(2, 1) passing through the segmentation candidate position x(1, 1) is 1/2·(1·20+19) = 19.5. D*(1) = 20² indicated in the formula (3-2) is stored correspondingly to the segmentation candidate position x(1, 1). Therefore, D(2) = 20² + 19² according to the expression (3-2). Now, substituting these values in the formula (3-3), the appreciation standard U(0, 2) at the segmentation candidate position x(2, 1) in a path through the segmentation candidate position x(1, 1) is U(0, 2) = 0.5( 20²+19² 2 - 19.5²) + 0.5·(19.5-20)² = 0.38 . Similarly, an appreciation standard U'(0, 2) at the segmentation candidate position x(2, 1) in a path through the segmentation candidate position x(1, 2), is 1.26. The start point of the path of the path toward the segmentation candidate position x(2, 1), namely the segmentation candidate positions x(1, 1) or x(1, 2) is selected such that the appreciation standards U takes a minimum value. Accordingly, an optimum segmentation candidate position of the segmentation candidate section k=1 toward the segmentation candidate position x(2, 1) is x(1, 1) because U(0, 2) is smaller than U'(0, 2). Further, the mean value µ * / d(0, 2) = 19.5 and the appreciation standard U(0, 2) = 0.38 are selected. Thus, an appreciation standard U(0, k) (k = 0, 1, 2, 3, 4) at each segmentation candidate position x(k, i k ) (k = 0, 1, 2, 3, 4) will be calculated, as shown in Fig. 3, by carrying out the similar operation according to the recurrence formulas (3-1), (3-2) and (3-3). As described previously, the trailing end section E includes the segmentation candidate positions x(4, 2), x(4, 3) and x(4, 4) of the segmentation candidate section k=4. One of the segmentation candidate positions x(4, 2), x(4, 3) and x(4, 4) whose appreciation standard U(0, 4) is minimum is selected as an end position of the character segmentation. Accordingly, the position x(4, 2) is selected as the end position because its appreciation standard is 20.3 while others are 20.5 and 20.8. Finally, x(4, 2) = 81, x(3, 3) = 60, x(2, 2) = 40, x(1, 1) = 20, x(0, 1) = 0 are selected as segmenting positions by tracing the path of optimum segmentation candidate positions reversely from the character segmentation end position x(4, 2). Namely, positions 0, 20, 40, 60 and 81 are determined as sectioning positions. A logical block for the above processing is shown in Fig. 4. A scanner 1 scans a character string image printed on a sheet of paper optically and transforms it into an electrical signal. The character string image is binary-quantized and stored in a character string image memory 2. A character lump extraction unit 3 extracts character lumps of the character string image out of the character string image memory 2 in sequence and stores position, width and height of each character lump Vi to a character lump information register 21. Such character lump extraction unit 3 can be realized according to a known technique. A character pitch detector 4 estimates the character pitch P by means of position, width and height of each character lump Vi stored in the character lump information register 21. The estimated character pitch is stored to a character pitch information register 22. The character pitch detector 4 will be described in detail hereinafter. Here, the character pitch is already known, the known character pitch P may be used. A parameter information register 30 stored parameters T₁, T₂, T₃, T₄, T₅, β which are various thresholds and weighting factor as described hereinbefore. A permissible section extraction unit 5 extracts the permissible sections Ai satisfying the above-described condition (1) and condition (2). The positions and height of the section Wi are extracted by a comparator or others referring to the position and width Vi of a plurality of character lumps stored in the character lump information register 21. Next, each character lump width Vi is compared with the sum P+T₁ of the character pitch P stored in the character pitch information register 22 and the parameter T₁ stored in the parameter information register 30. If the width Vi is larger than the sum P+T₁, a value T₂ stored in the parameter information register 30 is excepted from both ends of the character lump width Vi, and the permissible section satisfying the condition (2) is extracted. The position and width of the permissible sections Ai are stored in a permissible section information register 23. A trailing end candidate section extraction unit 6 calculates the product T₄·P of the parameter T₄ stored in the parameter information register 30 and the character pitch P. Then, the unit 6 compares the product T₄·P with the blank space Wi stored in the permissible section register 23. The blank space W j having a width larger than the product T₄·P is thus detected as a first trailing end candidate section. Next, the extraction unit 6 calculates the product T₅·P of the parameter T₅ and the character pitch P, and sets the section from a leading end of the blank space W j to the position determined by the product T₅·P as a permissible section. Further, the sum P+T₁ of the character pitch P and the parameter T₁ is calculated, and the permissible section from a leading end of the character lump V j immediately before the bank space W j to the sum P+T₁ is set. The two permissible sections are subjected to a logical sum and stored in sequence in a trailing end candidate section register 24 as a second trailing end candidate section. A segmentation candidate section extraction unit 7 extracts each segmentation candidate position x(k, i k ) of the segmentation candidate section k in sequence with reference to the permissible sections Ai and parameters stored in the permissible section information register 23 and the parameter information register 30 respectively. At this time, a control unit 10 has obtained each segmentation candidate position x(0, i₀) (i₀ = 1, 2, .... h₀) of the leading end segmentation candidate section k=0 including a character segmentation start position. These positions x(0, i₀) are calculated based on each segmentation candidate position in a constant range of blank space W₀'. The blank space W₀' is set according to the character pitch P from a leading end of the character string image. The segmentation candidate positions x(0, i₀) are stored to an optimum segmentation position information register 26. A segmentation candidate section extraction unit 7 calculates a segmentation candidate position x(k+1, i k+1 ) satisfying the expression (1). In this calculation, the segmentation candidate positions x(k, i k ) (i k = 1, 2, .... h k ) of the segmentation candidate section k (k = 0, 1, 2, ....) are read from the optimum segmentation candidate position register 26. That is, a position (x(k, 1) + P - T₃) is calculated using the first segmentation candidate position x(k, 1) of the segmentation candidate section k, the character pitch P and the parameter T₃. Next, a position (x(k, h k ) + P + T₃) is calculated using the last segmentation candidate position x(k, h k ) of the segmentation candidate section k, the character pitch P and the parameter T₃. The scan bits included in a section k' from the position (x(k, 1) + P - T₃) to (x(k, h k ) + P + T₃) are subjected to a logical product with the permissible section Ai. All the segmentation candidate positions x(k+1, i k+1 ) (i k+1 = 1, 2, .... h k+1 ) of the segmentation candidate section (k+1) is thus extracted and stored in a segmentation candidate position information register 25. Contents of the segmentation candidate position information register 25 are transferred to an appreciation standard arithmetic operation unit 8. When the segmentation candidate position x(k+1, i k+1 ) are transferred to the arithmetic operation unit 8, the segmentation candidate positions x(0, i₀) (i₀ = 1, .... h₀), x(1, i₁) (i i = 1, .... h₁), .... x(k, i k ) (i k = 1, .... h k ) which belong to the segmentation candidate section k=0 to k has already computed and are stored in the optimum segmentation position information register 26. Further, the mean value µ * / d(0, k; i₀, i k ) calculated by the appreciation standard arithmetic operation unit 8 according to the formula (3-1), the square cumulative sum D*(k) of a distance calculated according to the formula (3-2), and the appreciation standard U(0, k) and the optimum segmentation candidate position x*(k-1, i k-1 ) of the segmentation candidate section k-1 calculated according to the formula (3-3) has already stored in the register 26. These data are stored at the area correspondingly to each segmentation candidate position x(k, i k ) (i k = 1, .... h k ). Then, when the segmentation candidate positions x(0, i₀) of the segmentation candidate section k=0 are stored in the register 25, 0 is loaded therein as the mean value µ * / d(0, 0; i₀, i₀) and the square cumulative sum D*(0) corresponding to each segmentation candidate position x(0, i₀). When the segmentation candidate position x*(k+1, i k+1 ) is transferred from the segmentation candidate position information register 25, the appreciation standard arithmetic operation unit 8 calculates the distance d*(k, k+1; i k , i k+1 ) for each segmentation candidate position x(k, i k ) (i k = 1, 2, .... h k ) of the segmentation candidate section k at first. Next, h k pieces of the appreciation standard U(0, k+1) relating to the segmentation candidate positions x(k, i k ) of the segmentation candidate section k are obtained through calculating the recurrence formulas (3-1), (3-2) and (3-3) in sequence. At this time, the mean value µ * / d(0, 1; i₀, i k ), square cumulative sum D*(k) of the distance and parameter β stored in the parameter information register 30 are referred. Then, the minimum value of the appreciation standard U*(0, k+1) is defected, and the segmentation candidate position x*(k, i k ) corresponding to the minimum standard U*(0, k+1) is selected as an optimum segmentation candidate position. The optimum segmentation candidate x*(k, i k ) is a precedent point reaching to the segmentation candidate position x(k+1, i * / k+1). Further, minimum value of the appreciation standard U(0, k+1), mean value µ * / d(0, k+1, i₀, i * / k+1) whereat the appreciation standard U(0, k+1) is minimized in value, and square cumulative sum D*(k+1) of the distance are stored to the optimum segmentation position information register 26 together with the segmentation candidate position x*(k+1, i k+1 ). The appreciation standard arithmetic operation unit 8 performs the above-described operation for all the segmentation candidate positions x(k+1, i k+1 ). Next, the control unit 10 instructs the segmentation candidate section extraction unit 6 for extraction of the segmentation candidate positions x(k+2, i k+2 ) of the next segmentation candidate section k+2. Thus, the same operation to the above-described is repeated. The control unit 10 then checks whether or not the segmentation candidate position x(k+1, i k+1 ) of the segmentation candidate section (k+1) transferred to the optimum segmentation position information register 26 has reached the trailing end candidate section. The information of the trailing end candidate section is stored in the trailing end candidate section register 24. If not, then only an instruction on processing to the next segmentation candidate section is outputted to the segmentation candidate section extraction unit 6. On the other hand, in case the segmentation candidate position x(k+1, i k+1 ) has reached the trailing end candidate section, the control part 10 outputs the above instruction to the segmentation candidate section extraction part 6, and ensures that each segmentation candidate position x(k+2, i k+2 ) (i k+2 = 1, .... h k+2 ) of the next segmentation candidate section k+2 is appreciated by the appreciation standard arithmetic operation unit 8. Next, the control unit 10 detects the segmentation candidate positions x(e, i e ) included in the trailing end candidate section E. Then, the control unit 10 calculates a plurality of the appreciation standard U(0, n) relating to h e pieces of the segmentation candidate positions x(e, i e ). The minimum appreciation standard U*(0, n) is detected, and the segmentation candidate position x*(e, i e ) corresponding to the appreciation standard U*(0, n) is selected as a trailing end position. The control unit 10 further detects a sequence of optimum segmentation candidate positions reaching the segmentation candidate position x*(n, i n ). This detection is carried out referring to the optimum segmentation position information register 26. That is, the sequence of the optimum segmenting position is selected by tracing the optimum path reversely from the trailing end position x*(n, i n ) to the segmentation candidate positions x*(n-1, i n-1 ), .... x*(0, i₀) in sequence. The segmenting positions thus detected, are stored in a character segmenting position register 27. Next, the control unit 10 detects a constant range set according to the character pitch P within the blank space from the trailing end position x*(n, i n ) to a leading end of the next character lump. This constant range set as a leading end of the fragmentary character string image to be segmented next. The position of the leading end is stored to the optimum segmenting position information register 26. Thus, character segmenting positions of the character string image (Fig. 1 (a)) are stored to the character segmenting position register 27. The character string image is segmented per character by means of the height of each character lump stored in the character lump information register 21 and the character segmenting position stored in the character segmenting position register 27. Segmented characters are read by a known character recognition system. The appreciation standard arithmetic operation unit 8 will now be described in detail with reference to Fig. 5. When the segmentation candidate positions x(k+1, i k+1 ) of the segmentation candidate section k+1 are stored in the segmentation candidate position information register 25, the segmentation candidate positions x(k+1, i k+1 ) is transferred to a distance calculation unit 81 and a segmentation candidate position group register 261 at appropriate positions. The segmentation candidate section (k+1) is stored in a stage register 80 and the segmentation candidate position group register 261 at predetermined positions. When the segmentation candidate positions x(k+1, i k+1 ) are stored in the distance calculation part 81, the segmentation candidate positions x(k, i k ) stored in the segmentation candidate position group register 261 are transferred by the control unit 10 in sequence to the distance calculation unit 81. The optimum segmentation position information register 26 comprises the segmentation candidate position group register 261, a concatenation information group register 262, an optimum statistic group register 263 and an optimum appreciated value group register 264. The distance calculation unit 8 calculates a distance d(k, k+1; i k , i k+1 ) in sequence. A statistic calculation unit 82 calculates a mean value µ d (0, k+1; i₀, i k+1 ) and a square cumulative sum D(k) of the distance according to the recurrence formulas (3-1) and (3-2). That is, the mean value µ d (0, k+1; i₀, i k+1 ) is calculated according to the expression (3-1) by means of the mean value µ * / d(0, k; i₀, i k ) at the segmentation candidate position x(k, i k ) stored in the optimum statistic group register 263, the distance d(k, k+1; i k , i k+1 ) calculated in the distance calculation unit 81, and segmentation sections (k+1) and k stored in the stage register 80. On the other hand, the square cumulative sum D(k+1) of the distance is calculated according to the formula (3-2) by means of the square cumulative sum D*(k) of the distance at the segmentation candidate position x(k, i k ) stored in the optimum statistic group register 263 and the distance d(k, k+1; i k , i k+1 ) put out from the distance calculation part 81. The mean value µ d (0, k+1; i₀, i k+1 ) and the square cumulative sum D(k+1) of the distance are calculated by the statistic calculation unit 82. These data are stored to a statistic loading register 83. An appreciated value calculation unit 84 calculates a value of the appreciation standard U(0, k+1) according to the formula (3-2). That is, the appreciated value U(0, k+1) is calculated according to the formula (3-3) by means of the character pitch P, the parameter β, a content of the statistic loading register 83, and a content of the stage register 80. Next, a comparator 85 compares an appreciated value put out from the appreciated value calculation unit 84 with a content of a minimum appreciated value register 86. If the output of the appreciated value calculation unit 84 is smaller than the content of the minimum appreciated value register 86, an output signal 851 turns "ON". Initially, a sufficiently large value is set in the minimum appreciated value register 86. When the output signal 851 turns "ON", a gate circuit 53 opens, and an output of the appreciated value calculation part 84 is transferred to the minimum appreciated value register 86. Further, when the output signal 851 turns "ON", a gate circuit 52 opens, and the mean value µ d (0, k+1, i₀, i k+1 ) and the square cumulative sum D(k+1) of the distance stored in the statistic loading register 83 are transferred to a minimum statistic register 88. Furthermore, when the output signal 851 turns "ON", a gate circuit 51 opens, position informations k and i k at the segmentation candidate position x(k, i k ) stored in the distance calculation part 81 are transferred to a concatenation information register 87. The above operation is applied to all segmentation candidate positions x(k, i k ) (i k = 1, ... h k ) of the segmentation candidate section k stored in the optimum segmentation position information register 261. That is, at this time, the optimum mean value µ*(0, k+1; i₀, i k+1 ) and the square cumultive sum D*(k+1) at the segmentation candidate position x(k+1, i k+1 ) are stored to the minimum statistic register 88. An optimum appreciated value of the segmentation candidate position x(k+1, i k+1 ) is stored to the minimum appreciated value register 86. Further, an optimum segmentation path information to the segmentation candidate position x(k+1, i k ) from the segmentation candidate section x(k, i₁) is stored in the concatenation information register 87. Contents of the minimum statistic register 88, the minimum appreciated value register 86 and the concatenation information register 87 are respectively transferred to the minimum statistic group register 263, the minimum appreciated value group register 264 and the concatenation information group register 262 by the control part 10. Next, the minimum appreciated value register 86 is initialized sufficiently large. The optimum appreciated value and the optimum segmentation path relating to all the segmentation candidate positions x(k+1, k k+1 ) (i k+1 = 1, 2, ... h k+1 ) of the segmentation candidate section (k+1) are obtained by repeating the above operation. Needless to say, these operations can be realized by a normal microcomputer. The character sectioning apparatus as described above can sectioning a character string into indivisual characters easily and stably even if the character string includes touching characters and one character is splited into two or more images. Next, the character pitch detector 4 will be described in detail. Fig. 6 represents a character string image for describing a distance between character lumps. The character lump is indicated by oblique lines and is given in a rectangular area (broken line). A reference symbol F i , i+₁ (i = 1, 2, ... 6) represents a distance from a leading end of the i-th character lump to a leading end of the i+1-th character lump. A reference symbol F' i , i+₁ (i = 1, 2, ... 6) represents a distance from a trailing end of the i-th character lump to a trailing end of the i+1-th character lump. The symbols representing a distance between the character lumps can be utilized as observed values constituting a frequency distribution of a distance between the character lumps. Similarly, a reference symbol F i, j (i = 1, 2, ... 6; i < j) represents a distance from a leading end of the i-th character lump to a leading end of the j-th character lump, and a reference symbol F' i, j represents a distance from a trailing end of the i-th character lump to a trailing end of the j-th character lump. The more an observation is made, the stabler statistics will be obtained, and hence these can be utilized as observed values constituting a frequency distribution of the distance between character lumps described hereinafter. Besides, the distance between character lumps for the observed value constituting the frequency distribution can be limited as far as the distance F i, j (j = i+1, i+2, i+3) or the distance F' i, j (j = i+1, i+2, i+3). Further, character images such as period (.), comma (,) and the like can be removed from observation of the distance between character lumps by checking the character lump width and height by means, for example, of a mean height H m of a plurality of character lumps. When a large blank space as compared with the means height H m is detected, the distance between character lumps including the blank space can be removed from the observation. Referring to Fig. 7, which is one example of a frequency distribution of the distance between a series of character lumps having a constant pitch character as shown in Fig. 6. An axis F of abscissas the indicates a value of the distance F i, j , and an axisNUM of ordinates indicates a frequency of the distance between character lumps. Figs. 8 (a) and 8 (b) represent an example of a frequency distribution of the distance between a series of character lumps in a constant pitch data and an alphabetical variable pitch data, respectively. A principle of a detecting character pitch will be then described. With reference to Fig. 7 and Figs. 8(a) and 8(b), the mean character height H m is calculated according to the heights of a plurality of character lumps. Next, a presence candidate section (α₁ · H m , α₂ · H m ) of the character pitch is set by means of coefficients α₁, α₂ (α₁ < α₂). All distances between the character lumps existing in the presence candidate section (α₁ · H m , α₂ · H m ) can be regarded as candidate character pitches P i , however, number of the candidate character pitches P i can be reduced according to the following processing in order to save a processing time. That is, a distance F(1) between character lumps which takes the most frequent distance within a constant permissible width Δτ is calculated by means of the frequency distribution within the presence candidate section (α₁ · H m , α₂ · H m ). A lower bound value of a limited presence candidate section of the character pitch P i is set as MAX(α₁ · H m , (1-α₃)· F(1)) by means of a coefficient α₃ (0 ≦ α₃ ≦ 1). An upper bound value of the limited presence candidate section of the character pitch is set as MIN(α₂ · H m , (1+α₃) · U(1)). In Fig. 7, a section C₁ is the limited presence candidate section of the character pitch, and a plurality of distance between character lumps included in the section C₁ are as the candidate character pitches P i . Next, the frequency distribution is divided into areas f'₁, f'₂, ... f' n as indicated by a broken line. Here, a boundary point S (f' k-1 ,f' k ) of each area f' k (k = 1, 2, ... n) is present at middle of a center (k-1)· P i of the area f' k-1 and a center k·P i of the area f' k . Similarly, a boundary point S(f' k , f' k+1 ) of each area f' k is present at middle of a center k·P i of the area f' k and a center (k+1)· P i of the area f' k+1 . Accordingly, the boundary point S(f' k-1 , f' k ) is expressed as (kP i - 1 / 2P i )and the boundary point S(f' k , f' k+1 ) is expressed as (kP i + 1 / 2P i ). Next, a mean value P (k, n k ) of n k pieces (n k ≧ 0) of distances between character lumps present in the area f' k (k = 1, 2, ... n) is calculated. A quantity corresponding to the character pitch observed from the area f' k based on the candidate character pitch P i is detected by dividing the mean value P (k, n k ) by an integer k. An estimated character pitch P and can be obtained by means of an optimal linear estimating technique. In this technique, a plurality of difference between a value 1 / k. P (k.n k ) observed from the area f' k and the candidate character pitch P i converting all the area f' k are calculated. Then, the candidate character pitch P i minimizing the difference is selected as an estimated character pitch P and. Accordingly, the following pitch estimation error appreciation standard (variance criterion) T which works as the appreciation standard for optimal estimation is employed. where the coefficient C (k, n k ) is a function of a sample number n k and an integer k (k = 1, 2, ... n), and which satisfies As an example of this coefficient, can be used. Further, the estimation error appreciation standard T of the formula (4) is a variance of estimation error. However, an appreciation standard based on an absolute value | 1 / k· P (k, n k ) - P i | of the difference may be employed. The optimum estimated character pitch P and can be obtained by means of formula (4). Further, the frequency distribution of the distance between character lumps is also clustered at the same time. Next, a character pitch identifying technique will be described with reference to Figs. 7, 8(a) and 8(b). The frequency distribution of the distance between character lumps having a constant pitch printed character (Fig. 8 (a)) is different from that having a variable pitch printed character (Fig. 8 (b)). The difference can be identified by appreciating a plurality of variance σ² (f k ) of the distance between character lumps on k times (P and, 2P and, 3P and, ...) of the estimated character pitch P and for all the area f k (k = 1, 2, ... n). The following variance appreciated value ε² constituted of the linear sum of a variance σ²(f k ) for all the area f k (k = 1, 2, ... n) will be employed: where the coefficient C'(k, n k ) at the variance appreciated value ε² is a function of the sample number n k of the distance between character lumps and the integer k, and which satisfies As an example of this coefficient, can be employed. Here, an error appreciated value ε can be used instead of the above-described variance appreciated value ε². If the variance appreciated value ε² or the error appreciated value ε is greater than a preset threshold α₄, the character string can be segmented by means of the estimated character pitch P and as a main component, namely, the character string has a constant character pitch. If the variance appreciated value ε² or the error appreciated value ε is less than the threshold α⁴, the character string cannot be segmented by means of mainly the estimated character pitch P and, namely, the character string has a variable character pitch. Thus, a property of the character pitch can be identified. A stable character segmentation will be ensured by the character sectioning apparatus shown in Fig. 4, in the case that the character string has a constant character pitch. On the other hand, if the character string has a various character pitch, the characters can be segmented according to other character segmentation technique based on a blank space of the character line image, for example. Fig. 9 is a block diagram of a character pitch detector. A leading edge position and a size of each character lump are stored to the character lump register 21 by means of the scanner 1, the character string image memory 2 and the character lump extraction unit 3. The size of the character lump means a width and a height of the character lump. An another control unit 41 calculates a distance between character lumps by means of a leading end position and a trailing end position of the character lumps. The leading and trailing end positions are transferred in sequence from the character lump register 21. Then, the control unit 41 increases a frequency corresponding the distance between character lumps. The frequency is stored in a frequency distribution table 42 at an address position indicating the distance between character lumps. Thus, the frequency distributions of the distance between character lumps as shown in Figs. 7, 8(a) and 8(b) are generated in the frequency distribution table 42. Initially, the frequency distribution table 42 is initialized at 0 at first. Next, the control unit 41 calculates the mean height H m by means of a plurality of height of a plurality of character lumps stored in the character lump register 21. The mean height H m is transferred to a presence section detector 43. A constant register 44 stores the coefficients α₁, α₂ (α₁ < α₂) and α₃ and the constant permissible width Δτ. The presence section detector 43 inputs the coefficients α₁ and α₂ from the constant register 44 at first, and then sets the lower bound value α₁ · H m and the upper bound value α₂ · H m of a presence candidate section of the character pitch. Next, the presence section detector 43 reads a frequency value of the distance between character lumps belonging to the presence candidate section in sequence from the frequency distribution table 42 via the control unit 41. According to the read frequency value, the distance F(1) between character lumps which takes the most frequent distance within the constant permissible width Δτ is calculated. A presence section arithmetic operation unit 45 calculates values (1-α₃) · F(1) and (1+α₃) · F(1) by means of the distance F(1) by means of the presence section detector 43 and the coefficient α ₃ from the constant register 44. Then, the arithmetic operation unit decides MAX{α₁ · H m , (1 -α₃) · F(1)} and MIN{α₂ · H m , (1+α₃)·F(1)} as a lower bound value P L of the character pitch limited presence candidate section C₁ and an upper bound value P U of the limited presence candidate section C₁. The lower and upper bound values P L and P U are stored to a presence section register 46. If the distance F(1) is not detected in the presence section detector 45, the mean height H m is set instead of the distance F(1). Then, the lower bound value P L of the character pitch is transferred from the presence section register 46 to a counter 47. The counter 47 is counted from the lower bound value P L up to the upper bound value P U in sequence after, the operation described below is finished, and transfers the count value P i (P L ≦ P i ≦ P U ) to a mean value calculation unit 48. The mean value calculation unit 48 calculates n pieces of area ranges of the frequency distribution, namely, a lower bound value (k · P i - 1 / 2 P i ) and an upper bound value (k · P i + 1 / 2 P i ) for all the areas f k (k = 1, 2, ... n) according to the count value (the candidate character pitch P i ) transferred from the counter 47. Further, the means value calculation unit 48 calculates a number n k and mean value P (k, n) of the distance between character lumps belonging to the area f k with reference to the frequency distribution table 42. The above processing is carried out covering n pieces of areas. The candidate character pitch P i , the number n k (k = 1, 2, ... n) of the distance between character lumps of each area f k (k = 1, 2, ... n) and the mean value P (k, n k ) (k = 1, 2, ... n) are transferred to an estimation error appreciated value arithmetic operation unit 49. The estimation error appreciated value arithmetic operation unit 49 computes the estimation error appreciated value T (formula (4)) by means of the information transferred from the mean value calculation unit 48. A minimized estimation error appreciated value T is stored to an appreciated value register 50. Initially, a sufficiently large value is set in an optimum character pitch register 54 as the estimation error appreciated value. A comparison unit 55 compares the estimation error appreciated value T transferred from the estimation error appreciated value arithmetic operation unit 49 with a content of the appreciated value register 50. When an output value of the estimation error appreciated value arithmetic operation unit 49 is smaller than the content of the appreciated value register 50, the comparison unit 55 writes the output value of the estimation error appreciated value arithmetic operation unit 49 in the appreciated value register 50, and writes a value of the candidate character pitch P i in the optimum character pitch register 54. Then, the comparison unit 49 advances the counter 47 by 1 via the control unit 41. On the other hand, when the output value of the arithmetic operation unit 49 is larger than the content of the appreciated value register 50, the comparison part 55 only advances the counter 47 by 1. The optimum character pitch P and will be obtained in the optimum character pitch register 54 by carrying out the above operation until a value of the counter 47 reaches the upper bound value P U of the character pitch. When the optimum estimated character pitch P and is set in the optimum character pitch register 54, a variance appreciated value arithmetic operation unit 56 calculates a range of n pieces of areas of the frequency distribution, namely, a lower bound value (k · P and- 1|2 P and) and an upper bound value (k · P- 1 / 2 P and) of the area f k (k = 1, 2, ... n) according to the estimated character pitch P and. Next, the variance appreciated value arithmetic operation unit 56 calculates a sample number n k and a variance σ²(f k ) at a value k · P and of the distance between character lumps belonging to the area f k with reference to the frequency distribution table 42. Further, the arithmetic operation unit 56 computes the variance appreciated value ε² of formula (5). In this embodiment the variance σ² (f k ) is detected by the variance appreciated value arithmetic operation unit 56, but it can also be calculated at the mean value calculation unit 48. The variance appreciated value ε² is stored to a variance appreciated value register 57. A threshold register 58 stores a threshold α₄ for identifying the character pitch. A comparator 59 identifies a property of the character pitch by comparing the variance appreciated value ε² stored in the variance appreciated value register 57 with the threshold α₄ stored in the threshold register 58. That is, if the variance appreciated value ε² is larger than the threshold α₄, the comparator 59 decides that a method for determining the character segmenting position with the estimated character pitch P and as a main component cannot be applied; if the variance appreciated value ε² is smaller than the threshold α₄, the comparator 59 is decided that the method for determining the character segmenting position with the estimated character pitch P and as a main component can be applied. In the latter case, the estimated character pitch P and stored in the optimum character pitch register 54 and the variance appreciated value ε² stored in the variance appreciated value register 57 are transferred to the character pitch information register 22. In the former case, a plurality of character lump images stored in the character lump register 21 are segmented according to another character segmenting method. In the character pitch detector, a character pitch can be measured accurately even if the character string includes touching characters or splited characters. Further, a property of the character pitch can be grasped securely, thereby selecting a character segmenting method with high adaptability. According to this invention a frequency distribution on a distance between character lumps is created from a plurality of character images, the frequency distribution is divided into a plurality of areas by means of information such as character height and the like, an appreciation standard of estimation error between a representative point of the divided areas and a candidate character pitch is set, the candidate character pitch minimizing the appreciation standard is set as an estimated character pitch, thereby, a character pitch can accurately be obtained in spite of existing touching characters or a split character in the character string.

Claims: A character pitch detector apparatus for detecting a character pitch of a series of character string images comprising: means for detecting a plurality of character lumps from a series of said character string images (3 in Fig. 9), a character lump being defined as a connected non-blank region; means for calculating distances (F i,j ; F' i,j ) between leading or between trailing edges of said character lumps and storing a frequency distribution of said distances (F i,j ; F' i,j ) (41 and 42 in Fig. 9), the frequency being defined as the number of occurrences of a particular distance ; means for forecasting a presence section within the distribution of distances as an interval within the frequency distribution, which section defines candidate pitch values and is derived from a) a presence candidate section calculated by the mean height of said character lumps (43 in Fig. 9) and two constant factors and b) an interval around the most frequent distance (F(1)) within a constant permissible width (Δτ); means for dividing said frequency distribution into a plurality of areas by means of an arbitrary candidate character pitch included in said presence section (41 and 48 in Fig. 9), the areas having a width and centre-to-centre distance corresponding to said arbitrary pitch; means for calculating a character pitch estimation error between a pitch estimation value calculated as a means value of a plurality of said distances within an area and said arbitrary candidate character pitch (49 in Fig. 9); means for calculating an estimation error appreciation standard constituted of a sum of the weighted squared character pitch estimation errors over said plurality of areas (50 in Fig. 9), one of the weighting factors being the inverse square of said arbitrary pitch; and means for selecting a candidate character pitch minimizing said estimation error appreciation standard from a plurality of said arbitrary candidate character pitches as an optimum character pitch (55 and 54 in Fig. 9). The character pitch detector apparatus as claimed in claim 1, further comprising means for calculating a variance of said distances in a plurality of said areas divided by said optimum character pitch and calculating a variance appreciated value constituted of a sum of the weighted variances (56 in Fig. 9) over the areas weighted by the squared inverse of the optimum pitch; and means for identifying the character pitch according to said variance appreciated value (59 in Fig. 9) to distinguish constant from variable pitch. A character pitch detecting method for detecting a character pitch of a series of character string images, comprising the steps of: detecting a plurality of character lumps from a series of said character string images, a character lump being defined as a connected non-blank region; calculating distances (F i,j ;F' i,j ) between leading or between trailing edges of said character lumps and storing a frequency distribution of said distances (F i,j ; F' i,j ) the frequency being defined as number of occurrences of a particular distance; forecasting a presence section within the distribution of distances as an interval within the frequency distribution, which section defines candidate pitch values and is derived from a) a presence candidate section calculated by the mean height of said character lumps and two constant factors and b) an interval around the most frequent distance (F(1)) within a constant permissible width (Δτ); dividing said frequency distribution into a plurality of areas by means of an arbitrary candidate character pitch included in said presence section, the areas having a width and centre-to-centre distance corresponding to said arbitrary pitch; calculating a character pitch estimation error between a pitch estimation value calculated as a mean value of a plurality of said distances within an area and said arbitrary candidate character pitch; calculating an estimation error appreciation standard constituted of a sum of the weighted squared character pitch estimation error over said plurality of areas, one of the weighting factors being the inverse square of said arbitrary pitch, and selecting a candidate character pitch minimizing said estimation error appreciation standard from a plurality of said arbitrary candidate character pitches.

Inventors: KO ASAI, YOSHITAKE TSUJI, KO, ASAI, YOSHITAKE, TSUJI
Applicants: NIPPON ELECTRIC CO, NEC CORPORATION
Application year: 1984
Main classification: G06K9
IPC codes: G06K9