[go: up one dir, main page]

CN114445821A - Method for judging scanning end of scanning pen and scanning pen - Google Patents

Method for judging scanning end of scanning pen and scanning pen Download PDF

Info

Publication number
CN114445821A
CN114445821A CN202210052260.8A CN202210052260A CN114445821A CN 114445821 A CN114445821 A CN 114445821A CN 202210052260 A CN202210052260 A CN 202210052260A CN 114445821 A CN114445821 A CN 114445821A
Authority
CN
China
Prior art keywords
scanning
pen
picture
scanning pen
finished
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210052260.8A
Other languages
Chinese (zh)
Inventor
贾志强
俞晓君
韦克礼
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Guangnian Infinite Technology Co ltd
Original Assignee
Beijing Guangnian Infinite Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Guangnian Infinite Technology Co ltd filed Critical Beijing Guangnian Infinite Technology Co ltd
Priority to CN202210052260.8A priority Critical patent/CN114445821A/en
Publication of CN114445821A publication Critical patent/CN114445821A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Character Input (AREA)
  • Position Input By Displaying (AREA)

Abstract

The invention relates to a method for judging scanning end of a scanning pen and the scanning pen, comprising the following steps: when detecting that the pen head of the scanning pen is pressed down, generating a scanning trigger signal; controlling a camera in the scanning pen to start to collect pictures of a scanned medium in response to receiving a scanning trigger signal; judging whether the scanning of the scanning pen is finished or not, and generating a scanning finishing signal; controlling the scanning pen to stop collecting the image of the scanning medium in response to receiving a scanning end signal; and splicing the collected pictures to identify the text to be inquired. The invention improves the accuracy of judging the scanning end of the scanning pen and can solve the problem of picture splicing error caused by inaccurate judgment of the scanning end in the prior art.

Description

Method for judging scanning end of scanning pen and scanning pen
Technical Field
The invention relates to the technical field of scanning pens, in particular to a method for judging the end of a scanning pen and the scanning pen.
Background
The description of the background of the invention pertaining to the present invention is intended only for the purpose of illustration and for the purpose of facilitating an understanding of the summary of the invention, and should not be taken as an admission or admission that the applicant is aware of or is aware of the prior art at the date of filing this application as first filed.
The scanning pen is a handheld electronic device, and a user can scan and input characters or images by holding the scanning pen with the left hand or the right hand. The traditional scanning pen or dictionary pen usually needs to press the pen head for a long time, so that the pen head starts to move from the first letter or word of a text to be queried on a scanning medium, images on the surface of the text are sequentially collected until the pen head moves past the last letter or word of the text to be queried, the scanning of the scanning pen is finished, and then a plurality of sequentially collected images are spliced and identified through an image processing technology so as to identify the complete text to be queried and perform operations such as translation and the like.
In the prior art, the scanning end of the scanning pen is judged based on the level change of the microswitch, and when the scanning end is judged, because the scanning pen has a very fast acquisition frame rate in scanning, a plurality of fuzzy pictures containing characters participate in image splicing at the moment of pen lifting, so that the final possible splicing error is caused. Therefore, a solution for determining the scanning end of the scanning pen is needed to improve the accuracy of the scanning.
Disclosure of Invention
The invention mainly aims to provide a method for judging scanning end of a scanning pen and the scanning pen, and aims to solve the problem of picture splicing error caused by inaccurate judgment of scanning end in the prior art.
In order to solve the above problems, the present invention provides a method for determining the scanning end of a scanning pen, which is characterized by comprising the following steps:
when the pen head of the scanning pen is pressed down, generating a scanning trigger signal;
controlling a camera in the scanning pen to start to collect pictures of a scanned medium in response to receiving a scanning trigger signal;
judging whether scanning of the scanning pen is finished, calculating the angle of each collected picture according to the installation angle of the camera in the scanning pen, and calculating the angle of the scanning pen at the current moment according to the picture;
judging whether the angle of the scanning pen exceeds a set threshold value or not, if so, judging that the picture is invalid, judging that the scanning of the scanning pen is finished, and generating a scanning finishing signal;
and controlling the scanning pen to stop acquiring the image of the scanning medium in response to receiving the scanning end signal.
Further, before the scanning of the scanning pen is finished, judging whether invalid pictures continuously appear in a certain number or not, and if so, judging that the scanning of the scanning pen is finished;
preferably, the angle of the scanning pen is the included angle between the scanning pen and the scanning medium, and the set threshold is 70-90 degrees
Further, the step of judging whether the scanning by the scanning pen is finished may further be: whether scanning of the scanning pen is finished or not is judged according to the change of the pen point of the scanning pen, and the method specifically comprises the following steps: and detecting whether the pen point mold in the picture changes or not, and if the pen point mold in the picture changes back and forth in position, judging that the scanning of the scanning pen is finished.
Further, the step of judging whether the scanning by the scanning pen is finished may further be: whether the scanning of the pen is finished or not is judged according to the change of a light supplement lamp of the pen, which specifically comprises the following steps: and detecting whether the light supplement lamp of the scanning pen is turned off, if so, judging that the scanning pen is lifted, and finishing scanning of the scanning pen.
Further, the step of judging whether the scanning by the scanning pen is finished may further be: : and detecting whether the picture is repeated, and if the picture repetition times exceed a certain threshold value, judging that the scanning of the scanning pen is finished.
Further, the normalization processing is performed on the acquired picture, and specifically includes: and after the angle of each collected picture is calculated, correcting the obliquely shot picture according to the result calibrated by the camera to obtain a normalized picture.
Further, the method for judging the scanning end of the scanning pen further includes: and splicing the collected pictures to identify the text to be inquired.
Further, the step of splicing the collected pictures and identifying the text to be queried specifically includes the following steps: detecting whether the picture contains effective texts, and if the picture does not detect that the effective texts exist, discarding the picture; if the effective text is detected to exist in the picture, the picture is kept; and splicing the reserved pictures to identify the text to be inquired.
The invention also provides a scanning pen, which is characterized in that the method for judging the scanning end of the scanning pen is used.
The invention has the following beneficial effects: the method for judging the scanning end of the scanning pen and the scanning pen are provided, the accuracy of judging the scanning end of the scanning pen is improved, and the problem of picture splicing errors caused by inaccurate judgment of the scanning end in the prior art can be solved.
Drawings
In order to more clearly illustrate the technical solution of the present invention, the drawings used in the description of the embodiments will be briefly described as follows:
fig. 1 is a flowchart illustrating a method for determining an end of a scanning process of a scanning pen according to a first embodiment of the present invention.
Fig. 2 shows a first embodiment of determining the scanning end of the scanning pen according to the present invention.
Fig. 3 shows a second embodiment of the present invention for determining the scanning end of the scanning pen.
Fig. 4 shows a third embodiment of determining the scanning end of the scanning pen according to the present invention.
Fig. 5 shows a fourth embodiment of determining the scanning end of the scanning pen according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
In the following description, the terms "first" and "second" are used for descriptive purposes only and are not to be construed as implying relative importance.
The following description provides embodiments of the invention, which may be combined with or substituted for various embodiments, and the invention is thus to be construed as embracing all possible combinations of the same and/or different embodiments described. Thus, if one embodiment includes feature A, B, C and another embodiment includes feature B, D, then the invention should also be construed as including embodiments that include A, B, C, D in all other possible combinations, even though such embodiments may not be explicitly recited in the following text.
Example one
Fig. 1 is a flowchart illustrating a method for determining an end of a scanning process of a scanning pen according to a first embodiment of the present invention.
As shown in fig. 1, a method for determining the scanning end of a scanning pen according to the present invention is characterized by comprising the following steps:
step S101, when detecting that the pen head of the scanning pen is pressed down, generating a scanning trigger signal;
step S102, in response to receiving a scanning trigger signal, controlling a camera in the scanning pen to start to collect pictures of a scanned medium;
step S103, judging whether the scanning of the scanning pen is finished or not, and generating a scanning finishing signal;
and step S104, controlling the scanning pen to stop collecting the pictures of the scanned medium in response to receiving the scanning end signal.
Specifically, in step S103, it is determined whether the scanning by the scanning pen is finished, and a first embodiment of generating a scanning end signal is shown in fig. 2.
Step S201, calculating the angle of each collected picture 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 picture;
step S204, judging whether the angle of the scanning pen exceeds a set threshold value;
step S205, if the picture exceeds the preset threshold value, the picture is judged to be invalid;
in step S207, the scanning end of the scanning pen is determined, and a scanning end signal is generated.
Further, between the step S201 and the step S203, a step S202 is further included, in which normalization processing is performed on the acquired picture, specifically including: and after the angle of each collected picture is calculated, correcting the obliquely shot picture according to the result calibrated by the camera to obtain a normalized picture.
Further, between the step S205 and the step S207, a step S206 is further included, which determines whether invalid pictures continuously appear more than a certain number, and if so, determines that the scanning of the scanning pen is finished; the certain number can be determined according to the acquisition frequency of the scanning pen camera and the use requirement of a user.
Preferably, in step S204, the angle of the scanning pen is an included angle between the scanning pen and the scanning medium, and the set threshold is 70 ° to 90 °. And (3) determining that the scanning is finished when the included angle between the scanning pen and the paper is within a normal use range of 70-90 degrees and is not within a support range if the included angle is 70 degrees.
Specifically, in the step S103, the second embodiment of determining whether the scanning of the scanning pen is finished and generating a scanning end signal determines whether the scanning of the scanning pen is finished according to the variation of the pen point of the scanning pen, as shown in fig. 3:
step S301, detecting whether the pen point mold in the picture changes;
step S302, if the front and back change of the position of the pen point mold in the picture is detected, the scanning end of the scanning pen is judged, and a scanning end signal is generated.
Specifically, in the third embodiment of the step S103, determining whether the scanning by the scanning pen is finished and generating a scanning end signal, determining whether the scanning by the scanning pen is finished according to a change of a light supplement lamp of the scanning pen, as shown in fig. 4:
step S401, detecting whether the light supplement lamp of the scanning pen is turned off;
in step S402, if yes, the scanning pen is lifted, the scanning of the scanning pen is finished, and a scanning end signal is generated.
Specifically, in the fourth embodiment, in step S103, it is determined whether the scanning by the scanning pen is finished and a scanning end signal is generated, and it is determined whether the scanning by the scanning pen is finished according to whether the picture is sufficient, as shown in fig. 5:
step S501, detecting whether the pictures are repeated;
step S502, if the picture repetition times exceeds a certain threshold, judging that the scanning of the scanning pen is finished, and generating a scanning end signal.
Further, the method for judging the scanning end of the scanning pen further includes step S105 of splicing the collected pictures to identify the text to be queried.
Further, the step S105 specifically includes the following steps: detecting whether the picture contains effective texts, and if the picture does not detect that the effective texts exist, discarding the picture; if the effective text is detected to exist in the picture, the picture is kept; and splicing the reserved pictures to identify the text to be inquired.
Further, in step 103, the means for determining the scanning end of the scanning pen may be one or more of the combinations listed above.
The invention also provides a scanning pen, which is characterized in that the method for judging the scanning end of the scanning pen is used.
The present invention also provides a computer readable storage medium, on which a computer program is stored, which when executed by a processor implements the steps of the above method for determining the scanning end of a scanning pen. The computer-readable storage medium may include, but is not limited to, any type of disk including floppy disks, optical disks, DVD, CD-ROMs, microdrive, 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 media or device suitable for storing instructions and/or data.
The invention also provides computer equipment which comprises a memory, a processor and a computer program which is stored on the memory and can run on the processor, and is characterized in that the steps of the method for judging the scanning end of the scanning pen are realized when the processor executes the program. In the embodiment of the present invention, the processor is a control center of a computer system, and may be a processor of a physical machine or a processor of a virtual machine.
The foregoing description is only exemplary of the preferred embodiments of the invention and is not intended to limit the invention in any way as to its nature or form. Although the present invention has been described with reference to the preferred embodiments, it will be understood by those skilled in the art that various changes and modifications may be made without departing from the spirit and scope of the invention. However, any simple modification, equivalent replacement, improvement and the like of the above embodiments according to the technical spirit of the present invention should be included in the protection scope of the present invention without departing from the spirit and principle of the present invention.

Claims (10)

1. A method for judging the scanning end of a scanning pen is characterized by comprising the following steps:
step S101, when detecting that the pen head of the scanning pen is pressed down, generating a scanning trigger signal;
step S102, in response to receiving a scanning trigger signal, controlling a camera in the scanning pen to start to collect pictures of a scanned medium;
step S103, judging whether the scanning of the scanning pen is finished or not, and generating a scanning finishing signal;
step S104, in response to receiving a scanning end signal, controlling the scanning pen to stop collecting the picture of the scanning medium;
the step S103 specifically includes:
step S201, calculating the angle of each collected picture 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 picture;
step S204, judging whether the angle of the scanning pen exceeds a set threshold value;
step S205, if the picture exceeds the preset threshold value, the picture is judged to be invalid;
in step S207, the scanning end of the scanning pen is determined, and a scanning end signal is generated.
2. The method of claim 1, wherein: between the step S205 and the step S207, a step S206 is further included, in which whether invalid pictures continuously appear more than a certain number is determined, and if yes, the scanning of the scanning pen is determined to be finished; the certain number is determined according to the acquisition frequency of the scanning pen camera or the use requirement of a user.
3. The method according to claim 1, wherein in step S204, the angle of the scanning pen is an included angle between the scanning pen and the scanning medium, and the set threshold is 700-900
4. The method of claim 1, wherein the step S103 of determining whether the scanning by the scanning pen is finished and generating the scanning end signal further comprises:
step S301, detecting whether the pen point mold in the picture changes;
step S302, if the front and back change of the position of the pen point mold in the picture is detected, the scanning end of the scanning pen is judged, and a scanning end signal is generated.
5. The method of claim 1, wherein the step S103 of determining whether the scanning by the scanning pen is finished and generating the scanning end signal further comprises:
step S401, detecting whether the light supplement lamp of the scanning pen is turned off;
in step S402, if yes, the scanning pen is lifted, the scanning of the scanning pen is finished, and a scanning end signal is generated.
6. The method of claim 1, wherein the step S103 of determining whether the scanning by the scanning pen is finished and generating the scanning end signal further comprises:
step S501, detecting whether the pictures are repeated;
step S502, if the picture repetition times exceeds a certain threshold, judging that the scanning of the scanning pen is finished, and generating a scanning end signal.
7. The method of claim 1, further comprising, between the step S201 and the step S203, a step S202: and after the angle of each collected picture is calculated, correcting the obliquely shot picture according to the result calibrated by the camera to obtain a normalized picture.
8. The method as claimed in claim 1, wherein the method for determining the scanning end of the scanning pen further comprises step S105 of stitching the collected pictures to identify the text to be queried.
9. The method according to claim 8, wherein the step S105 specifically comprises the steps of: detecting whether the picture contains effective texts, and if the picture does not detect the existence of the effective texts, discarding the picture; if the effective text is detected to exist in the picture, the picture is reserved; and splicing the reserved pictures to identify the text to be inquired.
10. A wand adapted for use in a method of determining the end of a scan by a wand as claimed in any one of claims 1 to 9.
CN202210052260.8A 2022-01-18 2022-01-18 Method for judging scanning end of scanning pen and scanning pen Pending CN114445821A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210052260.8A CN114445821A (en) 2022-01-18 2022-01-18 Method for judging scanning end of scanning pen and scanning pen

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210052260.8A CN114445821A (en) 2022-01-18 2022-01-18 Method for judging scanning end of scanning pen and scanning pen

Publications (1)

Publication Number Publication Date
CN114445821A true CN114445821A (en) 2022-05-06

Family

ID=81367105

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210052260.8A Pending CN114445821A (en) 2022-01-18 2022-01-18 Method for judging scanning end of scanning pen and scanning pen

Country Status (1)

Country Link
CN (1) CN114445821A (en)

Similar Documents

Publication Publication Date Title
CN108734089B (en) Method, device, equipment and storage medium for identifying table content in picture file
CN109685055B (en) Method and device for detecting text area in image
CN111950463B (en) Scanning method, scanning device, scanning pen and storage medium
US8340426B2 (en) Apparatus and method for recognizing characters
EP1826720A1 (en) Image processing apparatus and method, computer program, and storage medium
JP2014071698A (en) Image processing apparatus and image processing method
WO2009094446A1 (en) Method and apparatus for cropping images
JP2008192032A (en) Document processing device, document processing method, and program
CN108734161B (en) Method, device and equipment for identifying prefix number area and storage medium
CN113762455A (en) Detection model training method, single character detection method, device, equipment and medium
CN110633649A (en) Mechanical diagram auditing method and device
WO2022111461A1 (en) Recognition method and apparatus, and electronic device
CN110442266B (en) Object recognition method, object recognition device, electronic equipment and storage medium
CN114445821A (en) Method for judging scanning end of scanning pen and scanning pen
EP2138959A1 (en) Word recognizing method and word recognizing program
JP5983781B2 (en) Image resolution recognition apparatus, image resolution recognition method, and image resolution recognition program
US20200296233A1 (en) Scoring apparatus and non-transitory computer readable medium
JP2014078168A (en) Character recognition apparatus and program
EP2189886A2 (en) A method and apparatus to define drafting position
KR101281805B1 (en) Method for recognizing optical mark recognition card by image process
SE516860C2 (en) Device and method of fingerprint control, by checking the features of the sub-images
CN113657366B (en) Control method, device, equipment and storage medium of scanning pen
JP6759955B2 (en) Place name extraction program, place name extraction device and place name extraction method
CN106951401B (en) Document text recognition method and device
US12231605B2 (en) Image forming apparatus and prompting method based on number of tasks to-be-processed

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination