Method for multi-line scanning of a portable scanning device and related products
Patent Information
- Application Number
- CN202211282113.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-19
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2042-10-19
AI Technical Summary
特别是,当扫描内容行数较多时,需要针对每行内容进行扫描,使得扫描操作非常繁琐,不仅耗时耗力,且影响便携式扫描设备的效率,从而影响便携式扫描设备的整体性能
[0019] In some embodiments of the present invention, the portable scanning device can support continuous multi-line scanning, and the scanning order can be sequential or random. Finally, all multi-line scanning results obtained from continuous scanning will be fused and deduplicated, which greatly improves the operability of the portable scanning device.
Smart Images

Figure CN115695670B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of image processing technology, and more specifically, the embodiments of the present invention relate to a method for multi-line scanning of a portable scanning device, a portable scanning device for performing the aforementioned method, and a computer-readable storage medium. Background Technology
[0002] This section is intended to provide background or context for embodiments of the invention set forth in the claims. The description herein may include concepts that may be explored, but not necessarily concepts that have been previously conceived or explored. Therefore, unless otherwise stated, what is described in this section is not prior art for the purposes of this application's specification and claims, and is not acknowledged as prior art simply by virtue of its inclusion in this section.
[0003] With the technological advancements in portable scanning devices such as dictionary pens, users have higher performance requirements for these devices. However, in practical applications, some scenarios still arise where their use is not entirely convenient.
[0004] For example, the content to be scanned needs to be scanned line by line in sequence. In particular, when there are many lines of content to be scanned, each line needs to be scanned individually, making the scanning operation very cumbersome, time-consuming and labor-intensive, and affecting the efficiency of the portable scanning device, thereby affecting the overall performance of the portable scanning device. Summary of the Invention
[0005] The scanning efficiency of known portable scanning devices is not ideal, which is a very frustrating process.
[0006] Therefore, there is a great need for an improved solution for multi-line scanning in portable scanning devices that can support multi-line scanning operations, effectively improve scanning efficiency, and thus enhance the overall performance of portable scanning devices.
[0007] In this context, embodiments of the present invention are intended to provide a method and related products for multi-line scanning in a portable scanning device.
[0008] In a first aspect of the present invention, a method for multi-line scanning of a portable scanning device is provided, comprising: acquiring an image scanned by the portable scanning device, wherein the image includes multi-line character information; acquiring the multi-line character information and paragraph structure information about the multi-line character information from the image; and determining a multi-line scanning result of the image based on the multi-line character information and the paragraph structure information.
[0009] In one embodiment of the present invention, acquiring the image scanned by the portable scanning device includes: acquiring the image scanned by the portable scanning device in a single scan; or acquiring the image scanned by the portable scanning device continuously.
[0010] In another embodiment of the present invention, each image obtained by a single scan or by continuous scans includes multiple consecutive frames. Obtaining the multi-line character information and paragraph structure information about the multi-line character information from the images includes: performing a mosaic process on the multiple consecutive frames to obtain a target image; performing a line-slicing process on the target image to obtain the multi-line character information; and determining the paragraph structure information based on the layout information of the multi-line character information.
[0011] In another embodiment of the present invention, the line-slicing process of the target image includes: using a natural scene text detection model to slice the target image, wherein the natural scene text detection model includes a convolutional neural network for feature extraction, a first prediction head for predicting a character-level Gaussian graph, and a second prediction head for predicting a centerline binary graph.
[0012] In another embodiment of the present invention, determining the multi-line scanning result of the image based on the multi-line character information and the paragraph structure information includes: performing segmentation processing on the multi-line character information based on the paragraph structure information; and performing character recognition processing on the segmented character information to obtain the multi-line scanning result of the image.
[0013] In one embodiment of the present invention, the image includes multiple images obtained by sequential scanning or multiple images obtained by sequential random scanning, and the method further includes: performing fusion and deduplication processing on the multi-line scanning results of each image.
[0014] In another embodiment of the present invention, the method further includes: in response to an anomaly in the multi-line scanning result of any image, rescanning the any image based on the portable scanning device; and continuing to perform fusion and deduplication processing based on the multi-line scanning result of the rescanned image and the multi-line scanning results of other images.
[0015] In another embodiment of the present invention, the multi-line character information in the image includes a handwritten portion and a printed portion, and the method further includes: segmenting the handwritten portion from the image to obtain an image after handwriting erasure; and performing image enhancement processing on the image after handwriting erasure.
[0016] In a second aspect of the present invention, a portable scanning device is provided, comprising: a processor; and a memory storing computer instructions for multi-line scanning by the portable scanning device, wherein when the computer instructions are executed by the processor, the portable scanning device performs the method described according to the foregoing and the following embodiments.
[0017] In a third aspect of the present invention, a computer-readable storage medium is provided, comprising program instructions for multiline scanning of a portable scanning device, wherein when the program instructions are executed by a processor, the methods described according to the foregoing and the following embodiments are implemented.
[0018] According to the method and related products for multi-line scanning of a portable scanning device according to embodiments of the present invention, multiple lines of character information can be obtained simultaneously from an image scanned by the portable scanning device, and the multi-line scanning result can be determined by combining the obtained paragraph structure information, thereby achieving true multi-line scanning—scanning multiple lines at once and obtaining multi-line scanning results. This effectively reduces the number of scans, improves scanning efficiency, and consequently enhances the overall performance of the portable scanning device.
[0019] In some embodiments of the present invention, the portable scanning device can support continuous multi-line scanning, and the scanning order can be sequential or random. Finally, all multi-line scanning results obtained from continuous scanning will be fused and deduplicated, which greatly improves the operability of the portable scanning device.
[0020] Furthermore, in some embodiments of the present invention, when an anomaly occurs in the multi-line scan result of an image during continuous scanning, only the anomaly portion needs to be rescanned, without having to repeat the entire scan. This further improves scanning efficiency. Attached Figure Description
[0021] The above and other objects, features, and advantages of exemplary embodiments of the present invention will become readily apparent from the following detailed description taken in conjunction with the accompanying drawings. Several embodiments of the invention are illustrated in the drawings by way of example and not limitation, wherein:
[0022] Figure 1 A block diagram schematically illustrates an exemplary computing system 100 suitable for implementing embodiments of the present invention;
[0023] Figure 2 A schematic flowchart of a method for multi-line scanning using a portable scanning device according to an embodiment of the present invention is shown.
[0024] Figure 3A schematic flowchart of a method for multi-line scanning using a portable scanning device according to another embodiment of the present invention is shown.
[0025] Figure 4 A schematic diagram illustrating a multi-line scanning process in a handwritten erasure scenario according to an embodiment of the present invention; and
[0026] Figure 5 A schematic diagram of a portable scanning device according to an embodiment of the present invention is shown. In the drawings, the same or corresponding reference numerals indicate the same or corresponding parts. Detailed Implementation
[0027] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0028] The principles and spirit of the invention will now be described with reference to several exemplary embodiments. It should be understood that these embodiments are given merely to enable those skilled in the art to better understand and implement the invention, and are not intended to limit the scope of the invention in any way. Rather, these embodiments are provided to make this disclosure more thorough and complete, and to fully convey the scope of this disclosure to those skilled in the art.
[0029] Figure 1 A block diagram of an exemplary computing system 100 suitable for implementing embodiments of the present invention is shown. For example... Figure 1 As shown, the computing system 100 may include: a central processing unit (CPU) 101, random access memory (RAM) 102, read-only memory (ROM) 103, a system bus 104, a hard disk controller 105, a keyboard controller 106, a serial interface controller 107, a parallel interface controller 108, a display controller 109, a hard disk 110, a keyboard 111, a serial external device 112, a parallel external device 113, and a display 114. Among these devices, the CPU 101, RAM 102, ROM 103, hard disk controller 105, keyboard controller 106, serial controller 107, parallel controller 108, and display controller 109 are coupled to the system bus 104. The hard disk 110 is coupled to the hard disk controller 105, the keyboard 111 is coupled to the keyboard controller 106, the serial external device 112 is coupled to the serial interface controller 107, the parallel external device 113 is coupled to the parallel interface controller 108, and the display 114 is coupled to the display controller 109. It should be understood that... Figure 1The structural block diagrams described are for illustrative purposes only and are not intended to limit the scope of the invention. In some cases, certain devices may be added or removed depending on the specific circumstances.
[0030] Those skilled in the art will recognize that embodiments of the present invention can be implemented as a system, method, or computer program product. Therefore, this disclosure can be specifically implemented as entirely hardware, entirely software (including firmware, resident software, microcode, etc.), or a combination of hardware and software, generally referred to herein as a "circuit," "module," "unit," or "system." Furthermore, in some embodiments, the present invention can also be implemented as a computer program product contained in one or more computer-readable media, which includes computer-readable program code.
[0031] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example,, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (not exhaustive) of a computer-readable storage medium may include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.
[0032] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0033] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0034] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network (including a local area network (LAN) or a wide area network (WAN)), or it can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0035] Embodiments of the present invention will now be described with reference to flowchart illustrations and block diagrams of apparatus (or systems) according to embodiments of the invention. It should be understood that each block of the flowchart and / or block diagram, and combinations of blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine that, when executed by the computer or other programmable data processing apparatus, creates means for implementing the functions / operations specified in the blocks of the flowchart and / or block diagram.
[0036] These computer program instructions may also be stored in a computer-readable medium that enables a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable medium produce a product comprising an instruction apparatus that implements the functions / operations specified in the boxes of a flowchart and / or block diagram.
[0037] Computer program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, such that the instructions that execute on the computer or other programmable apparatus can provide a process for implementing the functions / operations specified in the boxes of a flowchart and / or block diagram.
[0038] According to embodiments of the present invention, a method for multi-line scanning in a portable scanning device and related products are provided. Furthermore, any number of elements in the accompanying drawings is for illustrative purposes only and not for limitation, and any naming is for distinction only and has no limiting meaning.
[0039] The principles and spirit of the present invention will be explained in detail below with reference to several representative embodiments. Invention Overview
[0040] The inventors have discovered that the scanning performance of existing portable scanning devices, such as dictionary pens, is unsatisfactory. Specifically, existing portable scanning devices only support single-line scanning. This single-line scanning method extracts only the middle line in each scan and then directly splices the recognition results together. Therefore, users need to perform multiple scans, especially when there are many lines of content to scan. Not only do they need to scan each line sequentially, but if a line is scanned abnormally (e.g., an error occurs), all lines need to be rescanned. It can be seen that the entire scanning process is very cumbersome and inefficient.
[0041] Based on this, the inventors discovered through research that portable scanning devices can support multi-line scanning to improve their scanning efficiency. Specifically, this involves simultaneously extracting multi-line character information from images containing such information and further combining this information with paragraph structure information to obtain multi-line scanning results. This enables true multi-line scanning—scanning multiple lines at once and obtaining multi-line scanning results—effectively reducing the number of scans and improving scanning efficiency, thereby enhancing the overall performance of the portable scanning device.
[0042] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention will be described in detail below. Exemplary methods
[0043] The following is for reference. Figure 2 This section describes a method for multi-line scanning using a portable scanning device according to an exemplary embodiment of the present invention. It should be noted that the embodiments of the present invention can be applied to any applicable scenario.
[0044] Figure 2 A method 200 for multi-line scanning using a portable scanning device according to an embodiment of the present invention is illustrated schematically. It should be noted that the portable scanning device may include dictionary pens, scanning translation pens, and other portable devices requiring multi-line scanning and recognition.
[0045] like Figure 2 As shown, in step S201, an image scanned by a portable scanning device can be acquired, wherein the aforementioned image includes multiple lines of character information. The portable scanning device can support image acquisition of scanned content (character information carried on various scanning media, etc.). The specific number of lines of character information that can be scanned in each scan depends on the scanning port of the portable scanning device, the layout of the characters, etc. For example, for a dictionary pen, the number of lines of character information in the image scanned by the dictionary pen can be determined based on various factors such as the pen tip width and the layout of the scanned font, line spacing, etc.
[0046] Next, in step S202, multi-line character information and paragraph structure information about the multi-line character information can be obtained from the aforementioned image. Unlike traditional single-line scanning technology, which only extracts the middle line of the scanned content and directly splices the beginning and end of each recognition result without involving paragraph structure, this method not only needs to extract all the multi-line character information contained in the image, but also needs to further extract the relevant paragraph structure information to ensure the accuracy of subsequent multi-line scanning results.
[0047] Finally, in step S203, the multi-line scan result of the image can be determined based on the aforementioned multi-line character information and paragraph structure information. Simultaneously extracting multi-line character information that may belong to the same paragraph or multiple paragraphs, and combining this with specific paragraph structure information, allows for accurate sorting of the multi-line character information, thereby ensuring the validity of the multi-line scan result. In particular, for continuous multi-line scan scenarios, accurate sorting of the multi-line character information in each scan is especially important.
[0048] As can be seen, by simultaneously obtaining multiple lines of character information from images scanned by a portable scanning device and combining this with the obtained paragraph structure information to determine the multi-line scanning result, true multi-line scanning can be achieved—scanning multiple lines at once and obtaining multi-line scanning results. This effectively reduces the number of scans, improves scanning efficiency, and ultimately enhances the overall performance of the portable scanning device.
[0049] Figure 3 A method 300 for multi-line scanning using a portable scanning device according to another embodiment of the present invention is illustrated schematically. It will be understood that method 300 is a... Figure 2 Further limitations and supplements to Chinese method 200. Therefore, the preceding text, combined with... Figure 2 The relevant detailed descriptions also apply to the following text.
[0050] like Figure 3 As shown, in step S301, images scanned by the portable scanning device can be acquired. In some embodiments, images scanned by the portable scanning device can be acquired in various ways. For example, images scanned by the portable scanning device in a single scan can be acquired. Alternatively, images scanned continuously by the portable scanning device can be acquired. Each image obtained in a single scan or in continuous scans comprises multiple consecutive frames.
[0051] Next, in step S302, the aforementioned consecutive multi-frame images can be stitched together to obtain the target image. For example, the first n consecutive frames (e.g., the first two frames) can be stitched together first, and then the stitched images of the first n frames can be stitched together with the n+1 images again, until all frames have been stitched together to obtain the target image. For example, for two consecutive frames, a corresponding stitching template can be selected, and then template matching can be used to find the corresponding stitching position. Then, a gradient matrix can be used to fuse the images. It should be noted that the detailed description of the stitching process here is merely illustrative, and the solution of the present invention is not limited thereto.
[0052] Next, in step S303, the aforementioned target image can be processed by line segmentation to obtain multi-line character information. For example, the character regions in the target image can be segmented and extracted, and incomplete lines can be removed to obtain multi-line character information. The specific line segmentation method can be implemented using some text recognition techniques. Preferably, a scene text detection model (Differentiable Binarization Network, or DBNet for short) can be used, which is a method that can effectively detect text regions through line-level text detection. The DBNet model specifically includes a convolutional neural network for feature extraction, a first prediction head for predicting text regions, and a second prediction head for predicting an adaptive threshold map. Specifically, features can first be extracted from the image using the convolutional neural network, and then the first prediction head can generate a probability map of the text regions based on the extracted features. The text regions can be determined using the probability map. Then, the text regions are binarized using the threshold map predicted by the second prediction head, and then concatenated and corrected to achieve line segmentation. It should be noted that the detailed description of the image line segmentation process here is only illustrative, and the solution of the present invention is not limited thereto.
[0053] Next, in step S304, the paragraph structure information can be determined based on the layout information of the aforementioned multi-line character information. The scanned image may contain layout information such as paragraph numbers, paragraph indentation spaces, line spacing, and font. By collecting this layout information from the multi-line character information in the image, the corresponding paragraph structure information can be effectively determined.
[0054] Next, in step S305, the multi-line character information can be grouped into segments based on the aforementioned paragraph structure information. Specifically, the multi-line character information has corresponding paragraph structure information. In particular, if the multi-line character information scanned in a single scan belongs to different paragraphs, or if the multi-line character information scanned in multiple consecutive scans belongs to different paragraphs, it can be grouped into segments according to the corresponding paragraph structure information. Because it has detailed paragraph structure information and supports paragraph recombination, there is no restriction on the scanning order in continuous scanning scenarios. For example, it can be sequential continuous scanning or random continuous scanning. This greatly improves the user experience. In addition, when an error or other abnormality occurs in the multi-line scanning result of an image, only the abnormal part can be rescanned, greatly improving scanning efficiency.
[0055] Finally, in step S306, the character information after segmentation processing can be subjected to character recognition processing to obtain the multi-line scanning result of the image. There are various methods for character recognition processing, such as optical character recognition (OCR). Preferably, a convolutional neural network-based encoder (CNN-based Encoder) + a connectionist temporal classification (CTC)-based decoder (i.e., a CTC-based Decoder Head) is used for character recognition processing. Specifically, a convolutional neural network (e.g., the Darknet neural network architecture) can be used to extract features from the image. The encoder abandons the traditional recurrent neural network (RNN) structure and adopts a fully connected structure to support accelerated inference of the INT8 quantization model in devices such as edge neural network processors (NPUs) / tensor processors (TPUs). The decoder uses the CTC algorithm for character alignment.
[0056] Furthermore, in some embodiments, when the image scanned by the portable scanning device includes multiple images obtained from sequential scanning or multiple images obtained from sequential random scanning, the multi-line scanning results of each image can be fused and deduplicated. For example, the fusion of scanning results can be achieved through natural language recognition technology to remove incomplete lines, duplicate lines, etc.
[0057] Furthermore, in some embodiments, multi-line scanning can also be applied to handwritten erasure scenarios. When the multi-line character information in an image includes both handwritten and printed portions, the handwritten portion can be segmented from the image to obtain the handwritten erasure image. Then, image enhancement processing can be performed on the handwritten erasure image.
[0058] Figure 4A schematic diagram illustrating a multi-line scanning process in a handwritten erasure scenario according to an embodiment of the present invention is shown. Figure 4 As shown, the portable scanning device performs two consecutive scans, and then performs single-line mosaic processing on the images obtained from each scan to obtain the first scan image and the second scan image. Both the first and second scan images contain the handwritten and printed portions. Next, handwriting erasure is performed using techniques such as handwriting segmentation and image enhancement. The handwriting segmentation technique uses a High-Resolution Network (HRNet), whose data comes from pixel-by-pixel annotations. Image enhancement techniques can be implemented using models similar to Generative Adversarial Networks (GANs). For example, the erased image can be generated by a generator in the GAN model, then corrected by a judge in the GAN model, and finally enhanced using the generator part in the inference part. Then, after line segmentation, grouping, and fusion removal as mentioned above, the final multi-line scan result is obtained.
[0059] As can be seen, by simultaneously obtaining multiple lines of character information from images scanned by a portable scanning device and combining this with the obtained paragraph structure information to determine the multi-line scanning result, true multi-line synchronous scanning can be achieved, making information entry more efficient. Furthermore, the portable scanning device in this application not only supports multi-line scanning mode but is also compatible with the traditional single-line scanning mode, allowing for mode switching as needed. Additionally, it supports continuous multi-line scanning, rescanning of abnormal portions from a previous scan, and handwritten erasure processing. Exemplary device
[0060] After introducing the method of exemplary embodiments of the present invention, the following references are made. Figure 5 Related products of the method for multi-line scanning of a portable scanning device according to exemplary embodiments of the present invention will be described.
[0061] Figure 5 A schematic block diagram of a portable scanning device 500 according to an embodiment of the present invention is shown. Figure 5 As shown, the portable scanning device 500 may include a processor 501 and a memory 502. The memory 502 stores computer instructions implemented by a computer for multi-line scanning of the portable scanning device. When the computer instructions are executed by the processor 501, the portable scanning device 500 performs the actions described above. Figure 2 and Figure 3The method described herein. For example, in some embodiments, the portable scanning device 500 can perform tasks such as scanning images, acquiring images containing multi-line character information, acquiring multi-line character information and paragraph structure information, and determining multi-line scanning results. Based on this, the portable scanning device 500 can support simultaneous multi-line scanning, thereby effectively reducing the number of scans, improving scanning efficiency, and ultimately enhancing the overall performance of the portable scanning device. Furthermore, the portable scanning device 500 is also compatible with traditional single-line scanning modes. During use, the user can adjust the portable scanning device to adopt single-line or multi-line scanning modes according to needs (e.g., the amount of content to be scanned).
[0062] In some implementation scenarios, the portable scanning device 500 may include dictionary pens, scanning translation pens, and other portable devices with multi-line scanning and recognition requirements. The present invention does not limit the structural design that the portable scanning device 500 may have.
[0063] It should be noted that although several devices or sub-devices of the device have been mentioned in the detailed description above, this division is not mandatory. In fact, according to embodiments of the invention, the features and functions of two or more devices described above can be embodied in one device. Conversely, the features and functions of one device described above can be further divided and embodied by multiple devices.
[0064] The use of the verbs "including" and "contains" and their inflections in the application documents does not preclude the existence of elements or steps other than those described in the application documents. The article "a" or "one" preceding an element does not preclude the existence of multiple such elements.
[0065] While the spirit and principles of the invention have been described with reference to several specific embodiments, it should be understood that the invention is not limited to the disclosed specific embodiments, and the division of aspects does not imply that features in these aspects cannot be combined for benefit; such division is merely for ease of description. The invention is intended to cover various modifications and equivalent arrangements included within the spirit and scope of the appended claims. The scope of the appended claims is to be interpreted in the broadest sense, thereby encompassing all such modifications and equivalent structures and functions.
Claims
1. A method for multi-line scanning in a portable scanning device, characterized in that, include: The portable scanning device acquires an image, wherein the image includes multiple lines of character information; and the number of lines of character information that can be scanned in each scan is determined according to the scanning port of the portable scanning device and the layout of the characters, wherein the layout of the characters includes at least the font and line spacing of the scanned characters; The multi-line character information and paragraph structure information about the multi-line character information are obtained from the image, wherein the corresponding paragraph structure information is determined by collecting the layout information of the multi-line character information in the image, wherein the layout information includes at least: paragraph indentation spaces, line spacing, and font; and Based on the multi-line character information and the paragraph structure information, the multi-line scanning result of the image is determined, wherein the multi-line character information is segmented based on the paragraph structure information; and the segmented character information is subjected to character recognition processing to obtain the multi-line scanning result of the image. The images include multiple images obtained by sequential scanning or multiple images obtained by random scanning. The multi-line scanning results of each image are fused and deduplicated. In response to an anomaly in the multi-line scanning result of any image, the image is re-scanned based solely on the portable scanning device without re-scanning other images. The multi-line scanning result of the re-scanned image is then used to continue the fusion and deduplication process with the multi-line scanning results of other images.
2. The method according to claim 1, characterized in that, Acquiring the images scanned by the portable scanning device includes: Acquire the image captured in a single scan by the portable scanning device; or Acquire images continuously scanned by the portable scanning device.
3. The method according to claim 2, characterized in that, Each image obtained from a single scan or from consecutive scans comprises multiple consecutive frames. The multi-line character information and paragraph structure information regarding the multi-line character information are obtained from the images, including: The consecutive multiple frames of images are stitched together to obtain the target image; The target image is sliced line by line to obtain the multi-line character information; and The paragraph structure information is determined based on the layout information of the multi-line character information.
4. The method according to claim 3, characterized in that, The process of slicing the target image into rows includes: The target image is processed by slicing using a natural scene text detection model, wherein the natural scene text detection model includes a convolutional neural network for feature extraction, a first prediction head for predicting a character-level Gaussian graph, and a second prediction head for predicting a centerline binary graph.
5. The method according to any one of claims 1 to 4, characterized in that, The multi-line character information in the image includes both handwritten and printed portions, and the method further includes: The handwritten portion is segmented from the image to obtain an image after the handwriting has been erased; and The image after the handwriting has been erased is then subjected to image enhancement processing.
6. A portable scanning device, characterized in that, include: processor; as well as A memory storing computer instructions for multi-line scanning of a portable scanning device, which, when executed by the processor, cause the portable scanner to perform the method according to any one of claims 1-5.
7. A computer-readable storage medium, characterized in that, The device includes program instructions for multi-line scanning of a portable scanning device, which, when executed by a processor, cause the method according to any one of claims 1-5 to be implemented.
Citation Information
Patent Citations
Electronic equipments and text inputting method
CN101140617A
Scanning mode switching method based on entry equipment and entry equipment
CN103019834A
Text processing method and device
CN110059563A