Method for determining end of scanning by a scanning pen and scanning pen

By detecting the angle of the scanning pen, the change of the pen tip and the status of the fill light, and combining it with image processing technology, the problem of splicing errors caused by inaccurate judgment of the end of scanning is solved, and high-accuracy scanning of the scanning pen is achieved.

CN114445821BActive Publication Date: 2025-10-17BEIJING GUANGNIAN WUXIAN SCI & TECH
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210052260.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-01-18
Publication Date
2025-10-17
Estimated Expiration
2042-01-18

AI Technical Summary

Technical Problem

When the existing scanning pen determines that the scanning is finished, the camera captures the frame rate very quickly, resulting in multiple blurred images being stitched together at the moment the pen is lifted, resulting in final stitching errors.

Method used

By detecting the angle of the scanning pen, pen tip changes, fill light status and image duplication, combined with image processing technology, the scanning end is determined, and the image is normalized and valid text is detected to ensure accurate splicing.

Benefits of technology

The accuracy of the scanning pen's scanning end judgment is improved, image splicing errors are reduced, and scanning accuracy is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114445821B_ABST
    Figure CN114445821B_ABST
Patent Text Reader

Abstract

The present application relates to a kind of method and scanning pen of judging scanning pen scanning end, comprising the following steps: when detecting that scanning pen head is pressed, scanning trigger signal is generated;In response to receiving scanning trigger signal, control the camera in the scanning pen starts to collect the picture of scanning medium;Whether scanning pen scanning is ended is judged, and scanning end signal is generated;In response to receiving scanning end signal, control the scanning pen stops collecting the image of the scanning medium;The picture collected is spliced, and the text to be inquired is identified.The present application improves the accuracy of scanning pen scanning end judgment, and can solve the problem of picture splicing error caused by inaccurate scanning end judgment in the prior art.
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 pens, in particular to a method for determining the end of a scanning pen and a scanning pen. BACKGROUND

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

[0003] A scanning pen is a handheld electronic device, and a user can hold the scanning pen with the left hand or the right hand to realize the scanning and inputting of text or images. A conventional scanning pen or dictionary pen usually needs to press the pen head for a long time, so that the pen head moves from the first letter or word of the text to be queried on the scanning medium, and the images on the surface of the text are collected in sequence until the pen head moves over the last letter or word of the text to be queried, the scanning of the scanning pen ends, and then the multiple pictures collected in sequence are spliced and recognized by image processing technology, so as to recognize the complete text to be queried and perform translation and other operations.

[0004] The existing technology determines the end of the scanning of the scanning pen based on the level change of the microswitch. When determining the end of the scanning, since the frame rate of the camera is extremely fast when the scanning pen is scanning, multiple fuzzy pictures containing text are involved in image splicing at the moment of lifting the pen, which may cause the final splicing error. Therefore, there is an urgent need for a scheme for determining the end of the scanning of the scanning pen to improve the accuracy of the scanning. SUMMARY

[0005] The main purpose of the present application is to provide a method for determining the end of the scanning of a scanning pen and a scanning pen, which aims to solve the problem of image splicing error caused by inaccurate determination of the end of the scanning in the prior art.

[0006] In view of the above problems, the present application provides a method for determining the end of the scanning of a scanning pen, characterized in that it comprises the following steps:

[0007] When it is detected that the pen head of the scanning pen is pressed down, a scanning trigger signal is generated;

[0008] In response to receiving the scanning trigger signal, a camera in the scanning pen is controlled to start collecting pictures of the scanning medium;

[0009] It is determined whether the scanning of the scanning pen is ended, the angle of each picture collected is calculated according to the installation angle of the camera in the scanning pen, and the angle of the scanning pen at the current moment is calculated according to the picture;

[0010] Determine whether the angle of the scanning pen exceeds a set threshold. If so, determine that the image is invalid, determine that the scanning pen has finished scanning, and generate a scanning end signal;

[0011] In response to receiving the scanning end signal, the scanning pen is controlled to stop capturing the image of the scanning medium.

[0012] Furthermore, before determining that the scanning pen has finished scanning, it also includes determining whether invalid images appear continuously for more than a certain number, and if so, determining that the scanning pen has finished scanning;

[0013] Preferably, the angle of the scanning pen is the angle between the scanning pen and the scanning medium, and the threshold value is set to 70°-90°. 。

[0014] Furthermore, the step of determining whether the scanning pen has finished scanning can also be: determining whether the scanning pen has finished scanning based on the change of the scanning pen tip, specifically: detecting whether the pen tip mold in the picture has changed, and if it is detected that the pen tip mold in the picture has changed in position, then determining that the scanning pen has finished scanning.

[0015] Furthermore, the step of determining whether the scanning pen has finished scanning can also be: determining whether the scanning pen has finished scanning based on changes in the scanning pen's fill light, specifically: detecting whether the scanning pen's fill light is turned off, and if so, determining that the scanning pen is lifted and the scanning pen has finished scanning.

[0016] Furthermore, the step of determining whether the scanning of the scanner pen is finished may also include: detecting whether the image is repeated, and if the number of repetitions of the image exceeds a certain threshold, determining that the scanning of the scanner pen is finished.

[0017] Furthermore, the collected images are normalized, specifically including: calculating the angle of each collected image, and correcting the obliquely taken images according to the camera calibration results to obtain normalized images.

[0018] Furthermore, the method for determining whether scanning by the scanning pen is completed also includes: splicing the collected images to identify the text to be queried.

[0019] Furthermore, the splicing of the collected images and identifying the text to be queried specifically includes the following steps: detecting whether the image contains valid text, and if no valid text is detected in the image, discarding the image; if valid text is detected in the image, retaining the image; and splicing the retained images to identify the text to be queried.

[0020] The application further provides a scanning pen characterized by using the method for judging the end of scanning of the scanning pen.

[0021] The application has the beneficial effects of providing a method for judging the end of scanning of a scanning pen and a scanning pen, improving the accuracy of judging the end of scanning of the scanning pen, and solving the problem of picture splicing error caused by inaccurate judgment of the end of scanning in the prior art. BRIEF DESCRIPTION OF DRAWINGS

[0022] In order to more clearly illustrate the technical solutions of the application, the drawings needed in the following embodiment description will be briefly introduced as follows:

[0023] Figure 1 A flow chart of a method for judging the end of scanning of a scanning pen according to the first embodiment of the application is shown.

[0024] Figure 2 A first implementation of the method for judging the end of scanning of a scanning pen according to the application is shown.

[0025] Figure 3 A second implementation of the method for judging the end of scanning of a scanning pen according to the application is shown.

[0026] Figure 4 A third implementation of the method for judging the end of scanning of a scanning pen according to the application is shown.

[0027] Figure 5 A fourth implementation of the method for judging the end of scanning of a scanning pen according to the application is shown. DETAILED DESCRIPTION

[0028] In order to make the objects, technical solutions and advantages of the application clearer, the application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application and do not limit the application.

[0029] In the following description, the terms "first" and "second" are only used for the purpose of description and should not be understood as implying their relative importance.

[0030] The following description provides a plurality of embodiments of the application, and different embodiments can be replaced or combined, so the application can also be considered to include all possible combinations of the same and / or different embodiments described. Thus, if one embodiment includes features A, B and C, and another embodiment includes features B and D, the application should also be considered to include one or more embodiments of all other possible combinations of A, B, C and D, even if the embodiment is not explicitly described in the following content.

[0031] Example One

[0032] Figure 1 A flow chart of a method for determining the end of scanning by a scanning pen is shown.

[0033] As shown in Figure 1 A method for determining the end of scanning by a scanning pen, comprising the following steps:

[0034] Step S101, a scanning trigger signal is generated when it is detected that the scanning pen tip is pressed;

[0035] Step S102, in response to receiving the scanning trigger signal, the camera in the scanning pen is controlled to start collecting pictures of the scanning medium;

[0036] Step S103, it is determined whether the scanning by the scanning pen is ended, and a scanning end signal is generated;

[0037] Step S104, in response to receiving the scanning end signal, the scanning pen is controlled to stop collecting pictures of the scanning medium.

[0038] Specifically, the first embodiment of the step S103, determining whether the scanning by the scanning pen is ended, and generating a scanning end signal, is shown in Figure 2

[0039] Step S201, the angle of each collected picture is calculated according to the installation angle of the camera in the scanning pen;

[0040] Step S203, the angle of the scanning pen at the current moment is calculated according to the picture;

[0041] Step S204, it is determined whether the angle of the scanning pen exceeds a set threshold value;

[0042] Step S205, if it exceeds, the picture is determined to be invalid;

[0043] Step S207, it is determined that the scanning by the scanning pen is ended, and a scanning end signal is generated.

[0044] Further, between the step S201 and the step S203, there is also a step S202, which is a normalization process of the collected picture, specifically including: after the angle of each collected picture is calculated, the pictures taken obliquely are corrected according to the results of camera calibration to obtain normalized pictures.

[0045] ​Further, between the step S205 and the step S207, there is further included a step S206 of judging whether the invalid pictures continuously appear more than a certain number, and if so, judging that the scanning pen scanning is ended; the certain number can be determined according to the collection frequency of the scanning pen camera, or can be determined according to the use demand of the user.

[0046] Preferably, in the step S204, the angle of the scanning pen is the included angle between the scanning pen and the scanning medium, and the set threshold value is 70°-90°. The included angle between the scanning pen and the paper is normally used in the range of 70-90 degrees, and if <=70 degrees, it is considered to be out of the support range and is determined to be the scanning end.

[0047] Specifically, the second implementation of the step S103 of judging whether the scanning pen scanning is ended and generating the scanning end signal is to judge whether the scanning pen scanning is ended according to the change of the pen head of the scanning pen, as shown in the following table: Figure 3

[0048] The step S301 is to detect whether the pen head mold in the picture changes;

[0049] The step S302 is to judge that the scanning pen scanning is ended and generate the scanning end signal if it is detected that the pen head mold in the picture changes in position.

[0050] Specifically, the third implementation of the step S103 of judging whether the scanning pen scanning is ended and generating the scanning end signal is to judge whether the scanning pen scanning is ended according to the change of the light compensation lamp of the scanning pen, as shown in the following table: Figure 4

[0051] The step S401 is to detect whether the light compensation lamp of the scanning pen is turned off;

[0052] The step S402 is to determine that the scanning pen is lifted up if so, and the scanning pen scanning is ended and the scanning end signal is generated.

[0053] Specifically, the fourth implementation of the step S103 of judging whether the scanning pen scanning is ended and generating the scanning end signal is to judge whether the scanning pen scanning is ended according to whether the picture is sufficient, as shown in the following table: Figure 5

[0054] The step S501 is to detect whether the picture is repeated;

[0055] The step S502 is to judge that the scanning pen scanning is ended and generate the scanning end signal if the repetition number of the picture exceeds a certain threshold value.

[0056] Further, the method of judging whether the scanning pen scanning is ended further includes a step S105 of splicing the collected pictures to identify the text to be queried.​​​

[0057] Further, the step S105 specifically comprises the following steps: detecting whether the picture contains valid text, if no valid text is detected in the picture, discarding the picture; if valid text is detected in the picture, keeping the picture; and splicing the kept picture to identify the text to be queried.

[0058] Further, the step 103, the means for judging the end of the scanning pen scanning, can be one or a combination of the above listed means.

[0059] The application also provides a scanning pen, characterized in that the scanning pen uses the method for judging the end of the scanning pen scanning.

[0060] The application also provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to implement the steps of the method for judging the end of the scanning pen scanning. The computer readable storage medium can include but is not limited to any type of disk, including floppy disks, optical disks, DVDs, CD-ROMs, micro-drives, and magneto-optical disks, ROMs, RAMs, EPROMs, EEPROMs, DRAMs, VRAMs, flash memory devices, magnetic or optical cards, nanosystems (including molecular memory ICs), or any type of medium or device suitable for storing instructions and / or data.

[0061] The application also provides a computer device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the program to implement the steps of the method for judging the end of the scanning pen scanning. In the embodiment of the application, the processor is the control center of the computer system, which can be the processor of a physical machine or the processor of a virtual machine.

[0062] The above introduction is only the preferred embodiment of the application, and does not limit the application in any substantial or formal way. Although the application has been disclosed as above with the preferred embodiment, it is not intended to limit the application, and those skilled in the art can make various changes and equivalent embodiments of the above disclosed technical content without departing from the scope of the technical solution of the application. Any simple modification, equivalent replacement, improvement, etc. of the above embodiment made according to the technical essence of the application without departing from the spirit and principles of the application shall be included in the protection scope of the application.

Claims

1. A method for determining when a scanning pen has finished scanning, characterized in that: The following steps are involved: Step S101, when it is detected that the tip of the scanning pen is pressed, a scanning trigger signal is generated; Step S102, in response to receiving a scan trigger signal, controlling the camera in the scanning pen to start capturing an image of the scanned medium; Step S103, determining whether the scanning pen has finished scanning and generating a scanning end signal; The step S103 is specifically as follows: Step S201, calculating the angle of each captured image according to the installation angle of the camera in the scanning pen; Step S203, calculating the angle of the scanning pen at the current moment according to the image; Step S204, determining whether the angle of the scanning pen exceeds a set range; Step S205: If the limit is exceeded, the image is determined to be invalid; Step S206, determining whether invalid images appear continuously for more than a certain number, and if so, determining that the scanning pen has ended scanning; the certain number is determined according to the acquisition frequency of the scanning pen camera, or according to the user's usage requirements; Step S207, determining whether the scanning pen has finished scanning, and generating a scanning end signal; Between step S201 and step S203, the method further includes: Step S202: After calculating the angle of each of the collected images, the oblique images are corrected according to the camera calibration results to obtain normalized images; Step S104, in response to receiving the scanning end signal, controlling the scanning pen to stop capturing the image of the scanned medium; The method for determining the end of scanning by the scanning pen further includes: Step S105: splicing the collected images to identify the text to be queried; The step S105 specifically includes the following steps: detecting whether the picture contains valid text; If no valid text is detected in the image, the image is discarded; If valid text is detected in the image, the image is retained; The retained images are spliced ​​together to identify the text to be queried.

2. The method according to claim 1, wherein in step S204, the angle of the scanning pen is the angle between the scanning pen and the scanning medium, and the setting range is 70°-90°.

3. A scanning pen, characterized in that: A method for determining the end of scanning by a scanning pen as described in any one of claims 1-2 is used.

Citation Information

Patent Citations

  • Search method and apparatus

    CN105260418A

  • Image and text scanning pen and scanning method for area-of-interest for users

    CN105893997A

  • Scanning pen control method and device, electronic equipment and storage medium

    CN111832552A