Information processing device, information processing method and program
By specifying OCR target areas within table cells based on conditions, the system accurately determines reading areas and items in form images without printed text, improving form definition efficiency.
Patent Information
- Application Number
- JP2023109987
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-07-04
- Publication Date
- 2025-01-20
AI Technical Summary
Existing standard form analysis systems fail to accurately determine reading areas when no character strings are printed or written in the form image, complicating the form definition process.
A mechanism that specifies OCR target areas by identifying cells within a table layout, setting multiple OCR target areas based on predetermined conditions, and associating cells to determine reading areas even without printed character strings.
Enables accurate estimation of reading areas and derivation of items within those areas, even when character strings are absent, enhancing the form definition process.
Smart Images

Figure 2025008107000001_ABST
Abstract
Description
[Technical field]
[0001] The present invention relates to an information processing device, an information processing method, and a program. [Background technology]
[0002] There is a need for standard form analysis in business. Standard form analysis involves extracting specific character string information (such as an address or name) from form image data with a known layout. In standard form analysis, form definition is an important task. Form definition involves the worker specifying the range of the area to be read (hereafter referred to as the "read area") for the form to be read, mainly in rectangular format, and setting the conditions under which characters that may be written or printed within the read area will be processed using optical character recognition (hereafter referred to as "OCR").
[0003] Recently, there has been a demand for semi-automation of form definition work to reduce the burden of this work.One example of semi-automation of form definition work is a system that automatically determines the reading area from the form image data and the optimal OCR settings for that reading area, and then the automatically determined results are checked and corrected by the operator.
[0004] Since the layout of a form is generally divided into a header and a reading area cell in a table, it is important to determine the reading area within the table. Therefore, as a form definition work support process, it is considered to associate the header cell with the adjacent reading area cell on a one-to-one basis, and to set the OCR settings to the optimum settings for reading the items represented by the header.
[0005] However, depending on the layout of the form, there are cases where it is not possible to have a one-to-one correspondence between the header cells and the read area cells, such as when a postal code read area needs to be set within an address read area, or when a reading area for the name needs to be set within a name read area.
[0006] Patent Document 1 discloses a standard form analysis system including a form definition work support function. In detail, Patent Document 1 describes a technology for supporting form definition work, in which a form with a character string already printed in the reading area is used as input, and the range of the reading area and which item the area corresponds to are determined from the character string printed in the table. Patent Document 1 also describes an effect that, by using the printed character string as a clue, the range of the reading area can be accurately estimated even if a reading area for another item exists within one reading area. [Prior art documents] [Patent documents]
[0007] [Patent Document 1] JP 2021-140831 A Summary of the Invention [Problem to be solved by the invention]
[0008] However, the technology of Patent Document 1 requires that a character string is printed in the reading area of the form image as a prerequisite. Therefore, there is a possibility that analysis of the reading area will fail for forms on which no character string is printed or written in the reading area. Furthermore, preparing a form on which a character string is printed or written in the reading area of the form is a cumbersome task.
[0009] The present invention has been made to solve the above-mentioned problems, and an object of the present invention is to provide a mechanism that enables a reading area related to an item to be more appropriately specified. [Means for solving the problem]
[0010] The present invention is characterized by comprising a first identification means for identifying OCR target cells for setting an OCR target area among each cell of a table included in an acquired image, and an OCR target area setting means for setting multiple OCR target areas for cells among the OCR target cells identified by the first identification means that satisfy predetermined conditions. Effect of the Invention
[0011] According to the present invention, it is possible to more appropriately identify the reading area related to the item. As a result, even if a character string serving as a value is not written or printed in the reading area, the reading area can be estimated and the item of the area can be derived. [Brief description of the drawings]
[0012] [Figure 1] FIG. 1 is a diagram showing an example of a system configuration of a form definition support system according to an embodiment of the present invention. [Diagram 2] FIG. 2 is a diagram showing an example of a hardware configuration of an information processing apparatus according to the present embodiment. [Diagram 3] FIG. 2 is a diagram showing an example of a functional configuration of the information processing device according to the present embodiment. [Figure 4] 6 is a flowchart showing an example of a reading area estimation process according to the embodiment. [Diagram 5] 5 is a flowchart showing an example of a cell type determination process in the present embodiment. [Figure 6] 10 is a flowchart showing an example of cell association processing in the present embodiment. [Figure 7] 6 is a flowchart showing an example of a process for determining a reading area in the present embodiment. [Figure 8A] 6A to 6C are diagrams showing an example of a table output by table detection processing, a data table output by cell detection processing, and character recognition processing within a cell in the embodiment. [Figure 8B] 6A to 6C are diagrams showing an example of a data table output by a character string heading determination process and a cell type determination process in the embodiment. [Figure 9] 5A to 5C are diagrams showing examples of types of cells in a table according to the embodiment. [Figure 10] 6A to 6C are diagrams showing an example of a table indicating correspondence between cells and the data structure of each cell output by the cell correspondence process in this embodiment. [Figure 11] 6A and 6B are diagrams showing an example of a result of a reading area determination process in the embodiment. [Figure 12A] 11A and 11B are diagrams showing an example of a table of aliases of item names and a table of pairs of main headings and sub-headings in the embodiment. [Figure 12B] FIG. 13 is a diagram showing an example of a table showing area division rules for each alias of an item name in the present embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0013] Fig. 1 is a diagram showing an example of the system configuration of a form definition support system according to an embodiment of the present invention. Note that the configurations of the various terminals shown in Fig. 1 are merely examples, and it goes without saying that there are various configuration examples depending on the purpose and use.
[0014] 1, in the form definition support system according to this embodiment, an information processing device 101 such as a PC (Personal Computer) and an image reading device 102 such as a scanner are connected to each other so that they can communicate with each other. Here, an example will be described in which the information processing device 101 and the image reading device 102 are connected via a wired or wireless local area network (LAN) 103, but they may also be connected via various wired interfaces such as a USB interface, or a wireless interface such as Bluetooth (registered trademark).
[0015] Furthermore, the information processing device 101 may be a server, and the information processing device 101 as a server and the image reading device 102 may be communicably connected via a wide area network such as the Internet. The information processing device 101 as a server may be realized by one computer or by multiple computers. For example, the information processing device 101 may be configured to be realized using cloud computing technology. Note that, when the information processing device 101 is a server, a user accesses the information processing device 101 using a web browser or various applications from a PC, tablet terminal, smartphone, or the like (not shown) and issues various instructions.
[0016] FIG. 2 is a block diagram showing an example of a hardware configuration of the information processing device 101. As shown in FIG. The CPU 201 performs overall control of each device and controller connected to the system bus 204. The ROM 202 or external memory 211 stores a BIOS (Basic Input / Output System), which is a control program for the CPU 201, an operating system program (hereinafter referred to as "OS"), and various programs necessary for implementing various functions according to this embodiment. The RAM 203 functions as the main memory, work area, etc. of the CPU 201. The CPU 201 loads programs, etc. necessary for executing processing into the RAM 203 as necessary and executes them to implement various operations.
[0017] Moreover, an input controller (input C) 205 controls input from an input unit 209 which represents a pointing device such as a keyboard or a mouse (not shown). A video controller (VC) 206 controls display on a display unit 210 such as a liquid crystal display. The display unit 210 is not limited to a liquid crystal display, and may be another display device.
[0018] A memory controller (MC) 207 controls access to an external memory 211 such as a hard disk (HD) or a solid state drive (SSD) that stores a boot program, browser software, various applications, font data, user files, edited files, various data, etc. A communication I / F controller (communication I / FC) 208 connects to and communicates with external devices via a network or various interfaces, and executes, for example, communication control processing on the network.
[0019] Fig. 3 is a diagram showing an example of the functional configuration of the information processing device 101. The CPU 201 of the information processing device 101 realizes each function shown in Fig. 3 by loading a program stored in the external memory 211 or the like into the RAM 203 as necessary and executing the program.
[0020] 3, an input receiving unit 300 receives form image data (hereinafter, "form image") captured by an image reading device 102 or the like. Note that the input receiving unit 300 can also receive form images stored in an external memory 211 or a storage area (not shown) that can communicate via a network 103, in addition to the image reading device 102.
[0021] The table detection unit 310 detects tables from within the form image input from the input reception unit 300 . The table analysis unit 320 detects cells from within the table detected by the table detection unit 310, and performs character detection and character recognition from within the detected cells.
[0022] The cell heading determination unit 330 performs heading determination based on the character string information in the cell recognized by the table analysis unit 320 to determine whether the character string is a heading representing an item name, and performs cell type determination based on the determination result.
[0023] The reading area estimation unit 340 associates the header cells with the reading area cells based on the cell information determined by the cell header determination unit 330, and determines the reading area for each item based on the association result.
[0024] The database 350 stores and manages data output from the table analysis unit 320, the cell header determination unit 330, the reading area estimation unit 340, etc. The substance of the data managed by the database 350 is stored in the external memory 211, for example.
[0025] Next, the processing executed by the information processing device 101 in the embodiment of the present invention will be described with reference to the flowcharts of Figures 4 to 7. The processing shown in the flowcharts of Figures 4 to 7 corresponds to processing executed by the CPU 201 of the information processing device 101 reading and executing a program from the external memory 211 or the like. In addition, in the description of the above flowcharts, Figures 8A, 8B, 9 to 11, 12A, and 12B will be used. Hereinafter, Figures 8A and 8B will be collectively referred to as "Figure 8", and Figures 12A and 12B will be collectively referred to as "Figure 12".
[0026] FIG. 4 is a flowchart showing an example of a process for correctly estimating a reading area from a table of a layout in which a reading area of one item exists within a reading area of another item in this embodiment. In S401, the input receiving unit 300 acquires a form image captured by the image reading device 102 or the like.
[0027] Next, in S402, the table detection unit 310 performs preprocessing on the form image acquired in S401 above for processing in the subsequent steps. Examples of this preprocessing include binarization and noise removal. Next, in S403, the table detection unit 310 detects tables from within the form image that has been preprocessed in S402. For example, it is assumed that the table 800 in Fig. 8(a) is detected from within the form as a result of this table detection.
[0028] Next, in S404, the table analysis unit 320 detects cells in the table detected in S403. Known table detection methods and cell detection methods include, for example, the method described in JP 2021-96543 A. Here, as a result of performing cell detection on the table 800 in FIG. 8(a), for example, a table 810 representing the cell information in FIG. 8(b) is output to the database 350. However, the in-cell character string list 813, which is one of the elements of the record constituting the table 810 at the time of S404, is null data.
[0029] Specifically, the cell detection result for table 800 is that cell 801 in table 800 is detected as a cell with cell ID = "0" and cell position coordinates = [0,0,50,100] (814). Cell 802 is detected as a cell with cell ID = "1" and cell position coordinates = [50,0,400,100] (815). Cell 803 is detected as a cell with cell ID = "2" and cell position coordinates = [0,100,50,150] (816). Cell 804 is detected as a cell with cell ID = "3" and cell position coordinates = [50,100,200,150] (817).
[0030] Next, in S405, the table analyzer 320 performs character detection and character recognition on the position coordinates of the cell detected in S404. For example, the character strings detected in each cell are stored as a list in the cell character string list 813 of the table 810 in FIG. 8(b).
[0031] Specifically, the character recognition result of cell 801 in table 800 is character recognized as ["Address"] in the cell string list corresponding to cell ID = "0". The character recognition result of cell 802 is character recognized as ["〒"] in the cell string list corresponding to cell ID = "1". The character recognition result of cell 803 is character recognized as ["Telephone"] in the cell string list corresponding to cell ID = "2". The character recognition result of cell 804 is character recognized as [] in the cell string list corresponding to cell ID = "3". After the character recognition process in the cells in S405, data in which the item determination results of the character strings in each cell are registered, as in table 810 in FIG. 8B, is stored in database 350.
[0032] Next, in S406, the cell heading determination unit 330 determines whether the character string is a heading representing an item name based on the character string information in the cell recognized in S405 above, and outputs the data table 820.
[0033] To explain the cell heading judgment specifically, the similarity of the strings in the cell string list 813 of the table 810 and the strings registered in the item name 1201 and alias 1202 in the table 1200 of FIG. 12(a) is measured. For example, the Levenshtein distance can be used as the string similarity. If the similarity is equal to or greater than a threshold, the string in 813 is judged to be a "heading", and the item name 1201 of the alias 1202 with the highest string similarity is stored in the item judgment result 821 of the corresponding cell string, as shown in FIG. 8(c). For example, in the case of the cell string list = ["Address"] corresponding to the cell ID = "1", the record 1203 containing the string registered in the alias 1202 with the highest string similarity is identified, and the item name 1201 ["Address"] is stored in the judgment result 821 (831). Also, when the in-cell string list corresponding to cell ID = "2" = ["Telephone"], the record 1204 containing the string registered in alias 1202 with the highest string similarity is identified, and ["Telephone number"] of its item name 1201 is stored (832) in the determination result 821. Also, when there is no corresponding in-cell string list, such as cell ID = "3," the determination result 821 is set to a state where nothing is stored (833). After the character recognition process in the cell in S406, data in which the cell type is registered for each cell, as shown in table 820 in FIG. 8(c), is stored in database 350.
[0034] Next, in S407, cell header determination unit 330 determines the type of cell based on data table 820 including the header information determined in S406 above. Here, the cell type determination process will be described in detail with reference to FIG.
[0035] FIG. 5 is a flowchart showing an example of a cell type determination process. In S501 to S510, cell header determination unit 330 controls to perform the processes of S502 to S509 for each cell in cell list 820. Cell header determination unit 330 extracts one unprocessed cell from among the cells in cell list 820 (hereinafter, "cell to be processed"), and proceeds to S502.
[0036] In S502, the cell header determination unit 330 determines whether a header exists in the cell to be processed. Specifically, it checks whether an element exists in column 821 (item determination result of character string in cell) of the record of the cell to be processed, and determines whether a character string of an item name to be used as a header exists in the cell to be processed. Here, if there is no element in column 821 (No in S502), cell header determination unit 330 advances the process to S503. For example, in the case of 833 in FIG.
[0037] In S503, the cell header determination unit 330 registers the information "read area cell" in the cell type 841 of the cell to be processed, as in 845 in Fig. 8(d). Here, the cell type being "read area cell" refers to the state of a cell in which no character string serving as a header exists, as in cell 804 in Fig. 9(a). After processing in S503, the cell header determination unit 330 advances the process to S510.
[0038] On the other hand, if an element exists in column 821 (Yes in S502), cell header determination unit 330 advances the process to S504.
[0039] In S504, cell header determination unit 330 determines whether there is only one header in the cell being processed. Specifically, it checks whether there is one element in column 821 (item determination result of character string in cell) of the record of the cell being processed. Here, if the number of elements in column 821 is not one (No in S504), cell header determination unit 330 advances the process to S505.
[0040] In S505, cell header determination unit 330 registers the information "multiple header cell" in cell type 841 of the cell to be processed. Here, the cell type being "multiple header cell" means that the cell has multiple header character strings (921, 922) in it, such as cell 920 in table 910 in Fig. 9(b) (i.e., a cell that includes multiple headers). After processing in S505, cell header determination unit 330 advances the process to S510.
[0041] On the other hand, if the number of elements in column 821 of the record of the cell being processed is one (Yes in S504), cell header determination unit 330 advances the process to S506.
[0042] In S506, the cell header determination unit 330 determines whether the cell to be processed is a "main header cell." Here, the "main header cell" refers to a cell that may correspond to a child element, such as a "sub-header cell" or a "reading area cell," such as cells 801 and 803 in FIG. 9(a). The determination of whether the cell is a "main header cell" is performed based on whether an element in column 821 (item determination result of character string in cell) of the record of the cell to be processed exists in the main header 1211 of the table 1210 of the main header and sub-header pair in FIG. 12(b). For example, the element ["Address"] of column 821 corresponding to cell 801 exists in the main header 1211 of record 1213 in FIG. 12(b), and therefore is determined to be a "main header cell." Also, the element ["Phone Number"] of column 821 corresponding to cell 803 exists in the main header 1211 of record 1214 in FIG. 12(b), and therefore is determined to be a "main header cell." In addition, in the table 1210 of main heading and sub-heading pairs in FIG. 12(b), main headings that are headings of a first type and sub-headings that are headings of a second type are stored, and the sub-headings are associated with main headings.
[0043] If the cell to be processed is a "main header cell" (Yes in S506), the cell header determination unit 330 advances the process to S507. In S507, the cell header determination unit 330 registers the information "main header cell" in the cell type 841 of the cell to be processed, as in 842 or 844 in FIG. 8D, and proceeds to S510.
[0044] On the other hand, if the cell to be processed is not a "main header cell" (No in S506), the cell header determination unit 330 advances the process to S508. In S508, cell heading determination unit 330 determines whether the cell being processed is a "sub-header cell." Whether the cell is a "sub-header cell" is determined based on whether an element in column 821 (item determination result of character string in cell) of the record of the cell being processed exists in sub-header 1212 of table 1210 of the main heading and sub-header pair in Fig. 12(b). For example, element ["zip code"] of column 821 corresponding to cell 802 exists in sub-header 1212 of record 1213 in Fig. 12(b), and is therefore determined to be a "sub-header cell."
[0045] Here, if the cell to be processed is a "sub-header cell" (Yes in S508), cell header determination unit 330 advances the process to S509. In S509, the cell header determination unit 330 registers the information "sub-header cell" in the cell type 841 of the processing target cell, as shown by 843 in FIG. 8D, and proceeds to S510.
[0046] On the other hand, if the cell to be processed is not a "sub-header cell" (No in S508), cell header determination unit 330 advances the process to S510.
[0047] In S510, if there is still a cell in cell list 820 that has not been processed in S502 to S509, cell header determination unit 330 returns the process to S501 and controls to process the next cell. On the other hand, when the processes of S502 to S509 have been completed for all cells in cell list 820, cell header determination unit 330 ends the process of this flowchart (cell type determination process of S407), and proceeds to S408 in Fig. 4. After the cell type determination process of S407, data in which the cell type is registered for each cell, as in table 840 in Fig. 8(d), is stored in database 350.
[0048] Furthermore, among the cells whose types have been determined by the above process, the "read area cell," "sub-header cell," and "multiple header cell" are cells that may contain a reading area from which the item values are extracted as string information from an image with the same layout as the image input in S401.
[0049] Returning now to the explanation of the flowchart in FIG. In S408, the reading area estimation unit 340 associates the header cell with the reading area cell based on the cell information 840 determined in S407 above. Here, the cell association process will be described in detail with reference to FIG.
[0050] FIG. 6 is a flowchart showing the flow of the cell association process. In S601, the reading area estimation unit 340 investigates the adjacency relationship between the cell whose cell type 841 is determined to be the "main header cell" and the cell whose cell type 841 is determined to be the "reading area cell" among the cells constituting the cell information 840, and if it is determined that they are adjacent, records the cell correspondence in the table 1010 representing the cells in FIG. 10(b). Specifically, the cell ID of the adjacent "reading area cell" is stored in the corresponding cell ID 1020 of the record of the "main header cell". For example, the records 1032 and 1033 in FIG. 10(b) correspond to the cells 803 and 804 in FIG. 10(a), respectively, but since they are adjacent, they are associated with each other (FIG. 10(a) 1002). Here, the condition for determining whether the cells are adjacent may be, for example, the matrix relationship or the position coordinate relationship of the cells.
[0051] Next, in S602, the reading area estimation unit 340 checks the adjacency relationship between a cell whose cell type 841 is determined to be a "sub-header cell" and a cell whose cell type is determined to be a "reading area cell" among the cells constituting the cell information 840, and if it is determined that they are adjacent, records the cell correspondence in table 1010 representing the cells in Fig. 10(b). Specifically, the cell ID of the adjacent "reading area cell" is stored in the corresponding cell ID 1020 of the record of the "sub-header cell" (for example, 1032 in Fig. 10(b)).
[0052] Next, in S603 to S610, the reading area estimation unit 340 makes a list of "main header cells" other than the "main header cell" that has been processed (matched) in S601 above, and controls to perform the processes of S604 to S609 for each "main header cell" in the list. The reading area estimation unit 340 extracts one unprocessed "main header cell" from the "main header cells" in the list (hereinafter, the "main header cell" to be processed), and proceeds to S604.
[0053] In S604, the reading area estimation unit 340 judges whether the "main header cell" to be processed is adjacent to the "sub-header cell". If the "main header cell" is adjacent to the "sub-header cell" (Yes in S604), the reading area estimation unit 340 advances the process to S605.
[0054] In S605, the reading area estimation unit 340 judges whether the "main header cell" and the "sub header cell" to be processed correspond to each other. Specifically, it judges whether the heading of the "main header cell" that is determined to be adjacent in S604 above exists in the main header column 1211 in the table 1210 of the main header and sub header pairs in Fig. 12(b), and whether the heading of the "sub header cell" that is adjacent exists in the sub header column 1212 in the same table 1210, and whether the main header 1211 and the sub header 1212 exist on the same record.
[0055] For example, records 1030 ("Address") and 1031 ("Postal Code") in Figure 10(b) correspond to cells 801 and 802 in Figure 10(a), respectively, but since these are in a relationship of "main header cell" and "sub-header cell," and since "Address" is registered as the "main header" and "Postal Code" as the "sub-header" in record 1213 on table 1210, they are determined to correspond (Figure 10(a) 1001).
[0056] In the above S605, if it is determined that the "main header cell" to be processed and the adjacent "sub-header cell" correspond to each other (Yes in S605), the reading area estimation unit 340 advances the process to S606.
[0057] In S606, the reading area estimation unit 340 associates the "main header cell" to be processed with the adjacent "sub header cell." Specifically, the cell ID of the adjacent "sub header cell" is stored in the corresponding cell ID 1020 of the record of the "main header cell" to be processed in the table 1010 (for example, 1030 in FIG. 10(b)). After the process of S606, the reading area estimation unit 340 advances the process to S610.
[0058] On the other hand, if it is determined in S605 that the "main header cell" to be processed and the adjacent "sub-header cell" cannot be associated with each other (No in S605), the reading area estimation unit 340 advances the process to S610.
[0059] Also, in the above S604, if the "main header cell" to be processed is not adjacent to the "sub-header cell" (No in S604), the reading area estimation unit 340 advances the process to S607.
[0060] In S607, the reading area estimation unit 340 determines whether the "main header cell" to be processed is adjacent to "multiple header cells". If it is adjacent to "multiple header cells" (Yes in S607), the reading area estimation unit 340 advances the process to S608.
[0061] In S608, the reading area estimation unit 340 determines whether the "main heading cell" and "multiple heading cells" to be processed that were determined to be adjacent in S607 above exist in the table 1210 of main heading and sub-heading pairs (i.e., whether they correspond to each other).
[0062] Here, if the "main header cell" to be processed corresponds to the adjacent "multiple header cells" (Yes in S608), the reading area estimation unit 340 advances the process to S609. In S609, the reading area estimation unit 340 associates the "main header cell" to be processed with the adjacent "multiple header cells," and advances the process to S610. The method of association is the same as in S606.
[0063] On the other hand, in the above S608, if the "main header cell" to be processed and the adjacent "multiple header cells" cannot be associated with each other (No in S608), the reading area estimation unit 340 advances the process to S610.
[0064] Also, in the above S607, if the "main header cell" to be processed is not adjacent to the "multiple header cells" (No in S607), the reading area estimation unit 340 advances the process to S610.
[0065] In S610, if there is still an unprocessed "main header cell" in the list in S604 to S609, the reading area estimation unit 340 returns the process to S603 and controls to process the next "main header cell". On the other hand, when the processes of S604 to S609 have been completed for all the "main header cells" in the list, the reading area estimation unit 340 ends the process of this flowchart (cell matching process of S408) and proceeds to S409 in Fig. 4. After the cell matching process of S408, a table 1010 including information on the correspondence between the cells is stored in the database 350 as shown in Fig. 10(b).
[0066] Returning now to the explanation of the flowchart in FIG. In S409, the reading area estimation unit 340 determines the reading area for each item based on the table 1010 of the data of the cell correspondence relationship in the above S408. Here, the reading area determination process will be described in detail with reference to FIG.
[0067] FIG. 7 is a flowchart showing an example of a process for determining a reading area. In S700, the reading area estimation unit 340 generates an empty reading area table, which will be the final output data of the system. Here, the reading area table is a table consisting of a reading area ID 1111, a reading area item 1112, and a position coordinate 1113 of the reading area, as shown in 1110 in FIG. 11(b).
[0068] Next, in S701 to S707, the reading area estimation unit 340 makes a list of cells having values in column 1020 (corresponding cell ID) in table 1010 in Fig. 10(b), and controls to perform the processes of S702 to S706 for each cell in the list. The reading area estimation unit 340 extracts one unprocessed cell from the list (hereinafter, "cell to be processed"), and proceeds to S702.
[0069] In S702, the read area estimation unit 340 acquires the record of the corresponding cell indicated in the column 1020 (corresponding cell ID) of the record of the cell to be processed, and extracts the cell information. Next, in S703, the reading area estimation unit 340 judges whether the corresponding cell extracted in S702 is a "reading area cell". Specifically, it judges whether the column 841 (cell type) of the record of the corresponding cell is a "reading area cell".
[0070] Here, if the corresponding cell is a "read area cell" (Yes in S703), the read area estimation unit 340 advances the process to S704. In this case, in S704, the read area estimation unit 340 adds the information of the corresponding cell extracted in S702 (i.e., the information of the "read area cell") to the read area table 1110. Specifically, a new blank record is generated in the table 1110, and a read area ID 1111 is issued. Furthermore, the item name of the cell corresponding to the header of the "read area cell" (i.e., the value of column 821 of the record of the cell to be processed) is stored in the read area item 1112 of the newly generated record. Furthermore, the value of column 812 (cell position coordinates) of the "read area" record is stored in the position coordinates 1113 of the read area of the newly generated record.
[0071] A specific example will be used for explanation. For example, as shown in 1109 in Fig. 11(a), cell 804 corresponding to cell 803 with the heading "phone number" in table 800 is a "reading area cell" 1108. Therefore, the information of cell 804 is added to a reading area table 1110 (Fig. 11(b)). First, record 1123 is added to table 1110, and the value "phone number" of column 821 of record 1032 of cell 803 is stored in column 1112. Furthermore, the position coordinates of column 812 of record 1033 of cell 804, which is the "reading area cell", are stored in column 1113 (position coordinates of the reading area). After the process of S704, the reading area estimation unit 340 advances the process to S707.
[0072] On the other hand, in the above S703, if the corresponding cell extracted in the above S702 is not a "reading area cell" (No in S703), the reading area estimation unit 340 advances the process to S705.
[0073] In S705, the reading area estimation unit 340 judges whether the corresponding cell extracted in S702 is a "sub-header cell" or a "multiple header cell". If it is a "sub-header cell" or a "multiple header cell" (Yes in S705), the reading area estimation unit 340 advances the process to S706.
[0074] In S706, the reading area estimation unit 340 divides the position coordinates of the "sub-header cell" or "multiple header cells" according to the rules to generate individual reading areas. An example of the division rules is shown in table 1220 in Fig. 12(c). The rules for dividing the position coordinates of the "sub-header cell" or "multiple header cells" are determined using the "item name" and "alias" of the header as keys.
[0075] Specifically, for example, a cell 801 including a heading "Address" and a cell 802 including a heading 1104 "Postal Code" are in a relationship of "main heading cell" and "sub-heading cell". Therefore, the position coordinates of the sub-heading cell 802 are divided into sub-headings to generate a reading area for the heading "Postal Code" and a reading area for the main heading "Address". In this case, the reading area for "Postal Code" is secured first. According to the postal code area division rule 1224 (FIG. 12(c)), the position is set to the right of the heading area, with the area size being the same height as the heading and half the cell. Therefore, when the reading area for "Postal Code" is visualized, it becomes a rectangle with the position coordinates of 1105 (FIG. 11(a)). Then, the remaining area 1102 (FIG. 11(a)) is set as the reading area for the address, which is the main heading.
[0076] After the process of S706, the reading area estimation unit 340 advances the process to S704. In this case, in S704, the reading area estimation unit 340 adds to the reading area table 1110 the information of the "reading area cell" divided in S706. After the reading area is determined, the item name and the reading area are displayed as shown in table 1110 in FIG. The data is stored in the database 350 in the associated format. After the process of S704, the reading area estimation unit 340 advances the process to S707.
[0077] In S707, if there are still unprocessed cells in the list in S702 to S706, the reading region estimation unit 340 returns the process to S703 and controls to process the next cell. On the other hand, if the processes of S702 to S704 have been completed for all cells in the list, the reading area estimation unit 340 ends the process of this flowchart (cell type determination process of S407) and returns to the process of Fig. 4. When the process of S409 is completed, the reading area estimation unit 340 ends the process of the flowchart of Fig. 4.
[0078] In this way, for cells that satisfy certain conditions, by dividing the area within the cell according to a certain rule, even if no value string is written or printed, it is possible to correctly estimate the reading area from a sheet of a layout in which a reading area of another item exists within one reading area, and to derive the item of that area. In other words, for cells that satisfy certain conditions, multiple OCR target areas can be appropriately set.
[0079] It goes without saying that the configurations and contents of the various data described above are not limited to those described above, and the data may have various configurations and contents depending on the application and purpose. Although one embodiment has been described above, the present invention can be embodied, for example, as a system, an apparatus, a method, a program, a storage medium, etc. Specifically, the present invention may be applied to a system composed of multiple devices, or may be applied to an apparatus composed of a single device. Furthermore, any combination of the above-described embodiments is also included in the present invention.
[0080] The program of the present invention is a program that enables a computer to execute the processing methods of the flowcharts shown in Figures 4 to 7, and the storage medium of the present invention stores a program that enables a computer to realize the functions shown in Figure 3. The program of the present invention may be a program for each of the functions shown in Figure 3.
[0081] As described above, it goes without saying that the object of the present invention can be achieved by supplying a recording medium on which a program that realizes the functions of the above-mentioned embodiments is recorded to a system or device, and having the computer (or CPU or MPU) of that system or device read and execute the program stored on the recording medium.
[0082] In this case, the program itself read out from the recording medium will realize the novel functions of the present invention, and the recording medium on which the program is recorded will constitute the present invention.
[0083] Examples of recording media for supplying the program include flexible disks, hard disks, optical disks, magneto-optical disks, CD-ROMs, CD-Rs, DVD-ROMs, magnetic tapes, non-volatile memory cards, ROMs, EEPROMs, silicon disks, etc.
[0084] Furthermore, it goes without saying that the functions of the above-mentioned embodiments are not only realized by the computer executing a program it has read, but also includes cases where an OS (operating system) running on the computer performs some or all of the actual processing based on the instructions of the program, and the functions of the above-mentioned embodiments are realized through that processing.
[0085] Furthermore, it goes without saying that this also includes cases where a program read from a recording medium is written into a memory provided on a function expansion board inserted into a computer or a function expansion unit connected to a computer, and then a CPU or the like provided on the function expansion board or function expansion unit performs some or all of the actual processing based on the instructions of the program code, thereby realizing the functions of the above-mentioned embodiments.
[0086] The present invention may be applied to a system consisting of multiple devices, or to an apparatus consisting of a single device. Needless to say, the present invention can also be applied to a case where the object is achieved by supplying a program to a system or apparatus. In this case, the effect of the present invention can be enjoyed by the system or apparatus by reading a recording medium storing a program for achieving the present invention into the system or apparatus.
[0087] Furthermore, by downloading and reading a program for achieving the present invention from a server, database, etc. on a network using a communication program, the system or device can enjoy the effects of the present invention. Note that the present invention also includes configurations that combine the above-mentioned embodiments and their modified examples. [Explanation of symbols]
[0088] 101 Information processing device 102 Image reading device 103 Network 300 Input reception section 301 Table detection unit 302 Table analysis section 303 Cell header determination section 304 Reading area estimation unit
Claims
1. A first specifying means for specifying an OCR target cell for setting an OCR target area among each cell of a table included in the acquired image; an OCR target area setting means for setting a plurality of OCR target areas for cells that satisfy a predetermined condition among the OCR target cells identified by the first identification means; An information processing device comprising:
2. a recognition means for recognizing a character string from the cell, 2. The information processing apparatus according to claim 1, wherein the predetermined condition is a condition based on a recognition result by the recognition means.
3. a second identification means for identifying cells including a first type of header and cells including a second type of header based on a recognition result by said recognition means, The first identification means identifies a cell including the second type of header as an OCR target cell, 3. The information processing apparatus according to claim 2, wherein the OCR target area setting means sets a plurality of OCR target areas for a cell including the second type of heading.
4. 4. The information processing apparatus according to claim 3, wherein the second type of heading is a heading associated with the first type of heading.
5. The first identifying means further identifies a cell in which a character string cannot be recognized by the recognizing means as an OCR target cell; 5. The information processing apparatus according to claim 4, wherein the OCR target area setting means sets one OCR target area for a cell in which a character string has not been recognized by the recognition means.
6. 6. The information processing apparatus according to claim 5, further comprising a third specifying means for specifying a heading corresponding to the OCR target area set by the OCR target area setting means.
7. The information processing device according to claim 6, characterized in that the third identification means identifies the first type of heading as a heading corresponding to a first OCR target area among a plurality of OCR target areas set in a cell including the second type of heading, and identifies the second type of heading as a heading corresponding to a second OCR target area.
8. 8. The information processing apparatus according to claim 7, wherein the third specifying means specifies a heading corresponding to the OCR target region based on a positional relationship between the OCR target region and a cell including the heading.
9. 9. The information processing apparatus according to claim 8, wherein the OCR target area setting means sets a plurality of OCR target areas by dividing a cell including the second type of heading according to a predetermined rule.
10. A first identification step of identifying an OCR target cell for setting an OCR target area among each cell of a table included in the acquired image; an OCR target area setting step of setting a plurality of OCR target areas for cells that satisfy a predetermined condition among the OCR target cells identified by the first identification step; An information processing method comprising:
11. A program for causing a computer to function as each of the means according to any one of claims 1 to 9.
Citation Information
Patent Citations
Document image processing system, document image processing method, and document image processing program
JP2021140831A