Character extracting method

Abstract: In a character recognition device for the character recognition based on a light and shade image of an input character image, the light and shade image of the input character image is separated into a character area and a background area using at least density values of pixels and then, the above-mentioned character area is separated again into more than two areas using at least density values of pixels and based on an area information obtained by this re-separation, the characters are separated to individual characters.

Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a character extracting method to extract bridged characters to each character at a time in a character recognition device which recognizes characters according to, for instance, input light and shade character images. 2. Description of the Related Art Generally, the character recognition technology is broadly divided into input of character images, extraction of character lines, character extracting and character recognition. Generally, bridged characters are extracted after binarizing input character images. The input character images are divided into a character area and a background area. At this time, plural characters are extracted to one character area in the bridged stated. In the prior art, these bridged characters are separated each other by obtaining structural and analytical separating points according to the shape of bridged characters. That is, when the shape of bridged characters have a dent such as valley, a character area was cut out to each character by judging the dent as the junction point. However, a variety of patterns are considered for the shapes of junction points of bridged characters and the patterns that could be separated according to the prior art are limited only to a few special shapes out of these patterns. Generally, in the case of document images of handwritten characters, for the most part of bridged characters when extracting them, characters on an input document image are already bridged from the first time when the document is input. On the contrary, in the case of document images in printing type, the most part of causes for bridged characters that become a problem when characters are extracted are not actually bridged but are due to a low resolution of a scanner (a character image input device) and a binarization miss during the binarization processing. Therefore, if returning back to light and shade images that are binarized input character images, a bridged point between characters should be detectable relatively easily. However, when light and shade images only are simply used, a problem becomes more complicate including specifying of a character area, delay of processing speed and in addition, such ill effects as an error in character position estimation, etc. are caused and the performance is rather deteriorated US 5809166 describes character recognition system in which pairs of adjacent vertical bars are first detected in the character image and it is also divided into discrete horizontal bands. Characters are recognised on the basis of the distribution of image data in each band between the detected vertical bars. SUMMARY OF THE INVENTION It is, therefore, an object of the present invention according to claims 1, 7 and 12 is to provide a character extracting method that is able to highly precisely and efficiently find out bridged characters that are difficult to find from the shapes and separate them. According to the present invention, there is provided a character extracting method in a character recognition device for recognizing characters according to input character images, comprising: a first step for obtaining a first binarized image of the input character images binarized in accordance with a first threshold value based upon at least a density value of each pixel in the input character images to separate the first binarized image into a character area and a background area; a second step for obtaining a second binarized image by binarizing portions corresponding to the character area separated in the first step in accordance with a second threshold value based upon a density value of each pixel corresponding to the character area of the first binarized image to separate the second binarized image into at least two areas; and a third step for separating the first binarized image into individual separated characters in accordance with the second binarized image separated in the second step. BRIEF DESCRIPTION OF THE DRAWINGS Fig 1 is an enlarged view showing an example of an input document image before inputting by a scanner; FIG. 2 is a diagram for explaining the state to input a document image by marking off with meshes; FIG. 3 is a diagram showing an example of a light and shade image input by a scanner; FIG. 4 is a diagram showing an example of a binarized image by binarizing the light and shade image shown in FIG. 3; FIG. 5 is a block diagram schematically showing a structure of a character extracting device to which the character extracting method of the present invention is applicable; FIG. 6 is a flowchart for explaining the character extracting method of the present invention; FIG. 7 is a diagram showing an example of a first binarized image that is binarized in the first binarization unit; FIG. 8 is a diagram showing an example of a second binarized image that is binarized in the second binarization unit; and FIG. 9 is a flowchart for explaining a method for deciding a bridged character position in a character separation unit. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Preferred embodiments of the present invention will be described below referring to the attached drawings. Further, in the following description it is assumed that the more small density values of pixels are, the more black those pixels will become, and the more large density values are, the more white the pixels will become. "density value" refers to the level or degree of whiteness of the pixel. FIG. 1 shows an input document image enlarged before inputting by a scanner. Figures "1" and "2" are written closely each other; however, they are not bridged each other as there is a blank space between them. Now, let's consider a case to read such document images with a scanner. A scanner divides document images in such meshes as shown in FIG. 2, takes a mean value of densities in respective rectangles and inputs the mean density value as a representative density of pixels corresponding to the rectangles. Shown in FIG. 3 is an example of a light and shade image input by a scanner. In this example, a light and shade image is a vertically 6-dot and laterally 12-dot image. In FIG. 3, the portion a painted out in black represents pixels having the smallest density value, the portion b shown by cross oblique lines represents pixels having a density value larger than the pixels a , the portion c shown in thick oblique lines represents pixels having a density value larger than the pixels b and the portion d shown fine oblique lines represents pixels having a density value larger than the pixels c , respectively. When the width of the blank space between characters is narrower than rectangles acquired by a scanner, pixels in small density are obtained even when they are in the blank space portion as seen in FIG. 3. Therefore, when this image is binarized, a binarized image in a shape of two bridged characters is obtained as shown in FIG. 4. In a conventional character extracting method, bridged characters were separated using only a binarized image shown in FIG. 4. However, when looking the light and shade image shown in FIG. 3, the contour of a character is in a density larger than that of the central portion of the character. The bridged portion of characters is also not exceptional and pixels corresponding to the blank space are in a density larger than that of the character portion. Therefore, in the present invention, portions in large density are found efficiently and by deciding a bridged character portion, a character area is separated to each character. This will be explained below in detail. FIG. 5 is a block diagram showing the structure of a character extracting device to which the character extracting method of the present invention is applicable. In FIG. 5, a scanner 1, as a character image input means, reads an input document image optically and inputs such a light and shade image as shown in FIG. 3. The light and shade image input by the scanner 1 is temporarily stored in a first image memory 2. A first binarization unit 3 binarizes the light and shade image temporarily stored in the first image memrory 2 according to, for instance, a known Ohtsu's binarization method (Refer to "Automatic Threshold Selection Method according to Discrimination and Minimum Square Standard", by Nobuyuki Ohtsu, Shingakuron (D), vol. J63-D, no. 4, pp. 349-356, 1980) and outputs such a first binarized image as shown in FIG. 4. Furthermore, the binarization method for the light and shade image is disclosed in U.S.Patent No. 5,784,500 (Jul. 21, 1988). The first binarized image output from the first binarization unit 3 is stored in a second image memory 4 temporarily. A bridged character estimation unit 5 estimates (judges) if there are bridged characters based on the first binarized image temporarily stored in the second image memory. Regarding the standard for estimation, in the case where a lateral size of a black pixel area is wider than a vertical size, it is estimated that plural characters are bridged. A second binarization unit 6 operates when the bridged character estimation unit 5 estimates that plural characters are bridged, and when a light and shade image temporarily stored in the first image memory 2 and the first binarized image temporarily stored in the second image memory 4 are input, density values are first taken only from light and shade image pixels corresponding to positions of black pixels of the first binarized image and registered for a histogram. Then, based on the obtained histogram, the second binarization unit 6 obtains a threshold value to halve the density value of the histogram using the above-mentioned known Ohtsu's binarization method. Only when a density value of the same coordinates of the light and shade image out of the black pixel of the binarized image is larger than the obtained threshold value, the black pixels are reversed to white pixels and a new binarized image (a second binarized image) is formed. The second binarized image output from the second binarization unit 6 is stored temporarily in a third image memory 7. A character separation unit 8 decides bridged character positions according to the light and shade image temporarily stored in the first image memory 2, the first binarized image temporarily stored in the second image memory 4 and the second binarized image temporarily stored in the third image memory 7 and separates the character images to each character according to the information on this decided character bridge position. What is separated at this time is the character image (the first binarized image) obtained in the first binarization unit 3. A selection unit 9 selects the stored contents of the second image memory 4 or the output of the character separation unit 8 based on the result of estimation by the bridged character estimation unit 5. That is, when the bridged character estimation unit 5 estimated that there are no bridged characters, the stored contents of the second image memory 4 are selected and when it is estimated that there are bridged characters, the output of the character separation unit 8 is selected. Next, the character extracting method of the present invention will be described in detail referring to a flowchart shown in FIG. 6. First, a light and shade character image is input to the scanner 1 and stored in the first image memory 2 temporarily (S1). Then, the light and shade image in the first image memory 2 is converted into the first binarized image in the first binarization unit 3 using the Ohtsu's binarization method and stored in the second image memory 4 temporarily (S2). Then, the bridged character estimation unit 5 judges if there are bridged characters based on the obtained first binarized image in the second image memory 4 (S3). Regarding the standard for judging bridged characters, when a lateral size of a black pixel area is wider than a vertical size, it is judged that plural characters are bridged. When judged there are no bridged characters, the processing is terminated. In this case, the selection unit 9 selects the first binarized image in the second image memory 4 and forward it to the next recognition processing. When judged there are bridged characters, the second binarization unit 6 takes density values only from light and shade image pixels corresponding to the positions of the black pixels of the first binarized image obtained in the first binarization unit 3 and registers for a histogram (S4). Then, based on the obtained histogram, a threshold value to halve the density value of the histogram is obtained using the Ohtsu's binarization method. When the density values of the same coordinates of the light and shade image out of the black pixels of the binarized image are larger than the threshold value obtained, the black pixels are reversed to the white pixels, and the second binarized image is formed and stored in the third image memory 7 temporarily (S5). FIG. 7 shows an example of the first binarized image binarized in the first binarization unit 3 and FIG. 8 shows an example of the second binarized image binarized in the second binarization unit 6, and in FIGs. 7 and 8, the black rectangles are portions that are regarded to be black pixels in the binarization and white rectangles are portions that are regarded to be white pixels in the binarization. When a density histogram is plotted again for a character area only and binarized, the portions that were made black pixels by the quantization error of the scanner as mentioned above; that is, the closed portions between characters or the contours of the characters are changed into the white pixels because of a density value. Therefore, in FIG. 8, it can be seen that a new blank space is produced between characters "2" and "5" and "5" and "3" (the arrow portions in FIG. 8). Then, in the character separation unit 8, a bridged character position is decided (S6) based on the second binarized image obtained in the second binarization unit 6, the first binarized image obtained in the first binarization unit 3 and the light and shade image input with the scanner 1. The decision of bridged character position will be explained later in detail. Then, based on the information on the decided bridged character position, character images (the first binarized image obtained in the first binarization unit 3) is separated to each character (S7). In this case, the selection unit 9 selects the output of the character separation unit 8 and forward it to the next recognition processing. Next, the bridged character position deciding method in the character separation unit 8 will be explained in detail referring to a flowchart shown in FIG. 9. First, the first binarized image obtained in the first binarization unit 3 is compared with the second binarized image obtained in the second binarization unit 6 and columns containing much pixels that are newly turned to white pixels are detected (S11). Then, the columns detected in Step S11 are checked if there are single black pixels in the vertical direction of the second binarized image (S12). When no single black pixels are detected in the vertical direction as a result of the above check, the operation proceeds to Step S14. When black pixels are detected, the light and shade image input by the scanner 1 is checked (S13). That is, a mean density value at the positions of black pixels in the first binarized image of said column at the same column of the light and shade image is obtained. The same processing is executed for several columns that are left and right to said column. When said column is a bridge to the left and right columns; that is, it is judged whether a mean value of the density values of the left and right columns is smaller than a mean value of density values of said columns. When the mean value is smaller as a result of this judgement, the process proceeds to Step S14 and when not smaller, the characters are withdrawn from the character separation process. Then, whether there are characters at the left and right side (both sides) of the column obtained from the process in Step S12 or Step S13 is checked (S14). The white pixels obtained from the second binarized image are presented at the character edge in addition to the bridged point of characters as shown in FIG. 8. It is therefore necessary to check if there are characters at both ends of said column. For instance, the number of black pixels are counted over several columns at both ends of said column based on the first binarized image and if there were black pixels more than a certain value, it is regarded that there are characters. When no character is found as a result of the check in Step S14, the characters are withdrawn from the character separation process, and when there are characters, the character separation process is executed by the character separation unit (S15). Further, if the resolution of the scanner 1 that inputs character images is small in Step S12 of the flowchart shown in FIG. 9, jump to Step S14 even when there are some black pixels. In this case, as a standard for deciding a separation candidate, a difference between the black pixels of the first binarized image obtained in the first binarization unit 3 and the black pixels of the second binarized image obtained in the second binarization unit 6 is taken and a column having a larger difference is made a candidate column for the character separation. In this case, the threshold value for the size of difference is lowered if the resolution of the scanner 1 is low. As described above, according to the above-mentioned embodiment, it is possible to separate bridged characters that could not be separated so far by a binarized image only. Further, the bridged character separation can be processed with considerably lighter load than all processes using a light and shade image only. Accordingly, the bridged characters that are difficult to find from the viewpoint of shape can be found and separated highly precisely and efficiently. As described above in detail, according to the present invention, a character extracting method capable of finding and separating bridged characters highly precisely and efficiently from the viewpoint of shape can be provided.

Claims: A character extracting method in a character recognition device for recognizing characters according to input light and shade character images, comprising: a first step for obtaining a first binarized image of the input character images binarized in accordance with a first threshold value based upon at least a density value of each pixel in the input character images to separate the first binarized image into a character area and a background area; a second step for obtaining a second binarized image by binarizing portions corresponding to the character area separated in the first step in accordance with a second threshold value based upon a density value of each pixel corresponding to the character area of the first binarized image to separate the second binarized image into at least two areas; and a third step for separating the first binarized image into individual separated characters in accordance with the second binarized image separated in the second step. A method according to claim 1, wherein the third step includes a step of separating the characters into individual characters using a pixel line or a pixel column as a separating point, which has a large difference between the first binarized image obtained in the first step and the second binarized image obtained in the second step. A method according to claim 1, wherein the third step includes a step of comparing between density values at both sides of a region to be separated and a density value of the region itself to be separated and separating the characters into individual characters only when the density values at both sides are smaller than the density value of the region itself to be separated. A method according to claim 1, wherein the second step includes a step of separating the characters into individual characters based on a histogram which is formed using the density values of the pixels at the positions applicable to the character area. A method according to claim 2, wherein, when deciding a separating point based on a difference between the density value of the first binarized image obtained in the first step and the density value of the second binarized image obtained in the second step, the threshold value for deciding the separating point is varied based on a resolution value of the input character image. A character separating method according to claim 1 further comprising the steps of: a fourth step for judging whether character images are bridged based on the first binary images obtained in the first step, wherein the second and third steps are executed when the characters are judged as being bridged in the fourth step. A character extracting device in a character recognition device for recognizing characters according to input light and shade character images, comprising: first means for obtaining a first binarized image of the input character images binarized in accordance with a first threshold value based upon at least a density value of each pixel in the input character images to separate the first binarized image into a character area and a background area; second means for obtaining a second binarized image by binarizing portions corresponding to the character area separated by the first means in accordance with a second threshold value based upon a density value of each pixel corresponding to the character area of the first binarized image to separate the second binarized image into two areas or more; and third means for separating the first binarized image into individual separated characters in accordance with the second binarized image separated by the second means. A device according to claim 7, wherein the third means includes means for separating the characters into individual characters using a pixel line or a pixel column as a separating point, which has a large difference between the first binarized image obtained by the first means and the second binarized image obtained by the second means. A device according to claim 7 wherein the third means includes means for comparing between density values at both sides of a region to be separated and a density value of the region itself to be separated and separating the characters into individual characters only when the density values at both sides are smaller than the density value of the region itself to be separated. A device according to claim 7, wherein the second means includes means for separating the characters into individual characters based on a histogram which is formed using density values of the pixels at the positions applicable to the character area. A device according to claim 8, wherein the deciding a separating point based on a difference between the density value of the character area obtained by the first means and the density value of the area obtained by the second means, a threshold value for deciding a separating point is varied based on a resolution value of an input character image. A character recognition device comprising: a scanner for acquiring character images by optically reading input document images; a first image memory to store the character images acquired by the scanner; a first binarization unit for binarizing the character images stored in the first image memory to produce a first binarized image; a second image memory for storing the first binarized image produced by the first binarization unit; a bridge characters estimation unit to estimate whether there are bridged characters according to the first binarized image stored in the second image memory; a second binarization unit for producing a second binarized image by reversing the black pixels to white pixels when the bridge character estimation unit estimates bridged plural characters, in which density values are taken only from the pixels of the character images at a position equivalent to that of the black pixelsof the first binarized images based on the character images stored in the first image memory and the first binarized image stored in the second image memory and a histogram is registered, and a threshold value is obtained based on the registered histogram, out of the black pixels of the first binarized image, whose density value at the same coordinates of the character images is higher than the obtained threshold value; a third image memory for storing the second binarized image produced by the second binarization unit; a character separation unit to decide a bridged character position based on the character images stored in the first image memory, the first binarized image stored in the second image memory and the second binarized image stored in the third image memory and separate bridged character image into individual characters according to the decided character position information; and a recognition unit for recognising the individual characters separated by the character separation unit.

Inventors: AKAGI TAKUMA, AKAGI, TAKUMA, Akagi, Takuma, IPD, Toshiba Corporation
Applicants: TOSHIBA KK, KABUSHIKI KAISHA TOSHIBA
Application year: 2000
Main classification: G06K9
IPC codes: G06K9