Linear line detection apparatus using projection image of character string including linear line

Abstract: A line image detection apparatus having an image input function (S1) for inputting an image on a document, which image includes a rectangular character string (12) and a linear line (13) drawn along the character string, a function (S2) for detecting a character string image from the image, a function (S3) for forming a projection image (FIG. 6B) on the basis of the distance from a lower end of the character string image to each first black pixel found in the character string image in the vertical direction, a function (S4) for comparing the distance from the lower end of the character string image to each first black pixel, with a predetermined threshold value (f), thereby to define a plurality of "slice 0" areas (s = 0 in FIG. 15) included in the projection image, the distance, in each of the "slice 0" areas, from the lower end of the character string image to each first black pixel being lower than the predetermined threshold value (f), a function (S5) for determining an interval distribution of the interval (P(m) in FIG. 15) between each adjacent pair of the "slice 0" areas, and a function (S8) for detecting the linear line (13) on the basis of the interval distribution.

Description: This invention relates to a line image detection apparatus according to the preamble of claim 1, for example, for use in an address reading apparatus for reading address data on a postal matter, capable of detecting a line (solid or broken line) drawn just under an address character string as address data recited in the address area of the postal matter. This apparatus can be adapted for detecting and removing the underline of the address character string. This apparatus can include an address area determination apparatus for determining the address area from the detected underline. There is a case where an address character string as address data recited in the address area of a postal matter is underlined with a long linear solid (or broken) line. To optically read such an underlined address character string, it is necessary to remove the underline of the character string so as to facilitate character detection/pickup processing for picking up the characters of the character string one by one. In the conventional underline removal method disclosed, for example, in US 4,633,502 which also discloses an apparatus according to the preamble of claim 1, horizontal projection data which is parallel to an address character string (character row) is prepared and used to detect and remove a line drawn under the character string. In this method, the underline can be detected and removed only when an underline portion and a character string portion in the projection data are clearly separated from each other. US-A-4 633 502 also discloses detecting an underline from long pixel runs in a vertical projection (shadow) of the character image. The actual position of the underline is determined from long horizontal runs in the lower portion of the original character image. On the other hand, if lower portions of some of the characters contact the underline, or if the character string inclines and contacts the underline, the character string portion and the underline portion in the projection data cannot clearly be separated from each other. As a result, the underline cannot be detected and removed, thereby disabling detection/pickup of characters and hence recognition thereof. It is an object of the invention to provide a line image detection apparatus capable of efficiently and reliably detecting a linear line drawn along a character string even if the linear line is a solid line or a broken line, or contains a cut portion due to noise. This object is achieved by an apparatus according to claim 1. Further, developments of the invention are given in the dependent claims. The line image detection apparatus can detect a broken line contained in a character string image. Specifically, in this apparatus, a projection image of the character string projected from below the character string is prepared. If the character string is underlined with a broken line, the projection image contains that image of the broken line (a so-called silhouette of the broken line), which includes image portions arranged at regular intervals near the lower end of the projection image. Therefore, the broken line can be recognized by detecting whether there are image portions arranged at regular intervals (with a certain pitch). To this end, a plurality of areas in which black pixels are continuously arranged near the lower end of the character string image are detected, thereby calculating the center point of each of the areas and then the interval between the center points of each adjacent pair of the areas. Thereafter, a histogram concerning the interval is prepared. If concentration of frequency is found in the histogram, it is determined that the projection image contains image portions arranged at regular intervals and hence that a broken line exists. Thus, the existence of a broken line is determined by detecting the degree of concentration of frequency in the histogram. This invention can be more fully understood from the following detailed description when taken in conjunction with the accompanying drawings, in which: FIG. 1 is a schematic block diagram, showing a character reading apparatus to which linear line detection and removal apparatuses according to a first embodiment of the invention are applied; FIG. 2 is a view, showing a postal matter to be read, and horizontal projection data corresponding to the postal matter; FIGS. 3 and 4 show a flowchart useful in explaining the operation of the apparatus of FIG. 1; FIG. 5 shows an example of a character string image detected and picked up; FIG. 6A shows an example of projection data obtained when the character string image is projected from the upper end of the image in FIG. 5; FIG. 6B shows an example of projection data obtained when the character string image is projected from the lower end of the image in FIG. 5; FIG. 7A is a histogram concerning the interval between the center points of each pair of adjacent "slice 0" areas in a character string image which does not contain a broken line; FIG. 7B is a histogram concerning the interval between the center points of each pair of adjacent "slice 0" areas in a character string image which contains a broken line as shown in FIG. 6B; FIG. 8A is a histogram concerning the distances between the lower end of a character string image with no solid line and black pixels of the image; FIG. 8B is a histogram concerning the distances between the lower end of a character string image with a solid line and black pixels of the image; FIG. 9 is a histogram concerning those first black pixels from the lower end of the character string image, which are arranged on a continuous basis; FIG. 10A shows an example of a character string image obtained before the underline is removed; FIG. 10B shows an example of a character string image obtained after the underline is removed; FIG. 11 is a view, useful in explaining the process according to the invention for obtaining the interval between the center points of each adjacent pair of "slice 0" areas in the character string image; and FIG. 12 is a flowchart according to the invention for obtaining the interval between the center points of each adjacent pair of "slice 0" areas in the character string image. The embodiments of the invention will be explained with reference to the accompanying drawings. First, a first embodiment will be explained. FIG. 1 is a schematic block diagram, showing a character reading apparatus used as an address reading apparatus for reading address data on a postal matter, to which linear line detection and removal apparatuses according to a first embodiment of the invention are applied. Specifically, the character reading apparatus comprises a light source 1 for illuminating a to-be-read postal matter P transferred in a direction indicated by the arrow; an optical system 2 such as a lens; a CCD-type line sensor 3 provided perpendicular to the direction of transfer of the postal matter P; an image input section 4 serving as image input means for inputting an image on the postal matter P, which image includes an address character string and a line drawn under the character string; a digitizing section 5 for digitizing a signal output from the line sensor 3; an image memory 6 for storing digitized image data output from the digitizing section 5; a character string detection/pickup section 7 for detecting and picking up, from the image data stored in the image memory 6, an image of the character string (i.e. the character row) including the underline; an underline detection/removal section 8 for detecting the underline in the picked character string image and removing the same; a character detection/pickup section 9 for picking up characters one by one from the character string with no underline; and a character recognition section 10 for recognizing each character picked by the character detection/pickup section 9. FIG. 2 shows an example of a postal matter P. As is shown in FIG. 2, a stamp 11 is attached to the major surface of the postal matter P, and address character strings 12 and underlines (in this case, broken lines) 13 are printed horizontally. In this case, suppose that the postal matter P is transferred with the address character strings 12 and the underlines 13 positioned perpendicular to the path of transfer, and that some portions of the character strings 12 contact one of the underlines 13 as shown in FIG. 2. The operation of the first embodiment will be explained with reference to FIGS. 3 and 4. First, that image on the postal matter P transferred in the direction indicated by the arrow, which includes the address character strings 12 and the underlines 13, is input by the image input section 4, then digitized by the.digitizing section 5, and stored in the image memory 6 (step S1). Subsequently, the character string detection/pickup section 7 obtains horizontal projection data D (as shown in FIG. 2) in a direction parallel to the address character strings (character rows) 12 on the basis of the image data stored in the image memory 6, and picks up an image (see FIG. 5) of the character string 12 including the underline 13 on the basis of the projection data D (step S2). Thereafter, the underline detection/removal section 8 detects and removes the underline 13 from the character string image picked by the character string detection/pickup section 7. More specifically, as regards the picked character string image, the distance from the lower end b of the character string image (see FIG. 5) to each first black pixel of the image found in the vertical direction (i.e. in the direction perpendicular to the character string) is calculated, thereby preparing projection data on the distances (step S3). (In the case where the character string is inverted, the distance from the upper end a of the character string image to each first black pixel found in the vertical direction (i.e. in the direction perpendicular to the character string) may be calculated, thereby preparing projection data on the distances from the upper end a.) To prepare the projection data, the height c of the picked character string image is calculated, and the middle position O of the height c in the vertical direction (i.e. in a direction perpendicular to the character string 12) is calculated by division (c/2). Then, predetermined horizontal positions n are set at regular intervals, and the distance from the lower end b to a first black pixel found in the vertical direction is calculated in each horizontal position n. As a result, projection data on the distances from the lower end b is prepared as shown in FIG. 6B. (Similarly, in the case where the character string is inverted, predetermined horizontal positions n are set at regular intervals, and the distance from the upper end a to the first black pixel found in the vertical direction is calculated in each horizontal position n, thereby obtaining projection data on the distances from the upper end a as shown in FIG. 6A, which is used to detect a linear line.) Where no black pixel is found in the vertical direction, the distance between the level b or a and the vertically middle position O is calculated. All pieces of the thus-obtained projection data indicative of the distances from the lower end b are sliced using a predetermined threshold value f (i.e. each piece of the projection data is compared with the threshold value f), so as to define "slice 0" areas, and the middle point of each "slice 0" area is calculated (step S4). Specifically, as is shown in FIG. 6B, the threshold value f is calculated by dividing, by 2, a value which is obtained by subtracting a margin d from the vertically middle position O of the character string 12 (i.e. f = (0 - d)/2). Then, each distance is compared with the threshold value f, and an area with a distance value smaller than the threshold value f is set to the "slice 0" area. The middle points g0, g1, g2, ... of all "slice 0" areas are determined. Thereafter, the interval between each pair of adjacent middle points is calculated, and a histogram concerning the relationship between the interval and the frequency as shown in FIG. 7B (step S5). Specifically, the interval (g1 - g0), (g2 - g1), ... between each pair of adjacent middle points gn is calculated to prepare the FIG. 7B histogram concerning the intervals of the middle points. Referring then to FIGS. 11 and 12, the process for obtaining the pitch histogram on the basis of the projection data will now be explained in detail. FIG. 11 is a view, useful in explaining the process for obtaining the interval between the middle points of each pair of adjacent "slice 0" areas of the character string image, which is the feature of the invention. FIG. 12 is a flowchart for obtaining the interval between the middle points of each pair of adjacent "slice 0" areas of the character string image, which is the feature of the invention. In FIG. 11, table 41 shows the process for converting the projection data to a plurality of intervals P(m) for forming a histogram. At each horizontal position indicated by an address n, a corresponding piece of projection data 44 is expressed by a distance value f(n) which indicates the distance from the lower end b. The distance value f(n) represents one of 8 distance values (i.e. "n" represents 1, 2, ... or 8). Suppose that a middle value 5 between a maximum value 7 and a minimum value 3 is set as a "slice level α ". Further, the area is determined to be the "slice 0" area when its distance value is lower than a predetermined slice level, and to be a "slice 1" area when its distance value is higher than the predetermined slice level. A flag s0 is set to indicate the "slice 0" area, and a flag s1 is set to indicate the "slice 1" area. Moreover, an address counter n is used to indicate, with the address n, in which one of horizontal positions set at regular intervals each slice area is located. A counter c is used to indicate the number of each "slice 0" area. A register p is used to indicate the start position of the "slice 0" area. 0 is set as the initial value of each of s0, s1, n, m, c and p (step S61). Then, each distance value f(n) is compared with the slice level α (step S62). If the distance value f(n) set for a certain slice area is higher than the slice level, the slice area is recognized as the "slice 1" area. The "slice 1" area indicates an area in which there is a long distance between the lower end b and the first black pixel (see FIG. 5). This means that the "slice 1" area contains no broken line 13 which is drawn near the lower end b. Therefore, it is considered that in the "slice 1" area, there is a character (or a black pixel) with a long distance from the lower end b, or there is no character (black pixel). On the other hand, the "slice 0" area indicates an area in which there is only a short distance between the lower end b and the first black pixel. This means that the "slice 0" area contains the broken line 13, or that in this area, a character reaches a portion very near the lower end b. If a certain slice area is recognized as the "slice 0" area, it is determined whether or not the flag s0 is 0 (step S65). If the flag s0 is 1, it is determined that the "slice 0" areas are formed on a continuous basis, and the value of the counter c which indicates the number of the "slice 0" area is incremented by 1. In other words, the value of the counter c indicates how large the "slice 0" area is, and the value of the counter c is incremented each time it is determined that the "slice 0" area continues. If the flag s0 is not 0, i.e. if the flag s0 is 1, it is determined that the certain slice area is shifted from the "slice 1" area to the "slice 0" area. At this time, the flag s0 is set to 1, the flag s1 to 0, the counter c to 1, and the register p, which indicates the start position of the "slice 0" area, to n. Thereafter, the value of the address counter n is incremented (step S68). If all pieces of the projection data have not been processed (step S69), the comparison with the slice level α is repeated (step S62). If it is determined in the step S62 that the present slice area is the "slice 1" area, it is determined in the step S63 whether or not the flag s1 is 0. If s1 = 1, the slice area is determined a "slice 1" area continuous to the adjacent "slice 1" area. On the other hand, if s1 = 0, the present slice area is determined where the "slice 0" area is shifted to the "slice 1" area. Then, to obtain the center point gm of the "slice 0" area, calculation of g(m) = (p + c)/2 is performed. If the center point g is 0, a value of 0.5 is calculated from g(0) = = (0 + 1)/2. s1 is set to 1, s0 to 0, the value of the counter c for the "slice 0" area to 0, and the value of a counter m for the "slice 0" area to m + 1 (step S64). Moreover, in table 41, each interval P(m) is set to 5, 4, 4, 4, 4, 5, ... by just performing subtraction between each pair of adjacent center points gm of 0.5, 5.5, 9.5, 13.5, 17.5, 21.5, 26.5, ... A histogram as shown in FIG. 7B is prepared on the basis of the calculated intervals P(m) of each pair of adjacent center points gm of the "slice 0" areas (step S5). Then, a histogram concerning the distance between the lower end b and each first black pixel is prepared on the basis of projection data as shown in FIG. 6B which is obtained when the character string is viewed from the lower end b (step S6). Specifically, a histogram as shown in FIG. 8A is prepared, in which a peak value T2 indicates the position of the broken line 13. Subsequently, a histogram concerning the width of those of the first black pixels which are arranged on a continuous basis (the number of the black pixels is L) is prepared (step S7). Specifically, a histogram as shown in FIG. 9 is prepared, in which a maximum value R indicates the width of the underline 13. In steps S8 - S12, whether or not there is an underline, or whether the underline is a solid line or a broken line is determined on the basis of the FIG. 7B histogram concerning the intervals of the center points and the FIG. 8A histogram concerning the distance. FIG. 7A shows a histogram concerning the interval of each pair of the adjacent center points of the "slice 0" areas of a character string image which includes no broken line. FIG. 7B shows a histogram concerning the interval of each pair of the adjacent center points of the "slice 0" areas of a character string image which includes a broken line as shown in FIG. 6B. FIG. 8A shows a histogram concerning the distance between the lower end and each black pixel of a character string image which includes no solid line. FIG. 8B shows a histogram concerning the distance between the lower end and each black pixel of a character string image which includes a solid line. In a step S8, it is determined whether or not in the FIGS. 7A and 7B histograms concerning the interval, the sum of the maximum frequency and its vicinity frequency (within ± 1 of the maximum frequency) is more than about 80% of the overall frequency, and whether or not the interval corresponding to the maximum frequency is lower than a predetermined value. If the answer to the question of the step S8 is YES, the program proceeds to a step S9, where it is determined there is a broken underline, followed by the processing of a step S13. If, on the other hand, the answer to the question of the step S8 is NO, the program proceeds to the step S10. If in the step S8, a histogram as shown in FIG. 7B, in which the frequency concentrates in a small range, is obtained, the maximum value T1 indicates the constant pitch of the broken line 13 in FIG. 5. In other words, the fact that the interval P(m) of each pair of adjacent center points gm is substantially concentrated on the value indicated by the maximum value T1 means that the "slice 0" areas are arranged at regular intervals, i.e. that a broken line exists. Since in general, the broken line is drawn in positions lower than the positions of address characters, the line portions of the broken line are projected at regular intervals in positions very near the lower end of the character string image. In light of this, setting a slice level to detect "slice 0" areas enables "slice 0" areas to be found at a predetermined pitch where a broken line exists. On the other hand, in the case where a histogram concerning the intervals P(m) of the center positions gm of the "slice 0" areas is prepared after a character string image which contains no broken line 13 is subjected to similar processing, the intervals P(m) have different values and do not concentrate in a small range as shown in FIG. 7A. Thus, detecting whether or not there is a concentration of the frequency of the intervals P(m) can determine whether a character string image contains a broken line. Furthermore, the reason why it is determined whether the interval is lower than a predetermined value is to distinguish a broken line from characters printed using a word processor, etc. If the address characters are printed by a mechanical method using a word processor, etc., it is also possible that "slice 0" areas are arranged at regular intervals. In this case, it is hard to distinguish a broken line from such word processor characters. Since, however, the pitch of word processor characters is much larger than that of a general broken line, erroneous recognition can be avoided by comparing the pitch obtained from a histogram with a predetermined reference value indicative of the pitch of a general broken line. In the step S10, it is determined whether or not a solid line is contained in a character string image. Where the solid line is contained in the character string image, almost all of the first black pixels from the lower end must concentrate in a position very near the lower end. If the maximum frequency of the histogram is, for example, about 90% or more of the overall frequency, it is determined that a solid line exists. FIG. 8B shows a histogram obtained when a solid line exists. In this figure, the maximum frequency value T3 indicates the existence of a solid line. FIG. 8A shows a histogram obtained when a broken line exists as shown in FIG. 5, in which the maximum frequency value T2 indicates the existence of a broken line. In this case, however, the maximum frequency value obviously does not occupy 90% or more of the overall frequency. In other words, in the case of the FIG. 8A histogram, it is determined whether or not the sum of the maximum frequency and its vicinity frequency (within ± 1 of the maximum frequency) is, for example, more than about 90% of the overall frequency. If the answer to this question is YES, the program proceeds to the step S11, where it is determined there is a solid underline, followed by the step S13. If the answer is NO, the program proceeds to the step S12, where there is no underline, followed by a step S16 which will be explained later. It is a matter of course that if determination as to the histogram concerning the intervals is not performed, and only determination as to the histogram concerning the distances is performed to detect a solid line, the solid line can be more efficiently detected. In the step S13, the maximum value T2 is detected on the basis of the FIG. 8A histogram concerning the distances, to determine the position Lb of the detected underline (see FIG. 10A). In the next step S14, the width La of the detected underline is obtained on the basis of the histogram concerning the width of first black pixels from the lower end, shown in FIG. 9. That is, the line width La is determined from the maximum value T4. In a step 15, if the line width La determined in the step S14 is higher than a predetermined reference value, the detected underline is considered part of a character and maintained as it is. If, on the other hand, the line width La is lower than the predetermined reference value, the underline is deleted by replacing the line width La with white pixels (see FIG. 10B). If, as shown in FIG. 2, part of a character such as " ", " ", "7" or " " contacts the underline 13, the underline 13 is deleted by comparing the position of a portion of the underline with the position of that . portion of the underline which is deleted previously. This is because the underline is generally drawn at the same level. After deleting the underline 13, the character detection/pickup section 9 detects and picks up each character of the character string image with no underline 13 (see FIG. 10B) (step S16). In the next step S17, the character recognition section 10 recognizes each character picked by the character detection/pickup section 9 and outputs a recognition result, followed by the termination of the processing. As described above, in the first embodiment, a character string image including an underline is picked up from an input postal matter, and projection data is prepared which indicates the distance between the lower end of the image and the lower end of each character or each portion of the underline. Then, all the pieces of the projection data are compared with a predetermined threshold value, thereby defining "slice 0" areas which contain no characters or underline portions. The center point of each "slice 0" area is calculated, and a histogram concerning the interval of each pair of adjacent "slice 0" areas is prepared. If concentration of frequency is found in the histogram concerning the intervals, it is considered that a broken line exists. This is because the existence of the broken line is understood from the fact that "slice 0" areas exist at regular intervals. The first embodiment can be modified as follows: Projection data indicative of the distance from the upper end a of a character string image to each first black pixel of the image found in the vertical direction is prepared, as well as the above-described projection data indicative of the distance from the lower end b to each first black pixel found in the vertical direction. Then, "slice 0" areas from the upper end are specified, and the interval between the center points of adjacent "slice 0" areas is calculated. Referring to FIG. 6A, the intervals between the center points g100, g101, g102, ... are calculated to detect the intervals between characters in the character string. Thereafter, the intervals obtained with respect to the lower end are compared with the intervals obtained with respect to the upper end. If the average of the former intervals is lower than that of the latter intervals, it is considered that the intervals with respect to the lower end indicate the existence of a broken line. The comparison between the intervals with respect to the lower end and the intervals with respect to the upper end can avoid erroneous recognition which may occur in the case of regular address characters as printed by a word processor, etc. In this case, the address characters may well be misrecognized as a broken line, since the address characters drawn by the word processor, etc. are arranged very regularly, which results in detection of regular "slice 0" areas and hence regular intervals between the center points of the "slice 0" areas. In the case where no broken line is detected, a distance histogram with respect to the lower end is prepared. If concentration more than a predetermined value is detected in the distance histogram, it is determined that a solid line exists. When a broken line or a solid line has been detected, the position and width of the line is detected, thereby replacing the broken line or the solid line with white pixels to delete the same. The above-described methods enable a line under a character string to be detected and removed accurately and efficiently, even where a lower portion of a character contacts the underline (broken or solid line), even where the character string inclines, or even where the underline has cut portions due to noise. As a result, characters can be detected and picked up in a reliable manner, and accordingly accurate character reading can be performed. Thus, the invention can provide a linear line detection apparatus capable of efficiently and reliably detecting a linear line drawn along a character string even if the linear line is a solid line or a broken line or contains a cut portion due to noise. Furthermore, the invention can provide a linear line detection apparatus capable of efficiently and reliably detecting and removing the linear line, thereby performing accurate reading of characters. In addition, the invention can provide an address area determination apparatus capable of accurately determining an address area of a postal matter.

Claims: A line image detection apparatus, comprising means (S1, 1-6) for inputting an image (11, 12, 13) on a document (P), which image includes a character string (12) and possibly a linear line (13) drawn along the character string, means (S2, 7) for detecting, from the image input by the image input means, a rectangular character string image (FIG. 5) including the character string and the linear line which are constituted by black pixels, and means (S3, 4, 5, 8, 10, 11, 23, 25, 26) for recognizing that the character string image contains an underline, characterized by means (S3) for forming a projection image (FIG. 6A or 6B) on the basis of the distance from an upper end (a) or in the case where the character string is inverted a lower end (b) of the character string image detected by the character string image detecting means, to each first black pixel found in the character string image in the vertical direction, and in that the recognizing means is adapted for recognizing that the character string contains an underline on the basis of the projection image. The line image detection apparatus according to claim 1, characterized in that the projection image forming means (S3) is adapted for forming a first projection image (FIG. 6B) on the basis of the distance from the lower end (b) of the character string image detected by the character string image detecting means, to each first black pixel found in the character string image in the vertical direction, and in that the recognizing means includes means (S4) for comparing the distance from the lower end (b) of the character string image to each first black pixel, with a predetermined threshold value (f), thereby to define a plurality of "slice 0" areas (s = 0 in FIG. 11) included in the projection image, the distance, in each of the "slice 0" areas, from the lower end of the character string image to each first black pixel being lower than the predetermined threshold value (f); means (S5) for determining an interval distribution of the interval (P(m) in FIG. 11) between each adjacent pair of the "slice 0" areas determined by the area determining means; and means (S8) for detecting the linear line (13) on the basis of the interval distribution (P(m) in FIG. 15). The line image detection apparatus according to claim 2, characterized in that the interval distribution determining means includes: means (S4) for determining the center point (g0, g1, ... in FIG. 6B) of each of the "slice 0" areas; and means (S5) for detecting the interval (P(m) in FIG. 15) between each adjacent pair of the center points. The line image detection apparatus according to claim 2, characterized in that the linear line detecting means (S8) includes: means (S5) for preparing an interval histogram (FIG. 7B) concerning the interval (P(m) in FIG. 11); and means for determining that the detected linear line is a broken line, when in the interval histogram, the ratio of the frequency of one interval value (T1) to the sum of the frequencies of all interval values is higher than a predetermined value. The line image detection apparatus according to claim 4, characterized in that the linear line detecting means (S8) includes broken line determining means (S8) for determining that the detected linear line is a broken line, when in the interval histogram, the ratio of the sum of the frequencies of two continuous interval values to the sum of the frequencies of all interval values is higher than a predetermined value. The line image detection apparatus according to claim 3, characterized in that the linear line detecting means (S8) includes: means (S5) for preparing an interval histogram (FIG. 7B) concerning the interval (P(m) in FIG. 11); and means for determining that the detected linear line is a broken line, when in the interval histogram, the frequency of one interval value (T1) is 80% or more of the sum of the frequencies of all interval values. The line image detection apparatus according to claim 3, further comprising: means (S6) for obtaining the distance from the lower end of the character string image to each first black pixel, and preparing a distance histogram (FIG. 8A) concerning the distance; and means (S10) for determining that the detected linear line is a solid line, when in the distance histogram, the ratio of the frequency of one distance value (T2) to the sum of the frequencies of all distance values is higher than a predetermined value. The line image detection apparatus according to claim 7, characterized in that the solid line determination means includes means (S10) for determining that the detected linear line is a solid line, when in the distance histogram, the ratio of the sum of the frequencies of two continuous distance values to the sum of the frequencies of all distance values is higher than a predetermined value. The line image detection apparatus according to claim 7, characterized in that the solid line determining means includes means (S10) for determining that the detected linear line is a solid line, when in the distance histogram, the frequency of one distance value (T2) is 90% or more of the sum of the frequencies of all distance values. The line image detection apparatus according to claim 9, characterized in that the solid line determining means includes means (S10) for determining that the detected linear line is a solid line, when in the distance histogram, the sum of the frequencies of two continuous distance values is 90% or more of the sum of the frequencies of all distance values. The line image detection apparatus according to claim 3, further comprising: means (S7) for preparing a linear line width histogram (FIG. 9) concerning the width of each portion of the linear line in the projection image (FIG. 6B), when the linear line detecting means has detected the linear line; and removal means (S14, S15) for detecting the position and width of each portion of the linear line on the basis of the line width histogram so as to remove the linear line. The line image detection apparatus according to claim 11, further comprising means (S17) for recognizing characters in the character string image from which the linear line is removed by the removal means. The line image detection apparatus according to claim 3, characterized in that the projection image forming means (S3) is adapted for forming a second projection image (FIG. 6B) on the basis of the distance from an upper end of the character string image detected by the character string image detecting means, to each first black pixel found in the character string image in the vertical direction, and in that the recognizing means (S8) includes means (S4) for comparing the distance from the upper end of the character string image to each first black pixel, with a second predetermined threshold value (f), thereby to define a plurality of second "slice 0" areas (s = 0 in FIG. 11) included in the second projection image, the distance, in each of the second "slice 0" areas, from the upper end of the character string image to each first black pixel being lower than the predetermined threshold value (f); means (S4) for determining the center point (g0, g1, ... in FIG. 6B) of each of the second "slice 0" areas; means (S5) for detecting the second interval (P(m) in FIG. 15) between each adjacent pair of the center points of the second "slice 0" areas; means (S5) for preparing a first interval histogram (FIG. 7B) concerning the first-mentioned interval (P(m) in FIG. 11); means (S5) for preparing a second interval histogram (FIG. 7B) concerning the second interval (P(m) in FIG. 11); and means (S8) for determining that the detected linear line is a broken line, when the ratio of that frequency of a third interval value (T1) which is highest in the first interval histogram, to the frequency of all interval values is higher than a predetermined value, and at the same time when the third interval value is lower than a fourth interval value with a highest frequency in the second interval histogram. The line image detection apparatus according to claim 1, characterized in that the linear line recognizing means includes: means (S8) for obtaining the distance from each of plural points of the lower end of the character string image, to each first black pixel in the vertical direction, and preparing a distance histogram (FIG. 8A) concerning the distance; and means (S10, S11) for determining that the detected linear line is a solid line, when in the distance histogram, the ratio of that frequency of a distance value, which is highest, to the sum of the frequencies of all distance values is higher than a predetermined value. The line image detection apparatus according to claim 14, characterized in that the solid line determining means includes means (S10, S11) for determining that the detected linear line is a solid line, when in the distance histogram, that frequency of the distance value, which is highest, is 90% or more of the sum of the frequencies of all distance values. The line image detection apparatus according to claim 14, further comprising: means (S7) for preparing a solid line width histogram (FIG. 9) concerning the width of each portion of a solid line in the projection image (FIG. 6B), when the solid line determining means has determined that the solid line exists; and solid line removal means (S14, S15) for detecting the position and width of each portion of the solid line on the basis of the solid line width histogram, and removing the solid line. The line image detection apparatus according to claim 16, further comprising means (S17) for recognizing characters in the character string image from which the solid line is removed by the solid line removal means.

Inventors: NAKAMURA YOSHIKATU, SANO TIKARA, NAKAMURA, YOSHIKATU, SANO, TIKARA, Nakamura, Yoshikatu, c/o K.K. Toshiba, Sano, Tikara, c/o K.K. Toshiba
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 1995
Main classification: G06K9
IPC codes: G06T7, G06K9, B07C3