Image processing device and computer program
The image processing device flexibly arranges pages based on rule data, addressing the inflexibility in existing techniques by ensuring correct sequencing of pages from multiple documents.
Patent Information
- Application Number
- JP2023054600
- Authority / Receiving Office
- JP · JP
- Patent Type
- Applications
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-11
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing image processing techniques lack flexibility in controlling the order of page arrangement based on page order information, especially when multiple pages from different documents are processed together.
An image processing device that acquires input data representing documents, rule data defining the desired page arrangement order, and generates output data by rearranging pages according to the specified rule order, while notifying users of any discrepancies between the input and rule orders.
Enables flexible control over the page arrangement order based on predefined rules, ensuring that pages are arranged appropriately according to their intended sequence.
Smart Images

Figure 2024142458000001_ABST
Abstract
Description
[Technical field]
[0001] This specification relates to a technique for arranging multiple pages. [Background technology]
[0002] A technology has been proposed for automatically rearranging multiple pieces of image data. For example, in the technology described in Patent Document 1, a control unit of an image processing device recognizes page order information, which is information included in a predetermined recognition area of page image data and indicates the order of pages. The control unit divides multiple pieces of page image data into groups according to the type of page order information. The control unit rearranges the page image data within a group in order based on the page order information. [Prior art documents] [Patent documents]
[0003] [Patent Document 1] JP 2021-132334 A Summary of the Invention [Problem to be solved by the invention]
[0004] There are cases where a different sorting order from the sorting order of multiple pages based on the page order information is preferable. For example, when multiple pages of each of multiple documents are processed together, it is preferable that the sorting order of the page groups for each document is not determined from the page order information of the individual pages, but is associated with an appropriate sorting order of the multiple documents. Here, there is room for improvement in flexibly controlling the sorting order of multiple pages.
[0005] This specification discloses a technique for flexibly controlling the order in which multiple pages are arranged. [Means for solving the problem]
[0006] The technology disclosed in this specification can be realized in the following application examples.
[0007] [Application Example 1] An image processing device comprising: a first acquisition unit that acquires input data representing a document; a second acquisition unit that acquires rule data representing a target rule that specifies the order in which N pages should be arranged when the document represented by the input data is represented by N pages (N is an integer greater than or equal to 2); and a specific processing unit that executes specific processing including one or both of the following: a generation process that generates output data representing the N pages arranged in a rule order, which is the order in which the N pages should be arranged based on the target rule; and a notification process that, when an input order, which is the order in which multiple pages of the document represented by the input data are arranged, differs from the rule order, notifies a user that the input order differs from the rule order.
[0008] According to this configuration, the rule order, which is the order in which the N pages should be arranged, is based on the target rule represented by the rule data, so the rule order can be flexibly controlled by the rule data.
[0009] The technology disclosed in this specification can be realized in various forms, for example, in the form of an image processing method and an image processing device, a computer program for realizing the functions of those methods or devices, a recording medium on which that computer program is recorded (e.g., a non-temporary recording medium), etc. [Brief description of the drawings]
[0010] [Figure 1] FIG. 1 is an explanatory diagram showing a multifunction peripheral according to an embodiment; [Diagram 2] 11 is a flowchart illustrating an example of image processing. [Diagram 3] 11 is a flowchart illustrating an example of image processing. [Figure 4] FIG. 13 is a diagram illustrating an example of a rules page. [Diagram 5] 1A is a diagram showing an example of input data, and FIG. 1B is a diagram showing an example of feature information. [Figure 6]13A-13C are diagrams showing examples of candidate orders. [Figure 7] 13A-13C are diagrams illustrating calculation of the confidence level. [Figure 8] 13 is a flowchart showing an example of a generation process of the order evaluation model M1. [Figure 9] 11 is a part of a flowchart of another embodiment of image processing. [Figure 10] 13A to 13D are diagrams showing examples of information used in image processing. [Figure 11] 11 is a part of a flowchart of another embodiment of image processing. [Figure 12] 13A to 13E are diagrams showing examples of information used in image processing. [Figure 13] 11 is a part of a flowchart of another embodiment of image processing. [Figure 14] 13A to 13E are diagrams showing examples of information used in image processing. [Figure 15] 11 is a flow chart of another embodiment of image processing. [Figure 16] 13A to 13C are diagrams showing examples of information used in image processing. [Figure 17] 11 is a flow chart of another embodiment of image processing. [Figure 18] 13A to 13D are diagrams showing examples of information used in image processing. [Figure 19] 13A and 13B are diagrams showing another embodiment of image processing. [Figure 20] 11 is a part of a flowchart of another embodiment of image processing. [Figure 21] 13A and 13B are diagrams showing another embodiment of image processing. [Figure 22] 13A and 13B are diagrams showing another embodiment of image processing. [Figure 23] 13A to 13D are diagrams showing another embodiment of image processing. [Figure 24] 13A and 13B are diagrams showing another embodiment of image processing. [Diagram 25] 13A to 13D are diagrams showing another embodiment of image processing. [Figure 26] 13A and 13B are diagrams showing another embodiment of image processing. [Figure 27] 11 is a part of a flowchart showing another embodiment of image processing. [Figure 28] 13A and 13B are diagrams showing another embodiment of image processing. [Figure 29] 13A to 13D are diagrams showing another embodiment of image processing. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
[0011] A. First Example: A1. System configuration: 1 is an explanatory diagram showing a multifunction device as an embodiment of the present invention. The multifunction device 100 is capable of printing images and reading documents. The multifunction device 100 has a processor 110, a storage device 115, a display unit 140, an operation unit 150, a print execution unit 160, a read execution unit 170, and a communication interface 180. These elements are connected to each other via a bus.
[0012] The display unit 140 is a device configured to display images, such as a liquid crystal display or an organic EL display. The operation unit 150 is a device configured to receive operations by a user, such as a button, a lever, or a touch panel overlaid on the display unit 140. The communication interface 180 is an interface for communicating with other devices (for example, it includes one or more interfaces among a wired LAN, an IEEE802.11 wireless LAN, and a Universal Serial Bus (USB)).
[0013] The print execution unit 160 is a device that prints images. In this embodiment, the print execution unit 160 is a so-called inkjet printer. The print execution unit 160 is configured to print images using one or more types of printing material (for example, four colors of ink: cyan, magenta, yellow, and black). Note that the print execution unit 160 may be a device that prints images using another method (for example, a laser printer).
[0014] The reading execution unit 170 is a device that optically reads an object such as a document. In this embodiment, the reading execution unit 170 includes an optical sensor (not shown) (e.g., a Contact Image Sensor (CIS) or a Charge Coupled Device (CCD)). The reading execution unit 170 generates scan data representing the read object by optically reading the object. The data format of the scan data may be various formats (e.g., JPEG (Joint Photographic Experts Group), PNG (Portable Network Graphics), GIF (Graphic Interchange Format), TIFF (Tagged Image File Format), PDF (Portable Document Format), etc.). The reading execution unit 170 may include one or both of a document table (also called a flatbed) and an automatic document feeder. The automatic document feeder is a device that automatically transports multiple document pages one by one. The document table and the automatic document feeder each form a placement portion where the object should be placed.
[0015] The processor 110 is a device configured to process data. The processor 110 is, for example, a Central Processing Unit (CPU) or a System on a chip (SoC). The storage device 115 includes a volatile storage device 120 and a non-volatile storage device 130. The volatile storage device 120 is, for example, a DRAM, and the non-volatile storage device 130 is, for example, a flash memory.
[0016] The non-volatile storage device 130 stores data for each of the program PG1, the document analysis library LB1, and the machine learning models M1-M6. The data for each of the program PG1, the library LB1, and the models M1-M6 is stored in the non-volatile storage device 130 when the multifunction device 100 is manufactured. Data for one or more elements (e.g., the program PG1) selected from the program PG1, the library LB1, and the models M1-M6 may be stored in the non-volatile storage device 130 of the multifunction device 100 from a server (not shown) via a network, or from a portable storage device (e.g., a USB flash drive) (not shown) connected to the multifunction device 100.
[0017] A2.Image processing: 2 and 3 are flowcharts showing an example of image processing. Fig. 3 shows a continuation of Fig. 2. This image processing includes a process for acquiring the order of multiple pages based on a rule. In this embodiment, the multifunction device 100 reads multiple pages using the reading execution unit 170, and generates output data representing the multiple pages arranged in the order based on the rule.
[0018] The multiple pages may be pages of various documents. For example, a user causes the multifunction device 100 to read each of multiple presentations to be presented at an academic conference. Each paper includes one or more pages. For example, the presentation order at the academic conference is adopted as the rule for the arrangement order. Here, the order in which the multiple pages are read by the multifunction device 100 may differ from the order based on the rule. For example, a user may supply multiple papers to the reading execution unit 170 in an order different from the presentation order. Also, multiple pages (and thus multiple sheets) may be supplied to the reading execution unit 170 in a separated state, without being bound like a book. Here, a user may supply multiple pages to the reading execution unit 170 in an order different from the order of page numbers. Even in such a case, the processor 110 of the multifunction device 100 generates output data representing multiple papers arranged in the order of presentation, and multiple pages arranged in an appropriate page order for each paper.
[0019] A user operates operation unit 150 (FIG. 1) to input an instruction to start image processing to multifunction device 100. In response to the start instruction, processor 110 of multifunction device 100 starts the image processing of FIG. 2 and FIG. 3. Processor 110 executes program PG1 to perform the image processing of FIG. 2 and FIG. 3.
[0020] In S110, the processor 110 acquires rule data. In this embodiment, the user places a sheet of a rule page, which is a document page that represents a rule that specifies the order in which pages should be arranged, in the placement portion of the reading execution unit 170. The processor 110 causes the reading execution unit 170 to read the rule page, and acquires scan data of the rule page from the reading execution unit 170. This scan data is an example of rule data.
[0021] FIG. 4 is a diagram showing an example of a rules page. The rules page Pr represents a timetable for an academic conference. Specifically, the rules page Pr represents titles TLr1 and TLr2 and a table TBr. The table TBr is a table with 5 rows and 4 columns. The first row R1 is a header row and represents the header names of each of the columns C1-C4. As shown in the figure, the columns C1-C4 represent "Time", "Division", "Topic", and "Title", respectively. The second row R2 to the fifth row R5 each represent a presentation.
[0022] In S120, the processor 110 analyzes the rule data to obtain a plurality of pieces of reference information and their order. In this embodiment, the processor 110 adopts information represented by a string associated with a predetermined header name (here, "title") as the reference information. Then, the processor 110 obtains the order of the plurality of pieces of reference information.
[0023] In this embodiment, S120 includes S121 and S122. In S121, the processor 110 detects a table region representing a table by analyzing the rule data. There may be various methods for detecting the table region. In this embodiment, the processor 110 detects the table region by using a document analysis library LB1. The document analysis library LB1 is a document image analysis library called "Layout Parser". "Layout Parser" is disclosed in the following paper: Zejiang Shen, Ruochen Zhang, Melissa Dell, Benjamin Charles Germain Lee, Jacob Carlson, Weining Li, "LayoutParser: A unified toolkit for deep learning based document image analysis", arXiv:2103.15348, June 21, 2021, http: / / arxiv.org / abs / 2103.15348 The "Layout Parser" library is also available at the following URL. https: / / layout-parser.github.io /
[0024] The "Layout Parser" includes a trained machine learning model for performing layout detection. To support various types of layout structures, the "Layout Parser" includes a collection of multiple deep learning models trained on different datasets. The "Layout Parser" can detect multiple types of regions, including text regions, title regions, table regions, and figure regions. In addition, the "Layout Parser" supports two types of character recognition engines, "Google Cloud Vision" and "Tesseract OCR" from Google, for character recognition. In this embodiment, the document analysis library LB1 includes a collection of multiple trained deep learning models for layout detection and a trained character recognition engine (e.g., Tesseract OCR) for character recognition.
[0025] In S121, the processor 110 analyzes the image IMr of the rule page Pr (FIG. 4) by executing the calculations of the document analysis library LB1. As a result, the processor 110 detects the area of the first title TLr1, the area of the second title TLr2, and the area of the table TBr.
[0026] In S122, the processor 110 analyzes the table region to obtain information (here, text) and row and column positions of each cell. The method of obtaining the cell information may be various methods. For example, the processor 110 detects vertical and horizontal lines from the table region. The processor 110 detects an area surrounded by vertical and horizontal lines as a cell region. The processor 110 executes character recognition processing for each cell region to obtain the text of each cell. The character recognition processing may be performed by executing the calculation of the document analysis library LB1. The processor 110 obtains the row and column positions of each cell using the position of the cell region in the image. The method of detecting the vertical and horizontal lines may be various methods. For example, the vertical and horizontal lines may be detected by the Hough transform. Also, instead of lines, gaps may be formed between multiple cells. The processor 110 may execute a so-called labeling process to separate a background region from one or more object regions. This allows the processor 110 to separate the background region from each cell region (here, the region representing text). If a region of the table TBr of the image IMr (FIG. 4) is processed, the processor 110 may detect 20 pieces of text in 20 cells of 5 rows and 4 columns.
[0027] Processor 110 uses the first row (e.g., first row R1 (FIG. 4)) as the header row. Processor 110 searches the cells in the header row for a cell that contains a predetermined keyword (called a reference cell). The keyword may be various keywords related to the classification of the page. The keyword may include, for example, "title" and "presenter name." From first row R1 in FIG. 4, cell CLr that contains "title" is detected as the reference cell.
[0028] The processor 110 obtains information of each of a number of cells forming a reference column including the reference cell. When the table TBr of the image IMr (FIG. 4) is processed, the fourth column C4 including the reference cell CLr is the reference column. The processor 110 obtains four pieces of text Ta-Td in four cells corresponding to four rows R2-R5 from the fourth column C4. The text Ta-Td represents the title of the presentation. Each of these pieces of text Ta-Td is an example of reference information (also called reference information Ta-Td).
[0029] The processor 110 acquires the order of the acquired multiple pieces of reference information. In this embodiment, the processor 110 adopts the order of the multiple pieces of reference information in the reference string as the order of the multiple pieces of reference information. The processor 110 adopts the order of Ta, Tb, Tc, Td as the order of the reference information Ta-Td (FIG. 4).
[0030] At S130 (FIG. 2), processor 110 obtains input data representing a document. In this embodiment, a user provides multiple pages (here, multiple pages of multiple papers) contained in the document to reading execution unit 170. Processor 110 causes reading execution unit 170 to read the multiple pages and obtains scan data representing the multiple pages from reading execution unit 170. This scan data is an example of input data.
[0031] FIG. 5(A) is a diagram showing an example of input data. In this embodiment, the input data ID represents a plurality of pages of a plurality of documents including a first document Da and a second document Db (in this embodiment, each document is a paper). In the figure, a plurality of pages P11 and P12 of the first document Da and a plurality of pages P21 and P22 of the second document Db are shown. The first document Da is a document associated with the first reference information Ta (FIG. 4). The first page P11 of the first document Da includes a title TL11 including the same text as the first reference information Ta. The second document Db is a document associated with the second reference information Tb (FIG. 4). The first page P21 of the second document Db includes a title TL21 including the same text as the second reference information Tb. Although not shown in the figure, in this embodiment, the input data represents a plurality of pages of four papers corresponding to four presentations (FIG. 4).
[0032] In S140 (FIG. 2), processor 110 analyzes the multiple pages represented by the input data to obtain feature information for each page. In this embodiment, processor 110 performs layout detection for each page and character recognition for the detected areas. The layout detection and character recognition are performed according to document analysis library LB1.
[0033] 5B shows an example of characteristic information. For example, the page number PN, date DY, title TL, chapter number CN, figure FG, figure number FN, table TB, table number TN, text TX, and author name AU are detected as characteristic information F. The "Layout Parser" can detect the areas of figures, tables, titles, and text. In this embodiment, the processor 110 detects the page number PN, date DY, chapter number CN, figure number FN, and table number TN from the text.
[0034] The page number PN, date DY, chapter number CN, figure number FN, and table number TN may be detected in various ways. For example, the page number PN may be a number represented by text at the edge of the page. The edge of the page may be adjusted according to the size of the page.
[0035] As the date DY, for example, a date represented by text having a format indicating a date (for example, "YYYY (year) / MM (month) / DD (day)", "YYYY", etc.) may be adopted. Note that as the date DY, text including one or more elements arbitrarily selected from "year", "month", and "day" may be adopted.
[0036] As the chapter number CN, for example, a numerical value included in the front part (for example, the first half) of the title may be adopted.
[0037] The figure number FN may be, for example, a numerical value represented by text located next to the figure (e.g., above or below). Here, it is preferable to refer to text having a format indicating the figure number (e.g., "Figure # (# is a numerical value)").
[0038] The table number TN may be, for example, a numerical value represented by text located next to the table (for example, above or below). Here, it is preferable to refer to text having a format indicating the table number (for example, "Table # (# is a numerical value)").
[0039] For example, text including a person's name may be adopted as the author name AU. The person's name may be selected from a prepared list of person's names, for example.
[0040] Fig. 5(A) shows an example of feature information detected by layout detection and character recognition. In Fig. 5(A), the first two characters of the code indicate the type of area to be detected. Specifically, "TL" indicates the title, "TX" indicates the text, "CN" indicates the chapter number, "AU" indicates the author's name, "PN" indicates the page number, "FN" indicates the figure number, "TB" indicates the table, and "TN" indicates the table number.
[0041] In S150 (FIG. 2), the processor 110 matches the reference information with the feature information (and thus the pages). In this embodiment, the processor 110 evaluates the relevance between the feature information and each of the multiple reference information for each page in the page order represented by the input data. The processor 110 then uses the relevance evaluation result to associate one page with one piece of reference information. The matching method may be various methods that use the relevance between the reference information and the feature information. In this embodiment, the processor 110 determines the page to be associated with the reference information by matching in the following order of priority: (First matching MC1) If the total number of pages having a title including the reference information is 1, the page is associated with the reference information. (Second matching MC2) The page with the most number of occurrences of the reference information is associated with the reference information. The number of occurrences is the total number of reference information included in the feature information. (Third matching MC3) The first page found that has feature information including the reference information is associated with the reference information.
[0042] Feature information including reference information indicates high relevance between a page having the feature information and the reference information. The above matching MC1-MC3 can associate an appropriate page with the reference information. For example, if a title includes reference information, a page having the title is highly likely to be associated with the reference information. An example of such a page includes, for example, the cover of a paper. The first matching MC1 associates such a page with the reference information. For example, the first page P11 of the first document Da in FIG. 5(A) has a title TL11 including the first reference information Ta (FIG. 4). The first matching MC1 can associate such a first page P11 with the first text Ta.
[0043] Multiple pages may have titles that include the reference information, in which case the processor 110 matches the page to the reference information not by the first matching MC1 but by the second matching MC2 or the third matching MC3.
[0044] A page to be associated with reference information usually includes a sentence related to the reference information. Therefore, a page to be associated with reference information may include one or more pieces of reference information. Here, the greater the total number of pieces of reference information included in a page (i.e., the number of times the reference information appears), the more likely the page is to be associated with reference information. The second matching MC2 associates such a highly likely page with reference information. For example, feature information (here, the entirety of title TL14, text TX13, and TX14) detected from the second page P12 of the first document Da in FIG. 5(A) may include a plurality of pieces of first reference information Ta (FIG. 4). The second matching MC2 may associate such a second page P12 with the first text Ta.
[0045] Note that the number of occurrences of the reference information may be the same among multiple pages. And the multiple pages may show the most occurrences per page. In this case, the processor 110 associates the pages with the reference information by the third matching MC3, not by the second matching MC2.
[0046] As described above, in S150 (FIG. 2), the processor 110 associates a page with the reference information by matching MC1-MC3, thereby enabling the processor 110 to associate a page included in the document associated with the reference information with the reference information.
[0047] In S170, the processor 110 judges whether all pages have been associated with the reference information. If there are pages (called undetermined pages) whose association with the reference information is undetermined (S170: No), in S180 (FIG. 3), the processor 110 forms a page group for each reference information. In this embodiment, one page is associated with one reference information in S150 (FIG. 2). Therefore, in S180, one page group associated with one reference information is composed of one page. As explained in S120, the multiple reference information are arranged in an order based on the rule data. The multiple page groups are arranged in the same order as the order of the corresponding reference information.
[0048] In S200, the processor 110 calculates the confidence level of each of a plurality of candidate orders of page groups and undetermined pages (hereinafter, the candidate orders are referred to as "candidate orders"). The confidence level indicates the probability that the candidate order indicates an appropriate page order. Figures 6(A) to 6(C) are diagrams showing examples of a plurality of candidate orders.
[0049] 6A, two candidate orders Ca1 and C1a indicate the orders of the first page group G1 and the first undetermined page Pua. The candidate order Ca1 indicates that the first page group G1 follows the first undetermined page Pua, and the candidate order C1a indicates that the first undetermined page Pua follows the first page group G1. The confidence levels VCa1 and VC1a indicate the confidence levels of the candidate orders Ca1 and C1a, respectively.
[0050] Fig. 6(B) shows the order obtained by replacing the first page group G1 in Fig. 6(A) with the second page group G2. The candidate order Ca2 indicates that the first undetermined page Pua is located before the second page group G2, and the candidate order C2a indicates that the first undetermined page Pua is located after the second page group G2. The confidence levels VCa2 and VC2a indicate the confidence levels of the candidate orders Ca2 and C2a, respectively.
[0051] Fig. 6(C) shows an order obtained by replacing the first undetermined page Pua in Fig. 6(A) with the second undetermined page Pub. The candidate order Cb1 indicates that the second undetermined page Pub is located before the first page group G1, and the candidate order C1b indicates that the second undetermined page Pub is located after the first page group G1. The confidence levels VCb1 and VC1b indicate the confidence levels of the candidate orders Cb1 and C1b, respectively.
[0052] Although not shown in the figure, the processor 110 calculates the confidence of each of all the orders of all the pairs of the page group and the undetermined page. The confidence is calculated by using characteristic information of two pages, the undetermined page and the page adjacent to the undetermined page in the page group. For example, for the confidence VCa1 of the candidate order Ca1 in FIG. 6(A), the first undetermined page Pua and its adjacent page Pg1F (i.e., the first page Pg1F of the first page group G1) are used. For the confidence VC1a of the candidate order C1a, the first undetermined page Pua and its adjacent page Pg1L (i.e., the last page Pg1L of the first page group G1) are used. Note that when the total number of pages included in the first page group G1 is 1, the last page Pg1L is the same as the first page Pg1F. The same applies to the other page groups.
[0053] In this way, the two pages used to calculate the confidence level are composed of the first page and the next page that follows the first page. In this embodiment, the confidence level is set to a value greater than or equal to zero and less than or equal to 1. A confidence level of 1 indicates that the next page is an appropriate page that should follow the first page. A confidence level of zero indicates that the next page is inappropriate for the first page. For example, if the first page is the first page P11 of the first document Da (FIG. 5(A)) and the next page is the second page P12 of the same first document Da, the confidence level is close to 1. If the first page is the first page P11 of the first document Da and the next page is the second page P22 of the second document Db, the documents are different between the first page and the next page, so the confidence level is close to zero. If the first page is the second page P12 of the first document Da and the next page is the first page P11 of the first document Da, the order of the pages is reversed, so the confidence level is close to zero.
[0054] In S200 (FIG. 3), processor 110 calculates the degree of certainty of each of a plurality of candidate orders. The calculation of the degree of certainty will be described in detail later.
[0055] In S210, the processor 110 adopts the candidate order showing the highest degree of certainty as a target candidate, which is the order of the processing target. The processor 110 determines the order of one undetermined page (called a target page) associated with the target candidate according to the target candidate. The processor 110 adds the target page to a page group associated with the target candidate.
[0056] In S220, the processor 110 determines whether the order of all pages has been determined. If undetermined pages remain (S220: No), the processor 110 proceeds to S200. The processor 110 executes the processes of S200 and S210 to newly determine the order of the undetermined pages.
[0057] If the order of all pages has been determined (S220: Yes), processor 110 proceeds to ST230. If all pages are associated with reference information in S170 (FIG. 2) (S170: Yes), processor 110 proceeds to S230.
[0058] In S230, the processor 110 determines the rule order to be the current page order. The rule order is the order in which the multiple pages should be arranged based on the target rule represented by the rule data. The current page order is the order determined by the multiple page groups arranged in the order of the reference information. As described in S120, the order of the multiple reference information is determined by the rule data. As described in S150, a page having a high relevance to the reference information is associated with each of the multiple reference information. As described in S200 and S210, an undetermined page having a relationship with the page included in the page group is added in an appropriate order to the page group associated with the reference information. Therefore, the current page order may represent multiple papers in the same order as the order of the multiple reference information. And, if the paper includes multiple pages, the current page order may represent the multiple pages of the paper in an appropriate order. The processor 110 adopts such a current page order as the rule order.
[0059] In S240, the processor 110 generates output data representing a plurality of pages arranged in a regular order. The processor 110 generates the output data by rearranging the plurality of pages represented by the input data according to the regular order. The data format of the output data may be in various formats (e.g., PDF, XPS (XML Paper Specification), PCL (Printer Control Language), GDI (Graphics Device Interface), PostScript (registered trademark), etc.).
[0060] When the output data forms one data file, the data file may include order data that defines the order of multiple pages. For example, PDF data includes order data that defines the order of multiple pages. The processor 110 sets the order data based on a rule order.
[0061] In S250, the processor 110 outputs the output data. The processor 110 may cause the print execution unit 160 to print an image represented by the output data by outputting the output data to the print execution unit 160. The processor 110 may cause the display unit 140 to display an image represented by the output data by outputting the output data to the display unit 140. The processor 110 may store the output data in the storage device by outputting the output data to the storage device. Here, the storage device may be any of various storage devices, for example, the non-volatile storage device 130, a storage device (e.g., a USB flash drive) not shown connected to the communication interface 180, or a storage device of a server capable of communicating via the communication interface 180. In this way, the output destination of the output data may be various devices such as a printing device, a display device, or a storage device.
[0062] After S250, processor 110 ends the image processing of FIGS.
[0063] A3. Confidence calculation process: A3-1.Comparative feature information Fd: The process of calculating the confidence of each candidate order in S200 (FIG. 3) will be described. The confidence calculation method may be various methods, such as calculating a high confidence when the candidate order is appropriate and calculating a low confidence when the candidate order is inappropriate. In this embodiment, the processor 110 calculates the confidence using the order evaluation model M1. FIGS. 7(A)-7(C) are explanatory diagrams of the confidence calculation. FIG. 7(A) shows an example of the order evaluation model M1. The order evaluation model M1 outputs the confidence VC using the comparison feature information Fd associated with the candidate order. The confidence VC is set to a value equal to or greater than zero and equal to or less than one.
[0064] First, the comparison feature information Fd will be described. In this embodiment, the processor 110 calculates the comparison feature information Fd using feature information of two pages, the first page and the second page. The first page is the preceding page of the undetermined page and the page next to the undetermined page in the page group. The second page is the page following the first page. Hereinafter, the feature information of the first page is called the first feature information Fa, and the feature information of the second page is called the second feature information Fb. For example, in the calculation of the confidence VCa1 of the candidate order Ca1 (FIG. 6(A)), the feature information of the first undetermined page Pua is the first feature information Fa, and the feature information of the page Pg1F of the first page group G1 is the second feature information Fb. The feature information Fa and Fb may include various information shown in FIG. 5(B).
[0065] The comparison feature information Fd is calculated using the leading feature information Fa and the trailing feature information Fb. Fig. 7(B) is a diagram showing an example of the comparison feature information Fd. In this embodiment, the comparison feature information Fd is a vector obtained by concatenating multiple feature vectors Fd1-Fd12 (the function Cv in the diagram returns a concatenated vector of multiple vectors included in the arguments).
[0066] 7C is a diagram showing an example of feature vectors Fd1-Fd12. The feature vectors Fd1-Fd12 indicate the results of comparison between the previous page and the next page from different perspectives. The outline is as follows. Fd1: Difference in page number PN Fd2: Date DY difference Fd3: Title TL similarity SM3 Fd4: Similarity of text TX SM4 Fd5: Similarity SM5 of figure FG Fd6: Chapter number CN difference Fd7: Information related to the appearance of chapter number CN Fd8: Difference of figure number FN Fd9: Information related to the appearance of figure number FN Fd10: Difference in table number TN Fd11: Information related to the appearance of table number TN Fd12: Information showing the coherence of the text
[0067] As described below, each of the feature vectors Fd1-Fd12 changes depending on the appropriateness of the subsequent page relative to the preceding page, and therefore the comparison feature information Fd also changes depending on the appropriateness of the subsequent page relative to the preceding page.
[0068] The first feature vector Fd1 is a one-dimensional vector indicating the difference of the page numbers PN (Fd1=PNa-PNb). The previous page number PNa indicates the page number PN included in the previous feature information Fa, and the next page number PNb indicates the page number PN included in the next feature information Fb. When the next page is a suitable page to follow the previous page, Fd1=-1 is usually the case. When the next page is inappropriate for the previous page, Fd1 may be different from -1.
[0069] The second feature vector Fd2 is a one-dimensional vector indicating the difference of the dates DY (Fd2=DYa-DYb). The future date DYa indicates the date DY included in the future feature information Fa, and the future date DYb indicates the date DY included in the future feature information Fb. When the future feature information Fa includes multiple dates DY, the future date DYa may be determined in various ways. For example, the future date DYa may be the first date DY appearing on the future page, or the last date DY appearing on the future page. The same applies to the future date DYb.
[0070] Multiple pages of the same document may represent information of different dates. Here, the appropriate order of the multiple pages may be ascending order of dates. For example, a page representing information of 2022 may be placed after a page representing information of 2021. In this way, when the subsequent page represents a date newer than the previous page, Fd2 is negative. Also, when the previous page and the subsequent page are included in the same document, the previous page and the subsequent page may have the same date. In this case, Fd2=zero. When the previous page and the subsequent page are included in different documents, the previous page and the subsequent page may have dates unrelated to each other. In this case, Fd2 may be various values different from zero. In this way, the second feature vector Fd2 changes depending on the appropriateness of the subsequent page relative to the previous page.
[0071] The third feature vector Fd3 is a one-dimensional vector indicating the similarity SM3(TLa, TLb) of the title TL. The first title TLa indicates the title TL included in the first feature information Fa, and the second title TLb indicates the title TL included in the second feature information Fb. When the first feature information Fa includes multiple titles TL, the first title TLa may be determined in various ways. For example, the first title TLa may be the title TL that appears first on the first page, or the text obtained by concatenating all the titles TL included in the first feature information Fa. The same applies to the second title TLb.
[0072] The similarity SM3 indicates the similarity between two titles TLa and TLb. The calculation method of the similarity SM3 may be various methods for calculating the similarity of the contents between the two titles TLa and TLb. In this embodiment, the processor 110 vectorizes each of the titles TLa and TLb. Then, the processor 110 calculates the cosine similarity of the two vectors as the similarity SM3. The method for vectorizing the text may be various methods. In this embodiment, the processor 110 vectorizes the text using a language representation model M2. The language representation model M2 may be various trained models for vectorizing the text. In this embodiment, the language representation model M2 is a machine learning model called "BERT (Bidirectional Encoder Representations from Transformers)". The BERT model is disclosed in the following paper. Jacob Devlin, Ming-Wei Chang, Kenton Lee, Kristina Toutanova, "BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding", arXiv:1810.04805, May 24, 2019, https: / / arxiv.org / abs / 1810.04805
[0073] The training method of the language representation model M2 can be the training method disclosed in the above-mentioned paper on BERT, which includes pre-training and fine-tuning.
[0074] The text to be processed is broken down into words for input to the BERT model. Then, a string of tokens representing the word string is input to the BERT model. A tokenizer is used to convert the sentence into a token string. The configuration of the tokenizer (and thus the method of converting the sentence into a token string) can be various configurations suitable for the machine learning model that processes the token string. A trained BERT model and tokenizer suitable for the language to be processed are adopted. Various trained BERT models and various tokenizers are publicly available at the following URL. Publicly available trained models and tokenizers may be adopted. https: / / huggingface.co /
[0075] The processor 110 generates a token sequence by performing a tokenizer operation using the text to be processed (here, the first title TLa or the second title TLb). The processor 110 executes an operation of the language expression model M2 using the generated token sequence. As a result, a vector for each token is calculated. The processor 110 generates one vector representing the text by aggregating the calculated vector for each token. A method of aggregating a plurality of vectors may be various methods. For example, the processor 110 may calculate one vector representing the average of the plurality of vectors (the process of generating data representing the average in this way is also called Mean-Pooling). Alternatively, the processor 110 may select the maximum value of each dimension of the plurality of vectors to generate one vector (the process of generating data representing the maximum value in this way is also called Max-Pooling). The processor 110 calculates the cosine similarity (i.e., similarity SM3) between the vector obtained from the first title TLa and the vector obtained from the second title TLb.
[0076] If the subsequent page is an appropriate page that should follow the previous page, it is highly likely that the previous page and the subsequent page have similar titles. That is, Fd3 is highly likely to be a positive value. If the subsequent page is inappropriate for the previous page, it is highly likely that the previous page and the subsequent page have dissimilar titles. That is, Fd3 is highly likely to be a negative value. In this way, the third feature vector Fd3 changes depending on the appropriateness of the subsequent page relative to the previous page.
[0077] The fourth feature vector Fd4 is a one-dimensional vector indicating the similarity SM4(TXa, TXb) of the text TX. The previous text TXa indicates the text TX included in the previous feature information Fa, and the next text TXb indicates the text TX included in the next feature information Fb. When the previous feature information Fa includes a plurality of texts TX, the previous text TXa may be determined in various ways. For example, the previous text TXa may be the text TX that appears first on the previous page, or the text obtained by concatenating all the texts TX included in the previous feature information Fa. The same applies to the next text TXb.
[0078] The similarity SM4 indicates the similarity between the two texts TXa and TXb. The processor 110 vectorizes each of the texts TXa and TXb, and calculates the cosine similarity of the two vectors as the similarity SM4. The language expression model M2 is used for the vectorization. Unlike the title TL, the text TX may include a number of words greater than the maximum number of tokens that can be input to the language expression model M2. In this embodiment, the processor 110 generates a summary sentence of the text and vectorizes the summary sentence. There may be various methods for generating a summary sentence from the text. In this embodiment, the processor 110 generates a summary sentence using a summary model M3. The summary model M3 may be various trained models that generate a summary sentence from a text. In this embodiment, the summary model M3 is a machine learning model called "PEGASUS". The PEGASUS model is disclosed in the following paper. Jingqing Zhang, Yao Zhao, Mohammad Saleh, Peter J. Liu, "PEGASUS: Pre-training with Extracted Gap-sentences for Abstractive Summarization ", arXiv:1912.08777, July 10, 2020, https: / / arxiv.org / abs / 1912.08777
[0079] As a method for training the summary model M3, the training method disclosed in the above-mentioned paper by PEGASUS can be adopted.
[0080] A tokenizer is also used when inputting text to the PEGASUS model. The trained PEGASUS model and tokenizer are publicly available at the following URL. The publicly available trained model and tokenizer may be adopted. https: / / huggingface.co /
[0081] It should be noted that the published PEGASUS model is configured to process English. Other trained models may be used to process other languages (e.g., Japanese). For example, the summarization model M3 may be a machine learning model called T5 (Text-To-Text Transfer Transformer). The T5 model is disclosed in the following paper: Colin Raffel, Noam Shazeer, Adam Roberts, Katherine Lee, Sharan Narang, Michael Matena, Yanqi Zhou, Wei Li, Peter J. Liu, "Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer", arXiv:1910.10683, July 28, 2020, https: / / arxiv.org / abs / 1910.10683
[0082] The training method for the T5 model can be the one disclosed in the above paper. In addition, pre-trained T5 models and tokenizers for various languages are available at the following URL: https: / / huggingface.co /
[0083] The summary model M3 may be generated by fine-tuning a publicly available trained model. The method of fine-tuning the T5 model may be the method disclosed in the above paper on the T5 model. A text-summary pair is used to fine-tune the T5 model. For example, the text and summary of an article on a news website may be used as the text-summary pair.
[0084] The processor 110 generates a summary sentence by executing the operation of the summary model M3 using the text to be processed (here, the previous text TXa or the next text TXb). Here, the processor 110 may input a token string obtained by executing the operation of the tokenizer of the summary model M3 to the summary model M3. The processor 110 generates a token string by executing the operation of the tokenizer for the language expression model M2 using the summary sentence. The processor 110 calculates a vector for each token by executing the operation of the language expression model M2 using the generated token string. The processor 110 generates one vector representing the text by aggregating the calculated vector for each token. The aggregation method may be the same as the aggregation method for the third feature vector Fd3. The processor 110 calculates the cosine similarity (i.e., the similarity SM4) between the vector obtained from the previous text TXa and the vector obtained from the next text TXb.
[0085] If the subsequent page is an appropriate page that should follow the previous page, there is a high possibility that text expressing contents related to each other will be written on the previous page and the subsequent page. That is, Fd4 is likely to be a positive value. If the subsequent page is inappropriate for the previous page, there is a high possibility that text expressing contents unrelated to each other will be written on the previous page and the subsequent page. That is, Fd4 is likely to be a negative value. In this way, the fourth feature vector Fd4 changes depending on the appropriateness of the subsequent page with respect to the previous page.
[0086] The fifth feature vector Fd5 is a one-dimensional vector indicating the similarity SM5 (FGa, FGb) of the drawings FG. The previous drawing FGa indicates the drawing FG included in the previous feature information Fa, and the next drawing FGb indicates the drawing FG included in the next feature information Fb. When the previous feature information Fa includes a plurality of drawings FG, the previous drawing FGa may be determined in various ways. For example, the previous drawing FGa may be the drawing FG that appears first on the previous page, the drawing FG that is the largest on the previous page, or a drawing obtained by concatenating all the drawings FG included in the previous feature information Fa. The same applies to the next drawing FGb.
[0087] The similarity SM5 indicates the similarity between the two figures FGa and FGb. The processor 110 generates a caption for each of the figures FGa and FGb, vectorizes each of the two captions, and calculates the cosine similarity of the two vectors as the similarity SM5. The caption generation method may be various methods. In this embodiment, the processor 110 generates a caption from a figure using a caption model M4. The caption model M4 may be various trained models that generate captions from figures. In this embodiment, the caption model M4 is a machine learning model called "DenseCap". The DenseCap model is disclosed in the following paper. Justin Johnson, Andrej Karpathy, Li Fei-Fei, "DenseCap: Fully Convolutional Localization Networks for Dense Captioning", arXiv:1511.07571, 24 Nov 2015, https: / / arxiv.org / abs / 1511.07571
[0088] The training method of the caption model M4 can be the training method disclosed in the above-mentioned paper by DenseCap. In addition, the trained DenseCap model is publicly available at the following URL. The publicly available trained model may be used as the caption model M4. https: / / github.com / jcjohnson / densecap
[0089] It should be noted that the published DenseCap model generates English captions. For processing of other languages (e.g., Japanese), the processor 110 may translate the English captions into the language to be processed. The translation method may be various methods. In this embodiment, the processor 110 performs the translation using a machine translation model M5. The machine translation model M5 may be various trained models that use input text to generate text in another language. In this embodiment, the machine translation model M5 is a machine learning model called "Transformer". The Transformer model is disclosed in the following paper: Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, Illia Polosukhin, "Attention Is All You Need", arXiv:1706.03762, 6 Dec 2017, https: / / arxiv.org / abs / 1706.03762
[0090] The training method of the machine translation model M5 can be the training method disclosed in the above-mentioned paper on Transformer. The machine translation model M5 may be another model based on Transformer. The machine translation model M5 may be a model obtained by replacing the encoder part of the machine translation model based on Transformer with the BERT model.
[0091] The processor 110 generates a caption by performing calculations of the caption model M4 using the figure to be processed (here, the front figure FGa or the back figure FGb). The processor 110 generates a caption in the language to be processed by performing calculations of the machine translation model M5 using the generated caption. The processor 110 generates a vector representing the caption by performing calculations of the language expression model M2 using the generated caption. The method of generating the vector is the same as the method of generating a vector from a title or text in the calculation of the feature vectors Fd3 and Fd4. The processor 110 calculates the cosine similarity (i.e., similarity SM5) between the vector obtained from the front figure FGa and the vector obtained from the back figure FGb.
[0092] If the subsequent page is an appropriate page that should follow the previous page, it is highly likely that similar figures will be drawn on the previous page and the subsequent page. That is, Fd5 is highly likely to be a positive value. If the subsequent page is inappropriate for the previous page, it is highly likely that dissimilar figures will be drawn on the previous page and the subsequent page. That is, Fd5 is highly likely to be a negative value. In this way, the fifth feature vector Fd5 changes depending on the appropriateness of the subsequent page for the previous page.
[0093] The sixth feature vector Fd6 is a one-dimensional vector indicating the difference of the chapter numbers CN (Fd6=CNa-CNb). The previous chapter number CNa indicates the chapter number CN included in the previous feature information Fa, and the next chapter number CNb indicates the chapter number CN included in the next feature information Fb. When the previous feature information Fa includes a plurality of chapter numbers CN, the previous chapter number CNa may be determined in various ways. For example, the previous chapter number CNa may be the chapter number CN that appears last in the previous page. When the next feature information Fb includes a plurality of chapter numbers CN, the next chapter number CNb may be the chapter number CN that appears first in the next page. When the next page is an appropriate page that should follow the previous page, Fd6=-1. When the next page is inappropriate for the previous page, Fd6 may be different from -1. In this way, the sixth feature vector Fd6 changes according to the appropriateness of the next page for the previous page.
[0094] The seventh feature vector Fd7 is chapter feature information RF7 related to the appearance of chapter number CN. The chapter feature information RF7 is a two-dimensional one-hot vector defined as follows. RF7=[1,0]: The following condition 7a is satisfied. RF7=[0,1]: The following condition 7b is satisfied. RF7=[0,0]: Neither condition 7a nor 7b is satisfied. Condition 7a: The text TX included in the preceding characteristic information Fa includes the following chapter number CNb. Condition 7b: The text TX included in the subsequent characteristic information Fb includes the preceding chapter number CNa.
[0095] If the subsequent page is an appropriate page to follow the previous page, the chapter number CNa included in the previous page may be referenced in the text of the subsequent page. That is, condition 7b is likely to be satisfied. Also, the possibility that the chapter number CNb included in the subsequent page is referenced in the text of the previous page is small. That is, the possibility that condition 7a is satisfied is small. If the subsequent page is inappropriate for the previous page, the possibility that condition 7a is satisfied is greater, and the possibility that condition 7b is satisfied is smaller. In this way, the chapter feature information RF7 (i.e., the seventh feature vector Fd7) changes depending on the appropriateness of the subsequent page for the previous page. Note that if both conditions 7a and 7b are satisfied, the chapter feature information RF7 may be set to a predetermined vector (e.g., [0,0]).
[0096] The eighth feature vector Fd8 is a one-dimensional vector obtained by replacing the chapter number CN of the sixth feature vector Fd6 with the figure number FN (Fd8=FNa-FNb). The previous figure number FNa indicates the figure number FN included in the previous feature information Fa, and the next figure number FNb indicates the figure number FN included in the next feature information Fb. When the previous feature information Fa includes multiple figure numbers FN, the previous figure number FNa may be the figure number FN that appears last on the previous page. When the next feature information Fb includes multiple figure numbers FN, the next figure number FNb may be the figure number FN that appears first on the next page. When the next page is a suitable page that should follow the previous page, Fd8=-1. When the next page is inappropriate for the previous page, Fd8 may be different from -1. In this way, the eighth feature vector Fd8 changes depending on the appropriateness of the next page for the previous page.
[0097] The ninth feature vector Fd9 is figure feature information RF9 related to the appearance of figure number FN, and is obtained by replacing the chapter number CN of the sixth feature vector Fd6 with the figure number FN. The figure feature information RF9 is a two-dimensional one-hot vector defined as follows. RF9=[1,0]: The following condition 9a is satisfied. RF9=[0,1]: The following condition 9b is satisfied. RF9=[0,0]: Neither condition 9a nor 9b is satisfied. Condition 9a: The text TX included in the front characteristic information Fa includes the back drawing number FNb. Condition 9b: The text TX included in the subsequent feature information Fb includes the prior figure number FNa. The figure feature information RF9 (i.e., the ninth feature vector Fd9) changes according to the appropriateness of the subsequent page relative to the preceding page, similar to the seventh feature vector Fd7. Note that when both conditions 9a and 9b are satisfied, the figure feature information RF9 may be set to a predetermined vector (e.g., [0,0]).
[0098] The tenth feature vector Fd10 is a one-dimensional vector obtained by replacing the chapter number CN of the sixth feature vector Fd6 with the table number TN (Fd10=TNa-TNb). The first table number TNa indicates the table number TN included in the first feature information Fa, and the second table number TNb indicates the table number TN included in the second feature information Fb. When the first feature information Fa includes a plurality of table numbers TN, the first table number TNa may be the table number TN that appears last on the first page. When the second feature information Fb includes a plurality of table numbers TN, the second table number TNb may be the table number TN that appears first on the second page. When the second page is an appropriate page that should follow the first page, Fd10=-1. When the second page is inappropriate for the first page, Fd10 may be different from -1. In this way, the tenth feature vector Fd10 changes according to the appropriateness of the second page for the first page.
[0099] The eleventh feature vector Fd11 is table feature information RF11 related to the appearance of the table number TN, and is obtained by replacing the chapter number CN of the sixth feature vector Fd6 with the table number TN. The table feature information RF11 is a two-dimensional one-hot vector defined as follows. RF11=[1,0]: The following condition 11a is satisfied. RF11=[0,1]: The following condition 11b is satisfied. RF11=[0,0]: Neither condition 11a nor 11b is satisfied. Condition 11a: The text TX included in the front characteristic information Fa includes the back table number TNb. Condition 11b: The text TX included in the subsequent characteristic information Fb includes the previous table number TNa. The table feature information RF11 (i.e., the eleventh feature vector Fd11) changes according to the appropriateness of the subsequent page relative to the preceding page, similar to the seventh feature vector Fd7. If both conditions 11a and 11b are satisfied, the table feature information RF11 may be set to a predetermined vector (e.g., [0,0]).
[0100] The twelfth feature vector Fd12 is a one-dimensional vector indicating an evaluation value V12 (TXaL, TXbF) indicating the ease of connection of sentences between the previous page and the next page. This evaluation value V12 is calculated using the previous text TXaL that appears last on the previous page and the next text TXbF that appears first on the next page. The evaluation value V12 indicates the grammatical acceptability of one concatenated sentence consisting of the previous text TXaL and the next text TXbF that follows the previous text TXaL. In this embodiment, the evaluation value V12 is set to a value equal to or greater than zero and equal to or less than one. V12=1 indicates that the concatenated sentence is natural, and V12=0 indicates that the concatenated sentence is unnatural.
[0101] The method of calculating the evaluation value V12 may be various methods. In this embodiment, the processor 110 uses the sentence classification model M6 to calculate the evaluation value V12 of the concatenated sentence. The sentence classification model M6 may be various trained models that calculate the grammatical acceptability of a sentence. In this embodiment, the sentence classification model M6 is a machine learning model obtained by adding a classifier for calculating the evaluation value V12 to the BERT model. As the BERT model, a publicly available trained model can be adopted. The classifier may include an aggregation layer that aggregates multiple vectors output from the BERT model to generate one vector, and an output layer that uses one vector to output the evaluation value V12. The method of aggregating multiple vectors by the aggregation layer may be "Max-Pooling" or "Mean-Pooling" described in the similarity SM3 of the third feature vector Fd3. The output layer may be various layers that output a one-dimensional evaluation value V12 using multiple components of one vector. The output layer may be, for example, a fully connected layer. The activation function of the output layer may be a sigmoid function or a Tanh function.
[0102] The sentence classification model M6 may be trained using a dataset called CoLA (Corpus of Linguistic Acceptability). This dataset is a set of sentences labeled as grammatical or ungrammatical. Here, the classifier may be trained using CoLA with the parameters of the trained BERT model fixed. Alternatively, the entire sentence classification model M6 may be trained using CoLA. In either case, the sentence classification model M6 is trained so that if the input sentence is grammatical, an evaluation value V12 close to 1 is output, and if the input sentence is ungrammatical, an evaluation value V12 close to 0 is output.
[0103] As described above, in S200 (FIG. 3), processor 110 calculates feature vectors Fd1-Fd12. Note that there are cases where the preceding feature information Fa or the following feature information Fb does not include feature information used to calculate the feature vectors. For example, if the following page does not include a figure, the following feature information Fb does not include a following figure FGb for calculating the fifth feature vector Fd5. In this case, processor 110 may adopt a predetermined vector (for example, a vector indicating that the following page is appropriate for the preceding page, or a vector indicating that the following page is inappropriate for the preceding page) as the feature vector.
[0104] The processor 110 generates the comparison feature information Fd by concatenating the feature vectors Fd1-Fd12. Here, the processor 110 preferably normalizes each of the feature vectors Fd1-Fd12 and concatenates the normalized feature vectors Fd1-Fd12.
[0105] A3-2. Sequential evaluation model M1: The processor 110 calculates the confidence VC by inputting the comparison feature information Fd to the order evaluation model M1 (FIG. 7(A)). In this embodiment, the order evaluation model M1 includes m (m is an integer of 2 or more) layers L1-Lm. The m layers L1-Lm are connected in this order. The configuration of each layer L1-Lm may be various configurations that generate output data representing the features of the input data. For example, k layers from L1 to Lk (k is an integer of 1 or more and less than m) may include convolution layers, and mk layers from Lk+1 to Lm may include fully connected layers. Such an order evaluation model M1 is also called a convolutional neural network. The number of dimensions of the input data and the number of dimensions of the output data in each layer may be variously set. The activation function of each layer may be various functions such as ReLU (Rectified Linear Unit). Note that a function suitable for generating the confidence VC (for example, a Tanh function or a sigmoid function) is used as the activation function of the final layer Lm. Each layer L1-Lm has various computation parameters such as weights and biases.
[0106] A3-3. Generation process of the order evaluation model M1: 8 is a flowchart showing an example of a generation process of the order evaluation model M1. The generation process may be performed by the multifunction device 100, or alternatively, may be performed by a computer (not shown). In the following, the order evaluation model M1 is assumed to be generated by a computer (not shown).
[0107] In S910, the computer acquires multiple page data of multiple documents. In this embodiment, scan data for each page is generated in advance by reading multiple pages of multiple documents using a reading execution unit (e.g., reading execution unit 170 in FIG. 1). The scan data for each of the multiple pages is stored in a storage device (not shown) of the computer. The computer acquires the scan data from the storage device as page data.
[0108] In S920, the computer acquires feature information of each page data. The method of acquiring feature information is the same as the method of acquiring feature information in S140 of FIG.
[0109] In S930, the computer generates training data. Specifically, the computer uses a pair of a first page and a second page represented by two page data as a training pair. The computer calculates the comparative feature information Fd for each of the multiple training pairs using the page data of the first page and the page data of the second page. The calculation method of the comparative feature information Fd is the same as the calculation method of the comparative feature information Fd in S200 (FIG. 3). The multiple training pairs may be predetermined or may be randomly determined by the computer.
[0110] The computer determines a correct answer confidence VCc for each of the plurality of training pairs. The correct answer confidence VCc is determined as follows: (1) The two pages of the training pair are consecutive pages, and the latter page should follow the former page: VCc=1 (2)Other cases: VCc=0 Other cases include the following: (A) When the two pages in the training pair are not consecutive pages (B) The order of the two pages in the training pair is incorrect.
[0111] The training data includes input data and correct answer data associated with the same training pair. The input data represents the comparison feature information Fd, and the correct answer data represents the correct answer confidence VCc. The computer generates a plurality of training data using a plurality of training pairs.
[0112] In S940, the computer obtains a subset of the plurality of training data from the plurality of training data generated in S930. Unprocessed training data is selected as the subset. The total number of training data in the subset may be predetermined.
[0113] In S950, the computer calculates the confidence VC by inputting the input data of the training data of the subset into the order evaluation model M1. The computer calculates the confidence VC by performing calculations of each layer L1-Lm using the calculation parameters of each layer L1-Lm of the order evaluation model M1. The calculation of the confidence VC is performed for each training data included in the subset.
[0114] In S960, the computer calculates a loss using multiple combinations of the confidence VC and the correct confidence VCc. The loss may be a number of values indicating the difference between the confidence VC and the correct confidence VCc (e.g., mean square error or mean absolute error).
[0115] In S970, the computer adjusts a plurality of calculation parameters of the order evaluation model M1 so as to reduce the loss. As an algorithm for adjustment, for example, an algorithm using the backpropagation method and the gradient descent method may be adopted. Here, so-called Adam optimization may be performed.
[0116] In S980, the computer judges whether a termination condition is satisfied. The termination condition may be any condition that indicates that the sequence evaluation model M1 is properly trained. In this embodiment, the termination condition is that the loss calculated using a predetermined number of training data that is not used for training is equal to or less than a predetermined loss threshold.
[0117] If the termination condition is not satisfied (S980: No), the computer proceeds to S940 and executes processing of a new subset. If the termination condition is satisfied (S980: Yes), in S990, the computer stores data of the trained sequence evaluation model M1 in the computer's storage device. Then, the computer ends the generation process of FIG. 8. In this way, the trained sequence evaluation model M1 is generated.
[0118] Various documents may be used to train the sequence evaluation model M1. For example, a document having multiple pages representing different dates may be used. Here, the multiple pages may be arranged in ascending order of dates. In this case, the trained sequence evaluation model M1 may calculate a large confidence VC when the candidate order indicates that the first page and the next page are arranged in ascending order of dates. In this way, the documents used to train the sequence evaluation model M1 are used as information representing the appropriate relationship between the first page and the next page. By selecting the documents used to train the sequence evaluation model M1, the appropriate relationship between the first page and the next page for the large confidence VC can be controlled.
[0119] As described above, in this embodiment, the multifunction device 100 is an example of an image processing device that processes images of pages of a document. The processor 110 of the multifunction device 100 executes the following process. In S130 (FIG. 2), the processor 110 acquires input data representing a document. In S110, the processor 110 acquires rule data. As described in S230, the processor 110 uses the rule data to determine the order of multiple pages represented by the input data (S230). In this way, the data acquired in S110 is an example of rule data representing a target rule that specifies the order in which N pages should be arranged when the document represented by the input data is represented by N pages (N is an integer equal to or greater than 2). In S240, the processor 110 generates output data representing multiple pages arranged in the rule order. The rule order is the order in which the N pages should be arranged based on the target rule.
[0120] In this way, the rule order, which is the order in which the N pages should be arranged, is based on the target rules represented by the rule data. Therefore, the rule order can be flexibly controlled by the rule data. For example, when the first reference information Ta and the second reference information Tb in the table TBr of the rule page Pr (FIG. 4) are interchanged, the page of the paper associated with the first reference information Ta and the page of the paper associated with the second reference information Tb are interchanged among the multiple pages represented by the output data. In this way, the rule order can be flexibly controlled.
[0121] Also, in this embodiment, in S250 (FIG. 3), the processor 110 outputs output data. As a result, the output data can be used for various processes. The output destination of the output data may include one or more devices arbitrarily selected from a printing device, a display device, and a storage device. In this way, the output data can be used for various purposes, such as printing an image, displaying an image, and saving data.
[0122] In addition, in this embodiment, as described in S120 (FIG. 2) and FIG. 4, the order of the multiple pages is specified by the order of the text Ta-Td (FIG. 4). The text Ta-Td is an example of reference information that defines a target rule, and the target rule represents the order of the multiple reference information. The processor 110 further executes the following process. In S140, the processor 110 obtains feature information of each of the N pages (which is the same as the N pages represented by the output data in this embodiment) represented by the input data. The N pages are an example of the multiple elements represented by the input data. In S150-S230, the processor 110 determines the rule order using the order of the reference information associated with the feature information. According to this configuration, the processor 110 can determine an appropriate rule order using the order of the reference information. Processor 110 may determine the correspondence between feature information and reference information for q pieces (q is an integer between 1 and N) of feature information among the N pieces of feature information of N pages. Processor 110 may determine the order of the remaining Nq pages using other conditions. For example, processor 110 may determine the order of N pages using evaluation information indicating the appropriateness of two pages when the two pages are assumed to be consecutive, such as comparison feature information Fd (FIGS. 4(A)-4(C)).
[0123] B. Second Example: Fig. 9 is a part of a flow chart of another embodiment of image processing. The difference from the embodiment of Fig. 2 and Fig. 3 is that the processor 110 generates output data including a table of contents page. Specifically, instead of S240 in Fig. 3, S232b and S240b in Fig. 9 are executed. The other parts of the image processing are the same as the corresponding parts in Fig. 2 and Fig. 3 (description will be omitted).
[0124] 10(A)-10(D) are diagrams showing examples of information used in image processing. FIG. 10(A) shows an example of a table represented by rule data. Table TBrb shows a list of index terms. In this embodiment, multiple pages showing past questions of mathematics exams are processed. Of the five rows R1-R5 of table TBrb, the first row R1 shows a header. The four rows R2-R5 show four index terms Ab1-Ab4, respectively. Each of the index terms Ab1-Ab4 includes text showing the field of the problem (text on the left side of the figure) and text showing an abbreviation of the field (text on the right side of the figure). These index terms Ab1-Ab4 are examples of reference information. Note that the rule data showing the list of index terms Ab1-Ab4 may be data of a spreadsheet software or data input by operating the operation unit 150 instead of scan data.
[0125] FIG. 10B shows an example of multiple pages represented by input data. Input data IDb represents multiple pages of documents DBa and DBb. The first document DBa includes four pages Pa1-Pa4 representing exam questions for 2021, and the second document DBb includes four pages Pb1-Pb4 representing exam questions for 2023. The text in the boxes showing each page represents the character strings included in the text TX detected in S140 (FIG. 2). As shown, the text TX includes a year and an abbreviation for the field. The year is detected as the date DY.
[0126] Fig. 10C shows an example of multiple pages represented by the output data. The output data ODb shows page groups GB1-GB4 that correspond to the index terms Ab1-Ab4, respectively. The order of the page groups GB1-GB4 is the same as the order of the index terms Ab1-Ab4 represented by the table TBrb (Fig. 10A).
[0127] The first page group GB1 includes pages Pa1 and Pb1 that include the corresponding index term Ab1 (here, an abbreviation). The order of pages in the first page group GB1 is ascending order of date DY. Such a first page group GB1 can be formed by matching in S150 (FIG. 2) and adding undetermined pages in S200-S210 (FIG. 3). The other page groups GB2-GB4 similarly include pages that include corresponding index terms. And the order of pages in each of the groups GB2-GB4 is ascending order of date DY. In S230 (FIG. 3), the processor 110 determines the rule order to be such a page order.
[0128] In S232b (FIG. 9), the processor 110 generates data for a table of contents page. FIG. 10(D) shows an example of a table of contents page. The table of contents page Pp shows the correspondence between a keyword K associated with a page group and the first page number PNf of the page group. In this embodiment, an index term (here, an abbreviation) detected from each page is used as the keyword K. The first page number PNf indicates the page number PNo represented by the output data ODb (FIG. 10(C)). As will be described later, in this embodiment, the processor 110 places the table of contents page Pp at the beginning of multiple pages represented by the output data ODb. Therefore, the page number PNo of the first page Pa1 of the first page group GB1 is 2, not 1. The page numbers PNo of the other pages are similarly shifted by 1 each time.
[0129] In S240b (FIG. 9), the processor 110 generates output data representing the first table of contents page Pp and a plurality of pages arranged in the regular order. Then, the processor 110 proceeds to S250 (FIG. 3).
[0130] As described above, in this embodiment, in S240b (FIG. 9), processor 110 generates output data representing table of contents page Pp located at the beginning and N pages arranged in regular order (here, pages Pa1-Pb4). A user can easily refer to the N pages arranged in regular order by referring to the table of contents.
[0131] The table of contents page Pp indicates the page numbers PNo of some of the N pages arranged in the regular order. Such a table of contents page Pp is an example of a first type specific page that indicates the regular order.
[0132] C. Third Example: Fig. 11 is a part of a flow chart of another embodiment of image processing. The difference from the embodiment of Fig. 9 is that the processor 110 generates output data including a page showing the rule order. Specifically, instead of S240b, S233c, S234c, and S240c are executed. These processes add a page of a correspondence table, which will be described later. The other parts of the image processing are the same as the corresponding parts of Fig. 2, Fig. 3, and Fig. 9 (description will be omitted).
[0133] 12(A)-12(E) are diagrams showing examples of information used in image processing. FIG. 12(A) shows an example of a table represented by rule data. The only difference from table TBrb in FIG. 10(A) is that a sixth row R6 indicating index term Ab5 is added to table TBrc. Index term Ab5 is related to the answer.
[0134] Fig. 12(B) shows an example of multiple pages represented by the input data. The difference from the input data IDb in Fig. 10(B) is that answer pages Pa5 and Pb5 have been added to documents DCa and DCb, respectively. The text TX detected from answer pages Pa5 and Pb5 includes the year and the abbreviation of the field.
[0135] Fig. 12(C) shows an example of multiple pages represented by the output data. The major difference from the output data ODb in Fig. 10(C) is that a final correspondence table page Pq2 has been added. The output data ODc further shows a table of contents page Pq1 and page groups GC1-GC5 that correspond to the index terms Ab1-Ab5, respectively. The order of the page groups GC1-GC5 is the same as the order of the index terms Ab1-Ab5 shown in the table TBrc (Fig. 12(A)).
[0136] The configurations of the four page groups GC1-GC4 are the same as the configurations of the four page groups GB1-GB4 in Fig. 10(C), respectively. The fifth page group GC5 includes pages Pa5 and Pb5 that include the corresponding index term Ab5 (here, an abbreviation). The order of the pages Pa5 and Pb5 is the ascending order of the date DY.
[0137] Fig. 12(D) shows an example of table of contents page Pq1. The difference from table of contents page Pp in Fig. 10(D) is that information related to the fifth page group GC5 is added. In S232b (Fig. 11), processor 110 generates data for table of contents page Pq1. The generation method is the same as the generation method in S232b in Fig. 9.
[0138] In S233c (FIG. 11), the processor 110 acquires original page information related to the original document for each page. In this embodiment, the processor 110 acquires the date DY and the page number PN in the original document for each page.
[0139] In S234c, processor 110 generates a correspondence table page that indicates the correspondence between the original page information and the new page number PNo. FIG. 12(E) shows an example of the correspondence table page. Correspondence table page Pq2 indicates the correspondence between the original page information (here, date DY and page number PN) and the new page number PNo. By referring to correspondence table page Pq2, the user can easily understand the correspondence between the page number of the original document and the new page number. For example, answer pages Pa5 and Pb5 may indicate the correspondence between the page number of the question and the answer to that question. Here, by referring to correspondence table page Pq2, the user can easily understand the correspondence between the new page number of the question and the answer.
[0140] In S240c (FIG. 11), the processor 110 generates output data representing the table of contents page Pq1 at the beginning, a plurality of pages arranged in the regular order, and the last correspondence table page Pq2. Then, the processor 110 proceeds to S250 (FIG. 3).
[0141] As described above, in this embodiment, in S240c (FIG. 11), the processor 110 generates output data representing the correspondence table page Pq2 and N pages (here, pages Pa1-Pb5) arranged in the regular order. The correspondence table page Pq2 represents the page numbers PNo of the N pages arranged in the regular order. Such a correspondence table page Pq2 is an example of a first type specific page representing the regular order.
[0142] The original page information may be composed of only the page number PN. For example, the date DY may be omitted. The original page information may include various other information (for example, the title TL) in addition to the page number PN. The correspondence table page Pq2 may be placed in a position other than the end (for example, the beginning). The table of contents page Pq1 may be omitted.
[0143] D. Fourth Example: Fig. 13 is a part of a flow chart of another embodiment of image processing. The difference from each of the above embodiments is that the reference information represented by the rule data and the feature information of the page are associated with each other through the intermediate information represented by the intermediate data. In the following, the explanation will be given assuming that a plurality of pages representing past questions of a mathematics examination are processed.
[0144] S110 and S120 are the same as S110 and S120 in FIG. 2, respectively. FIG. 14(A)-FIG. 14(E) are diagrams showing examples of information used in image processing. FIG. 14(A) shows an example of a table represented by rule data. The first table TBd1 shows a list of reference information. The first row R1 shows a header. Four rows R2-R5 show four pieces of reference information Di1-Di4, respectively. Each piece of reference information Di1-Di4 includes text indicating the field of the problem (text on the left side of the figure) and text indicating details of the field (text on the right side of the figure). The details may include multiple pieces of text. Note that the rule data showing the list of reference information Di1-Di4 may be data of a spreadsheet software or data input by operating the operation unit 150, instead of scan data.
[0145] In S126d (FIG. 13), the processor 110 acquires intermediate data. FIG. 14(B) shows an example of information represented by the intermediate data. In this embodiment, the intermediate data shows the second table TBd2. Columns C1-C3 show "year", "question number", and "field", respectively. The first row R1 is a header row. Eight rows R2-R9 show the correspondence between "year", "question number", and "field", respectively. "Field" shows the text included in the details of the reference information Di1-Di4 (FIG. 14(A)). "Year" and "question number" show the text included in the feature information of the page, as described later. In this way, the second table TBd2 shows the correspondence between the reference information and the feature information. The second table TBd2 is an example of intermediate information.
[0146] In S128d (FIG. 13), the processor 110 analyzes the intermediate data to determine the correspondence between the reference information and the feature information (called intermediate correspondence). When the second table TBd2 is represented by scan data, the processor 110 executes the same process as S121 and S122 (FIG. 2) using the scan data to obtain eight intermediate correspondences RL1-RL8 of the eight rows R2-R9 of the second table TBd2. Note that the intermediate data may be data of a spreadsheet software or data input by operating the operation unit 150 instead of the scan data.
[0147] S130 and S140 (FIG. 13) are the same as S130 and S140 in FIG. 2, respectively. FIG. 14(C) shows an example of multiple pages represented by input data. Input data IDd represents multiple pages of documents DDr and DDs. The first document DDr includes four pages Pr1-Pr4 representing exam questions for 2021, and the second document DDs includes four pages Ps1-Ps4 representing exam questions for 2023. The text TX detected from each page includes the year and the question number. The year is detected as the date DY.
[0148] In S150d (FIG. 13), the processor 110 performs matching between the reference information and the feature information (and thus the page) associated with the reference information through the intermediate correspondence. As a matching method, various methods can be adopted. For example, the processor 110 replaces the information associated with the reference information by the intermediate correspondence among the feature information of the page with the corresponding reference information. For example, the text TX of the page Pr1 (FIG. 14(C)) includes "2021" and "Question 1". The combination of "2021" and "Question 1" is associated with "cosine" by the intermediate correspondence RL5 (FIG. 14(B)). The processor 110 replaces "Question 1" represented by the intermediate correspondence RL6 among the text TX of the page Pr1 with the corresponding "cosine". In this embodiment, it is assumed that "Question number" is the replacement target. Then, the processor 110 performs matching in the order of priority described in S150 (FIG. 2) using the changed feature information. In this way, the processor 110 associates one piece of reference information with one page.
[0149] After S150d, the processor 110 proceeds to S170 (FIG. 2). The process after S170 may be the same as the corresponding process in any of the above embodiments. In this embodiment, the process in the embodiment in FIG. 9 is adopted. In either case, the above-mentioned modified feature information may be used to calculate the confidence level.
[0150] FIG. 14(D) shows an example of a plurality of pages represented by output data. The output data ODd shows page groups GD1-GD4 that are respectively associated with the reference information Di1-Di4 (FIG. 14(A)). The order of the page groups GD1-GD4 is the same as the order of the reference information Di1-Di4 represented by the first table TBd1. The first page group GD1 includes pages Pr1 and Ps1 that include information (here, "2023 and question 1" or "2021 and question 1") that is associated with the first reference information Di1 (here, "sine" or "cosine") by the intermediate correspondence relationships RL1 and RL5. The order of pages in the first page group GD1 is the ascending order of date DY. Such a first page group GB1 can be formed by matching by S150d (FIG. 13) and adding undetermined pages by S200-S210 (FIG. 3). The same is true for the other page groups GD2-GD4. Furthermore, the table of contents page Pd is placed at the top.
[0151] As described above, in this embodiment, in S126d (FIG. 13), processor 110 acquires intermediate data. As described in FIG. 14(B), the intermediate data defines intermediate correspondences RL1-RL8 that represent correspondences between reference information and feature information. In S150d (FIG. 13) and S170-S230 (FIGS. 2 and 3), processor 110 determines the rule order according to the order of reference information associated with feature information via intermediate correspondences RL1-RL8. In this way, by using intermediate data, the user can flexibly control the correspondences between feature information and reference information.
[0152] E. Fifth Example: 15 is a flow chart of another embodiment of image processing. In this embodiment, the rule data represents a layout for each page. The processor 110 allocates the elements represented by the input data according to this layout.
[0153] In S110e, the processor 110 acquires rule data. In this embodiment, the user places a layout page, which is a document page that represents the layout of each page, in the placement portion of the reading execution unit 170. The processor 110 causes the reading execution unit 170 to read the layout page, and acquires scan data of the layout page from the reading execution unit 170. This scan data is an example of rule data.
[0154] Fig. 16(A)-Fig. 16(C) are diagrams showing examples of information used in image processing. Fig. 16(A) shows an example of a layout page. In this embodiment, the rule data D5 represents two pages P51 and P52. The first page P51 represents two areas A11 and A12. The areas A11 and A12 contain texts TX11 and TX12, respectively. The second page P52 represents two areas A21 and A22. The areas A21 and A22 contain texts TX21 and TX22, respectively.
[0155] In S120e (FIG. 15), the processor 110 obtains reference information for each of the multiple regions of the multiple pages by analyzing the rule data. In this embodiment, the processor 110 executes the same process as S121 and S122 (FIG. 2) using the rule data. As a result, the processor 110 detects the regions of text TX11, TX12, TX21, and TX22, and obtains the text recognized by OCR. The obtained text is an example of reference information.
[0156] In S130e, the processor 110 acquires input data. Fig. 16(B) shows an example of the input data. The input data ID5 includes text data TX5a and TX5b, and image data IM5a and IM5b. Both the sentence represented by the text data and the image represented by the image data are examples of documents.
[0157] In this embodiment, the user prepares data TX5a, TX5b, IM5a, and IM5b in advance. The user supplies the prepared data to the multifunction device 100. Any method of supplying the data may be used. For example, the user connects a storage device (e.g., a USB flash drive) that stores the input data ID5 to the communication interface 180. The processor 110 acquires the input data ID5 from the storage device.
[0158] In S142e (FIG. 15), the processor 110 generates the summaries ABa and ABb by analyzing the text data TX5a and TX5b (FIG. 16(B)). The method of generating the summaries may be the same as the method of generating the summaries described in the calculation of the similarity SM4 (FIG. 7(C)).
[0159] In S144e (FIG. 15), the processor 110 generates captions CPa and CPb by analyzing the image data IM5a and IM5b (FIG. 16(B)). The method of generating the captions may be the same as the method of generating the captions described in the calculation of the similarity SM5 (FIG. 7(C)).
[0160] The summaries ABa, ABb and the captions CPa, CPb are examples of feature information of each of the elements TX5a, TX5b, IM5a, IM5b represented by the input data ID5.
[0161] In S150e, the processor 110 performs matching between the reference information and the feature information. Various methods of matching may be used. In this embodiment, both the reference information and the feature information are text. The processor 110 calculates the similarity between the reference information and the feature information in the same manner as the text similarity SM4 (FIG. 7(C)). The processor 110 associates the reference information and the feature information that show the highest similarity. Here, the processor 110 may determine the correspondence between the reference information and the feature information in descending order of similarity. For example, the processor 110 calculates the similarity of all combinations of the reference information and the feature information. The processor 110 associates the reference information and the feature information that show the highest similarity. The processor 110 associates the reference information and the feature information that show the highest similarity among the remaining combinations excluding the associated combination. The processor 110 can determine the correspondence between the reference information and the feature information by repeating this process. In the example of FIG. 16(B), the following correspondence is formed. Summary ABa:Text TX11 Summary ABb: Text TX21 CaptionCPa:TX12 CaptionCPb:TX22
[0162] In S160e (FIG. 15), the processor 110 allocates the element to an area according to the reference information associated with the feature information of the element represented by the input data ID5. FIG. 16(C) shows an example of pages P51o and P52o to which elements are allocated. Pages P51o and P52o correspond to pages P51 and P52 in FIG. 16(A), respectively. Text TX11 is associated with summary sentence ABa in text data TX5a (FIG. 16(B)). Therefore, the processor 110 allocates text data TX5a to area A11 associated with text TX11 in the first page P51o (FIG. 16(C)). Other elements TX5b, IM5a, and IM5b are similarly allocated to areas A21, A12, and A22, respectively. The elements are allocated so as not to protrude outside the corresponding areas.
[0163] Various methods may be used to determine the range of an area in pages P51, P52 represented by rule data D5 (FIG. 16(A)). For example, rule data D5 may represent multiple areas in different colors. Processor 110 may adopt an area that is continuous with text TX11 and has the same color as area A11 associated with text TX11. Alternatively, rule data D5 may represent a line separating multiple areas. Processor 110 may adopt the smallest area that includes text TX11 and is surrounded by a line as area A11 associated with text TX11. Areas associated with other reference information are also determined in the same manner as the method for determining area A11.
[0164] In this way, the layout process of S160e determines the order in which the N pages P51o, P52o should be arranged when the document represented by the input data (here, multiple elements TX5a, TX5b, IM5a, IM5b) is represented on N pages (here, N=2).
[0165] In S240e (FIG. 15), processor 110 generates output data representing a plurality of pages arranged in the rule order. The generated output data represents a plurality of pages (e.g., pages P51o, P52o (FIG. 16(C))) representing the elements allocated in S160e.
[0166] In S250, the processor 110 outputs the output data. The process of S250 is the same as the process of S250 in Fig. 3. Then, the processor 110 ends the image processing.
[0167] As described above, in this embodiment, the rule data D5 (FIG. 16(A)) represents the layout on each of the N pages. In this embodiment, the layout represents the arrangement of one or more areas (here, areas A11, A12, A21, A22) on each of the N pages. Then, in S160e, the processor 110 allocates the multiple elements TX5a, TX5b, IM5a, and IM5b represented by the input data ID5 using the layout represented by the rule data D5. This determines the rule order. By using the layout represented by the rule data, the user can flexibly control the order in which the N pages should be arranged when the multiple elements represented by the input data are represented on the N pages.
[0168] In addition, the method of determining the correspondence between the area defined by the layout and the elements represented by the input data is not limited to the method of matching reference information for the area with feature information for the element, and may be various other methods.
[0169] F. Sixth Example: 17 is a flowchart of another embodiment of image processing. In this embodiment, a page of a large-sized document (e.g., a newspaper) is divided and read by the reading execution unit 170. Then, a plurality of images are synthesized to form one page.
[0170] In S110f, the processor 110 acquires rule data. In this embodiment, the rule data represents reference information for each page. Figs. 18(A)-18(D) are diagrams showing examples of information used in image processing. Fig. 18(A) shows an example of rule data D6. The rule data D6 represents the correspondence between pages P1, P2 and reference information D61, D62. The user inputs reference information for each page (e.g., the name of the newspaper) by operating the operation unit 150 (Fig. 1). The processor 110 acquires the rule data D6 using information from the operation unit 150.
[0171] In S130f (FIG. 17), the processor 110 acquires input data. In this embodiment, the user causes the reading execution unit 170 to read a page of a newspaper. FIG. 18(B) shows an example of a page to be read. A first page DP1 and a second page DP2 are read. The user separates each of the pages DP1 and DP2 into portions and causes the reading execution unit 170 to read them. The processor 110 acquires scan data representing the multiple portions that have been read from the reading execution unit 170. This scan data is an example of input data.
[0172] 18C shows an example of an image represented by input data. Input data ID6 represents four partial images SP11, SP12, SP21, and SP22. Partial images SP11 and SP12 represent different parts of the first page DP1, and partial images SP21 and SP22 represent different parts of the second page DP2. Partial images SP11 and SP12 include a common portion OV1, and partial images SP21 and SP22 include a common portion OV2.
[0173] In S140f (FIG. 17), processor 110 analyzes each partial image to acquire feature information for each partial image. The method of acquiring feature information is the same as the method of acquiring feature information in S140 of FIG. 2. From partial images SP11 and SP12 representing the first page DP1, feature information F11 and F12 including the name of the newspaper of the first page DP1 can be acquired, respectively. From partial images SP21 and SP22 representing the second page DP2, feature information F21 and F22 including the name of the newspaper of the second page DP2 can be acquired, respectively.
[0174] In S150f, the processor 110 matches the reference information with the feature information. Various methods of matching may be used. In this embodiment, the feature information may include text including the reference information (e.g., the name of a newspaper). The processor 110 associates the reference information with the feature information including the reference information. For example, the feature information F11 and F12 of the partial images SP11 and SP12 are associated with the first reference information D61, and the feature information F21 and F22 of the partial images SP21 and SP22 are associated with the second reference information D62.
[0175] In S152f, the processor 110 generates data of a composite image by synthesizing a plurality of partial images having a common portion. The synthesis method may be various methods. For example, the processor 110 detects a common portion by analyzing a plurality of partial images associated with the same reference information. Then, the processor 110 synthesizes the plurality of partial images so that the common portion overlaps. The detection method of the common portion may be various methods. For example, the processor 110 divides each partial image into a plurality of blocks. The processor 110 detects a block pair (i.e., a common portion) representing the same image by template matching that compares a block selected from one partial image with a block selected from another partial image. The method of determining the relative positional relationship between two partial images for synthesis may be various methods. For example, the relative position may be determined by template matching or key point matching.
[0176] 18D shows an example of a composite image. The first composite image OP1 is a composite image of partial images SP11 and SP12, and represents the first page DP1. The second composite image OP2 is a composite image of partial images SP21 and SP22, and represents the second page DP2.
[0177] In S160f (FIG. 17), the processor 110 determines a regular order, which is the order of the composite images, according to the order of the reference information. In this embodiment, the composite images are associated with feature information of the original partial images. The processor 110 determines the order of the composite images according to the order of the reference information associated with the feature information of the composite images. The order of the first composite image OP1 is determined to be the order of the first reference information D61 associated with the feature information F11, F12 (first page P1). The order of the second composite image OP2 is determined to be the order of the second reference information D62 associated with the feature information F21, F22 (second page P2).
[0178] In S240f (FIG. 17), processor 110 generates output data representing a plurality of pages arranged in a regular order. The generated output data represents a plurality of composite images (e.g., composite images OP1, OP2 (FIG. 18(D))) that are composited in S152f.
[0179] In S250, the processor 110 outputs the output data. The process of S250 is the same as the process of S250 in Fig. 3. Then, the processor 110 ends the image processing.
[0180] As described above, in this embodiment, the processor 110 generates a composite image by synthesizing a plurality of images represented by the input data. The processor 110 then determines the rule order by using the order of the reference information associated with the feature information associated with the composite image. With this configuration, the processor 110 can determine an appropriate rule order by using the order of the reference information even if one document page is too large to be represented by one image of the input data.
[0181] The image synthesis (S152f) may be performed before the characteristic information is acquired (S140f). Then, processor 110 may acquire the characteristic information by analyzing the synthesized image. To synthesize the images, processor 110 may detect common parts using various combinations of a plurality of partial images. Furthermore, processor 110 may synthesize two partial images when the continuity of the text between the two partial images is good (for example, when evaluation value V12 (FIG. 7) calculated from the two partial images is equal to or greater than a predetermined threshold) regardless of whether or not there is a common part.
[0182] G. Seventh Example: 19(A) and 19(B) are diagrams showing another embodiment of image processing. In this embodiment, feature information is acquired according to a template. FIG. 19(A) shows a part of a flowchart of image processing in this embodiment. S140g in the figure may be executed instead of S140 in each of the above embodiments. S140g may be followed by, for example, S130. S140g may be followed by, for example, either S150 or S150d.
[0183] In S140g, processor 110 acquires feature information by analyzing an area represented by a template in a page represented by input data. FIG. 19(B) shows an example of a template. Template TP1 represents four areas TA1-TA4. These areas TA1-TA4 correspond to "title", "author name", "main text", and "page number", respectively. In this embodiment, it is assumed that the layout in the page represented by the input data is predetermined. And it is assumed that template TP1 indicates this layout.
[0184] The processor 110 obtains the title by analyzing (e.g., OCR) the first region TA1 of the page represented by the input data, and similarly, the processor 110 obtains the author name, text, and page number by analyzing regions TA2, TA3, and TA4, respectively.
[0185] In this embodiment, the area representing the feature information in the page is determined by the template. Then, the processor 110 obtains the feature information by analyzing the area represented by the template in the page represented by the input data. Therefore, the processor 110 can obtain the feature information appropriately.
[0186] In this embodiment, the data of the template TP1 is prepared by the user. The data format of the template TP1 may be any data format. The method of preparing the data of the template TP1 may be any method. For example, the user may have the reading execution unit 170 read a template page, which is a document page representing the template TP1. The processor 110 may acquire the data of the template TP1 by analyzing the scan data of the template page. The template page may represent each of the areas TA1-TA4 by color or a surrounding line, similar to the layout page described in FIG. 16(A). The template page may represent text indicating the type of the area (for example, "title", "author name", etc.), like the text TX11 in FIG. 16(A). The processor 110 can acquire the range and type of each area by analyzing the scan data of the template page.
[0187] H. Eighth Example: FIG. 20 is a part of a flowchart of another embodiment of image processing. In this embodiment, when the input order, which is the order in which a plurality of pages represented by input data are arranged, is different from the rule order, the processor 110 notifies the user that the input order is different from the rule order. S310 for notification is applicable to various embodiments of this specification. S310 may be followed by, for example, any of S230, S160e, and S160f. S310 may be followed by, for example, any of S240, S232b, S240e, and S240f. In addition, the processor 110 may end the image processing in response to the end of S310. That is, the generation of output data and the output of the output data may be omitted.
[0188] S310 includes S312, S314, and S316. In S312, the processor 110 obtains an input order, which is the order of the pages represented by the input data. For example, as in the embodiment of FIG. 5A, when the pages of a document are read one by one in order by the reading execution unit 170, the input order is the same as the reading order.
[0189] In S314, the processor 110 determines whether the input order is the same as the rule order. If the input order is different from the rule order (S314: No), in S316, the processor 110 notifies the user that the input order is different from the rule order. Any method may be used for the notification. The processor 110 may display a message on the display unit 140. The processor 110 may also output a sound from a buzzer or speaker (not shown). After S316, the processor 110 ends S310. If the input order=the rule order (S314: Yes), the processor 110 skips S316 and ends S310.
[0190] In this manner, in this embodiment, when the input order differs from the rule order (S314: No), processor 110 executes a notification process (S316). Therefore, the user can easily notice the possibility of an error in either or both of the input order and the rule order.
[0191] I. Ninth Example: 21(A) and 21(B) are diagrams showing another embodiment of image processing. In this embodiment, the processor 110 allows the user to change the order of the N pages. FIG. 21(A) shows a part (S320) of a flow chart of image processing. S320 for changing the order is applicable to various embodiments of the present specification. S320 may be followed by, for example, any of S230, S160e, S160f, and S310. S320 may be followed by, for example, any of S240, S232b, S240e, and S240f.
[0192] S320 includes S322 and S324. In S322, the processor 110 displays a change screen on the display unit 140. FIG. 21(B) shows an example of the change screen. The change screen SCi represents a rule order area PLi1. The rule order area PLi1 represents a thumbnail and a page number of each page. The user can change the order of the pages by operating the operation unit 150. The change screen SCi further represents a changed order area PLi2. The changed order area PLi2 represents the changed order of multiple pages. The changed order area PLi2 represents a thumbnail and a page number of each page.
[0193] The change screen SCi includes a completion button BTi. The user can input an instruction to complete the order change by operating the completion button BTi via the operation unit 150. In S324 (FIG. 21(A)), the processor 110 changes the order of the pages in response to the user's completion instruction. Thereafter, the processor 110 executes processing according to the changed order. For example, the output data generated in S240 (FIG. 2) represents a plurality of pages arranged in the changed order.
[0194] As described above, in this embodiment, the processor 110 allows the user to change the order of the N pages from the regular order in S310. When the order is changed, in S240 (FIG. 3), S240b (FIG. 9), S240c (FIG. 11), S240e (FIG. 15), and S240f (FIG. 17), the processor 110 generates output data (also called specific output data) representing the N pages arranged in the changed order, instead of the regular order. In S250, the processor 110 outputs the specific output data. In this way, even if the regular order is not suitable for the user's request, the processor 110 can generate specific output data representing the N pages arranged in an order suitable for the user's request.
[0195] J. Tenth Example: 22(A) and 22(B) are diagrams showing another embodiment of image processing. In this embodiment, when the rule data represents multiple rules, the processor 110 allows the user to select a target rule from the multiple rules. For example, the rule page Pr in FIG. 4 represents "category (second column C2)" and "theme (third column C3)" in addition to "title (fourth column C4)". "Category" and "theme" can also be used as target rules. When the rule data represents multiple rules, it may be difficult to configure the program PG1 to select one rule from the multiple rules. Therefore, in this embodiment, the user can select a rule.
[0196] 22(A) shows a part (S120j) of a flowchart of image processing. S120j for selecting a rule is applicable to various embodiments of the present specification. S120j may be executed between S110 and S130, for example.
[0197] In the following description, it is assumed that the rule data represents the rule page Pr (FIG. 4). S120j includes S121, S122j, and S123j. S121 is the same as S121 in FIG.
[0198] In S122j, the processor 110 acquires information (here, text), row position, and column position of each cell, similarly to S122 in FIG. 2. The processor 110 adopts each of the multiple columns as a column representing a rule. Here, the processor 110 may select a column associated with a header including a predetermined keyword. The keyword may include "category", "theme", and "title". Hereinafter, it is assumed that three columns C2, C3, and C4 (FIG. 4) are selected as columns representing a rule. The processor 110 acquires the text of multiple cells (i.e., reference information) and their order for each of the columns C2, C3, and C4.
[0199] In S123j, the processor 110 displays a selection screen on the display unit 140. FIG. 22(B) shows an example of the selection screen. The selection screen SCj shows a plurality of candidate rules CR1, CR2, CR3, and a radio button RB for selecting one rule. Each of the candidate rules CR1, CR2, CR3 shows a plurality of pieces of reference information arranged in the order of the rule. The user can select one rule from the plurality of candidate rules CR1-CR3 by operating the radio button RB via the operation unit 150.
[0200] Selection screen SCj includes a completion button BTk. The user can input a completion instruction for the selection of a rule by operating the completion button BTj via operation unit 150. In S123j, processor 110 adopts the rule selected by the user as the target rule in response to the completion instruction of the user. Thereafter, processor 110 executes processing according to the selected target rule.
[0201] As described above, in this embodiment, the processor 110 allows the user to select a target rule from a plurality of rules in S123j. Therefore, the processor 110 can execute image processing according to a rule order based on a target rule that meets the user's needs.
[0202] K. 11th Example: 23(A)-23(D) are diagrams showing another embodiment of image processing. In this embodiment, the processor 110 sets information represented by rule data to information (such as a file name) associated with output data. FIG. 23(A) shows a part (S330) of a flowchart of image processing. S330 for setting is applicable to various embodiments of the present specification. S330 may be followed by, for example, any of S240, S240b, S240c, S240e, and S240f. S330 may be followed by, for example, S250.
[0203] In the following description, it is assumed that the target rule is determined by the fourth column C4 of table TBr in Fig. 4. In S330, processor 110 determines reference information to be set for the target element associated with the output data. The target element may be any element associated with the output data. When the output data forms a data file (also simply called a file), the target element may include a file name and a directory name of a directory that stores the file.
[0204] FIG. 23(B) shows an example of output data. A directory structure including files is shown in the figure. The output data ODk1 includes files FD1-FD4 for each piece of reference information. The names of the files FD1-FD4 include a file number FNn and a document name FNd. The file number FNn represents the order of the reference information associated with the file. The document name FNd represents the reference information associated with the file. The user can easily know the file order and the reference information by referring to the file names.
[0205] Also, as shown in FIG. 23(B), each of the files FD1-FD4 may be placed under a specific directory FDN. The directory name may be various names associated with the file. In this embodiment, the processor 110 analyzes the table TBr (FIG. 4) and obtains the directory name from a column (here, the second column C2) associated with a header including a predetermined keyword (here, "category"). For example, the file FD1 associated with the reference information Ta in the second row R2 is placed under a directory having the directory name DIa (here, "system") in the same row R2. The same applies to other files. The user can easily know the attribute of the file (here, category) by referring to the name of the directory FDN. Note that multiple files FD1-FD4 may be stored in the same directory.
[0206] FIG. 23(C) shows another example of output data. The output data ODk2 forms one file. The output data ODk2 includes data of a title Tk1 in addition to data of a plurality of pages Pk. The title Tk1 is an example of a property associated with the output data ODk2. The title Tk1 may include various pieces of information represented by rule data. For example, the title Tk1 may include a plurality of pieces of reference information associated with the output data ODk2.
[0207] Fig. 23(D) shows another example of output data. The difference from the output data ODk2 (Fig. 23(C) is that a property PP is set for each page Pk of the output data ODk3. The property PP may include various information represented by rule data. For example, the property PP for each page may include reference information associated with the page. The property PP for each page may further include a summary of the text TX detected from the page. Note that the title Tk1 may include various other information instead of the reference information (for example, the title (here, the second title TLr2) detected from the rule page Pr (Fig. 4)).
[0208] In S330 (FIG. 23(A)), the processor 110 determines the target information to be set in the target element. Then, the processor 110 sets the target information in the target element in S330 or in S250 following S330. For example, in S330, the processor 110 determines a directory structure (FIG. 23(B)). In the following S250, the processor 110 stores the output data (i.e., a file) in a storage device (e.g., the non-volatile storage device 130) according to the determined directory structure. Also, in S330, the processor 110 edits the output data (FIGS. 23(C) and 23(D)). In the following S250, the processor 110 stores the edited output data in a storage device (e.g., the non-volatile storage device 130). In either case, the user can easily know the reference information of the file by referring to the output data. The data format of the output data may be PDF. In this case, the property PP for each page may be a bookmark.
[0209] Also, as shown in Fig. 23(B), the output data may include multiple files. In this case, it is preferable that a file reference order is set for each file, such as a file number FNn. When multiple pages are arranged in a regular order by referring to the files in the reference order, the output data including multiple files represents multiple pages arranged in the regular order.
[0210] The target element set in S330 may be one or more elements arbitrarily selected from a file name, a directory name, a property, and a title associated with the output data. Also, one or more pieces of information represented by rule data may be set in the target element.
[0211] L. 12th Example: 24(A) and 24(B) are diagrams showing another embodiment of image processing. In this embodiment, the processor 110 generates output data including a reference page that represents a target rule. FIG. 24(A) shows a part of a flow chart of image processing (S232L, S240L). S232L and S240L for generating output data including a reference page are applicable to various embodiments of the present specification. S232L and S240L may be followed by any of S230, S160e, S160f, S310, S320, and S330, for example. S240L may be followed by S250, for example.
[0212] In S232L, the processor 110 generates data of a reference page representing the target rule. Fig. 24(B) shows an example of a reference page. The reference page PL1 represents rule information RI, which is information representing the target rule among the information represented by the rule data. When the target rule represented by the table TBr (Fig. 4) is used, the rule information RI may be the table TBr.
[0213] In S240L, the processor 110 generates output data representing the reference page PL1 and a plurality of pages arranged in the regular order. The position of the reference page PL1 may be various positions (for example, the top or the bottom). After S240L, the processor 110 proceeds to S250.
[0214] As described above, in this embodiment, in S240L, the processor 110 generates output data representing the reference page PL1 representing the target rule and a plurality of pages arranged in rule order. By referring to the reference page PL1, the user can easily understand what kind of rule the target rule is. Note that the reference page PL1 is an example of a second type specific page representing the target rule.
[0215] M. Thirteenth Example: 25(A)-25(D) are diagrams showing another embodiment of image processing. In this embodiment, the processor 110 adds information representing the page numbers of each of a plurality of pages arranged in a regular order to the output data. FIG. 25(A) shows a part (S340) of a flowchart of image processing. S340 for adding page numbers is applicable to various embodiments of this specification. S340 may be followed by any of S240, S240b, S240c, S240e, S240f, and S240L, for example. S340 may be followed by S250, for example.
[0216] The information representing the page number may be added to various information related to the output data. Fig. 25(B) shows an example of the output data. The processor 110 writes a number representing the page number PNm on each of the multiple pages PM1-PM4 represented by the output data ODm1.
[0217] 25C shows another example of output data. The output data ODm2 includes data files FP1-FP4 for each page. The processor 110 sets the file name FNm to a file name including a number representing the page number.
[0218] 25(D) shows another example of output data. The output data ODm3 forms one file. The processor 110 sets the page number in the property PP of each of the multiple pages Pm.
[0219] In S340 (FIG. 25(A)), processor 110 obtains the page number of each page. Then, processor 110 assigns the obtained page number to the output data in S340 or in S250 following S340. For example, in S340, processor 110 edits the output data (FIGS. 25(B) and 25(D)). Also, in S250, processor 110 stores the data of each page in a storage device (e.g., non-volatile storage device 130) using the file name set in S340. The user can easily know the page number of each page by referring to the output data.
[0220] In the example of Fig. 25(C), a file reference order (here, a file name including a page number) is set for each file of the output data. When multiple pages are arranged in a regular order by referring to the files in the reference order, the output data ODm2 including multiple files represents multiple pages arranged in the regular order.
[0221] N. Fourteenth Example: 26(A) and 26(B) are diagrams showing another embodiment of image processing. In this embodiment, the processor 110 generates output data including an index page. FIG. 26(A) shows a part of a flow chart of image processing (S232n, S234n, S240n). S232n, S234n, S240n for generating output data including an index page are applicable to various embodiments of the present specification. S232n, S234n, S240n may be followed by any of S230, S160e, S160f, S310, S320, S330, and S340, for example. S240n may be followed by S250, for example.
[0222] In S232n, the processor 110 extracts keywords from each page. FIG. 26(B) shows examples of keywords. Various keywords Kn1-Kn4 are extracted from pages Pn1-Pn4, respectively. Various methods may be used to extract keywords. For example, the processor 110 may extract terms in bold font as keywords from text TX included in the feature information F (FIG. 5(B)). The processor 110 may also refer to the entirety of multiple texts TX on multiple pages to identify frequently occurring terms. The processor 110 may extract frequently occurring terms as keywords from each page.
[0223] In S234n, the processor 110 uses the extracted keywords to generate data for an index page. Page Pnx in Fig. 26(B) shows an example of an index page. Page Pnx represents the correspondence between a keyword and the page number of the page that contains the keyword.
[0224] In S240n, the processor 110 generates output data representing the index page Pnx and a plurality of pages arranged in regular order. The position of the index page Pnx may be various positions (for example, the top or the bottom). After S240n, the processor 110 proceeds to S250.
[0225] Thus, in this embodiment, in S240n, the processor 110 generates output data representing a plurality of pages arranged in the regular order and an index page Pnx representing the location (including page numbers here) of terms included in the plurality of pages. By referring to the index page Pnx, the user can easily know the location of terms included in the plurality of pages.
[0226] O. 15th Example: Fig. 27 is a part of a flowchart showing another embodiment of image processing. In this embodiment, the rule data is obtained from the input data. S130, S140, S142o, and S144o for obtaining the rule data are applicable to various embodiments of the present specification. After S144o, the processor 110 proceeds to S150 (Fig. 2, etc.).
[0227] S130 and S140 are the same as S130 and S140 in FIG. 2. In S142o, the processor 110 obtains rule data representing a rule page from the input data. The rule page may be various pages. For example, the processor 110 may select a page having a strong correlation with the most pages as the rule page. The rule page Pr in FIG. 4 represents each title of a plurality of papers (fourth column C4). Such a rule page Pr may have a strong correlation with each of a plurality of pages of a plurality of papers.
[0228] The correlation may be calculated by various methods. For example, the processor 110 extracts words from the text TX included in the feature information F for each page. Here, the processor 110 may perform a known morphological analysis. The processor 110 calculates the number of common extracted words for all combinations of page pairs consisting of two pages as the degree of association. Note that the degree of association may be calculated using sentences instead of words.
[0229] The processor 110 selects a page pair that shows a degree of relevance equal to or greater than a predetermined threshold as a page pair having a strong correlation. The processor 110 counts the number of times each page is selected as a page pair having a strong correlation. The processor 110 adopts the most frequently selected page as the rule page.
[0230] Alternatively, the processor 110 may adopt a page from which feature information F including a specific type of table TB (e.g., a timetable) is obtained as the rule page. There may be various methods for detecting a specific type of table. For example, a table having a header including words related to a specific type (e.g., "time", "period", etc.) may be adopted.
[0231] S144o (FIG. 27) is the same as S120 in FIG. 2. The processor 110 acquires a plurality of pieces of reference information and their order. After S144o, the processor 110 proceeds to S150 (FIG. 2).
[0232] As described above, in this embodiment, in S140 and S142o, the processor 110 obtains the rule data by analyzing the input data. Therefore, the user can proceed with image processing without distinguishing in advance between the rule page and other pages.
[0233] P. 16th Example: 28(A) and 28(B) are diagrams showing another embodiment of image processing. In this embodiment, the processor 110 generates new output data using generated output data and additional input data. FIG. 28(A) shows a part of a flowchart of image processing. This embodiment is applicable to various embodiments of this specification. That is, in this embodiment, the output data generated in the various embodiments described above can be used. Hereinafter, the generated output data will be referred to as the first input data, and the additional input data will be referred to as the second input data.
[0234] S110 and S120 are the same as S110 and S120 in Fig. 2. Note that the same data as the rule data used to generate the first input data is used as the rule data. In other words, the target rule is the same as the target rule used to generate the first input data.
[0235] In S130p1, the processor 110 acquires first input data. The first input data may be acquired from the non-volatile storage device 130 or another storage device (for example, a storage device connected to the communication interface 180). Hereinafter, the first input data represents N pages.
[0236] 28B shows an example of the first input data, the second input data, and the output data. The first input data IDp1 represents six pages Pp11-Pp16. These pages form three page groups Gp11, Gp12, and Gp13. The first input data IDp1 represents the 2021 exam questions and the 2022 exam questions.
[0237] In S130p2 (FIG. 28(A)), processor 110 acquires information indicating the page group of the first input data. Although not shown, in this embodiment, processor 110 stores data indicating the page group in the output data or in a storage device (e.g., non-volatile storage device 130) when generating the output data. For example, processor 110 sets an identifier of the page group in the properties of each page. Alternatively, processor 110 may associate data indicating the page group with the output data and store it in a storage device (e.g., non-volatile storage device 130). In S130p2, processor 110 refers to the data of the page group associated with the first input data.
[0238] In S130p3, the processor 110 acquires second input data. Hereinafter, it is assumed that the second input data represents M pages. Note that S130p3 may be performed in the same manner as S130 in FIG.
[0239] An example of the second input data is shown in Fig. 28(B). The second input data IDp2 represents three pages Pp21, Pp22, and Pp23. The second input data IDp2 represents the exam questions for 2023.
[0240] Next, the processor 110 executes the processes of S140-S230 in Fig. 2 and Fig. 3. As a result, the processor 110 determines the rule order of N+M pages. An example of output data is shown in Fig. 28(B). The output data ODp3 represents nine pages. Pages Pp21, Pp22, and Pp23 of the second input data IDp2 are added behind the page groups Gp11, Gp12, and Gp13 of the first input data IDp1, respectively. Then, three new page groups Gp31, Gp32, and Gp33 are formed.
[0241] When focusing on N pages of the first input data IDp1, the processor 110 determines a rule order of N+M pages so that the order of the N pages does not change. Various methods may be used to determine such a rule order. For example, the processor 110 may reuse the page groups Gp11, Gp12, and Gp13 of the first input data IDp1 as formed page groups. Specifically, after S140 (FIG. 2), the processor 110 may skip S150, S170, and S180 (FIGS. 2 and 3) and proceed to S200. Multiple pages of the second input data IDp2 may be used as undetermined pages.
[0242] In addition, an appropriate position of the page of the second input data IDp2 may be a position between multiple pages of one page group of the first input data IDp1. For example, if the first page group Gp11 includes a page of 2021 and a page of 2023, and the second input data IDp2 includes a page of 2022, it is preferable that the page of 2022 is inserted between the page of 2021 and the page of 2023. Therefore, in S200 (FIG. 3), the processor 110 may adopt the following candidate order as a candidate order for calculating the confidence factor. (1) First-class candidate order: An undetermined page follows a page group (for example, candidate order C1a in FIG. 6(A)). (2) Second type candidate order: A page group follows an undetermined page (for example, candidate order Ca1 in FIG. 6(A)). (3) Third-class candidate order: The undetermined page is located between multiple pages in the page group.
[0243] The third type candidate order is a newly adopted candidate order. When the page group includes t pages (t is an integer equal to or greater than 1), t candidate orders indicating that an undetermined page follows one target page selected from the t pages are used as the third type candidate order. The processor 110 may calculate the confidence level by using the target page as the previous page and the undetermined page as the next page. When the confidence level of the third type candidate order is high, the undetermined page may be inserted in the middle of the page group. Note that the candidate order indicating that an undetermined page follows the last page of the t pages is the same as the first type candidate order.
[0244] After determining the rule order (FIG. 3: S230), in S240p1 (FIG. 28), processor 110 generates output data representing N+M pages arranged in the rule order. In S240p2, processor 110 stores data indicating the page group in the output data or in a storage device (e.g., non-volatile storage device 130). Processor 110 then proceeds to S250 (FIG. 3).
[0245] As described above, in this embodiment, in S130p3, the processor 110 acquires the second input data. The second input data is an example of additional data representing an additional document. In S140-S230 and S240p1, the processor 110 generates output data representing N+M pages including the N pages represented by the first input data (i.e., the output data) and the M additional pages represented by the second input data. In S140-S230, the processor 110 determines the order of the N+M pages based on the target rule while maintaining the order of the N pages. As described above, the additional pages can be inserted between the N pages. In this case, too, when focusing on the N pages, the order of the N pages is not changed. Therefore, it can be said that the order of the N pages is maintained. In this way, the processor 110 can realize an appropriate page order based on the target rule in each of the first input data and the new output data.
[0246] Q. 17th Example: 29(A)-29(D) are diagrams showing another embodiment of image processing. In this embodiment, the processor 110 generates output data including a front cover page. FIG. 29(A) shows a part (S240q1, S240q2) of a flowchart of image processing. S240q1, S240q2 for generating output data including a front cover page are applicable to various embodiments of the present specification. S240q1, S240q2 may be followed by, for example, any of S230, S310, and S320. S240q2 may be followed by, for example, any of S250, S330, and S340.
[0247] In S240q1, the processor 110 generates a front cover page for each page group. FIG. 29(B) shows an example of a plurality of pages arranged in a regular order. Here, it is assumed that the same page groups Gp11-Gp13 as in the example of FIG. 28(B) are formed. FIG. 29(C) shows an example of a front cover page. This page PqT1 shows the front cover page of the first page group Gp11. In this embodiment, the processor 110 generates a page representing reference information associated with the page group. Alternatively, the front cover page may be a blank page.
[0248] In S240q2 (FIG. 29(A)), processor 110 generates output data representing a plurality of pages arranged in regular order and the inner cover pages at the beginning of each page group. FIG. 29(D) shows an example of the output data. Output data ODq represents page groups Gp11-Gp13 and the inner cover pages PqT1, PqT2, and PqT3 added to the beginning of each page group. After S240q2, processor 110 may proceed to any of S250, S330, and S340.
[0249] Thus, in this embodiment, processor 110 generates output data in S240q2 that represents L inner title page pages indicating the start of each of L page groups (L is an integer equal to or greater than 2) formed from multiple pages based on the target rules, and multiple pages arranged in rule order. By referring to the inner title page, the user can easily know the start of a page group.
[0250] The method of forming a page group may be various methods. For example, the processor 110 may determine the reference information to be associated with each page by matching the feature information with the reference information for all pages. The matching method may be various methods. For example, the processor 110 counts the number of times each of the multiple reference information appears for each page. The number of times may be the number of times the reference information appears in the title TL and the text TX (FIG. 5(B)). The processor 110 may associate the most frequently appearing reference information among the reference information appearing in the target page with the target page. The processor 110 may adopt one or more consecutive pages that are associated with the same reference information among the multiple pages arranged in the rule order as one page group. The processor 110 may form a page group again before S240q1.
[0251] R. Variations: (1) The input data may be various other data instead of scan data. For example, the input data may be data of a specific application such as a word processor or a slide creation application for presentations. The processor 110 may obtain the input data from the storage device 115 (e.g., the non-volatile storage device 130) of the multifunction device 100 or from another device connected to the multifunction device 100.
[0252] (2) The rule data may be various other data instead of the scan data and the data of the spreadsheet software. For example, the rule data may be data of a specific application such as a word processor or a slide creation application for presentation. The rule data may be data input by the user operating the operation unit 150. The rule data may be various data representing information (e.g., the reference information Ta-Td in FIG. 4) different from the portion representing the page numbers of the multiple pages represented by the input data. The order of the multiple reference information represented by the target rule may be any order, such as an order related to time or an order determined by the user. The rule order of the multiple pages based on the target rule may be various orders. In either case, the rule data may be data representing one page. The processor 110 may acquire the rule data from the storage device 115 (e.g., the non-volatile storage device 130) of the multifunction device 100 or another device connected to the multifunction device 100.
[0253] (3) The image processing is not limited to the above processing, and may be various other processing. For example, the processor 110 may generate output data including N pages arranged in a regular order and one or more supplementary pages. The supplementary pages may include one or more types of pages arbitrarily selected from the following candidate AE. (A) Table of contents page (e.g., table of contents page Pp in FIG. 10(D)) (B) Correspondence table page (e.g., correspondence table page Pq2 in FIG. 12(E)) (C) Reference page (e.g., reference page PL1 in FIG. 24(B)) (D) Index page (e.g., index page Pnx in FIG. 26(B)) (E) A page in the middle (for example, page PqT1 in Fig. 29(C))
[0254] In either case, other pages may be inserted between the N pages. Here, when focusing on the N pages, if the order of the N pages is a regular order, it can be said that the output data represents the N pages arranged in the regular order.
[0255] (4) In the embodiment of Fig. 28(A), processor 110 may perform S140-S230 without reusing the page group of the first input data, i.e., processor 110 may perform the same image processing as in the case of using one input data representing N+M pages.
[0256] (5) In the embodiment of Fig. 29(A), the processor 110 may add a cover page regardless of the page group. For example, the processor 110 may insert a cover page at regular intervals (e.g., every 10 pages).
[0257] (6) The method of calculating the confidence level (FIG. 3: S200) may be various methods instead of the above method. For example, various documents may be used to generate the order evaluation model M1 used to calculate the confidence level. For example, a document including multiple pages arranged in descending date order may be used. In this case, the rule order may be determined so that the multiple pages are arranged in descending date order.
[0258] In addition, instead of the sentence classification model M6, various other machine learning models may be used to calculate the evaluation value V12 (FIG. 7(C)) indicating the ease of connection of sentences between the previous page and the next page (hereinafter, referred to as a sentence evaluation model). The sentence evaluation model may be, for example, a model that calculates the evaluation value of the ease of connection of sentences using one concatenated image in which an image of the previous page and an image of the next page are concatenated (the arrangement of the two images in the concatenated image is determined in advance). For example, a convolutional neural network can be adopted as such a sentence evaluation model. Various concatenated images are used to train this sentence evaluation model. When the concatenated image represents an appropriate previous page and a next page, the correct evaluation value may be set to 1, and when the concatenated image represents an inappropriate previous page and a next page, the correct evaluation value may be set to 0. Then, data input to the final output layer of the trained sentence evaluation model may be used as the 12th feature vector Fd12.
[0259] (6) The image processing device may be a device of a different type from the multifunction device 100 (for example, a personal computer, a digital camera, a scanner, or a smartphone). In addition, a plurality of devices (for example, computers) that can communicate with each other via a network may share a portion of the image processing function of the image processing device, and together provide the image processing function (a system including these devices corresponds to an image processing device).
[0260] In each of the above embodiments, a part of the configuration realized by hardware may be replaced by software, and conversely, a part or all of the configuration realized by software may be replaced by hardware. For example, the function of the sequence evaluation model M1 in FIG. 7(A) may be realized by a dedicated hardware circuit.
[0261] Furthermore, when some or all of the functions of the present disclosure are realized by a computer program, the program can be provided in a form stored in a computer-readable recording medium (e.g., a non-transitory recording medium). The program can be used in a state stored in the same or a different recording medium (computer-readable recording medium) from when it was provided. The "computer-readable recording medium" is not limited to portable recording media such as memory cards and CD-ROMs, but may also include internal storage devices within a computer, such as various ROMs, and external storage devices connected to a computer, such as a hard disk drive.
[0262] The above-mentioned examples and modifications can be combined as appropriate. The above-mentioned examples and modifications are provided to facilitate understanding of the present disclosure, and do not limit the present invention. The present invention may be modified or improved without departing from the spirit of the present invention, and the present invention includes equivalents thereof. [Explanation of symbols]
[0263] 100... multifunction device, 110... processor, 115... storage device, 120... volatile storage device, 130... non-volatile storage device, 140... display unit, 150... operation unit, 160... print execution unit, 170... reading execution unit, 180... communication interface, LB1... document analysis library, PG1... program, M1-M6... machine learning model
Claims
1. An image processing device, a first acquisition unit for acquiring input data representing a document; a second acquisition unit that acquires rule data representing a target rule that specifies an order in which N pages (N is an integer equal to or greater than 2) should be arranged when a document represented by the input data is represented by N pages; a specific processing unit that executes specific processing including one or both of a generation process that generates output data representing the N pages arranged in a rule order, which is the order in which the N pages should be arranged based on the target rule, and a notification process that, when an input order, which is the order in which the multiple pages of the document represented by the input data are arranged, differs from the rule order, notifies a user that the input order differs from the rule order; An image processing device comprising:
2. 2. The image processing device according to claim 1, the identifying process includes the generating process, The image processing device further comprises: an order change unit that allows a user to change the order of the N pages from the regular order; a specific generation unit for generating specific output data representing the N pages in modified order; An image processing device comprising:
3. 3. The image processing device according to claim 1, the rules data represents a plurality of rules; The image processing device further includes a rule selection unit that allows a user to select the target rule from the plurality of rules. Image processing device.
4. 3. The image processing device according to claim 1, The specific processing is The generation process; an output process for outputting the output data; 23. An image processing device comprising:
5. 5. The image processing device according to claim 4, The identification process further includes a setting process of setting one or more pieces of information represented by the rule data to one or more elements selected from a file name, a directory name, a property, and a title associated with the output data. Image processing device.
6. 3. The image processing device according to claim 1, the identifying process includes the generating process, The generation process generates the output data representing one or both of a first type specific page representing the rule order and a second type specific page representing the target rule, and the N pages arranged in the rule order. Image processing device.
7. 7. The image processing device according to claim 6, the generation process generates the output data representing the first type specific page that is a table of contents and is arranged at the beginning, and the N pages that are arranged in the regular order. Image processing device.
8. 3. The image processing device according to claim 1, The specific processing is The generation process; a process of adding information representing each page number of the N pages arranged in the regular order to the output data; 23. An image processing device comprising:
9. 3. The image processing device according to claim 1, the identifying process includes the generating process, The generation process generates the output data representing the N pages arranged in the rule order and an index page indicating the location of terms included in the N pages. Image processing device.
10. 3. The image processing device according to claim 1, The second acquisition unit acquires the rule data by analyzing the input data. Image processing device.
11. 3. The image processing device according to claim 1, the identifying process includes the generating process, The image processing device further comprises: a third acquisition unit for acquiring additional data representing the additional document; an additional generation unit that generates additional output data representing N+M pages including the N pages represented by the output data and M additional pages represented by the additional data; Equipped with The additional generation unit determines an order of the N+M pages based on the target rule while maintaining the order of the N pages. Image processing device.
12. 3. The image processing device according to claim 1, The target rule represents an order of a plurality of pieces of reference information; The image processing device further comprises: a fourth acquisition unit that analyzes the input data to acquire feature information of each of a plurality of elements represented by the input data; an order determination unit that determines the rule order using an order of reference information associated with feature information; An image processing device comprising:
13. The image processing device according to claim 12, further comprising: a fifth acquisition unit that acquires intermediate data that defines intermediate information that represents a correspondence relationship between the reference information and the feature information; the order determination unit determines the rule order according to an order of the reference information associated with the feature information via the intermediate information. Image processing device.
14. 3. The image processing device according to claim 1, further comprising: the rule data represents a layout for each of the N pages; the specific processing unit includes a process of determining the rule order by allocating a plurality of elements represented by the input data using the layout, Image processing device.
15. 3. The image processing device according to claim 1, the identifying process includes the generating process, The generation process generates the output data representing L inner cover pages indicating the beginning of each of L page groups (L is an integer equal to or greater than 2) formed from the N pages based on the target rule, and the N pages arranged in the order of the rule. Image processing device.
16. A computer program comprising: a first acquisition function for acquiring input data representing a document; a second acquisition function for acquiring rule data representing a target rule that specifies an order in which N pages (N is an integer equal to or greater than 2) should be arranged when a document represented by the input data is represented by N pages; a specific processing function for executing specific processing including one or both of a generation process for generating output data representing the N pages arranged in a rule order, which is the order in which the N pages should be arranged based on the target rule, and a notification process for notifying a user that an input order, which is the order in which the multiple pages of the document represented by the input data are arranged, differs from the rule order when the input order differs from the rule order; A computer program that enables a computer to realize the above.
Citation Information
Patent Citations
Image processing apparatus
JP2021132334A
