Scanning mode determination method, determination system, electronic device and readable storage medium of scanning pen

By using the scanning mode determination method of the scanning pen to listen to and analyze image information and automatically adjust the scanning mode, the problem of low recognition accuracy in existing technologies is solved, and more efficient text recognition is achieved.

CN114419622BActive Publication Date: 2025-12-05BEIJING GUANGNIAN WUXIAN SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210079079.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-24
Publication Date
2025-12-05
Estimated Expiration
2042-01-24

AI Technical Summary

Technical Problem

The text recognition accuracy of existing scanning pens is not high, making it difficult to accurately determine the scanning mode, resulting in low recognition efficiency.

Method used

By monitoring whether the scanning pen is pressed, the camera is controlled to take pictures and generate images. The image information is analyzed and it is determined whether the image contains multiple lines of text. The system then automatically enters multi-line or single-line scanning mode and uses OCR processing to generate text content.

Benefits of technology

It improves the accuracy and efficiency of text recognition, and can accurately recognize multiple lines or a single line of text to meet users' scanning needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114419622B_ABST
    Figure CN114419622B_ABST
Patent Text Reader

Abstract

The application provides a scanning mode judgment method and system of a scanning pen, an electronic device and a readable storage medium. Text information is generated according to image information in an image, and then whether the image contains multiple lines of text is judged according to the text information, and the scanning pen automatically enters a multi-line scanning mode or a single-line scanning mode. Compared with the prior art, the user's scanning intention can be automatically judged, and the multi-line scanning mode or the single-line scanning mode is automatically adjusted to enter, so that the text in the image can be accurately recognized, and the text recognition efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of scanning devices, in particular to a scanning mode judgment method of a scanning pen, a recognition system, an electronic device and a readable storage medium. BACKGROUND

[0002] The description of the background art in the present application belongs to the related art related to the present application, and is only used to illustrate and facilitate the understanding of the application content of the present application, and should not be understood as the applicant's explicit recognition or presumption that the present application is the prior art on the filing date of the first application.

[0003] When the working end of the scanning pen scans the text on books, newspapers or even packaging and other media, through the built-in optical character recognition module, the text can be recognized, stored, edited and other operations, which is very convenient in the scene of court records, student learning, travel translation and the like. SUMMARY

[0004] The scanning mode judgment method, judgment system, electronic device and readable storage medium of the scanning pen provided by the embodiments of the present application can solve the problem of low recognition accuracy of the scanning pen in the prior art, thereby greatly improving the accuracy of text recognition.

[0005] The embodiment of the first aspect of the present application provides a scanning mode judgment method of a scanning pen, comprising the following steps:

[0006] Listening to whether the scanning pen is pressed;

[0007] If the scanning pen is pressed, controlling the camera of the scanning pen to take a picture to generate a picture;

[0008] Analyzing the image information in the picture to generate text information;

[0009] Judging whether the picture contains multiple lines of text according to the text information;

[0010] If it is judged that multiple lines of text are contained, the scanning pen automatically enters a multiple-line scanning mode;

[0011] If it is judged that single-line text is contained, the scanning pen automatically enters a single-line scanning mode;

[0012] When the scanning pen ends being pressed, controlling the camera to end taking pictures.

[0013] In some embodiments, judging whether the picture contains multiple lines of text according to the text information specifically comprises the following steps:

[0014] Analyzing the text information in the picture to generate multiple lines of text;

[0015] Judging the completeness of each line of text;

[0016] If the completeness of the multiple lines of text is greater than the preset value, it is determined that the multiple lines of text are included.

[0017] If the completeness of only one line of text is greater than the preset value, it is determined that the single line of text is included.

[0018] In some embodiments, the preset value is that the completeness of the text is greater than 95%.

[0019] In some embodiments, the multiple-line scanning mode includes the following steps:

[0020] performing OCR processing on the picture to generate a multiple-line text field;

[0021] concatenating the first and last of the multiple-line text field to generate a complete text field, and taking the complete text field as the output text content.

[0022] In some embodiments, the single-line scanning mode includes the following steps:

[0023] performing OCR processing on the picture to generate a text field;

[0024] taking the line of text closest to the center line of the picture as the output text content.

[0025] Embodiments of the second aspect of the present application provide a scanning mode judgment system of a scanning pen, which includes: a listening module, configured to listen to whether the scanning pen is pressed and send a listening signal; a photographing module, configured to control the camera of the scanning pen to start photographing or end photographing according to the listening signal; an analysis module, configured to analyze image information in a picture and generate a text signal; a judgment module, configured to judge whether multiple lines of text are included in the picture according to the text information and send a judgment signal; and an execution module, configured to control the scanning pen to enter a multiple-line scanning mode or a single-line scanning mode according to the judgment signal.

[0026] In some embodiments, the judgment module includes: an analysis unit, configured to analyze text information in a picture to generate multiple lines of text; and a judgment unit, configured to judge the completeness of each line of text and judge whether multiple lines of text are included in the picture according to the completeness of the text.

[0027] In some embodiments, the execution module includes: a processing unit, configured to perform OCR processing on a picture to generate a multiple-line text field; a concatenation unit, configured to concatenate the first and last of the multiple-line text field to generate a complete text field, and take the complete text field as the output text content; and a recognition unit, configured to take the line of text closest to the center line of the picture as the output text content.

[0028] The embodiment of the third aspect of the present application provides an electronic device, which comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the scanning mode judgment method of any of the scanning pens when executing the computer program.

[0029] The embodiment of the fourth aspect of the present application provides a non-transitory computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the scanning mode judgment method of any of the scanning pens.

[0030] The above technical solution of the present application has the following advantages: text information is generated according to image information in an image, then whether the image contains multiple lines of text is judged according to the text information, and the scanning pen automatically enters a multi-line scanning mode or a single-line scanning mode, compared with the existing solution, the scanning pen can automatically judge the scanning intention of a user, and automatically adjust to enter the multi-line scanning mode or the single-line scanning mode, so as to accurately identify the text in the image, thereby improving the text recognition efficiency.

[0031] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present application.

[0032] Additional aspects and advantages of the present application will become apparent from the following description, or will be learned by practice of the present application. BRIEF DESCRIPTION OF DRAWINGS

[0033] The above and / or additional aspects and advantages of the present application will become apparent and be readily understood from the following description, taken in conjunction with the accompanying drawings, in which:

[0034] Figure 1 A flow chart of the first embodiment of the scanning mode judgment method of the scanning pen of the present application;

[0035] Figure 2 A flow chart of the second embodiment of the scanning mode judgment method of the scanning pen of the present application;

[0036] Figure 3 A flow chart of the third embodiment of the scanning mode judgment method of the scanning pen of the present application;

[0037] Figure 4 A structural schematic diagram of the scanning mode judgment system of the scanning pen of the present application;

[0038] Figure 5 A structural schematic diagram of the judgment module of the present application;

[0039] Figure 6 A structural schematic diagram of the execution module of the present application;

[0040] Figure 7 A structural schematic diagram of an electronic device described in the present application.

[0041] wherein, Figures 1 to 5 The correspondence between the reference signs and the component names in the accompanying drawings is as follows:

[0042] 1000, identification system; 100, monitoring module; 200, analysis module; 300, judgment module, 301, analysis unit; 302, judgment unit; 400, execution module; 401, processing unit; 402, splicing unit; 403, identification unit; 10, processor; 20, signal interface; 30, memory; 40, communication bus. DETAILED DESCRIPTION

[0043] In order to enable a more clear understanding of the above-mentioned purposes, features and advantages of the present application, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be noted that the embodiments of the present application and the features in the embodiments can be combined with each other without conflict.

[0044] In the following description, many specific details are set forth in order to provide a thorough understanding of the present application, however, the present application can also be implemented in other ways different from those described herein, therefore, the scope of protection of the present application is not limited by the specific embodiments disclosed below.

[0045] The following discussion provides a number of embodiments of the present application. Although each embodiment represents a single combination of the application, different embodiments of the present application can be replaced or combined, and therefore the present application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes A, B, and C, and another embodiment includes a combination of B and D, the present application should also be considered to include embodiments containing one or more of all other possible combinations of A, B, C, and D, although the embodiment may not be explicitly described in the following content.

[0046] Figure 1 A flowchart of a first embodiment of a scanning mode judgment method of a scanning pen described in the present application.

[0047] As Figure 1 shown, the scanning mode judgment method of the scanning pen provided by the embodiment of the first aspect of the present application includes the following steps:

[0048] Step S10, monitoring whether the scanning pen is pressed.

[0049] Step S20, if the scanning pen is pressed, controlling the camera of the scanning pen to take a picture to generate a picture.

[0050] Step S30, analyzing the image information in the picture to generate text information.

[0051] Step S40: Determine whether the image contains multiple lines of text based on the text information.

[0052] Figure 2 This is a flowchart of a second embodiment of the scanning mode determination method for the scanning pen described in this application. Figure 2 As shown, in one embodiment of this application, step S40 specifically includes the following steps:

[0053] Step S41: Analyze the text information in the image to generate multi-line text.

[0054] Step S42: Determine the completeness of each line of text.

[0055] Step S43: If the completeness of the multi-line text is greater than the preset value, then it is determined that the text contains multiple lines.

[0056] Step S44: If the completeness of only one line of text is greater than the preset value, then it is determined that it contains a single line of text.

[0057] In one embodiment of this application, the preset value is that the integrity of the text is greater than 95%.

[0058] The above method can accurately determine the number of lines of text in an image, and then automatically adjust to enter multi-line scanning mode or single-line scanning mode to accurately recognize the text in the image, thereby improving the text recognition efficiency.

[0059] In step S50, if it is determined that the text contains multiple lines, the scanning pen will automatically enter the multi-line scanning mode.

[0060] Figure 3 This is a flowchart of a third embodiment of the scanning mode determination method for the scanning pen described in this application. Figure 3 As shown, in one embodiment of this application, step S50 includes the following steps:

[0061] Step S51: Perform OCR (Optical Character Recognition) processing on the image to generate multi-line text fields.

[0062] Step S52: Concatenate the first and last lines of the multi-line text field to generate a complete text field, and use the complete text field as the output text content.

[0063] The above method allows for the complete input of multiple lines of text, making it convenient for users to read.

[0064] In step S60, if it is determined that the text is a single line, the scanning pen will automatically enter the single-line scanning mode.

[0065] Continue to refer to Figure 3In an embodiment of the present application, step S60 comprises the following steps:

[0066] As shown in FIG. 6, step S61 comprises the following steps: Figure 3

[0067] Step S62 comprises the following steps:

[0068] The above method can completely input the content of a single line of text, so as to facilitate the user to read.

[0069] Step S70 comprises the following steps:

[0070] The scanning mode judgment method provided by the present application can generate text information according to image information in an image, and then judge whether the image contains multiple lines of text according to the text information, and automatically enter a multiple-line scanning mode or a single-line scanning mode. Compared with the prior art, the scanning mode judgment method can automatically judge the scanning intention of the user, and automatically adjust to enter the multiple-line scanning mode or the single-line scanning mode, so as to accurately recognize the text in the image, thereby improving the text recognition efficiency.

[0071] Figure 4 FIG. 1 is a structural schematic diagram of a scanning mode judgment system of a scanning pen according to the present application.

[0072] As shown in FIG. 10, the scanning mode judgment system 1000 of the scanning pen according to the second aspect of the present application comprises a listening module 100, a photographing module, an analysis module 200, a judgment module 300, and an execution module 400. Figure 4 The listening module 100 is configured to listen to whether the scanning pen is pressed, and send a listening signal.

[0073] The photographing module is configured to control the camera of the scanning pen to start photographing or end photographing according to the listening signal.

[0074] The analysis module 200 is configured to analyze image information in the image, and generate a text signal.

[0075] The judgment module 300 is configured to judge whether the image contains multiple lines of text according to the text information, and send a judgment signal.

[0076] The execution module 400 is configured to control the scanning pen to enter a multiple-line scanning mode or a single-line scanning mode according to the judgment signal.

[0077]

[0078] ​​The recognition system 1000 provided in the application, the analysis module 200 generates text information according to image information in the image, the judgment module 300 judges whether the picture contains multiple lines of text according to the text information, and the execution module 400 controls the scanning pen to automatically enter the multi-line scanning mode or the single-line scanning mode. Compared with the prior art, the user's scanning intention can be automatically judged, so that the multi-line scanning mode or the single-line scanning mode is automatically adjusted to enter, so that the text in the picture can be accurately recognized, and the text recognition efficiency is improved.

[0079] Figure 5 The structure diagram of the judgment module is described in the application.

[0080] As Figure 5 shown, in an embodiment of the application, the judgment module 300 includes an analysis unit 301 and a judgment unit 302.

[0081] The analysis unit 301 is used to analyze the text information in the picture to generate multiple lines of text.

[0082] The judgment unit 302 is used to judge the completeness of each line of text, and judge whether the picture contains multiple lines of text according to the completeness of the text.

[0083] The above-mentioned judgment module 300 can accurately judge the number of lines of text in the picture, so as to automatically adjust to enter the multi-line scanning mode or the single-line scanning mode, accurately recognize the text in the picture, and improve the text recognition efficiency.

[0084] Figure 6 The structure diagram of the execution module is described in the application.

[0085] As Figure 6 shown, in an embodiment of the application, the execution module 400 includes a processing unit 401, a splicing unit 402 and an identification unit 403.

[0086] The processing unit 401 is used for performing OCR processing on the picture to generate a multi-line text field.

[0087] The splicing unit 402 is used for splicing the first and last of the multi-line text field to generate a complete text field, and taking the complete text field as the output text content.

[0088] The identification unit 403 is used for taking the line of text field closest to the center line of the picture as the output text content.

[0089] The above-mentioned method can completely input the content of multiple lines of text or single line of text, so as to facilitate the user to read.

[0090] Figure 7 The structure diagram of the electronic device is described in the application. The scanning pen provided in the third aspect of the embodiment of the application includes the above-mentioned recognition system.

[0091] As Figure 7 The electronic device provided by the embodiment of the fourth aspect of the application can include a processor 10, a communications interface 20, a memory 30 and a communications bus 40, wherein the processor 10, the communications interface 20 and the memory 30 complete mutual communication through the communications bus 40. The processor 10 can invoke the logical instructions in the memory 30 to execute the control method of the scanning pen, which includes: listening to whether the scanning pen is pressed; if the scanning pen is pressed, controlling the camera of the scanning pen to take a picture to generate a picture; analyzing the image information in the picture to generate text information; judging whether the picture contains multiple lines of text according to the text information; if it is judged that the picture contains multiple lines of text, the scanning pen automatically enters a multiple-line scanning mode; if it is judged that the picture contains a single line of text, the scanning pen automatically enters a single-line scanning mode; and when the scanning pen ends being pressed, controlling the camera to end taking pictures.

[0092] In addition, the logical instructions in the memory 30 described above can be implemented in the form of a software functional unit and sold or used as an independent product, and can be stored in a computer-readable storage medium. Based on such understanding, the technical solutions of the application or parts of the technical solutions that essentially contribute to the prior art or parts of the technical solutions can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes a plurality of instructions for causing a computer device (which can be a personal computer, a server or a network device, etc.) to execute all or part of the steps of the embodiments of the method of the application. The aforementioned storage medium includes a U disk, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a magnetic disk or an optical disk and various media that can store program codes.

[0093] On the other hand, the embodiment of the application also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute the control method of the scanning pen provided by the above-mentioned method embodiments, which includes: listening to whether the scanning pen is pressed. If the scanning pen is pressed, controlling the camera of the scanning pen to take a picture to generate a picture. Adding a time stamp on each picture. The function of the time stamp is to determine the time distribution of the front-end picture taking. Listening to whether the scanning pen ends being pressed. If the scanning pen ends being pressed, controlling the camera to end taking pictures. Judging the action type of the scanning pen according to the picture and the time stamp. Performing corresponding operations according to the action type.

[0094] In yet another aspect, the embodiments of the present application also provide a non-transitory computer readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the control method of the scanning pen provided by the above-mentioned embodiments, and the method comprises: listening whether the scanning pen is pressed; if the scanning pen is pressed, controlling the camera of the scanning pen to take a picture to generate a picture; analyzing image information in the picture to generate text information; judging whether the picture contains multiple lines of text according to the text information; if it is judged that the picture contains multiple lines of text, the scanning pen automatically enters a multiple-line scanning mode; if it is judged that the picture contains a single line of text, the scanning pen automatically enters a single-line scanning mode; and when the scanning pen is ended to be pressed, controlling the camera to end taking pictures.

[0095] The device embodiments described above are only schematic, wherein the units shown as separate components can or can not be physically separate, and the components shown as units can or can not be physical units, i.e., can be located in one place or distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the embodiments. Those skilled in the art can understand and implement without creative labor.

[0096] Through the above description of the embodiments, those skilled in the art can clearly understand that the embodiments can be realized by means of software plus necessary universal hardware platforms, and of course, can also be realized by hardware. Based on such understanding, the above technical solutions can be embodied in the form of software products, which can be stored in a computer readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and include a number of instructions to make a computer device (which can be a personal computer, a server, or a network device, etc.) execute the methods described in each embodiment or some parts of the embodiments.

[0097] Finally, it should be noted that: the above embodiments are only used to illustrate the technical solutions of the present application, and not to limit them; although the present application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: it can still modify the technical solutions recorded in the foregoing embodiments, or make equivalent replacement to some technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for determining the scanning mode of a scanning pen, characterized in that, Includes the following steps: S10, monitor whether the scanning pen is pressed; S20, if the scanning pen is pressed, control the scanning pen's camera to take a picture and generate an image; Add a timestamp to each image; the purpose of the timestamp is to determine the time distribution of image retrieval by the front end. Monitor whether the scanning pen has stopped being pressed; if the scanning pen has stopped being pressed, control the camera to stop taking pictures; Determine the type of scanning pen action based on the image and timestamp; In order to perform the corresponding operation according to the action type; S30, Analyze the image information in the image to generate text information; S40, determine whether an image contains multiple lines of text based on text information; specifically including the following steps: S41, Analyze the text information in the image to generate multi-line text; S42, determine the completeness of each line of text; S43, if the completeness of the multi-line text is greater than the preset value, then it is determined that the text contains multiple lines; S44, if only one line of text has a completeness greater than the preset value, then it is determined that it contains a single line of text; In order to accurately determine the number of lines of text in an image, the system automatically adjusts to enter multi-line scanning mode or single-line scanning mode to accurately recognize the text in the image, thereby improving the text recognition efficiency. S50: If the scanner determines that the text contains multiple lines, it will automatically enter the multi-line scanning mode. In step S50, the scanning pen automatically enters the multi-line scanning mode, including the following steps: S51, perform OCR processing on the image to generate multi-line text fields; S52 concatenates the beginning and end of the multi-line text field to generate a complete text field, and uses the complete text field as the output text content; so that the content of the multi-line text can be completely entered for easy reading by the user; S60: If the scanner detects that a single line of text is present, the scanner will automatically enter single-line scanning mode. In step S60, the scanning pen automatically enters single-line scanning mode, including the following steps: S61, Perform OCR processing on the image to generate text fields; S62, the line of text closest to the center line of the image is used as the output text content; This allows for the complete input of single-line text, making it easier for users to read; On the S70, when the scanning pen is pressed, the camera stops taking pictures.

2. The scanning mode determination method for a scanning pen according to claim 1, characterized in that, The preset value is that the integrity of the text is greater than 95%.

3. An electronic device, characterized in that, It includes 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 scanning mode determination method of the scanning pen as described in any one of claims 1-2.

4. A non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the scanning mode determination method of the scanning pen as described in any one of claims 1-2.

Citation Information

Patent Citations

  • Scanning mode switching method based on entry equipment and entry equipment

    CN103019834A

  • Question identification method and device, equipment and medium

    CN113205091A