Information processing device, information processing method, and program

The information processing apparatus addresses the challenge of detecting and recognizing character strings in documents with mixed orientations by determining and rotating document images, ensuring accurate character recognition in documents with both horizontal and vertical writing.

JP7532124B2Active Publication Date: 2024-08-13CANON KK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2020122994
Authority / Receiving Office
JP · JP
Patent Type
Patents
Current Assignee / Owner
Filing Date
2020-07-17
Publication Date
2024-08-13
Estimated Expiration
2040-07-17

AI Technical Summary

Technical Problem

Existing OCR technologies struggle to accurately detect and recognize character strings in documents with both horizontal and vertical writing, particularly in small business cards with complex layouts, such as those containing logos or vertically written names.

Method used

An information processing apparatus that determines the writing direction of a document image and rotates it if necessary, followed by character string detection and recognition processes tailored for horizontal or vertical writing, including image rotation and post-processing to align characters upright for accurate recognition.

Benefits of technology

Enables high-accuracy detection and recognition of character strings in documents with both horizontal and vertical writing, even in complex layouts, by appropriately handling rotated images and integrating recognition results for improved accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 0007532124000001
    Figure 0007532124000001
  • Figure 0007532124000002
    Figure 0007532124000002
  • Figure 0007532124000003
    Figure 0007532124000003
Patent Text Reader

Abstract

To enable highly accurate character recognition processing on document images even when dealing with documents of various formats.SOLUTION: An information processing device for performing character string detection processing suitable for identifying a horizontal character string area is provided, the information processing device being configured to perform character string detection processing as it is for a document image with a horizontal line direction, and perform character string area detection processing for a document with a vertical line direction after rotating the image 90 degrees to make the line direction horizontal.SELECTED DRAWING: Figure 2
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to a technique for identifying an area in which a character string is written that is included in a document image. [Background technology]

[0002] Conventionally, there is a technology for reading and recognizing characters in a document image obtained by scanning a document. This technology is generally called OCR (Optical Character Recognition). OCR processing is usually composed of image preprocessing for modifying a document image into an image suitable for OCR, character string detection processing for identifying a region in which characters are written (character string region) from the document image, and character recognition processing for identifying each character included in the detected character string region. Regarding such OCR processing, Patent Document 1 discloses a technology for detecting a character string region from the vertical and horizontal projections of the entire image and performing character recognition for a document image obtained by scanning a general horizontally written document. Patent Document 2 discloses a technology for detecting a circumscribing frame of a character string from the vertical and horizontal projections of the entire image for a document image obtained by scanning a business card, and further identifying a name portion based on the number of connected pixels within the circumscribing frame and performing character recognition. [Prior art documents] [Patent documents]

[0003] [Patent Document 1] Japanese Patent Application Publication No. 7-200733 [Patent Document 2] Japanese Patent Application Publication No. 6-96270 Summary of the Invention [Problem to be solved by the invention]

[0004] The results of the above OCR processing have been used to index document images, and one use case for this indexing is scanning and saving business cards. Business cards are different from general documents in that they are small in size and usually contain a small number of characters. There are also vertical business cards with names and other information written vertically.

[0005] In the above indexing, even for documents with vertical writing and a small number of characters (low character density) such as the above-mentioned vertical business card, it is required to appropriately detect character string areas from the document image and perform character recognition processing with high accuracy. However, the technology of Patent Document 1 is designed only for general documents, that is, documents with horizontal writing and a large number of characters (high character density), and cannot process documents such as vertical business cards with high accuracy. In addition, the technology of Patent Document 2 is a technology specialized for business cards, and does not take into account documents with complex layouts where projection is difficult, such as when there is a pattern such as a company logo near the name.

[0006] The technology disclosed herein has been developed in consideration of the above problems, and aims to properly detect character string areas and perform character recognition processing with high accuracy even when the document to be processed contains a mixture of horizontal and vertical writing. [Means for solving the problem]

[0007] The information processing device according to the present disclosure includes a determination unit that performs a process of determining whether a document image in which characters are written upright is written vertically or horizontally, a rotation unit that performs a process of rotating the document image, and a detection unit that performs a character string detection process suitable for identifying a horizontally written character string area. a character recognition means for performing a character recognition process on the character string area detected by the character string detection process; When the result of the determination is that the text is written horizontally, the detection means performs the character string detection process on the document image that is not rotated by the rotation means, and when the result of the determination is that the text is written vertically, the detection means performs the character string detection process on the document image that has been rotated 90 degrees by the rotation means. stomach , When the result of the determination is vertical writing, the character recognition means performs a first character recognition process on an image of the character string area detected in the character string detection process rotated -90 degrees, and further performs a second character recognition process on an image of the character string area rotated 90 degrees in which alphanumeric characters are dominant among the character string areas that were the subject of the first character recognition process. Effect of the Invention

[0008] According to the technology disclosed herein, character string areas can be appropriately detected even if the document to be processed contains a mixture of horizontal and vertical writing, and as a result, character recognition processing can be performed with high accuracy. [Brief description of the drawings]

[0009] [Figure 1] FIG. 1 is a diagram showing a hardware configuration of an information processing system. [Diagram 2] 4 is a flowchart showing the flow of processing in the entire system. [Diagram 3] An example of a vertically written document image. [Figure 4] An example of a horizontally written document image. [Diagram 5] 1A and 1B are diagrams illustrating how a character string region is detected from a vertically written document image. [Figure 6] 11 is a flowchart showing details of post-processing. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0010] Hereinafter, an embodiment of the present invention will be described with reference to the drawings. Note that the embodiment does not limit the present invention, and all of the configurations described in the embodiment are not necessarily essential means for solving the problems of the present invention.

[0011] [Embodiment 1] [Hardware configuration] 1 is a diagram showing the hardware configuration of an information processing system according to this embodiment. The information processing system includes a copying machine 100 and an information processing device 110. The copier 100 includes a scanner 101 and a copier communication unit 102. The scanner 101 scans a document and generates a document image. The copier communication unit 102 communicates with external devices including an information processing device 110 via a network.

[0012] The information processing device 110 includes a system control unit 111, a ROM 112, a RAM 113, a HDD 114, a display unit 115, an input unit 116, and an information processing device side communication unit 117. The system control unit 111 is composed of a calculation device such as a CPU, and reads out a control program stored in the ROM 112 to execute various processes. The RAM 113 is used as a temporary storage area such as a main memory and a work area of ​​the system control unit 111. The HDD 114 stores various data and various programs. The functions and processes of the information processing device 110 described later are realized by the system control unit 111 reading out a program stored in the ROM 112 or the HDD 114 and executing the program. The information processing device side communication unit 117 performs communication processing with external devices including the copying machine 100 via a network. The display unit 115 displays various information. The input unit 116 includes a keyboard and a mouse, and accepts various operations by a user. The display unit 115 and the input unit 116 may be provided integrally, such as a touch panel. The display unit 115 may project an image using a projector, and the input unit 116 may recognize the position of a fingertip relative to the projected image using a camera.

[0013] In this embodiment, a scanner 101 of a copying machine 100 scans a paper document such as a business card to generate a document image. The document image is transmitted to an information processing device 110 by a copying machine side communication unit 102. In the information processing device 110, an information processing device side communication unit 117 receives the document image and stores it in a storage device such as an HDD 114.

[0014] 1 is an example of a configuration for implementing this embodiment, and for example, some functions of the display unit 115 and the input unit 116 may be included in the copier 100. Also, the copier 100 and the information processing device 110 may be integrated into one configuration.

[0015] <Overall processing flow> Next, the operation flow of software for implementing COR processing on document images in the information processing system according to this embodiment will be described with reference to Fig. 2. The series of processes shown in the flowchart in Fig. 2 are implemented by the system control unit 111 reading out a predetermined program from the ROM 112 or the like and executing it. In the following description, the symbol "S" means a step.

[0016] First, in S201, data of a document image is acquired from the HDD 114. Next, in S202, a process of determining the type of the document of the acquired document image is executed. In this embodiment, it is determined whether the document type is a business card or a non-business card. This determination is made based on the scan resolution and the document image size. For example, when the scan resolution is 300 DPI, if the long side of the document image obtained by scanning is within the range of 1040 pixels ± 5% and the short side is within the range of 615 pixels ± 5%, it is determined to be a business card, and if it is outside the range, it is determined to be a non-business card. Note that the method of determining the document type is not limited to the method based on the image size. For example, information specifying the document type may be received from the input unit 116, or the feature amount may be calculated from the document image and the determination may be made using a discrimination model that has been learned in advance.

[0017] Based on the result of the determination in S202, the process flow branches in S203. If it is determined that the object is not a business card, the process proceeds to S204, and if it is determined that the object is a business card, the process proceeds to S205. In S204, a general-purpose character recognition process that is independent of the document type is executed. When the character recognition process is completed, this process ends.

[0018] In S205, a process for correcting the skew of the document image is executed. The document image generated by the scanner 101 is skewed depending on how the document is placed on the platen. Therefore, a skew correction process is performed to obtain a document image without skew. The skew correction process may be performed by applying a known method disclosed in Japanese Patent No. 4114959 or the like.

[0019] Next, in S206, a process is executed to determine the character direction in the document image. Here, the character direction is defined as the direction of the characters in the document image when the direction in which the characters are upright is set to 0 degrees. In the document image that has been subjected to the tilt correction process in S205, the original may be rotated in 90 degree increments. Therefore, the known method disclosed in Japanese Patent No. 3727971 and the like is applied to obtain the character direction of the document image.

[0020] Next, in S207, a process of rotating the document image is executed based on the character direction determined in S206, thereby obtaining a document image in which the characters are upright.

[0021] Next, in S208, a process of extracting character pixels from the document image is executed. In this embodiment, character pixels are extracted by binarization, which involves performing threshold processing on the luminance value of each pixel. For binarization, a known method such as Otsu's binarization may be applied. Since characters in a document are usually printed in a darker color than the background, pixels with a luminance value smaller than the threshold value are regarded as character pixels. Note that the method of extracting character pixels is not limited to the method using threshold processing. For example, it may be realized by a method of extracting image features from a neighboring area centered on an arbitrary pixel of interest, and inferring whether the pixel of interest is a character pixel or not based on a discrimination model previously learned based on the features.

[0022] Next, in S209, a process of determining the line direction is executed based on the character pixels extracted in S208. The line direction here refers to the direction in which characters are arranged in the document image, and in this embodiment, it is either the horizontal direction or the vertical direction. As a determination method, for example, a method of generating a projection histogram for each of the vertical and horizontal directions for the entire document image and determining the direction with the smallest variance as the line direction is used. By this line direction determination process, for example, the line direction of the business card image 301 shown in FIG. 3 is determined to be vertical (vertical), and the line direction of the business card image 401 shown in FIG. 4 is determined to be horizontal (horizontal). The obtained determination result is stored in RAM 113.

[0023] In the next step S210, the process flow branches based on the result of the determination in step S209. If the result of the determination is that the row direction is horizontal, the process proceeds to step S211, and if the row direction is vertical, the process proceeds to step S212.

[0024] In S211, when the line direction is horizontal, a character string detection process suitable for identifying a horizontal character line is executed. Specifically, the document image is scanned horizontally for the presence or absence of black pixel blocks, and multiple black pixel blocks with a certain range of spacing between them are identified, and a circumscribed rectangular area surrounding the identified multiple black pixel blocks is detected as one character string area. When the characters are arranged horizontally in the document image, the gap between characters (spacing between black pixel blocks = number of white pixels) is usually narrower in the horizontal direction (left and right direction) than in the vertical direction (up and down direction). Therefore, a character string area is detected from the document image by performing area analysis with processing parameters adjusted to be suitable for identifying a group of characters written horizontally. As a specific method for detecting a character string, a known method disclosed in JP-A-7-200733 and the like may be applied. As a result, when the character string detection process is executed on the business card image 401 in FIG. 4, which has a horizontal line direction, five horizontally long rectangular character string areas 402 to 406 are detected as shown in the lower part of the figure. Information on the detected character string area is stored in the RAM 113.

[0025] In S212, when the line direction is vertical, a rotation process for rotating the document image by 90 degrees is executed prior to the character string detection process. For example, business card image 301 in FIG. 3, which has a vertical line direction, is rotated by 90 degrees to generate business card image 501, as shown in FIG. 5, in which the top and bottom of the business card are aligned horizontally. The business card image after such rotation process is stored in RAM 113. As a result, characters arranged vertically on the original (business card) are arranged horizontally in the rotated image. This allows a document image with vertical line direction to be treated as a pseudo-horizontal document image, making it possible to apply the character string detection process common to S211 described above.

[0026] In the next S213, similar to S211 described above, a character string detection process suitable for identifying a horizontally written character line is executed. For example, in the case of the business card image 501 of FIG. 5, which is obtained by rotating the business card image 301 by 90 degrees, five character string areas 502 to 506 are detected as shown in the center of the figure. Information on the character string areas detected in this way is stored in the RAM 113. If the character string detection process is performed directly on the business card image 301 before rotation shown in FIG. 3, six character string areas 302 to 307 are detected as shown on the right side of the figure. In this example, it can be seen that the part of the surname "Jono" has been separated into separate character string areas. In the case of a business card to be processed that is vertically long and written vertically, it can be seen that the character string area of ​​the character part where the characters are widely spaced and discretely arranged, such as the name, can be more appropriately detected by rotating the image by 90 degrees as in this embodiment and then performing the character string detection process.

[0027] Next, in S214, the character string area detected in S213 is rotated by -90 degrees, that is, the character string area is rotated by the same angle in the opposite direction to the direction of rotation in S212. This causes the characters in the character string area to return to an upright state. At this time, a partial image corresponding to the detected character string area may be rotated by -90 degrees. For example, partial images of character string areas 502, 503, 504, 505, and 506 may be cut out from the rotated business card image 501 shown in FIG. 5, and each partial image may be rotated by -90 degrees. In addition, the coordinate information of the detected character string area may be rotated by -90 degrees, and the coordinate information after the rotation may be applied to the document image in which the characters obtained in S207 are formed. For example, coordinate information rotated by -90 degrees corresponding to character string areas 502', 503', 504', 505', and 506' in the business card image 501' in FIG. 5 is obtained, and the obtained coordinate information is applied to the document image 301 in which the characters are upright. This makes it possible to obtain a character string area in which the characters are upright.

[0028] In S215, character recognition processing is performed on each character string region acquired in S214. As an example of character recognition processing, there is a method of inferring the character code of a character included in a partial image corresponding to a character string region using a trained model. The trained model is an identification model trained to input a character image and output its character code. Similarly, in S216, character recognition processing is performed on each character string region detected in S211. When the character recognition processing in S216 is completed, this processing ends.

[0029] In S217, post-processing is performed on the character recognition result obtained in S215. The details of this post-processing will be described later. When the post-processing is completed, this process ends.

[0030] The above is the operational flow of the software that realizes COR processing on document images.

[0031] <Details of post-processing> Next, the post-processing in S217 will be described with reference to the flowchart in FIG.

[0032] In S601, the recognition result (character code) obtained in the character recognition process in S215 is divided into lines. If the recognition result contains a line feed code, it can be divided at that point. Furthermore, using position information for each character contained in the recognition result divided into lines, coordinate information of the circumscribing rectangle of each character string area after division into lines is generated. For example, in the case of character area 505 consisting of multiple lines in business card image 501 of FIG. 5, it is divided into two character string areas 508 and 509 as shown by reference numeral 507, and coordinate information of the circumscribing rectangle corresponding to each divided character string area is generated. The obtained coordinate information of the character string areas for each line is stored in RAM 113 together with the character codes for each line.

[0033] Next, in S602, it is determined whether alphanumeric characters are dominant in the character sequence region for each line obtained in S601 based on the character code. For example, as in business card image 301, email addresses and URLs of homepages written on vertically long business cards are often written in a format rotated 90 degrees from horizontal writing. In general-purpose character recognition processing, a discrimination model is generally constructed on the assumption that characters are upright, but email addresses and the like can also be recognized by separately learning image features of rotated characters. On the other hand, erroneous determination of similar vertically written characters may also be mixed in. For this reason, it is determined from the recognition result whether alphanumeric characters are dominant in the character line, that is, whether there is a high possibility that it is an email address or a URL. For example, if the number of recognized characters in one line is five or more and the majority of the characters in the line are alphanumeric characters, it may be determined that alphanumeric characters are dominant. The reason for setting the condition of at least five characters is based on the standard technical specifications of URL domains and email addresses. If it is determined that alphanumeric characters are predominant, the process proceeds to S603, and if not, the process ends.

[0034] In S603, the coordinate information of the line-by-line character string area determined to be dominated by alphanumeric characters is rotated 90 degrees to change the vertical character string area to horizontal. At this time, a partial image of the line-by-line character string area may be generated and the partial image may be rotated 90 degrees. Alternatively, only the coordinate information may be rotated 90 degrees and the 90-degree rotated coordinate information may be applied to the document image (see business card image 501 in FIG. 5) that has been generated and rotated for character string detection. This results in a character string area that is originally vertical but has been turned horizontal, such as character string area 510 in FIG. 5. This results in a character string area in which the characters inside are upright. The character string area after the 90-degree rotation is stored in RAM 113.

[0035] Next, in S604, character recognition processing is performed on the rotated character string region obtained in S603. The character recognition processing performed here may be the same as the character recognition processing in S215 and S216 described above, or may be a dedicated character recognition processing using a trained model that limits the types of characters to be recognized to alphabets, numbers, and symbols that can be used in email addresses and URLs. The obtained recognition results are stored in RAM 113.

[0036] Next, in S605, the recognition result obtained in S604 is integrated with the recognition result obtained in the previous character recognition process in S215. This integration can be said to be a process of converting the coordinate information of the recognition result in S604 into one that matches the coordinate system of the original document image and incorporating it into the recognition result in S215. For example, in the character recognition process in S215 that is executed first, the coordinate system follows the business card image 501' in FIG. 5. In contrast, in the character recognition process in S604 in the post-processing, the character string area 505' (after division into line units, the character string areas 508 and 509) in the business card image 501' is rotated 90 degrees to the side to become the character string area 510, so the coordinate systems do not match. Therefore, the coordinate information of the recognition result of the character string area 510 obtained in S604 is converted to the coordinate system in 507, that is, the coordinate information so that it corresponds to the position of 505'. In this way, the coordinate systems are matched, and the recognition result obtained in the post-processing and the recognition result obtained earlier are integrated into one. The integrated result is stored in the RAM 113 .

[0037] The above is the content of the post-processing according to this embodiment.

[0038] According to this embodiment, when the target document is, for example, a vertically oriented business card, the image is rotated so that the lines are oriented horizontally, and then a horizontal character string detection process is applied, and the detected character string area is returned to an upright orientation and character recognition process is performed. This makes it possible to obtain highly accurate character recognition results. Even if horizontally written alphanumeric characters are arranged in a vertically written business card at a 90 degree angle, the characters are rotated in a post-processing step so that they are upright, and character recognition process is performed again, and the recognition result is integrated with the previous recognition result. This makes it possible to perform highly accurate character recognition on horizontally written email addresses and URLs included in vertically written business cards.

[0039] (Other Examples) The present invention can also be realized by a process in which a program for implementing one or more of the functions of the above-described embodiments is supplied to a system or device via a network or a storage medium, and one or more processors in a computer of the system or device read and execute the program. The present invention can also be realized by a circuit (e.g., ASIC) that implements one or more of the functions.

Claims

1. A determination means that performs a process to determine whether a document image, in which the characters written in the document are upright, is written vertically or horizontally, A rotation means for performing a process of rotating the document image, A detection means that performs a string detection process suitable for identifying a horizontally written string area, Character recognition means for performing character recognition on the character region detected by the aforementioned character detection process, Equipped with, The detection means is If the result of the above determination is horizontal writing, the character detection process is performed on the document image that has not been rotated by the rotation means. If the result of the above determination is vertical writing, the text detection process is performed on the document image rotated 90 degrees by the rotation means. The aforementioned character recognition means is If the result of the above determination is vertical writing, the first character recognition process is performed on the image of the character region obtained by rotating the character region detected in the above character detection process by -90 degrees. Furthermore, a second character recognition process is performed on the image of the character string region obtained by rotating the alphanumeric-dominant character string region from the character string region that was the target of the first character recognition process by 90 degrees. An information processing device characterized by the following:

2. The information processing apparatus according to claim 1, characterized in that the detection means scans horizontally for the presence or absence of black pixel clusters in the document image, identifies a plurality of black pixel clusters whose intervals from each other are within a certain range, and detects the bounding rectangular region surrounding the identified plurality of black pixel clusters as the string region.

3. The information processing apparatus according to claim 1 or 2, characterized in that the image of the detected string region rotated by -90 degrees is obtained by either a process of rotating the partial image corresponding to the string region detected in the string detection process by -90 degrees, or a process of rotating the coordinate information of the string region detected in the string detection process by -90 degrees and applying the coordinate information after -90 degrees rotation to the document image that has not been rotated by the rotation means.

4. The information processing apparatus according to any one of claims 1 to 3, wherein the image of the string region obtained by rotating the alphanumeric-dominant string region by 90 degrees is obtained by either a process of rotating a partial image of the alphanumeric-dominant string region that was the subject of the first character recognition process by 90 degrees, or a process of rotating the coordinate information of the alphanumeric-dominant string region by 90 degrees and applying the coordinate information after the 90-degree rotation to the document image rotated by 90 degrees by the rotation means.

5. The information processing apparatus according to any one of claims 1 to 4, characterized in that the alphanumeric character-dominant character range is a line-by-line character range determined to be alphanumeric based on the result of the first character recognition process.

6. The information processing apparatus according to any one of claims 1 to 5, characterized in that the character recognition means has means for integrating the result of the first character recognition process and the result of the second character recognition process.

7. The information processing apparatus according to any one of claims 1 to 6, characterized in that the second character recognition process is a character recognition process that recognizes the types of characters used in an email address or URL.

8. The information processing device according to any one of claims 1 to 7, characterized in that the document is a business card.

9. A determination step in which the determination means of the information processing device performs a process to determine whether a document image in which the characters written in the document are upright is written vertically or horizontally, The rotation means of the information processing device performs a rotation step of rotating the document image, The detection means of the information processing device performs a detection step suitable for identifying a horizontally written character area, The character recognition means of the information processing device performs a character recognition process on the character string region detected in the character string detection process, Includes, In the aforementioned detection step, If the result of the above determination is horizontal writing, the text detection process is performed on the document image that has not been rotated in the rotation step. If the result of the above determination is vertical writing, the text detection process is performed on the document image that has been rotated 90 degrees in the rotation step. In the above character recognition step, If the result of the above determination is vertical writing, the first character recognition process is performed on the image of the character region obtained by rotating the detected character region by -90 degrees. Furthermore, a second character recognition process is performed on the image of the character string region obtained by rotating the alphanumeric-dominant character string region from the character string region that was the target of the first character recognition process by 90 degrees. An information processing method characterized by the following:

10. A program for causing a computer to function as an information processing device according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Business card recognizing device

    JP1994096270A

  • Method and device for recognizing character

    JP1995200733A

  • Heat developable photosensitive material

    JP1996122994A

  • Apparatus, method, and program for character string extraction, and computer-readable recording medium

    JP2009289038A

  • Document recognition device, document recognition method and program

    JP2013206258A