Document reading methods and terminals, readable storage media, and document reading systems

By using an automated document reading method that combines image and radio frequency signals with neural network optimization, the problems of low document reading efficiency and high labor costs have been solved, achieving efficient and accurate document information acquisition.

CN114842481BActive Publication Date: 2025-10-28HEBEI ALPHASTA TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210557924.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-05-19
Publication Date
2025-10-28
Estimated Expiration
2042-05-19

AI Technical Summary

Technical Problem

Existing technologies suffer from low efficiency, error-proneness, and high labor costs in document reading.

Method used

An automated document reading method is adopted, which performs edge detection on the document image to determine the reading method, and reads the document information using image or radio frequency signals. The binarization process is optimized by combining a neural network model to reduce manual intervention.

Benefits of technology

It improves the efficiency and accuracy of document reading, reduces labor costs, simplifies user operations, and saves reading time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114842481B_ABST
    Figure CN114842481B_ABST
Patent Text Reader

Abstract

This invention provides a document reading method and terminal, a readable storage medium, and a document reading system. The method includes: acquiring an image of a document to be read from a reading device; performing edge detection on the document image to obtain an edge detection result, and determining a reading method corresponding to the document to be read based on the edge detection result; and controlling the reading device to read the document to be read based on the reading method corresponding to the document to be read. The document reading method and terminal, readable storage medium, and document reading system provided by this invention can effectively improve the efficiency of document reading.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of document reading technology, and more specifically, relates to a document reading method and terminal, a readable storage medium, and a document reading system. Background Technology

[0002] In real life, there are many scenarios where document reading is required for identity verification and business processing. For example, document checks at highway entrances and the issuance of transportation cards and toll cards all require document reading. Currently, document reading technology, except for ID cards, is mostly based on manual reading. Obviously, manual document reading is inefficient, error-prone, and extremely labor-intensive when there is a high demand for document reading.

[0003] Therefore, how to improve the efficiency and accuracy of document reading and reduce labor costs has become an urgent problem for those skilled in the art. Summary of the Invention

[0004] The purpose of this invention is to provide a document reading method and terminal, a readable storage medium, and a document reading system to solve the technical problems of low efficiency, error-proneness, and extremely high labor costs associated with manual document reading in the prior art when there is a large demand for document reading.

[0005] A first aspect of the present invention provides a document reading method, comprising:

[0006] Obtain an image of the document to be read from the reading device;

[0007] Edge detection is performed on the document image to obtain the edge detection result of the document image, and the reading method corresponding to the document to be read is determined based on the edge detection result;

[0008] The reading device is controlled to read the document based on the reading method corresponding to the document to be read.

[0009] In one possible implementation, determining the reading method corresponding to the document to be read based on the edge detection result of the document image includes:

[0010] The edge detection results of the document image are matched with various edge images in a preset database to determine the matching image of the edge detection results;

[0011] The reading method corresponding to the matched image is used as the reading method for the document to be read.

[0012] In one possible implementation, the reading method includes an image reading method and a radio frequency signal reading method; controlling the reading device to read the document based on the reading method corresponding to the document to be read includes:

[0013] If the reading method corresponding to the document to be read is radio frequency signal reading, then the reading device is controlled to obtain the document information of the document to be read by sending radio frequency signals.

[0014] In one possible implementation, the reading method includes an image reading method and a radio frequency signal reading method; controlling the reading device to read the document based on the reading method corresponding to the document to be read includes:

[0015] If the document to be read is read using an image reading method, then text recognition is performed on the document image to obtain the document information.

[0016] In one possible implementation, the step of performing text recognition on the document image to obtain the document information of the document to be read includes:

[0017] The document image is preprocessed to obtain a preprocessed document image;

[0018] The preprocessed document image is segmented to obtain multiple segmented images;

[0019] Each segmented image is scanned to obtain the character information of each segmented image, and the character information of each segmented image is combined to form the document information of the document to be read.

[0020] In one possible implementation, the preprocessing includes binarization; wherein the method for determining the threshold value used in the binarization process is as follows:

[0021] The document type of the document to be read is determined based on the edge detection results of the document image;

[0022] Obtain the optical information of the document reading area corresponding to the reading device;

[0023] The optical information and the document type are input into a preset neural network model to determine the threshold value used in the binarization process.

[0024] In one possible implementation, the preprocessing includes binarization; wherein the method for determining the threshold value used in the binarization process is as follows:

[0025] The document type of the document to be read is determined based on the edge detection results of the document image, and the neural network model used for threshold detection is determined according to the document type.

[0026] Obtain the optical information of the document reading area corresponding to the reading device;

[0027] The optical information is input into the neural network model used in the threshold detection to determine the threshold value used in the binarization process.

[0028] In a second aspect, the present invention provides a terminal device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the document reading method described above.

[0029] A third aspect of the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the document reading method described above.

[0030] A fourth aspect of the present invention provides a document reading system, comprising: a reading device and the aforementioned terminal device, wherein the reading device and the terminal device are communicatively connected.

[0031] The beneficial effects of the document reading method and terminal, readable storage medium, and document reading system provided by this invention are as follows:

[0032] Unlike existing technologies that involve manual document reading, this invention employs an automated reading method. Specifically, it involves acquiring an image of the document to be read, determining the appropriate reading method based on the image, and then reading the document according to that method. Compared to existing technologies, this automated reading method offers higher efficiency, is less prone to errors, and reduces labor costs, thus effectively solving the problems present in existing technologies. Furthermore, as the invention's solution automatically determines the reading method, eliminating the need for users to select document types on a specific interface or to place documents in a prescribed order. This not only reduces the user's operational difficulty but also effectively saves reading time, further improving document reading efficiency. Attached Figure Description

[0033] To more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0034] Figure 1 This is a flowchart illustrating a document reading method according to an embodiment of the present invention.

[0035] Figure 2 This is a schematic block diagram of a terminal device provided in an embodiment of the present invention. Detailed Implementation

[0036] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of the invention. However, those skilled in the art will understand that the invention can be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods are omitted so as not to obscure the description of the invention with unnecessary detail.

[0037] To make the objectives, technical solutions, and advantages of the present invention clearer, specific embodiments will be described below in conjunction with the accompanying drawings.

[0038] Please refer to Figure 1 , Figure 1 This is a flowchart illustrating a document reading method according to an embodiment of the present invention. The method includes:

[0039] S101: Obtain the image of the document to be read from the reading device.

[0040] In this embodiment, an external reading device can be controlled to capture an image of the document to be read, and the image of the document to be read can be obtained from the reading device.

[0041] In this embodiment, the documents to be read include, but are not limited to, ID cards, bank cards, transportation cards, passes, household registration books, and health codes and travel codes displayed on mobile phones.

[0042] S102: Perform edge detection on the document image to obtain the edge detection result of the document image, and determine the reading method corresponding to the document to be read based on the edge detection result.

[0043] In this embodiment, edge detection can be performed on the document image to determine the edge detection result of the document image. The edge detection result can be the edge image corresponding to the document to be read in the document image, or it can be the size of the document to be read in the document image.

[0044] Optionally, the reading method for the document to be read can be determined based on the edge detection results, which can be detailed as follows:

[0045] The document type of the document to be read is determined based on the edge detection results, and then the reading method of the document to be read is determined based on the document type.

[0046] When the edge detection result is the edge image corresponding to the document to be read in the document image, the document type can be determined based on the following method:

[0047] The edge image corresponding to the document to be read is matched with each edge image in the preset database to determine the matching image of the edge image corresponding to the document to be read. Based on this, the document type corresponding to the matching image is taken as the document type of the document to be read. Then, the reading method of the document to be read is determined according to the preset mapping relationship between document type and reading method.

[0048] When the edge detection result is the size of the document to be read in the document image, the document type can be determined based on the following method:

[0049] The size of the document to be read is compared with multiple preset size ranges, each of which corresponds to a document type. The document type of the document to be read is then determined based on the preset size range to which the document to be read belongs.

[0050] In this embodiment, ID cards, bank cards, transportation cards, and access cards can be read using radio frequency signals, while household registration books, health codes, and travel codes displayed on mobile phones can be read using image analysis.

[0051] S103: Control the reading device to read the document based on the reading method corresponding to the document to be read.

[0052] In this embodiment, once the reading method of the document to be read is determined, the reading device can be controlled to read the document information of the document to be read according to the determined reading method.

[0053] As can be seen from the above, unlike the manual document reading method in the prior art, the embodiments of the present invention adopt an automated reading method, specifically: acquiring an image of the document to be read, determining the reading method of the document based on the image, and then reading the document according to the corresponding reading method. Compared with the prior art, the automated reading method adopted in the embodiments of the present invention has higher reading efficiency, is less prone to errors, and also helps to reduce labor costs, thus effectively solving the problems existing in the prior art. In addition, as can be seen from the solution of the embodiments of the present invention, the embodiments of the present invention automatically determine the reading method, so there is no need for the user to select the document type on the corresponding interface to control the reading device to read the document, nor is there a need for the user to place the document according to the prescribed reading order. Therefore, it not only reduces the user's operating difficulty, but also effectively saves reading time, thereby further improving the efficiency of document reading.

[0054] In one possible implementation, the reading method corresponding to the document to be read is determined based on the edge detection results of the document image, including:

[0055] The edge detection results of the document image are matched with various edge images in the preset database to determine the matching image of the edge detection results.

[0056] Use the reading method corresponding to the matched image as the reading method for the document to be read.

[0057] In this embodiment, the edge detection result of the document image can be the edge image of the document to be read in the document image. Therefore, the edge image of the document to be read can be matched with the edge images in the preset database by feature point matching. The edge image in the preset database that has a feature point matching rate with the edge image of the document to be read that reaches a preset threshold is used as the matching image of the edge detection result. The document type and reading method corresponding to the matching image are the document type and reading method corresponding to the document to be read.

[0058] As described above, when determining the document type or reading method, this embodiment of the invention does not directly identify the document image. Instead, it extracts the edges of the document to be read from the image and determines the document type or reading method based on these edges. This method effectively reduces the computational load in the image processing process, improves the execution speed of the method, and thus improves the overall efficiency of document reading.

[0059] In one possible implementation, the reading method includes image reading and radio frequency signal reading. The reading device is controlled to read the document based on the reading method corresponding to the document, including:

[0060] If the document to be read is read using radio frequency (RF) signal reading, the control device obtains the document information by sending RF signals.

[0061] In this embodiment, if the reading method corresponding to the document to be read is radio frequency signal reading, then radio frequency signals can be sent to the document to be read to read the document information stored in the chip of the document to be read.

[0062] In one possible implementation, the reading method includes image reading and radio frequency signal reading. The reading device is controlled to read the document based on the reading method corresponding to the document, including:

[0063] If the document to be read is read using image reading, then text recognition is performed on the document image to obtain the document information.

[0064] In this embodiment, if the reading method corresponding to the document to be read is image reading, the previously acquired document image can be directly analyzed to extract the document information from the document to be read based on image analysis methods.

[0065] In one possible implementation, text recognition is performed on the document image to obtain the document information to be read, including:

[0066] The document image is preprocessed to obtain the preprocessed document image.

[0067] The preprocessed document image is segmented to obtain multiple segmented images.

[0068] Scan each segmented image to obtain the character information of each segmented image, and combine the character information of each segmented image to form the document information of the document to be read.

[0069] In this embodiment, the preprocessing of the document image includes, but is not limited to: grayscale processing, binarization processing, noise reduction processing, and tilt correction.

[0070] In this embodiment, the text in the document image can be divided by image segmentation, and then the segmented images can be processed separately to extract the character information in the segmented images to obtain the character information corresponding to each segmented image. Subsequently, the document information of the document to be read can be obtained by combining the character information corresponding to each segmented image.

[0071] Furthermore, the binarization process involves a threshold value. Pixels with values ​​greater than this threshold are processed as white, while those with values ​​less than or equal to this threshold are processed as black. In other words, this threshold value directly affects the image processing accuracy, and consequently, the accuracy of subsequent text recognition. Therefore, this invention also provides a method for determining the threshold value during the binarization process:

[0072] In one possible implementation, preprocessing includes binarization. The method for determining the threshold value used in the binarization process is as follows:

[0073] The document type of the document to be read is determined based on the edge detection results of the document image.

[0074] Obtain the optical information of the document reading area corresponding to the reading device.

[0075] The optical information and document type are input into a preset neural network model to determine the threshold value used in the binarization process.

[0076] In this embodiment, considering the impact of the optical environment on the accuracy of document image processing, the optical information of the document reading area corresponding to the reading device can be obtained and combined with the document type to determine the threshold value used in the binarization process. The optical information includes, but is not limited to, illuminance, brightness, and light intensity.

[0077] As one possible approach, optical information and document type can be directly combined into a feature vector, which can then be input into a pre-trained neural network model to determine the threshold value used in the binarization process.

[0078] In one possible implementation, preprocessing includes binarization. The method for determining the threshold value used in the binarization process is as follows:

[0079] The document type of the document to be read is determined based on the edge detection results of the document image, and the neural network model used for threshold detection is determined according to the document type.

[0080] Obtain the optical information of the document reading area corresponding to the reading device.

[0081] Optical information is input into the neural network model used in threshold detection to determine the threshold value used in the binarization process.

[0082] In this embodiment, considering the impact of the optical environment on the accuracy of document image processing, the optical information of the document reading area corresponding to the reading device can be obtained and combined with the document type to determine the threshold value used in the binarization process. The optical information includes, but is not limited to, illuminance, brightness, and light intensity.

[0083] As one possible approach, different neural network models can be pre-trained for different document types. When reading documents, the corresponding neural network model can be selected based on the document type. Subsequently, optical information can be input into the corresponding neural network model to determine the threshold value used in the binarization process.

[0084] As can be seen from the above embodiments, the present invention also considers the influence of optical environment and different document types on image processing accuracy (and the influence on document reading accuracy), and provides several effective means to take into account the above-mentioned influencing factors. Therefore, the present invention can effectively improve document reading accuracy.

[0085] See Figure 2 , Figure 2 This is a schematic block diagram of a terminal device provided in an embodiment of the present invention. Figure 2 The terminal 200 in this embodiment may include one or more processors 201, one or more input devices 202, one or more output devices 203, and one or more memories 204. The processors 201, input devices 202, output devices 203, and memories 204 communicate with each other via a communication bus 205. The memories 204 store computer programs, including program instructions. The processors 201 execute the program instructions stored in the memories 204. Specifically, the processors 201 are configured to invoke the program instructions to execute the steps in the above method embodiments.

[0086] It should be understood that, in this embodiment of the invention, the processor 201 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0087] Input device 202 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 203 may include a display (LCD, etc.), a speaker, etc.

[0088] The memory 204 may include read-only memory and random access memory, and provides instructions and data to the processor 201. A portion of the memory 204 may also include non-volatile random access memory. For example, the memory 204 may also store device type information.

[0089] In specific implementations, the processor 201, input device 202, and output device 203 described in the embodiments of the present invention can execute the implementation methods described in the first and second embodiments of the document reading method provided in the embodiments of the present invention, or they can execute the implementation methods of the terminal described in the embodiments of the present invention, which will not be repeated here.

[0090] In another embodiment of the present invention, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. The computer program can also instruct related hardware to complete the process. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, the computer-readable medium does not include electrical carrier signals and telecommunication signals.

[0091] The computer-readable storage medium can be an internal storage unit of the terminal in any of the foregoing embodiments, such as the terminal's hard disk or memory. The computer-readable storage medium can also be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc., equipped on the terminal. Furthermore, the computer-readable storage medium can include both internal storage units and external storage devices of the terminal. The computer-readable storage medium is used to store computer programs and other programs and data required by the terminal. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.

[0092] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.

[0093] Those skilled in the art will understand that, for the sake of convenience and brevity, the specific working processes of the terminals and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.

[0094] In the several embodiments provided in this application, it should be understood that the disclosed terminals and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or units, or it may be an electrical, mechanical, or other form of connection.

[0095] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of the embodiments of the present invention, depending on actual needs.

[0096] Furthermore, the functional units in the various embodiments of the present invention can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.

[0097] Furthermore, in a fourth aspect of the present invention, a document reading system is provided, comprising: a reading device and the aforementioned terminal device, wherein the reading device and the terminal device are communicatively connected.

[0098] In this embodiment, the reading device is the same as the reading device in the above method embodiment. It can capture an image of the document to be read, or read the information stored in the chip of the document to be read by sending radio frequency signals, or send the captured image of the document and the read chip storage information to the terminal device.

[0099] The above are merely specific embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for reading identification documents, characterized in that, include: Obtain an image of the document to be read from the reading device; Edge detection is performed on the document image to obtain the edge detection result of the document image, and the reading method corresponding to the document to be read is determined based on the edge detection result; The reading device is controlled to read the document based on the reading method corresponding to the document to be read; The reading method includes an image reading method; controlling the reading device to read the document based on the reading method corresponding to the document to be read includes: If the reading method corresponding to the document to be read is image reading, then perform text recognition on the document image to obtain the document information of the document to be read; The step of performing text recognition on the document image to obtain the document information of the document to be read includes: The document image is preprocessed to obtain a preprocessed document image; The preprocessed document image is segmented to obtain multiple segmented images; Scan each segmented image to obtain the character information of each segmented image, and combine the character information of each segmented image as the document information of the document to be read; The preprocessing includes binarization; wherein, the method for determining the threshold value used in the binarization process is as follows: The document type of the document to be read is determined based on the edge detection results of the document image; Obtain the optical information of the document reading area corresponding to the reading device; The optical information and the document type are input into a preset neural network model to determine the threshold value used in the binarization process.

2. The document reading method as described in claim 1, characterized in that, The step of determining the reading method corresponding to the document to be read based on the edge detection results of the document image includes: The edge detection results of the document image are matched with various edge images in a preset database to determine the matching image of the edge detection results; The reading method corresponding to the matched image is used as the reading method for the document to be read.

3. The document reading method as described in claim 1, characterized in that, The reading methods include image reading and radio frequency signal reading; controlling the reading device to read the document based on the reading method corresponding to the document to be read includes: If the reading method corresponding to the document to be read is radio frequency signal reading, then the reading device is controlled to obtain the document information of the document to be read by sending radio frequency signals.

4. The document reading method as described in claim 1, characterized in that, The preprocessing includes binarization; wherein, the method for determining the threshold value used in the binarization process is as follows: The document type of the document to be read is determined based on the edge detection results of the document image, and the neural network model used for threshold detection is determined according to the document type. Obtain the optical information of the document reading area corresponding to the reading device; The optical information is input into the neural network model used in the threshold detection to determine the threshold value used in the binarization process.

5. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 4.

6. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 4.

7. A document reading system, characterized in that, include: The reading device and the terminal device as described in claim 5, wherein the reading device is communicatively connected to the terminal device.

Citation Information

Patent Citations

  • Card reading equipment and card reading control method and device

    CN109657668A

  • A person and certificate verification method and device

    CN109670402A

  • Scanning bill classification method and system and readable storage medium

    CN112308141A