Image processing device, image processing system, output device, image processing method, and image processing program

The image processing device addresses the issue of incorrect character ordering by allowing user input to define line segments for arranging characters, enhancing recognition accuracy through machine learning.

JP2024123962APending Publication Date: 2024-09-12SHARP KK
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
JP2023031813
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-02
Publication Date
2024-09-12

AI Technical Summary

Technical Problem

Conventional character recognition systems fail to arrange characters appropriately when a string spans multiple lines in a document image, leading to incorrect ordering of characters.

Method used

An image processing device that allows users to input line segments to determine the arrangement order of characters based on specified directions, using machine learning to generate a trained model for accurate character recognition.

Benefits of technology

Enables characters to be recognized in the correct order, improving recognition accuracy and simplifying the correction process for character strings across multiple lines.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024123962000001
    Figure 2024123962000001
Patent Text Reader

Abstract

To provide an image processing device, image processing system, output device, image processing method and image processing program, which can recognize, in an appropriate order, characters included in an input image.SOLUTION: An image processing device comprises: a display processing unit configured to display multiple characters recognized from an image on a display screen; a reception processing unit configured to receive, on the display screen, a predetermined input operation from a user; and a determination processing unit configured to determine an arrangement order of the multiple characters based on a direction identified according to an input position of the input operation.SELECTED DRAWING: Figure 1
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present disclosure relates to a technique for performing image processing such as character recognition on an image. [Background technology]

[0002] Conventionally, there are known techniques for extracting character strings from images of documents such as documents, slips, etc. For example, there is known a technique for extracting handwritten input character strings character by character, setting a character frame (character rectangle) for each character, and correcting the inclination of the character frame based on a rotation angle of the character frame calculated using a reference line of the character frame (see, for example, Patent Document 1). [Prior art documents] [Patent documents]

[0003] [Patent Document 1] JP 2007-316754 A Summary of the Invention [Problem to be solved by the invention]

[0004] However, in the conventional technology, when a character string spans multiple lines in a document image, the order of the recognized characters may be inappropriate. In this case, for example, the recognition result of the document image may be displayed such that the characters of the first line of the character string are followed by the characters of the second line, and then the remaining characters of the second line are displayed followed by the characters of the third line (see FIG. 3D).

[0005] An object of the present disclosure is to provide an image processing device, an image processing system, an output device, an image processing method, and an image processing program capable of recognizing characters included in an input image in an appropriate order. [Means for solving the problem]

[0006] An image processing device according to one aspect of the present disclosure includes a display processing unit that displays a plurality of characters recognized from an image on a display screen, a reception processing unit that receives a predetermined input operation from a user on the display screen, and a determination processing unit that determines the order of each of the plurality of characters based on a direction identified according to an input position of the input operation.

[0007] An image processing system according to another aspect of the present disclosure includes the image processing device and a learning device that generates a trained model by performing machine learning using the learning data generated by the image processing device.

[0008] An output device according to another aspect of the present disclosure performs character recognition processing on an input image using the trained model generated by the learning device, and outputs the character recognition result.

[0009] An image processing method according to another aspect of the present disclosure is a method in which one or more processors execute the following steps: displaying a plurality of characters recognized from an image on a display screen; accepting a predetermined input operation from a user on the display screen; and determining the order of each of the plurality of characters based on a direction identified according to an input position of the input operation.

[0010] An image processing program according to another aspect of the present disclosure is a program for causing one or more processors to execute the following operations: displaying a plurality of characters recognized from an image on a display screen; accepting a predetermined input operation from a user on the display screen; and determining the order of each of the plurality of characters based on a direction identified according to an input position of the input operation. Effect of the Invention

[0011] According to the present disclosure, it is possible to provide an image processing device, an image processing system, an output device, an image processing method, and an image processing program capable of recognizing characters included in an input image in an appropriate order. [Brief description of the drawings]

[0012] [Figure 1] FIG. 1 is a functional block diagram showing a configuration of an image processing device according to an embodiment of the present disclosure. [Diagram 2] FIG. 2 is a diagram illustrating an example of an input image (quote) according to an embodiment of the present disclosure. [Figure 3A] FIG. 3A is a diagram illustrating an example of an image according to an embodiment of the present disclosure. [Figure 3B] FIG. 3B is a diagram illustrating an example of a character rectangle set in an image according to an embodiment of the present disclosure. [Figure 3C] FIG. 3C is a diagram showing the recognition order of character rectangles in a conventional system. [Figure 3D] FIG. 3D shows a character recognition result in a conventional system. [Figure 4] FIG. 4 is a flowchart showing an example of a procedure of image processing executed in the image processing device according to the embodiment of the present disclosure. [Diagram 5] FIG. 5 is a flowchart illustrating an example of a procedure of a line segment registration process executed in the image processing device according to an embodiment of the present disclosure. [Figure 6A] FIG. 6A is a diagram illustrating an example of an input operation on an image according to an embodiment of the present disclosure. [Figure 6B] FIG. 6B is a diagram illustrating an example of a line segment displayed on an image according to an embodiment of the present disclosure. [Figure 7] FIG. 7 is a diagram illustrating an example of a line segment list according to an embodiment of the present disclosure. [Figure 8] FIG. 8 is a flowchart illustrating an example of a procedure of a destination determination process executed in an image processing device according to an embodiment of the present disclosure. [Figure 9] FIG. 9 is a diagram illustrating an example of a list of belonging line segments according to an embodiment of the present disclosure. [Figure 10] FIG. 10 is a diagram illustrating an example of a character rectangle list according to an embodiment of the present disclosure. [Figure 11A] FIG. 11A is a diagram illustrating an example of a method for determining a destination line segment according to an embodiment of the present disclosure. [Figure 11B] FIG. 11B is a diagram illustrating an example of a method for determining a destination line segment according to an embodiment of the present disclosure. [Figure 11C] FIG. 11C is a diagram illustrating an example of a method for determining a destination line segment according to an embodiment of the present disclosure. [Figure 12A] FIG. 12A is a diagram illustrating an example of a first determination process for determining a destination line segment according to an embodiment of the present disclosure. [Figure 12B] FIG. 12B is a diagram illustrating an example of a first determination process for determining a destination line segment according to an embodiment of the present disclosure. [Figure 13] FIG. 13 is a flowchart illustrating an example of a procedure of the order determination process in the first determination process executed in the image processing device according to the embodiment of the present disclosure. [Figure 14] FIG. 14 is a diagram illustrating an example of a method for determining the arrangement order of character rectangles according to an embodiment of the present disclosure. [Figure 15] FIG. 15 is a diagram illustrating an example of a total sort order list according to an embodiment of the present disclosure. [Figure 16A] FIG. 16A is a diagram showing an example of an arrangement order of character rectangles according to an embodiment of the present disclosure. [Figure 16B] FIG. 16B is a diagram illustrating an example of a line segment for an image according to an embodiment of the present disclosure. [Figure 17A] FIG. 17A is a diagram illustrating an example of a line segment for an image according to an embodiment of the present disclosure. [Figure 17B] FIG. 17B is a diagram illustrating an example of a line segment for an image according to an embodiment of the present disclosure. [Figure 18] FIG. 18 is a diagram illustrating a character recognition result according to an embodiment of the present disclosure. [Figure 19A] FIG. 19A is a diagram showing an example of a character rectangle correction method (character rectangle correction mode) according to an embodiment of the present disclosure. [Figure 19B] FIG. 19B is a diagram showing an example of a character rectangle correction method (character rectangle correction mode) according to an embodiment of the present disclosure. [Figure 20]FIG. 20 is a flowchart illustrating an example of a procedure of an order determination process in a character rectangle correction process executed in an image processing device according to an embodiment of the present disclosure. [Figure 21] FIG. 21 is a diagram showing an example of a division line input in the character rectangle correction process according to the embodiment of the present disclosure. [Figure 22] FIG. 22 is a diagram showing a specific example of the character rectangle correction process according to an embodiment of the present disclosure. [Diagram 23] FIG. 23 is a flowchart illustrating an example of a procedure of an order determination process in a rectangle integration process executed in an image processing device according to an embodiment of the present disclosure. [Figure 24] FIG. 24 is a diagram illustrating a specific example of the rectangle merging process according to an embodiment of the present disclosure. [Diagram 25] FIG. 25 is a diagram illustrating a specific example of the rectangle merging process according to an embodiment of the present disclosure. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0013] Hereinafter, embodiments of the present disclosure will be described with reference to the accompanying drawings. Note that the following embodiments are examples of the present disclosure and are not intended to limit the technical scope of the present disclosure.

[0014] [Image processing device 1] 1 is a block diagram showing a configuration of an image processing device 1 according to an embodiment of the present disclosure. The image processing device 1 performs a process (annotation) of generating data in which information on an appropriate character order is added to an input image (image data) as learning data (teacher data) to be used for machine learning. The image processing device 1 also performs machine learning using the learning data to generate a trained model that performs character recognition on the input image.

[0015] 1, the image processing device 1 includes a control unit 11, a storage unit 12, an operation display unit 13, and a communication unit 14. The image processing device 1 may be one or more cloud servers, or one or more physical servers.

[0016] The communication unit 14 is a communication interface for connecting the image processing device 1 to a network N1 in a wired or wireless manner and for executing data communication with an external device via the network N1 in accordance with a predetermined communication protocol. The network N1 is formed of, for example, the Internet, a LAN, or the like.

[0017] The operation display unit 13 is a user interface that includes a display unit, such as a liquid crystal display or an organic EL display, that displays various information, and an operation unit, such as a mouse, a keyboard, or a touch panel, that accepts operations.

[0018] The storage unit 12 is a non-volatile storage unit such as an HDD (Hard Disk Drive), an SSD (Solid State Drive), or a flash memory that stores various information. The storage unit 12 stores a control program such as an image processing program (an example of an image processing program of the present disclosure) for causing the control unit 11 to execute image processing described below. For example, the image processing program is non-temporarily recorded on a computer-readable recording medium such as a CD or a DVD, and is read by a reading device (not shown) such as a CD drive or a DVD drive provided in the image processing device 1 and stored in the storage unit 12. The image processing program may be distributed from a cloud server and stored in the storage unit 12.

[0019] The storage unit 12 also stores image data (scanned data, etc.) of documents and the like acquired from external devices.

[0020] FIG. 2 shows an estimate as an example of a document. As shown in FIG. 2, an estimate includes multiple items such as a document category ("estimate"), an issue date, a destination, an estimater's contact information, an estimated amount, a product name, a quantity, a standard price, a discount amount, a subtotal, a consumption tax, and a total amount. A user scans the estimate using an external device and uploads image data (input image) to the image processing device 1. When the control unit 11 acquires the image data of the estimate, it stores the image data in the storage unit 12. As another embodiment, the control unit 11 may acquire a document file of the estimate created in an external device and store the document file in the storage unit 12.

[0021] The control unit 11 has control devices such as a CPU, a ROM, and a RAM. The CPU is a processor that executes various arithmetic operations. The ROM stores in advance control programs such as a BIOS and an OS for causing the CPU to execute various processes. The RAM stores various information and is used as a temporary storage memory (work area) for the various processes executed by the CPU. The control unit 11 controls the image processing device 1 by executing, by the CPU, various control programs that are stored in advance in the ROM or the storage unit 12.

[0022] However, in the conventional technology, for example, when a character string spans multiple lines in a document image, the order of recognized characters may be inappropriate. The following description focuses on a part of the document (dotted frame part) shown in FIG. 2. First, when the conventional system acquires a document image (input image) (see FIG. 3A) to be subjected to character recognition, it specifies the range of each character from the document image and sets a character rectangle surrounding the character (see FIG. 3B). Next, the system recognizes the characters included in the character rectangle and arranges the recognized characters. For example, as shown in FIG. 3C, the system determines the order of each character of "ABCD Co., Ltd." on the first line, then moves to the second line and determines the order of each character of "Business Solutions," which has the same width as the character width on the first line. Next, the system moves to the third line and determines the order of each character of "Turner, First Development Office," and then returns to the second line and determines the order of each character of the remaining "Solution Development Headquarters, Technology Development Center." The system arranges the characters of the document image in the order in which they were determined, and outputs "ABCD Business Solution Co., Ltd. First Development Office, Solution Development Headquarters, Technology Development Center" as the recognition result (see FIG. 3D). As described above, in the conventional system, a problem occurs in which characters from the first line of the string are followed by characters from the second line, followed by characters from the third line of the string and then the remaining characters from the second line (see FIG. 3D). In response to this, the image processing device 1 according to the present disclosure is capable of improving the character recognition accuracy for an input image, as shown below.

[0023] Specifically, as shown in Fig. 1, the control unit 11 includes various processing units such as an acquisition processing unit 111, a display processing unit 112, a recognition processing unit 113, a reception processing unit 114, a judgment processing unit 115, a decision processing unit 116, an output processing unit 117, and a generation processing unit 118. The control unit 11 functions as the various processing units by executing various processes according to the image processing program. Some or all of the processing units included in the control unit 11 may be configured with electronic circuits. The image processing program may be a program for causing a plurality of processors to function as the various processing units.

[0024] The acquisition processing unit 111 acquires an input image. Specifically, the acquisition processing unit 111 acquires an input image (input data) that is the original data of the learning data from an external device. For example, the acquisition processing unit 111 acquires image data of various document images such as an estimate shown in FIG. 2.

[0025] The display processing unit 112 displays the input image acquired by the acquisition processing unit 111 on the display screen (operation display unit 13).

[0026] The recognition processing unit 113 executes character recognition processing on the input image acquired by the acquisition processing unit 111. Specifically, the recognition processing unit 113 executes well-known character recognition processing such as OCR processing and character rectangle extraction processing. For example, the recognition processing unit 113 identifies the range of each character in the input image and sets a character rectangle surrounding each character (see FIG. 3B). The recognition processing unit 113 also recognizes the characters included in the character rectangle. When the recognition processing unit 113 has set the character rectangle, the display processing unit 112 displays the character rectangle on the display screen.

[0027] The reception processing unit 114 receives a predetermined user operation (input operation) on the image displayed on the display screen. For example, the reception processing unit 114 receives, from the user on the display screen, an input operation of a line segment having a start point and an end point, for example, an operation of drawing a line segment by dragging an arbitrary distance with a mouse or a finger, or an operation of inputting a line segment by specifying arbitrary two points (mouse click or finger touch). Note that the line segment identified based on the input operation is not limited to a straight line segment, and may be a non-straight line segment. Furthermore, the reception processing unit 114 may receive, from the user on the display screen, an input operation of specifying a start point and an end point, for example, an operation of specifying arbitrary two points with a mouse or a finger (mouse click or finger touch).

[0028] The determination processing unit 115 executes a process (belonging determination process described later) of determining (determining) which line segment, among the line segments input in response to the user operation, the character or character rectangle belongs to, for each of the characters or character rectangles.

[0029] The determination processing unit 116 determines the order of each character recognized by the recognition processing unit 113. Specifically, the determination processing unit 116 determines the order of each character based on the direction from the start point to the end point based on the input operation. For example, the determination processing unit 116 determines the order of each character included in each character rectangle based on a direction specified according to an input position of the input operation of the user and a line segment to which each character rectangle belongs (belonging line segment). For example, the determination processing unit 116 determines the order of each of the multiple characters based on a direction from a start point to an end point of a line segment specified by an input operation to input a line segment. Also, for example, the determination processing unit 116 determines the order of each of the multiple characters based on a direction from a start point to an end point specified by an input operation to input the start point and the end point. The determination processing unit 116 may determine the order of each character using a line segment input by a user, or may determine the order of each character using a start point and an end point input by a user.

[0030] The output processing unit 117 displays a plurality of characters on the display screen in the order determined by the determination processing unit 116. That is, the output processing unit 117 outputs the character recognition result.

[0031] The generation processing unit 118 generates data in which the respective order of the multiple characters determined by the determination processing unit 116 is added to the input image as learning data to be used for machine learning of character recognition.

[0032] The specific configuration of each processing unit will be described below with a specific example.

[0033] [Image processing] FIG. 4 is a flowchart showing an example of the procedure of image processing executed in the image processing device 1.

[0034] The present disclosure can be understood as an image processing method (image processing method of the present disclosure) that executes one or more steps included in the image processing. One or more steps included in the image processing described here may be omitted as appropriate. The steps in the image processing may be executed in a different order as long as the same action and effect is achieved. Furthermore, although an example is described here in which the control unit 11 of the image processing device 1 executes each step in the image processing, in other embodiments, one or more processors may execute each step in the image processing in a distributed manner. Furthermore, when the control unit 11 acquires image data of an input image from an external device, it is possible to execute the image processing for each piece of image data in parallel.

[0035] In step S1, the control unit 11 executes a line segment registration process. Specifically, the control unit 11 receives an input operation of a line segment that is a reference for determining the order of characters (character rectangles) included in an input image from a user, and executes a process of registering the line segment. The details of the "line segment registration process" (see FIG. 5) will be described later.

[0036] In step S2, the control unit 11 executes a destination determination process. Specifically, the control unit 11 determines the destination line segment of each character rectangle recognized from the input image. For example, for each character rectangle, the control unit 11 determines one of the multiple line segments registered in step S1, and associates the character rectangle with the line segment (destination line segment). Details of the "destination determination process" (see FIG. 8) will be described later.

[0037] In step S3, the control unit 11 executes an order determination process. Specifically, the control unit 11 determines the order of each character rectangle recognized from the input image. For example, the control unit 11 determines the order of each character rectangle based on the relationship between the character rectangle and the line segment (the destination line segment) determined in step S2.

[0038] [Line registration process] FIG. 5 is a flowchart showing an example of the procedure of line segment registration processing executed in the image processing apparatus 1. It is assumed that the control unit 11 executes well-known character recognition processing on the input image (see FIG. 3A) and displays character rectangles corresponding to the respective characters on the display screen (see FIG. 3B).

[0039] In step S11, the control unit 11 determines whether or not it has received an input operation of a start point from the user. For example, the user designates an arbitrary position on the input image by a mouse click, a touch operation on the touch panel, etc. on the display screen. For example, as shown in FIG. 6A, the user designates the character "A" (start point). When the control unit 11 receives an input operation of the start point from the user (S11: Yes), it shifts the process to step S12. The control unit 11 waits until it receives an input operation of the start point from the user (S11: No).

[0040] In step S12, the control unit 11 sets the start point at the input position.

[0041] In step S13, the control unit 11 determines whether or not it has received an input operation of an end point from the user. For example, as shown in FIG. 6A, the user designates the character "社" (end point). When the control unit 11 receives an input operation of the end point from the user (S13: Yes), it shifts the process to step S14. The control unit 11 waits until it receives an input operation of the end point from the user (S13: No).

[0042] In step S14, the control unit 11 sets the end point at the input position and determines a line segment connecting the start point and the end point. For example, as shown in FIG. 6B, the control unit 11 determines a line segment L1 connecting the input position (start point) for "A" and the input position (end point) for "社". Further, the control unit 11 (display processing unit 112) superimposes and displays the line segment L1 on the image (input image) and the character rectangles displayed on the display screen.

[0043] In step S15, the control unit 11 registers the determined line segments in the line segment list D1. Here, since the belonging destination of each character rectangle has not been determined, the control unit 11 registers the position (XY coordinates) of the line segment L1 on the input image in the line segment list D1 shown in, for example, FIG.

[0044] In step S16, the control unit 11 determines whether or not to specify the next line segment. When the control unit 11 receives an instruction to specify the next line segment from the user (S16: Yes), the control unit 11 shifts the process to step S11 and receives an input operation of the next start point from the user. The user repeats the operation of inputting the start point and the end point until the user finishes specifying the line segments in the input image.

[0045] Here, the control unit 11 judges an odd-numbered click (touch) as a start point and an even-numbered click (touch) as an end point, and distinguishes the start point and the end point by multiple click (touch) operations. As shown in FIG. 6A, the control unit 11 sets the start point (input position for "A") by the first (odd-numbered) click, sets the end point (input position for "sha") by the second (even-numbered) click, and determines a line segment L1 (see FIG. 6B) connecting the input position for "A" and the input position for "sha". Next, the control unit 11 sets the start point (input position for "bi") by the third (odd-numbered) click, sets the end point (input position for "n") by the fourth (even-numbered) click, and determines a line segment L2 (see FIG. 6B) connecting the input position for "bi" and the input position for "n". Next, the control unit 11 sets the start point (the input position for "ta") with a fifth click (an odd-numbered click), sets the end point (the input position for "room") with a sixth click (an even-numbered click), and determines a line segment L3 (see FIG. 6B) connecting the input position for "ta" and the input position for "room." The control unit 11 associates the determined order with each of the line segments L1 to L3 and registers them in a line segment list D1 (see FIG. 7). The control unit 11 (display processing unit 112) repeats the above process to display the line segments L1 to L3 superimposed on the image (input image) and character rectangle displayed on the display screen.

[0046] In the above process, if the user executes a cancel operation even while the start point and end point are being accepted, the control unit 11 may shift the process to step S16. The control unit 11 discards the start point that has already been set, if any, and sets the index k of the line segment Lk to "k=k-1", so that when an instruction to specify a line segment is accepted again in step S16, the control unit 11 starts a selection operation of the line segment Lk+1 again. Note that examples of the cancel operation include a right-click operation, a press of a shortcut key, a click of a cancel button displayed on the display screen, and an operation of specifying a start point or end point beyond the inputtable range.

[0047] As another example of the input operation of the start point and the end point, the control unit 11 may determine the line segment by setting the start point and the end point based on a drag operation (input operation of a line segment) by the user. For example, when setting one line segment by one trajectory (one drag operation) regardless of the shape, the control unit 11 sets the start point and the end point of the one trajectory to the start point and the end point of the line segment, respectively.

[0048] When a single drag operation is permitted to divide the line into multiple segments, a vertex is set each time the line moves a specified number of pixels from the previous vertex (the starting point is the initial vertex), and a line segment Lk is added with the previous vertex as its starting point and the new vertex as its end point, and at the same time, the added vertex is set as the previous vertex, k=k+1, and line segments are added as needed until the end point is specified. Alternatively, a known method of acquiring a representative vertex from a curve drawn freehand may be used to add a line segment connecting the starting point and the next vertex as needed.

[0049] Here, the control unit 11 (display processing unit 112) may display the connection lines that connect the multiple line segments in chronological order on the display screen in a display mode different from that of the line segments. For example, as shown in Fig. 6B, the control unit 11 displays a connection line La that connects the end point of the line segment L1 to the start point of the line segment L2 inputted after the line segment L1, and a connection line Lb that connects the end point of the line segment L2 to the start point of the line segment L3 inputted after the line segment L2, in a display mode different from that of the line segments L1 to L3 (for example, a line of a predetermined type, color, or thickness). This allows the user to intuitively grasp the order of the line segments L1 to L3.

[0050] Furthermore, when only the starting point is specified and the control unit 11 is waiting for the specification of the end point, the control unit 11 may display the expected end point and the line segment set accordingly using a supplementary display method (a display mode different from the display mode showing the order of the line segments described above). For example, in the case of multiple mouse click operations, the control unit 11 displays a tentative end point and line segment according to the current position of the mouse pointer, in the case of a drag operation, the control unit 11 displays the trajectory up to the current point, and in the case of division into multiple points, the control unit 11 displays the expected points between them.

[0051] [Affiliation determination process] 8 is a flowchart showing an example of the procedure of the belonging determination process executed in the image processing device 1. The control unit 11 executes the belonging determination process after registering line segments L1 to L3 for character rectangles in response to an input operation by the user. In the belonging determination process, the control unit 11 (determination processing unit 115) determines to which of the line segments L1 to L3 each of the multiple character rectangles belongs.

[0052] In step S21, control unit 11 determines whether overlap determination with line segments has been performed for all character rectangles (whether there are character rectangles for which overlap determination has not been performed). If there are character rectangles for which overlap determination has not been performed (S21: Yes), control unit 11 shifts the process to step S22. On the other hand, if there are no character rectangles for which overlap determination has not been performed, i.e., if overlap determination with line segments has been completed for all character rectangles (S21: No), control unit 11 shifts the process to step S212.

[0053] In step S22, the control unit 11 selects the next character rectangle for which overlap determination has not been made.

[0054] In step S23, the control unit 11 determines whether or not there is a line segment that overlaps the selected character rectangle. Here, the control unit 11 determines whether or not there is a line segment that overlaps the selected character rectangle (e.g., the character rectangle of "A") in the line segment list D1 (see FIG. 7). If the control unit 11 determines that there is a line segment that overlaps the selected character rectangle in the line segment list D1 (S23: Yes), it shifts the process to step S24. On the other hand, if the control unit 11 determines that there is no line segment that overlaps the selected character rectangle in the line segment list D1 (S23: No), it shifts the process to step S231.

[0055] In step S24, the control unit 11 executes a first belonging determination process. In the first belonging determination process, when the selected character rectangle overlaps with only one line segment, the control unit 11 determines the overlapping line segment as the belonging line segment of the character rectangle. For example, as shown in FIG. 6B, when the selected character rectangle of "A" overlaps with only line segment L1, the control unit 11 determines the line segment L1 overlapping with the character rectangle as the belonging line segment of the character rectangle. The control unit 11 registers information combining the character rectangle and the line segment determined as the belonging line segment of the character rectangle in the belonging line segment list D2 (see FIG. 9).

[0056] Also, for example, the selected character rectangle of "A" may overlap with multiple line segments. For example, when the user inputs the lines in a disorganized manner, or when the freehand trajectory is divided into multiple line segments, a situation may occur in which two or more line segments overlap one character rectangle. In this case, the control unit 11 determines the destination line segment as follows. For example, as shown in FIG. 11A, the control unit 11 calculates the distance t1 between the line segment and the character rectangle K1 (center position) for each line segment that overlaps the character rectangle K1 of "A", and determines the line segment with the shortest distance t1 as the destination line segment.

[0057] Furthermore, as shown in FIG. 11B, for each line segment that overlaps with the character rectangle K1 of “A”, the control unit 11 calculates the distance t2 between the starting point or the ending point of the line segment, whichever is closer, and the character rectangle K1, and determines the line segment with the shortest distance t2 as the destination line segment.

[0058] Furthermore, as shown in FIG. 11C, for each line segment that overlaps the character rectangle K1 of “A”, the control unit 11 calculates the distance t3 (or the number of pixels) of the part that overlaps the character rectangle, and determines the line segment with the longest distance t3 as the destination line segment.

[0059] In this way, the control unit 11 (determination processing unit 115) determines that the first character rectangle belongs to the first line segment when the first character rectangle overlaps any one of the multiple line segments, and determines that the first character rectangle belongs to the line segment closest to the first character rectangle when the first character rectangle overlaps more than one of the multiple line segments.

[0060] In step S23, if the control unit 11 determines that the selected character rectangle does not have an overlapping line segment (S23: No), in step S231, the control unit 11 registers the selected character rectangle in a non-overlapping character rectangle list D3 (see FIG. 10).

[0061] After steps S24 and S231, the control unit 11 returns the process to step S21 and executes the above-mentioned process for each character rectangle for which overlap determination has not been performed. When the overlap determination process has been performed for all character rectangles corresponding to the input image, the control unit 11 determines that there are no character rectangles for which overlap determination has not been performed (S21: No), and transitions the process to step S212.

[0062] In step S212, the control unit 11 executes a second belonging determination process. Specifically, the control unit 11 executes a process (second belonging determination process) to determine the belonging line segment for the character rectangle registered in the non-overlapping character rectangle list D3 (see FIG. 10) in step S231.

[0063] For example, in the second affiliation determination process, the control unit 11 can execute the first determination process (first embodiment) or the second determination process (second embodiment).

[0064] In the first determination process of the second belonging determination process, the control unit 11 always determines one of the belonging line segments for each character rectangle registered in the non-overlapping character rectangle list D3.

[0065] In the second determination process of the second belonging determination process, the control unit 11 does not necessarily need to determine the belonging line segment for all character rectangles, and for character rectangles for which the belonging line segment has not been determined even in this process, the order of the character rectangles is determined separately in a later process.

[0066] [First decision process (first embodiment)] In the first determination process, the control unit 11 determines one destination line segment for each character rectangle based on the distance from the line segment. For example, the control unit 11 determines the destination line segment based on the distance from the end point (start point or end point) of the line segment. For example, as shown in FIG. 12A, the extension line L11 of the line segment L1 and the extension line L31 of the line segment L3 overlap the character rectangle K1 of "O" whose destination line segment has not been determined. In this case, the extension line L31 is closer to the character rectangle K1 (center position) than the extension line L11, but based on the distance from the end point of the line segment, the end point of the line segment L1 is closer to the character rectangle K1 than the start point of the line segment L3. Therefore, the control unit 11 determines the line segment L1 that more closely reflects the user's intention as the destination line segment of the character rectangle K1, registers information combining the character rectangle K1 and the line segment L1 in the destination line segment list D2, and deletes the information of the character rectangle K1 from the non-overlapping character rectangle list D3.

[0067] In the first determination process, the control unit 11 may determine the destination line segment from the character rectangles before and after the character rectangle K1. For example, as shown in FIG. 12B, for the character rectangle K1 of ".", whose destination line segment has not yet been determined, the control unit 11 searches for character rectangles whose destination line segment has already been determined in the first destination determination process in the forward and backward directions from the character rectangle K1, and if the destination line segment of the character rectangle found first in each of the forward and backward directions is the same line segment, the control unit 11 determines the line segment as the destination line segment of the character rectangle K1. Here, since the destination line segments of the character rectangles K2 and K3 before and after the "." are determined to be the line segment L1, the control unit 11 determines the destination line segment of the character rectangle K1 of "." to be the line segment L1, registers information on the combination of the character rectangle K1 and the line segment L1 in the destination line segment list D2, and deletes the information of the character rectangle K1 from the non-overlapping character rectangle list D3.

[0068] In the first determination process, for character rectangles on the extension of a line segment, it is possible to easily determine the line segment to which they belong. For example, even if a line is long and it is difficult to draw a line across the entire line from one end to the other (user input operation), by drawing the line partway, it is possible to easily determine the line segment to which the subsequent character rectangles belong by using the extension of that line.

[0069] The second determination process of the second destination determination process will be described later. In the following, the sorting order determination process (see FIG. 4) after the first determination process of the second destination determination process is executed will be described.

[0070] [Order determination process of the first determination process] 13 is a flowchart showing an example of the procedure of the order determination process executed in the image processing device 1. The control unit 11 executes the order determination process after determining the line segments to which all character rectangles belong by the first determination process. In the order determination process, the control unit 11 (determination processing unit 116) determines the order of each of all character rectangles belonging to the line segments to which they belong.

[0071] In step S31, the control unit 11 determines whether or not the determination process described below has been performed for all line segments. If the determination process has not been performed for all line segments (the determination process has not been completed) (S31: No), the control unit 11 shifts the process to step S32. On the other hand, if the determination process has been performed for all line segments (the determination process has been completed) (S31: Yes), the control unit 11 ends the sorting order determination process.

[0072] In step S32, the control unit 11 selects the top line segment in the line segment list D1 (see FIG. 7).

[0073] In step S33, the control unit 11 determines the order of the character rectangles belonging to the selected line segment. An example of a method for determining the order of the character rectangles will be described with reference to FIG.

[0074] Specifically, the control unit 11 draws a perpendicular line from the center position (center coordinates) of the character rectangle to the line segment L1, and sets the intersection point (coordinates on the line segment L1) of the perpendicular line with the line segment L1 as the reference coordinates of the character rectangle. The control unit 11 sets the reference coordinates for each character rectangle. The control unit 11 also draws an extension line L11 from the start point to the end point of the line segment L1, sets the coordinates of the start point to "0" and sets the end point direction to positive (the direction from the end point to the start point to negative). The control unit 11 then arranges the character rectangles belonging to the line segment L1 in the order of the reference coordinates. Note that if the distance between two points (such as the center coordinates of the rectangle) is simply used, it will be impossible to distinguish between character rectangles before and after the start point of the line segment, so by allowing a negative value, the order of the character rectangles before the start point can also be appropriately determined.

[0075] In step S34, the control unit 11 registers the character rectangles belonging to the line segments in the determined order at the end of the overall order list D4 (see FIG. 15).

[0076] In step S35, the control unit 11 deletes the line segment selected in step S32 from the line segment list D1. For example, the control unit 11 selects the line segment L1 from the line segment list D1, and after determining the order of each of the character rectangles "A" to "Sha" belonging to the line segment L1, deletes the line segment L1 from the line segment list D1. After step S35, the control unit 11 returns the process to step S31.

[0077] Returning to step S31, the control unit 11 selects from the line segment list D1 the line segment L2 that follows the line segment L1 in time series, determines the order of each of the character rectangles "bi" to "n" that belong to the line segment L2, registers them in the overall order list D4, and deletes the line segment L2 from the line segment list D1. Similarly, the control unit 11 selects from the line segment list D1 the line segment L3 that follows the line segment L2 in time series, determines the order of each of the character rectangles "ta" to "room" that belong to the line segment L3, registers them in the overall order list D4, and deletes the line segment L3 from the line segment list D1.

[0078] In this way, when control unit 11 receives input operations of multiple line segments for multiple character rectangles from the user, it arranges the multiple line segments in the chronological order of the input operations and determines the order of each of the multiple characters (character rectangles) corresponding to each of the multiple character rectangles selected by the multiple line segments. When control unit 11 completes the determination process for all line segments L1 to L3 registered in line segment list D1 (S31: Yes), it ends the order determination process.

[0079] [Order determination process of the second determination process (second embodiment)] In the second determination process, the control unit 11 first determines whether each character rectangle (or character string area, described later) belongs to any line segment, as in the first determination process. If the distance between the character rectangle (character string) and a line segment is equal to or less than a predetermined value, the control unit 11 determines the line segment to which the character rectangle (one or more character rectangles included in the character string) belongs. On the other hand, if the distance between the character rectangle (character string) and any line segment exceeds the predetermined value, the control unit 11 reserves the character rectangle (character string) as having no line segment to which it belongs. For all character rectangles registered in the non-overlapping character rectangle list D3 (see FIG. 10), the control unit 11 assigns only character rectangles that satisfy the above condition (character rectangles whose distance is equal to or less than a predetermined value) to a predetermined line segment and removes them from the non-overlapping character rectangle list D3. In this way, in the second determination process, character rectangles that do not belong to any line segment are permitted.

[0080] The control unit 11 executes a sorting order determination process after the second determination process. In the sorting order determination process, the control unit 11 (determination processing unit 116) determines the order of the character rectangles belonging to each line segment input by the user by the method in the first determination process (see FIG. 13). In addition, for character rectangles remaining in the non-overlapping character rectangle list D3 (see FIG. 10) (not belonging to any line segment), the control unit 11 searches for character rectangles whose destination line segment has already been determined in the first destination determination process in the forward and backward directions from the character rectangle of interest in the order before rearranging the character rectangles by this function, and if the destination line segments of the character rectangles found first in the forward and backward directions are the same line segment, the control unit 11 determines the line segment as the destination line segment of the character rectangle.

[0081] Note that the control unit 11 may collectively process a plurality of locally concentrated character rectangles as a character string area. In particular, when handling a character rectangle that does not belong to any of the line segments in the second determination process, problems such as the order being swapped within a set of character rectangles that are considered to be in the same line or a character rectangle in another line being sandwiched in between can be solved. Specifically, the control unit 11 divides a character rectangle whose destination line segment has not been determined into a group as a character string area composed of one or more character rectangles based on the position and size information. A well-known technique (for example, Patent No. 5153857) can be applied to the method of grouping each as a character string area based on the positional relationship of the character rectangles. For example, the control unit 11 may specify the direction of the character string in advance from the direction of the line segment input by the user, and group the remaining character rectangles that do not belong to any of the line segments as those that also form a character string in the same direction. Also, when using an existing OCR or the like as the initial value of the rectangle, since the possibility of a single character being separated into multiple parts is low, more simply, when assuming a horizontally written document (horizontal character string), a method of grouping character rectangles whose coordinates overlap in the vertical direction and the horizontal distance is within a predetermined value may also be used.

[0082] For example, the control unit 11 determines the order of the character rectangles that do not belong to any of the line segments based on the order before sorting and the information of the line segment input by the user. For example, as shown in FIG. 16A, the order 1 to 38 before the sorting process is set for each character rectangle. Here, as shown in FIG. 16B, when the line segments L1 and L2 are input by the user, the control unit 11 integrates the remaining character rectangles as the character string area R1. In this case, among the character string area R1, the end character "社" of the character rectangle belonging to the line segment L1, the character "ビ" with a consecutive order in the backward direction (the 9th in FIG. 16A), the start character "タ" of the character rectangle belonging to the line segment L2, and the character "ー" with a consecutive order in the forward direction (the 16th in FIG. 16A) are included in the same character string area R1. Therefore, the control unit 11 inserts the character rectangles included in the character string area R1 between the end character "社" of the character rectangle belonging to the line segment L1 and the start character "タ" of the character rectangle belonging to the line segment L2.

[0083] The control unit 11 extracts the target character rectangle from the order before the sorting process. Specifically, in addition to the character rectangle belonging to the line segment input by the user, the control unit 11 also includes character rectangles between the character rectangle and the character rectangle in the order before the sorting process. In the example shown in Fig. 17A, in addition to the 9th to 16th and 25th to 38th character rectangles belonging to the line segment L1 input by the user (the 9th to 10th and 27th to 38th character rectangles are assumed to have been added in the second destination determination process), the control unit 11 also includes the 17th to 24th character rectangles as targets for sorting, since they are considered to be between the character rectangle belonging to the line segment L1 in the order before the sorting process.

[0084] Furthermore, when a character string area is configured including the character rectangles, control unit 11 may also add the character rectangles included in the character string area to the rearrangement targets. In the example shown in Fig. 17B, only the 9th to 16th character rectangles are included between line segment L1 (1st to 8th character rectangles) and line segment L2 (17th to 24th character rectangles) input by the user, and no particular rearrangement occurs from the original order if this is left as is, but when the character string area including the 9th to 16th character rectangles also includes the 25th to 38th character rectangles, control unit 11 may also include the added 25th to 38th character rectangles as the rearrangement targets.

[0085] Furthermore, when a set of character rectangles that are a group is specified in advance (for example, when a group such as an address is set in advance as a text area in which characters in a document image are grouped by one or more characters), the control unit 11 may target only the character rectangles included in the range. The grouping may be set manually by a user's input operation, or may be detected as a text area for each block of text using a deep learning model for object detection. In addition, by assigning an initial character rectangle to each range of these text areas using an existing OCR process or the like, some restriction may be imposed on the determination of the initial order of characters (determining the initial order within a text area prevents the order of characters from being mixed between multiple text areas). Furthermore, by providing one piece of text information and attribute information (address, name, etc.) for each given text area, it is possible to use it as learning data when constructing a model of a document information analysis AI that extracts information on a specific item from a document, such as LayoutLM or LiLT. In this case, the target character rectangles may not be narrowed down from the character order before the sorting process as described above, and all of the character rectangles in the text area may be targeted.

[0086] In this way, the control unit 11 (determination processing unit 116) may group multiple character rectangles based on their respective position information, and when a character rectangle included in a group is not selected by a line segment, determine the order of the line segment and the group based on the distance between the line segment and the group.

[0087] As described above, after executing the order determination process for the character rectangles of the input image, the control unit 11 causes the display screen to display the characters corresponding to the character rectangles according to the determined order. As a result, the characters of the input image are displayed in the appropriate order, as shown in FIG.

[0088] Furthermore, the control unit 11 generates data in which the determined order of each of the multiple characters is added to the input image as learning data to be used for machine learning of character recognition. Furthermore, the control unit 11 may perform machine learning using the learning data to generate a trained model. The trained model can be applied to various output devices (such as a character recognition device). For example, when an image to be character recognized is input to the output device (such as a user terminal), the control unit of the operation terminal executes character recognition processing on the image using the trained model, and outputs the character recognition result.

[0089] According to this embodiment, it is possible to construct an image processing system (learning system) including an image processing device 1 and a learning device that generates a trained model by performing machine learning using learning data generated by the image processing device 1. Note that the image processing device 1 and the learning device may be configured as an integrated device.

[0090] Machine learning includes algorithms such as supervised learning using supervised data, unsupervised learning using unsupervised data, and reinforcement learning. Furthermore, to realize these methods, a method called "deep learning" is used, which learns to extract features themselves. In this embodiment, the control unit 11 has a learning model based on the various algorithms described above. In this embodiment, data in which the determined order of each of the multiple characters is added to an input image corresponds to supervised data, and input image data to which the order is not added corresponds to unsupervised data. The control unit 11 can perform machine learning using the supervised data and unsupervised data as input data to generate a trained model that executes character recognition processing. That is, the image processing device 1 functions as a learning device that generates a trained model.

[0091] The trained model may be downloaded to an operation terminal for use, or may be stored in a server (cloud server) and accessed from an operation terminal via the Internet, etc. When an arbitrary input image is input to the operation terminal, the trained model outputs an optimal character recognition result.

[0092] As described above, the image processing device 1 according to this embodiment displays a plurality of characters recognized from an image on a display screen, accepts a predetermined input operation from a user on the display screen, and determines the order of each of the plurality of characters based on a direction identified according to the input position of the input operation.

[0093] In addition, the image processing device 1 displays a plurality of character rectangles surrounding each of the plurality of characters on the display screen, accepts an input operation from a user on the display screen for inputting a line segment having a start point and an end point, or an input operation for specifying a start point and an end point, and determines the order of each of the plurality of characters based on the direction from the start point to the end point based on the input operation.

[0094] According to the above configuration, for example, even if a character string spans multiple lines in a document image, each character can be recognized in the appropriate order. Therefore, it is possible to realize an annotation tool capable of recognizing characters included in an input image in the appropriate order. It is also possible to realize an annotation tool capable of improving the accuracy of character recognition for an input image. Furthermore, according to the above configuration, when creating learning data (teacher data) required in the development stage of OCR using machine learning, if an existing OCR result is used as an initial value, it is possible to simplify the user's correction work of correcting the initial value to a correct value (reduce the amount of work).

[0095] The present disclosure is not limited to the above-mentioned embodiments. The present disclosure may be embodied in the following ways:

[0096] For example, the image processing device 1 may have a function of correcting character rectangles set in an input image (character rectangle correction mode), in addition to the function of rearranging character rectangles in the above-described embodiment (character rectangle rearrangement mode).

[0097] Specifically, in the character rectangle correction mode, when the character rectangle set by existing OCR processing or the like is not appropriate, the control unit 11 (recognition processing unit 113) executes a process of correcting the character rectangle so that each character is appropriately enclosed in a rectangle by adjusting the range of the character rectangle or adding or deleting the number of character rectangles through the user's mouse operation, etc.

[0098] For example, a simple drag-and-drop operation to adjust the four corners of a character rectangle is not a problem if only a few corrections are required, but in the case of handwritten characters or when it is difficult to recognize each character due to problems with the scan image quality, a considerable number of corrections are required when setting the initial character rectangle using existing OCR processing. For example, when multiple character rectangles (rectangles indicated by dotted lines) are set in the image shown in FIG. 19A, the user can narrow the corners of character rectangle K11 to a desired range by dragging and dropping the mouse, expand the corners of character rectangle K12 to a desired range by dragging and dropping the mouse, or add a new character rectangle K13, as shown in FIG. 19B. Since such operations are complicated, it is desirable to reduce the amount of work as much as possible and to enable the user to operate more intuitively.

[0099] Therefore, when a character rectangle is set for an image (see Figure 19A), the control unit 11 performs a process of dividing the character rectangle area according to the curve input by the user (area division process), and a process of calculating the smallest rectangle for each divided area and replacing it with the original area (rectangle division process).

[0100] [Text rectangle correction processing] Fig. 20 is a flowchart showing an example of the procedure of a character rectangle correction process executed in the image processing device 1. It is assumed that the control unit 11 executes a known character recognition process on the input image to display character rectangles corresponding to characters on the display screen (see Fig. 19A).

[0101] In step S51, control unit 11 inputs a curve onto the input image in response to a curve input operation by the user. For example, the user inputs a curve at an arbitrary position on the input image by clicking a mouse on the display screen, touching a touch panel, or the like. For example, as shown in Fig. 21, the user inputs a curve G1 that divides the center of character rectangle K11 in the left-right direction. When control unit 11 accepts the input operation of curve G1 from the user, it inputs curve G1 at the input position on the input image.

[0102] Next, in step S52, the control unit 11 executes a process of dividing the character rectangle by the curve input by the user (character rectangle division process). Here, when the user inputs a curve G1 into the character rectangle K11 as shown in Fig. 22(a), the control unit 11 divides the character rectangle K11 into areas Ka and Kb as shown in Fig. 22(b).

[0103] Next, in step S53, the control unit 11 determines whether or not the correction process described below has been performed for all regions. If the correction process has not been performed for all regions (the correction process has not been completed) (S53: No), the control unit 11 shifts the process to step S54. On the other hand, if the correction process has been performed for all regions (the correction process has been completed) (S53: Yes), the control unit 11 ends the character rectangle correction process based on the input curve.

[0104] In step S54, the control unit 11 selects an area. For example, the control unit 11 selects the area Ka from the areas Ka and Kb.

[0105] Next, in step S55, the control unit 11 extracts the foreground of the selected area Ka (see FIG. 22(c)).

[0106] Next, in step S56, the control unit 11 calculates a minimum rectangle. For example, as shown in FIG. 22(d), the area Ka is reduced to the size of a character to calculate a minimum rectangle Ka1.

[0107] Next, in step S57, the control unit 11 corrects the rectangle. Specifically, the control unit 11 corrects the minimum rectangle Ka1 to a rectangle Ka2, as shown in (e) of Fig. 22. After step S57, the control unit 11 returns the process to step S53.

[0108] Returning to step S53, the control unit 11 determines that the correction process is not complete, selects the next area Kb (S54), extracts the foreground of area Kb (S55) (see FIG. 22(c)), calculates a minimum rectangle Kb1 (S56) (see FIG. 22(d)), and corrects the minimum rectangle Kb1 to rectangle Kb2 (S57) (see FIG. 22(e)).

[0109] When the correction process is completed as described above (S53: Yes), control unit 11 ends the character rectangle correction process based on the input curve. Steps S53 to S57 correspond to the rectangle division process. In this way, when control unit 11 receives an input operation from the user for a division line (curve G1) that divides the area of ​​the character rectangle, control unit 11 divides the character rectangle into a plurality of character rectangles based on the division line. As a result, character rectangle K1 is divided into two areas in response to the user's operation.

[0110] [Rectangle Merge Processing] Here, when one character is set to multiple character rectangles, the control unit 11 executes a rectangle integration process in accordance with a user's operation. Fig. 23 is a flowchart showing an example of the procedure of the rectangle integration process executed in the image processing device 1. It is assumed that the control unit 11 executes a known character recognition process on the input image to display multiple character rectangles corresponding to one character on the display screen (see Fig. 24(a)).

[0111] In step S61, the control unit 11 accepts an input operation of a curve from the user. For example, the user inputs a curve that traces multiple character rectangles to be integrated by clicking a mouse on the display screen, touching a touch panel, etc. For example, as shown in (b) of FIG. 24, the user inputs a curve G2 drawn in one stroke that overlaps character rectangles K21 and K22.

[0112] In step S62, the control unit 11 extracts a region to be integrated. For example, the control unit 11 extracts a rectangle that overlaps with the curve G2 input by the user or exists around the curve G2 as the region to be integrated.

[0113] In addition, in the example shown in Fig. 25, for example, when the rectangle previously selected as the object of integration is the selected rectangle K31 and the rectangle to be determined is the rectangle of interest K32, if an inter-rectangle boundary line b1 (see Fig. 25(b)) is taken between the selected rectangle K31 and the rectangle of interest K32, and a curve G2 (see Fig. 25(a)) is input so as to intersect with the inter-rectangle boundary line b1, the rectangle of interest K32 itself is extracted as the area to be integrated even if it does not overlap with the curve G2. Also, the inter-rectangle boundary line b1 is set so as to be close to the rectangle of interest K32.

[0114] In step S63, the control unit 11 executes an integration process. For example, as shown in (c) of Fig. 24, the control unit 11 integrates the character rectangles K21 and K22 to modify them into one character rectangle K2. In this way, when the control unit 11 receives an input operation of an integration line G2 (e.g., a curve) for integrating multiple character rectangles from the user, the control unit 11 integrates the multiple character rectangles into one character rectangle based on the integration line G2. As a result, the character rectangles K21 and K22 are integrated into one character rectangle in response to the user's operation.

[0115] After correcting each character rectangle of the input image in the character rectangle correction mode, the control unit 11 determines the order of the character rectangles in the character rectangle sorting mode.

[0116] [Disclosure Note] The following will provide an outline of the disclosure extracted from the above-described embodiment. Note that the configurations and processing functions described in the following supplementary notes can be selected and combined in any desired manner.

[0117] <Appendix 1> a display processing unit that displays a plurality of characters recognized from the image on a display screen; a reception processing unit that receives a predetermined input operation from a user on the display screen; a determination processing unit that determines an order of each of the plurality of characters based on a direction specified according to an input position of the input operation; An image processing device comprising:

[0118] <Appendix 2> the display processing unit displays a plurality of character rectangles surrounding each of the plurality of characters on the display screen; the reception processing unit receives, from a user on the display screen, an input operation of a line segment having a start point and an end point, or an input operation of specifying a start point and an end point, for the character rectangle; the determination processing unit determines an order of each of the plurality of characters based on a direction from the start point to the end point based on the input operation. 2. An image processing device as described in claim 1.

[0119] <Appendix 3> a determination processing unit that, when the reception processing unit receives an input operation of a plurality of line segments for the plurality of character rectangles from a user, determines to which of the plurality of line segments each of the plurality of character rectangles belongs, the determination processing unit determines, for each of the line segments, an order of each of a plurality of characters corresponding to a plurality of character rectangles belonging to the line segment; 3. An image processing device as described in claim 2.

[0120] <Appendix 4> The determination processing unit: If a first character rectangle overlaps any one of the plurality of line segments, it is determined that the first character rectangle belongs to the first line segment; if the first character rectangle does not overlap any of the plurality of line segments, or if the first character rectangle overlaps more than one of the plurality of line segments, it is determined that the first character rectangle belongs to the line segment that is closest to the first character rectangle. 4. An image processing device as described in claim 3.

[0121] <Appendix 5> the determination processing unit groups the plurality of character rectangles based on their respective position information, and when a character rectangle included in a group is not selected by the line segment, determines an order of the line segment and the group based on a distance between the line segment and the group. 5. The image processing device according to claim 2,

[0122] <Appendix 6> When the reception processing unit receives an input operation of a plurality of line segments for the plurality of character rectangles from a user, the display processing unit arranges the plurality of line segments in a chronological order of the input operation, and the determination processing unit determines an arrangement order of the plurality of characters corresponding to each of the plurality of character rectangles selected by the plurality of line segments. 6. The image processing device according to claim 2,

[0123] <Appendix 7> the display processing unit displays, on the display screen, a connecting line that connects the plurality of line segments in the chronological order of the input operations in a display mode different from that of the line segments. 7. The image processing device according to claim 2,

[0124] <Appendix 8> when an input operation of a dividing line for dividing an area of ​​the character rectangle is received from a user, the character rectangle is divided into a plurality of character rectangles based on the dividing line; 8. The image processing device according to claim 2,

[0125] <Appendix 9> when receiving an input operation of an integration line for integrating the plurality of character rectangles from a user, the plurality of character rectangles are integrated into one character rectangle based on the integration line; 9. The image processing device according to any one of claims 2 to 8.

[0126] <Appendix 10> generating data in which the order of each of the plurality of characters determined by the determination processing unit is added to the image as learning data to be used in machine learning; 7. The image processing device according to claim 1,

[0127] <Appendix 11> An image processing device according to any one of claims 1 to 10, A learning device that generates a trained model by performing machine learning using the learning data generated by the image processing device; An image processing system comprising:

[0128] <Appendix 12> An output device that performs character recognition processing on an input image using the trained model generated by the learning device described in appendix 11, and outputs the character recognition result. [Explanation of symbols]

[0129] 1: Image processing device 11: Control section 12: Storage section 13: Operation display section 14: Communications Department 111: Acquisition processing unit 112: Display processing unit 113: Recognition processing unit 114: Reception processing unit 115: Judgment processing unit 116: Decision processing unit 117: Output processing section 118: Generation processing unit D1: Line list D2: List of lines to which the D3: Character Rectangle List D4: Ordered list

Claims

1. a display processing unit that displays a plurality of characters recognized from the image on a display screen; a reception processing unit that receives a predetermined input operation from a user on the display screen; a determination processing unit that determines an order of each of the plurality of characters based on a direction specified according to an input position of the input operation; An image processing device comprising:

2. the display processing unit displays a plurality of character rectangles surrounding each of the plurality of characters on the display screen; the reception processing unit receives, from a user on the display screen, an input operation of a line segment having a start point and an end point, or an input operation of specifying a start point and an end point, for the character rectangle; the determination processing unit determines an order of each of the plurality of characters based on a direction from the start point to the end point based on the input operation. The image processing device according to claim 1 .

3. a determination processing unit that, when the reception processing unit receives an input operation of a plurality of line segments for the plurality of character rectangles from a user, determines to which of the plurality of line segments each of the plurality of character rectangles belongs, the determination processing unit determines, for each of the line segments, an order of each of a plurality of characters corresponding to a plurality of character rectangles belonging to the line segment; The image processing device according to claim 2 .

4. The determination processing unit: If a first character rectangle overlaps any one of the plurality of line segments, it is determined that the first character rectangle belongs to the first line segment; if the first character rectangle does not overlap any of the plurality of line segments, or if the first character rectangle overlaps more than one of the plurality of line segments, it is determined that the first character rectangle belongs to the line segment that is closest to the first character rectangle. The image processing device according to claim 3 .

5. the determination processing unit groups the plurality of character rectangles based on their respective position information, and when a character rectangle included in a group is not selected by the line segment, determines an order of the line segment and the group based on a distance between the line segment and the group. The image processing device according to claim 2 .

6. When the reception processing unit receives an input operation of a plurality of line segments for the plurality of character rectangles from a user, the display processing unit arranges the plurality of line segments in a chronological order of the input operation, and the determination processing unit determines an arrangement order of the plurality of characters corresponding to each of the plurality of character rectangles selected by the plurality of line segments. The image processing device according to claim 2 .

7. the display processing unit displays, on the display screen, a connecting line that connects the plurality of line segments in the chronological order of the input operations in a display mode different from that of the line segments.

7. The image processing device according to claim 2.

8. when an input operation of a dividing line for dividing an area of ​​the character rectangle is received from a user, the character rectangle is divided into a plurality of character rectangles based on the dividing line; 7. The image processing device according to claim 2.

9. when receiving an input operation of an integration line for integrating the plurality of character rectangles from a user, the plurality of character rectangles are integrated into one character rectangle based on the integration line; 7. The image processing device according to claim 2.

10. generating data in which the order of each of the plurality of characters determined by the determination processing unit is added to the image as learning data to be used in machine learning; 7. The image processing device according to claim 1.

11. The image processing device according to claim 10 ; A learning device that generates a trained model by performing machine learning using the learning data generated by the image processing device; An image processing system comprising:

12. An output device that performs character recognition processing on an input image using the trained model generated by the training device according to claim 11, and outputs a character recognition result.

13. displaying on a display screen a plurality of characters recognized from the image; receiving a predetermined input operation from a user on the display screen; determining an order of the plurality of characters based on a direction specified according to an input position of the input operation; An image processing method executed by one or more processors.

14. displaying on a display screen a plurality of characters recognized from the image; receiving a predetermined input operation from a user on the display screen; determining an order of the plurality of characters based on a direction specified according to an input position of the input operation; An image processing program for causing one or more processors to execute the above.

Citation Information

Patent Citations

  • English character recognizing device

    JP1994309503A

  • Document reader

    JP1996335248A

  • Handwritten information processor, handwritten information processing method, handwritten information processing program, recording medium recording the program and electronic blackboard

    JP2003208569A

  • Character string area / character rectangle extraction apparatus, character string area / character rectangle extraction method, and program

    JP2017204270A

  • Image processing apparatus, image processing method, and program

    JP2022191771A