Content capture system and content capture method
By using convolutional neural networks and intersection-union ratio (IU/U) calculation, accurate identification of target fields in file images is achieved, solving the problem of inaccurate identification of small-scale content in existing technologies, and can be applied to the automated auditing of accounting systems.
Patent Information
- Application Number
- CN202110544710.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2021-05-06
- Filing Date
- 2021-05-19
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2041-05-19
AI Technical Summary
Existing technologies lack accuracy when capturing small areas of content in file images, especially multiple small fields, resulting in a high error rate and an inability to effectively identify specific fields.
By employing a convolutional neural network (CNN) segmentation and processing module, and through multiple recursive segmentations and intersection-union (IUU) calculations, the target fields in the file images are accurately identified. Combined with a text recognition system, this enables precise capture of specific fields.
It improves the accuracy of recognizing specific fields in document images, reduces human error, and enhances the efficiency of automated auditing in accounting systems.
Smart Images

Figure CN115311659B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a content capture system and a content capture method, and more particularly to a content capture system and a content capture method suitable for capturing the content in a file image. Background Technology
[0002] Currently, computer vision technologies for region text capture, especially for document images, are almost entirely based on "full-text recognition," meaning they use Optical Character Recognition (OCR) to decode the entire text of the document. However, OCR is ineffective at recognizing specific fields required by the user. Furthermore, capturing small areas within document images, such as a single field, can lead to inaccurate results due to the limited scope. Generally, when capturing multiple small fields from a document image, the more small fields involved, the higher the error rate of OCR.
[0003] Therefore, how to accurately identify the content in document images has become one of the problems that needs to be solved in this field. Summary of the Invention
[0004] This disclosure provides a content capture system suitable for capturing the content of a file image. The content capture system includes a processor and a storage device. The processor accesses programs stored in the storage device to implement a cutting module and a processing module. The cutting module receives a correction image, wherein the content in the correction image includes multiple text regions. The cutting module inputs the correction image or a first text region into a Convolutional Neural Network (CNN). The CNN outputs the coordinates of the first text region. The cutting module cuts out the first text region based on the coordinates of the first text region and inputs the cut-out first text region into a character recognition system. The character recognition system obtains multiple first characters in the first text region, calculates the number of these first characters to obtain a first character count, and determines whether the first character count is greater than a character count threshold. When the cutting module determines that the first character count is greater than the character count threshold, it inputs the first text region into the CNN. When the cutting module determines that the first character count is not greater than the character count threshold, it sends the first text region to the processing module. The block; wherein, when the cutting module determines that the number of the first character is greater than the character number threshold, the first text region is input into the convolutional neural network, and the number of the second character in the second text region cut out by the coordinates of the second text region output by the convolutional neural network is used to determine whether the number of the second character is greater than the character number threshold, until the cutting module determines that the number of the second character is not greater than the character number threshold, the second text region is sent to the processing module; the processing module is used to calculate the intersection-union ratio of the first text region and the second text region. When the processing module determines that the intersection-union ratio is greater than the intersection-union ratio threshold, both the first text region and the second text region are regarded as a target field, and at least one target character in the target field is obtained.
[0005] This disclosure provides a content capture method applicable to capturing content in a file image. The content capture method includes: receiving a calibration image, wherein the content in the calibration image includes multiple text regions; inputting the calibration image or a first text region into a convolutional neural network (CNN), the CNN outputs the coordinates of the first text region; segmenting the first text region according to the coordinates of the first text region, and inputting the segmented first text region into a character recognition system, the character recognition system obtains multiple first characters in the first text region, calculates the number of these first characters to obtain a first character count, and determines whether the first character count is greater than a character count threshold; when the first character count is determined to be greater than the character count threshold, inputting the first text region into the CNN; and when the first character count is determined to be less than the character count threshold, transmitting the first text region to a processing module. Specifically, when the number of first characters is greater than the character count threshold, the first text region is input into the convolutional neural network. Based on the number of second characters in the second text region cut out by the coordinates of the second text region output by the convolutional neural network, it is determined whether the number of second characters is greater than the character count threshold. When it is determined that the number of second characters is not greater than the character count threshold, the second text region is sent to the processing module. The processing module calculates the intersection-union ratio (IUGR) of the first and second text regions. When it is determined that the IUGR is greater than the IUGR threshold, both the first and second text regions are regarded as a target field, and at least one target character in the target field is obtained.
[0006] Content capture methods and systems can effectively improve the accuracy of identifying specific fields in invoice documents. These methods and systems can be applied to accounting systems, where electronic invoices are uploaded when vendors request payment. The content capture methods and systems perform at least one stage of block segmentation to capture multiple target fields. Subsequently, text recognition technology is used to extract the embedded text. A user-friendly interface then compares the system data with the recognized information (i.e., the content of the target fields) to assist internal accounting staff in quickly reviewing the data, effectively reducing accounting entry and verification time, and minimizing errors caused by human intervention. This truly achieves a new application of artificial intelligence in accounting. Attached Figure Description
[0007] Figure 1 This is a block diagram illustrating a content capture system according to an embodiment of the present invention.
[0008] Figure 2 This is a flowchart illustrating a content capture method according to an embodiment of the present invention.
[0009] Figure 3This is a schematic diagram illustrating the generation of a corrected image according to an embodiment of the present invention.
[0010] Figure 4 This is a schematic diagram illustrating a method of cutting a text area according to an embodiment of the present invention.
[0011] Figure 5 This is a schematic diagram illustrating a method of cutting a text area according to an embodiment of the present invention.
[0012] Figure 6A This is a flowchart illustrating a method for cutting text regions according to an embodiment of the present invention.
[0013] Figures 6B-6C This is a schematic diagram illustrating a method of cutting a text area according to an embodiment of the present invention.
[0014] Figure 6D This is a schematic diagram illustrating the calculation of intersection-union ratio according to an embodiment of the present invention. Detailed Implementation
[0015] The following description is a preferred embodiment of the invention and is intended to describe the basic spirit of the invention, but is not intended to limit the invention. The actual scope of the invention must be understood by referring to the claims below.
[0016] It must be understood that the words “comprising” and “including” used in this specification are used to indicate the presence of specific technical features, values, method steps, work processes, elements and / or components, but do not preclude the addition of more technical features, values, method steps, work processes, elements, components, or any combination thereof.
[0017] In patent applications, terms such as "first," "second," and "third" are used to modify elements in the patent application and are not used to indicate priority order, prior relationship, one element preceding another, or the chronological order of execution of method steps. They are only used to distinguish elements with the same name.
[0018] Please see Figure 1 , Figure 1 This is a block diagram illustrating a content capture system 100 according to an embodiment of the present invention. The content capture system 100 includes a processor PR and a storage device ST. In one embodiment, the content capture system 100 is, for example, a computer, a server, or other electronic device including a processor PR and a storage device ST.
[0019] In one embodiment, the processor PR accesses and executes a program stored in the storage device ST to implement a cutting module 10 and a processing module 20. In another embodiment, the processor PR accesses and executes a program stored in the storage device ST to implement the cutting module 10, the processing module 20, a conversion module 30, and a correction module 40.
[0020] In one embodiment, the cutting module 10, processing module 20, conversion module 30, and correction module 40 may be implemented individually or together by software or firmware. In one embodiment, the processor PR is used to access the calculation results of the cutting module 10, processing module 20, conversion module 30, and correction module 40 in the storage device ST.
[0021] In one embodiment, the storage device ST can be implemented as a read-only memory, flash memory, floppy disk, hard disk, optical disk, USB flash drive, magnetic tape, database accessible via a network, or other storage media with the same functionality that can be easily conceived by those skilled in the art.
[0022] In one embodiment, the cutting module 10, processing module 20, conversion module 30, and correction module 40 may be implemented individually or collectively by hardware circuitry. For example, the cutting module 10, processing module 20, conversion module 30, and correction module 40 may be constructed using active components (e.g., switches, transistors) and passive components (e.g., resistors, capacitors, inductors). In one embodiment, the cutting module 10, processing module 20, conversion module 30, and correction module 40 may be located outside the storage device ST and each coupled to the processor PR.
[0023] In one embodiment, the cutting module 10, processing module 20, conversion module 30, and correction module 40 are each or together implemented by one or more processors. The processors may be implemented by volumetric circuits such as microcontrollers, microprocessors, digital signal processors (DSPs), field programmable gate arrays (FPGAs), application-specific integrated circuits (ASICs), or logic circuits.
[0024] Please refer to Figures 2-5. Figure 2 This is a flowchart illustrating a content capture method 200 according to an embodiment of the present invention. Figure 3 This is a schematic diagram illustrating the generation of a corrected image IMG2 according to an embodiment of the present invention. Figure 4 This is a schematic diagram illustrating a method of cutting a text area according to an embodiment of the present invention. Figure 5 This is a schematic diagram illustrating a method for cutting text regions according to an embodiment of the present invention. The content capture method 200 can be derived from... Figure 1 It is implemented using components.
[0025] In one embodiment, the processor PR is used to access the cutting module 10 and the processing module 20, or to access and execute programs / algorithms in the storage device ST to implement the functions of the cutting module 10 and the processing module 20. In one embodiment, when the cutting module 10 and the processing module 20 are implemented in hardware (e.g., a chip or circuit), they can perform calculations themselves after receiving data or signals and send the processing results back to the processor PR. In one embodiment, when the cutting module 10 and the processing module 20 are implemented in software (e.g., an algorithm), the processor PR executes the algorithm in the cutting module 10 and the processing module 20 to obtain the processing results.
[0026] In step 210, the cutting module 10 receives a correction image, wherein the content of the correction image contains multiple text regions.
[0027] In one embodiment, the conversion module 30 receives a file and converts it into an initial input image conforming to an image file format. More specifically, a user can upload a file to the content capture system 100 through a user interface. After receiving the file, the conversion module 30 is responsible for converting the file format and confirming whether it is a normal and processable image format based on the file format uploaded by the user. In one embodiment, when the conversion module 30 determines that the file format uploaded by the user is a PDF file (PDF file refers to Portable Document Format file), the conversion module 30 will perform pagination conversion, converting each page of the PDF file into a single image file. For example, if the PDF file has 10 pages, the conversion module 30 will convert each page of the PDF file into an initial input image conforming to the JPG format (JPG is an abbreviation for Joint Photographic Equipment Group, also known as JPEG, an image processing format defined by the Joint Photographic Equipment Group). Therefore, the 10 pages of the PDF file will be converted into 10 initial input images in JPG format, and each initial input image, the original file name of the initial input image, the converted new file name, and the path will be stored in the database in the storage device ST.
[0028] If the file uploaded by the user already conforms to an image file format (e.g., JPG), the conversion module 30 does not need to convert the file format. It directly treats this file as the initial input image and stores the initial input image, its original filename, the new filename, and the path accordingly. In one embodiment, to ensure the regularity of filenames, the conversion module 30 converts the original filename into a new filename, making all filenames in the database of the storage device ST regular.
[0029] However, this is just one example; the image format is not limited to the specified JPG file, and the file entered by the user is not limited to PDF or JPG files.
[0030] In one embodiment, such as Figure 3 As shown, the correction module 40 receives the initial input image IMG0 from the conversion module 30. When the correction module 40 determines that the initial input image IMG0 is skewed, for example, it calculates a linear angle using a standard Hough transform. The linear skew state can be marked on the initial input image IMG0 by line segments (i.e., shown in image IMG1). Based on the linear angle, the image is corrected to a horizontal state, thereby horizontally correcting the initial input image IMG0 to generate a corrected image IMG2.
[0031] This can improve the accuracy of subsequent image segmentation. Generally, image segmentation is done in a rectangular manner. Non-horizontal text segmentation is prone to text omission. Therefore, by performing horizontal correction on the initial input image IMG0 and using the corrected image IMG2 for subsequent image segmentation and text recognition, more accurate results can be obtained.
[0032] In step 220, the cutting module 10 inputs the corrected image IMGI or the first text region into a convolutional neural network (CNN), and the CNN outputs the coordinates of the first text region.
[0033] In one embodiment, the convolutional neural network is used to receive a corrected image (e.g., a...). Figure 3 The corrected image IMG2 in the image is shown below. Figure 4 (Taking a larger corrected image IMGI as an example) or a text region that has already been extracted (such as the first text region), the coordinates of the text region are then output.
[0034] In one embodiment, the convolutional neural network is trained in advance using a large number of images with pre-labeled text regions and fields, and the recognition accuracy is greater than a preset threshold. These labeled text regions and fields are, for example, target fields or target text regions such as "company", "INVOICE", "BILL TO:", "SHIP TO:", etc.
[0035] The cropping module 10 will correct the image IMGI and input it into a convolutional neural network, such as... Figure 4 As shown, the convolutional neural network outputs the coordinates of multiple text regions B10, B20, and B30. For example, text region B10 can be represented by two sets of coordinates (X1, Y1) and (X2, Y2). Other text regions (such as text regions B20 and B30) can also be represented by coordinates, so they will not be elaborated on here.
[0036] In step 230, the cutting module 10 cuts out the first text region according to the coordinates of the first text region (e.g., text region B10), and inputs the cut-out first text region into the character recognition system. The character recognition system obtains multiple first characters in the first text region (e.g., multiple characters in text region B10), calculates the number of these first characters to obtain a first character count, and determines whether the first character count is greater than a character count threshold.
[0037] When the cutting module 10 determines that the number of the first character is greater than the character count threshold, it executes step 220. When the cutting module 10 determines that the number of the first character is not greater than the character count threshold, it executes step 240.
[0038] For example, if the character count threshold is 300, and the number of characters in text region B10 is 350, then the segmentation module 10 determines that the number of characters in text region B10 is greater than the character count threshold, so it executes step 220 and inputs text region B10 into the convolutional neural network again.
[0039] For example, if the character count threshold is 300, and the number of characters in text region B10 is 200, then the cutting module 10 determines that the number of characters in text region B10 is not greater than the character count threshold, and therefore executes step 240.
[0040] In one embodiment, when the convolutional neural network receives a truncated text region (e.g., text region B10), it indicates that the truncated text region is not accurate enough, for example, it contains too many characters, and the convolutional neural network needs to analyze the coordinates of the text region again.
[0041] In one embodiment, the text recognition system is, for example, an Optical Character Recognition (OCR) system, which can analyze and recognize image files of text data to output characters.
[0042] Specifically, when the cutting module 10 determines that the number of first characters is greater than the character count threshold, it inputs the first text region (e.g., text region B10) into the convolutional neural network. Based on the coordinates of a second text region output by the convolutional neural network (e.g., text regions B11, B12, B13, and B14 output by the convolutional neural network), the cutting module 10 determines whether the number of second characters in the cut second text region is greater than the character count threshold (e.g., the cutting module 10 determines whether the number of characters in each text region B11, B12, B13, and B14 is greater than the character count threshold). The cutting module continues until it determines that the number of second characters is not greater than the character count threshold, at which point the second text region is transmitted to the processing module 10.
[0043] For example, the cutting module 10 determines that the number of characters in each text region B11, B12, B13, and B14 is less than the character count threshold, and sends these text regions B11, B12, B13, and B14 to the processing module 10. If there are still text regions with a number of characters greater than the character count threshold, then the text regions with a number of characters greater than the character count threshold will be regarded as the correction image IMGI and input into the convolutional neural network again (step 220 is executed for this text region).
[0044] like Figure 4 As shown, the cutting module 10 first determines that the number of characters in text region B10 (considered as the first text region) is greater than the character count threshold. Therefore, text region B10 is input into the convolutional neural network. This time, the convolutional neural network outputs the coordinates of text regions B11, B12, B13, and B14 (each of which is considered as the second text region). The character recognition system can identify the characters in each text region B11, B12, B13, and B14. The cutting module 10 determines that the number of characters in each text region B11, B12, B13, and B14 is less than the character count threshold, and then sends these text regions B11, B12, B13, and B14 to the processing module 10.
[0045] In addition, the cutting module 10 first determines that the number of characters in the text region B30 (considered as the first text region) is greater than the character count threshold. Therefore, the text region B30 is input into the convolutional neural network. This time, the convolutional neural network outputs the coordinates of the text region B31 (considered as the second text region). The character recognition system can identify the characters in each text region B31. If the cutting module 10 determines that the number of characters in the text region B31 is still greater than the character count threshold, then the text region B31 is considered as the correction image IMG1 and is input into the convolutional neural network again (step 220 is executed for this text region).
[0046] like Figure 5As shown, the convolutional neural network outputs the coordinates of text regions B32, B33, and B34 (considered as the third text region). The character recognition system can identify the characters in each text region B32, B33, and B34. The segmentation module 10 determines that the number of characters in each text region B32, B33, and B34 is less than the character count threshold, and then sends these text regions B32, B33, and B34 to the processing module 10.
[0047] As can be seen from the above, through multiple recursive cuts, the cutting module 10 can cut out 7 text regions B11, B12, B13, B14, B32, B33 and B34.
[0048] In one embodiment, when the position and number of characters of the cut-out text regions are appropriate, the processing device 20 can know the content of each text region with the assistance of the text recognition system. For example, text region B32 represents a total quantity of 3000, text region B33 represents the currency as USD, and text region B34 represents a total amount of 2545.
[0049] In step 240, the cutting module 10 transmits the first text region to the processing module 20.
[0050] exist Figure 4 and Figure 5 In the example, the cutting module 10 sends seven text regions B11, B12, B13, B14, B32, B33, and B34 to the processing module 20. In other words, the cutting module sends the text regions (e.g., the first text region and the second text region) that are calculated to be less than the character count threshold in each round to the processing module 20.
[0051] In step 250, the processing module 20 calculates the intersection-union ratio (IU / U) of the first text region (e.g., text region B10) and the second text region (e.g., text region B11). When the processing module determines that the IU / U is greater than the IU / U is a threshold, it considers both the first text region and the second text region as target fields and obtains at least one target character from the target fields.
[0052] Figure 6A This is a flowchart illustrating a method for cutting text regions according to an embodiment of the present invention. Figure 6A The steps in the text are used to explain step 230 in more detail. Figures 6B-6C This is a schematic diagram illustrating a method of cutting a text area according to an embodiment of the present invention. Figure 6D This is a schematic diagram illustrating the calculation of intersection-union ratio according to an embodiment of the present invention. Figure 6D To explain step 250 in more detail.
[0053] In step 610, the cutting module 10 reads the correction image IMGI'. In step 620, the cutting module 10 inputs the correction image IMGI' into a convolutional neural network. The convolutional neural network outputs the coordinates of the text region (such as text region B60). The cutting module 10 cuts out the text region according to the coordinates of the text region and inputs the cut-out text region into a character recognition system. The character recognition system obtains multiple characters in the text region and calculates the number of these characters to obtain a character count. In step 630, the cutting module 10 determines whether the character count is greater than the character count threshold. If so, in step 640, the cutting module 10 uses the text region as the correction image IMGI' and enters step 620 again (to obtain text region B61). If not, the process ends.
[0054] In one embodiment, before each process ends, the cutting module 10 transmits text blocks that are no greater than the character count threshold to the processing module 20.
[0055] In this example, if the second cutting is performed in step 640, the final processing module 20 obtains a second text region (the second text region is, for example, text region B61, assuming the number of characters in the second text region B61 is not greater than the character count threshold). Since the area of the second text region B61 has been cut again, it is usually smaller than the area of the first text region B60. Therefore, in one embodiment, when the processing module 20 determines that the distance between the second text region B61 and the edge of the image is less than an edge distance (for example, 0.1 cm), it compensates the boundary of the second text region B61 with white space (for example, by adding a white border d to the length and width of the second text region B61, where the white border d is, for example, 0.2 cm) to generate a compensated text region B61'.
[0056] The processing module 20 is used to calculate the intersection-union ratio of the first text region B60 and the compensation text region B61'. When the processing module 20 determines that the intersection-union ratio is greater than the intersection-union ratio threshold, both the first text region B60 and the second text region B61 are regarded as target fields.
[0057] Intersection-over-Union (IoU) is a concept used in object detection. It represents the overlap ratio between the generated candidate bounding boxes and the original ground truth bounding boxes, i.e., the ratio of their intersection to their union. In this invention, the candidate bounding box refers to the current text region, and the original ground truth bounding box refers to the previous text region. For example, if the current text region is the second text region, then the previous text region is the first text region; or, if the current text region is the third text region, then the previous text region is the second text region. The calculation method for IoU is known and will not be elaborated here.
[0058] In one embodiment, such as Figure 6D As shown, the processing module 20 calculates the crossover ratio by overlapping the coordinates of the first text region B60 in the correction image IMGI' with the coordinates of the second text region 61 (or the compensation text region B61') in the correction image IMGI'.
[0059] Specifically, when processing module 20 determines that the intersection-union ratio (IU) is not greater than the IU threshold (e.g., 80%), it means that the second text region B61 still has a convergence effect after being cut. Therefore, the second text region B61 is input into the convolutional neural network again. This is equivalent to executing step 620, where the second text region B61 is treated as the correction image IMGI' and input into the convolutional neural network, and the subsequent process is executed until the process of cutting the text region is completed.
[0060] When the processing module 20 determines that the intersection-union ratio is greater than the intersection-union ratio threshold (e.g., 80%), it means that the overlap rate between the second text region B61 and the first text region B60 is very high. After secondary cutting, the results of the two are almost the same, so the process can be terminated. The processing module 20 regards both the second text region B61 and the second text region B60 as a target field, and obtains multiple target characters in the target field obtained by the character recognition system.
[0061] Similarly, in Figure 4 and Figure 5 In the example, after the cutting module 10 transmits the seven text regions B11, B12, B13, B14, B32, B33 and B34 to the processing module 20, the processing module 20 calculates the intersection-union ratio (IUU) of the current text region and the previous text region for each of the seven text regions. When the processing module 20 determines that the IUU is greater than the IUU threshold, it regards both the current text region and the previous text region as target fields and obtains at least one target character from the target fields.
[0062] In this way, after each of the seven text regions has been segmented once or multiple times, the final processing module 20 can obtain the situation where these seven text regions can be regarded as the target field, and obtain the target text in the target field.
[0063] Furthermore, dynamically adding white borders to text areas can prevent fonts from getting too close to the image edges, thus avoiding affecting the accuracy of segmentation. Additionally, using the intersection-union ratio (IUGR) as a criterion can quickly reduce the number of image segments required.
[0064] Content capture methods and systems can effectively improve the accuracy of target field recognition in invoice documents. These methods and systems can be applied to accounting systems, where electronic invoices are uploaded when vendors request payment. The content capture methods and systems perform at least one stage of block segmentation to capture multiple target fields. Subsequently, text recognition technology extracts the embedded text, and a user-friendly interface compares the system data with the recognized information (i.e., the content of the target fields) to assist internal accounting staff in quickly reviewing the data. This effectively reduces accounting entry and verification time and minimizes errors caused by human intervention, truly achieving a new application of artificial intelligence in accounting.
[0065] [Symbol Explanation]
[0066] 100: Content Capture System
[0067] PR: Processor
[0068] ST: Storage device
[0069] 10: Cutting Module
[0070] 20: Processing Module
[0071] 30: Conversion Module
[0072] 40: Calibration Module
[0073] 200: Content capture method
[0074] 210~250, 610~630: Steps
[0075] IMG0: Initial input image
[0076] IMG1: Image
[0077] IMGI', IMG2, IMGI: Corrected images
[0078] (X1, Y1), (X2, Y2): Coordinates
[0079] B10, B20, B30, B11, B12, B13, B14, B31, B32, B33, B34, B60, B61: Text areas
[0080] B61': Compensation for text area
[0081] d: White border
Claims
1. A content capture system for capturing the content of a file image, the content capture system comprising: A processor; and A storage device, wherein the processor accesses programs stored in the storage device to implement a cutting module and a processing module; This cutting module is used to receive a correction image, wherein, The content of the corrected image contains multiple text regions. The cutting module inputs the corrected image or a first text region into a convolutional neural network. The convolutional neural network outputs the coordinates of the first text region. The cutting module cuts out the first text region according to the coordinates of the first text region and inputs the cut-out first text region into a character recognition system. The character recognition system obtains multiple first characters in the first text region, calculates the number of the first characters to obtain a first character count, and determines whether the first character count is greater than a character count threshold. Specifically, when the cutting module determines that the number of the first character is greater than the character number threshold, the first text region is input into the convolutional neural network; Specifically, when the cutting module determines that the number of the first character is not greater than the character number threshold, the first text region is transmitted to the processing module. Specifically, when the cutting module determines that the number of the first character is greater than the character number threshold, it inputs the first text region into the convolutional neural network, and determines whether the number of the second character in the second text region cut out by the coordinates of the second text region output by the convolutional neural network is greater than the character number threshold. The second text region is then sent to the processing module when the cutting module determines that the number of the second character is not greater than the character number threshold. The processing module is used to calculate the intersection-union ratio of the first text region and the second text region. When the processing module determines that the intersection-union ratio is greater than an intersection-union ratio threshold, it regards both the first text region and the second text region as a target field and obtains at least one target character in the target field.
2. The content capture system as described in claim 1, wherein the processing module compensates for the boundary blanks of the second text region to generate a compensated text region, the processing module calculates the intersection-union ratio of the first text region and the compensated text region, and when the processing module determines that the intersection-union ratio is greater than the intersection-union ratio threshold, both the first text region and the second text region are regarded as the target field.
3. The content capture system of claim 1, wherein the processor is used to access programs stored in the storage device to implement a conversion module; This conversion module receives a file and converts it into an initial input image that conforms to an image file format.
4. The content capture system of claim 3, wherein the processor is used to access programs stored in the storage device to implement a correction module; The correction module is used to receive the initial input image and perform horizontal correction on the initial input image to generate the corrected image.
5. The content capture system as claimed in claim 1, wherein the processing module calculates the crossover ratio based on the overlap of the coordinates of the first text region in the corrected image and the coordinates of the second text region in the corrected image; in, When the processing module determines that the cross-union ratio is not greater than the cross-union ratio threshold, it inputs the second text region back into the convolutional neural network.
6. A content capture method for capturing the content of a file image, the content capture method comprising: Receive a calibration image, where, The corrected image contains multiple text areas; The corrected image or a first text region is input into a convolutional neural network, which outputs the coordinates of the first text region. The first text region is cut out according to its coordinates, and the cut-out first text region is input into a character recognition system. The character recognition system obtains multiple first characters in the first text region, calculates the number of the first characters to obtain a first character count, and determines whether the first character count is greater than a character count threshold. When the number of the first character is determined to be greater than the character count threshold, the first text region is input into the convolutional neural network. as well as When it is determined that the number of the first character is not greater than the character number threshold, the first text region is sent to a processing module. Specifically, when it is determined that the number of the first character is greater than the character number threshold, the first text region is input into the convolutional neural network, and the number of the second character in the second text region cut out by the coordinates of the second text region output by the convolutional neural network is used to determine whether the number of the second character is greater than the character number threshold. When it is determined that the number of the second character is not greater than the character number threshold, the second text region is sent to the processing module. The processing module calculates the intersection-union ratio (IUR) of the first text region and the second text region. When the IUR is determined to be greater than an IUR threshold, both the first text region and the second text region are regarded as a target field, and at least one target character in the target field is obtained.
7. The content capture method as described in claim 6, further comprising: The processing module compensates for the blank space at the boundary of the second text region to generate a compensated text region; and The processing module calculates the intersection-union ratio (IUU) between the first text region and the compensated text region. When the processing module determines that the IUU is greater than the IUU threshold, both the first text region and the second text region are considered as the target field.
8. The content capture method as described in claim 6, further comprising: Receive a file and convert it into an initial input image that conforms to an image file format.
9. The content capture method as described in claim 8, further comprising: Receive the initial input image and perform horizontal correction on the initial input image to generate the corrected image.
10. The content capture method as described in claim 6, further comprising: The processing module calculates the crossover ratio by overlapping the coordinates of the first text region and the second text region in the corrected image. in, When the processing module determines that the cross-union ratio is not greater than the cross-union ratio threshold, it inputs the second text region back into the convolutional neural network.
Citation Information
Patent Citations
Adaptive code-jet character segmentation method and a system thereof based on a priori knowledge
CN109389123A
Bill character recognition method and system based on convolutional neural network
CN112069900A