Electronic pen scanning method and apparatus, electronic pen, and storage medium

CN116959005BActive Publication Date: 2026-08-21GUANGDONG XIAOTIANCAI TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202210396343.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-15
Publication Date
2026-08-21
Estimated Expiration
2042-04-15

AI Technical Summary

Technical Problem

[0004]有鉴于此,本申请实施例提供了电子笔扫描方法、装置、电子笔及存储介质,以解决现有技术中如何提高电子笔扫描结果的准确性的问题

Benefits of technology

[0029]本申请实施例与现有技术相比存在的有益效果是:本申请实施例中,获取电子笔的扫描状态,该电子笔的扫描状态包括电子笔的扫描速度和扫描角度;之后,当确定电子笔的扫描状态属于异常扫描状态时,发出用于提示用户调整该电子笔的扫描状态的提示信息。其中,该异常扫描状态包括电子笔的扫描速度超出目标扫描速度范围。由于目标扫描速度范围是根据当前电子笔的扫描角度而确定的在当前扫描角度下合适的扫描速度范围,因此能够根据当前电子笔的扫描角度准确定地约束当前电子笔的扫描速度,在该扫描速度超出目标扫描速度范围时,通过发出提示信息以及时提醒用户调整电子笔的扫描状态,从而有效地指导用户正确地使用电子笔进行文本扫描,提高电子笔扫描识别的准确性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116959005B_ABST
    Figure CN116959005B_ABST
Patent Text Reader

Abstract

The application is suitable for the field of electronic technology, and provides an electronic pen scanning method and device, an electronic pen and a storage medium. The method comprises the following steps: acquiring a scanning state of an electronic pen, wherein the scanning state of the electronic pen comprises a scanning speed and a scanning angle of the electronic pen; if the scanning state of the electronic pen belongs to an abnormal scanning state, issuing a prompt information; the prompt information is used for prompting a user to adjust the scanning state of the electronic pen; wherein the abnormal scanning state comprises that the scanning speed exceeds a target scanning speed range, and the target scanning speed range is a scanning speed range determined according to the scanning angle. The application can improve the accuracy of electronic pen scanning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of electronic technology, and in particular relates to an electronic pen scanning method, device, electronic pen and storage medium. Background Technology

[0002] An electronic pen is a device that can scan printed text using scanning technology and then convert it into corresponding electronic text, audio content, or translated content using Optical Character Recognition (OCR) technology.

[0003] However, when using electronic pens to scan printed text, users often make mistakes due to incorrect usage habits, resulting in improper scanning and thus lower accuracy of the scan results. Summary of the Invention

[0004] In view of this, embodiments of this application provide an electronic pen scanning method, apparatus, electronic pen, and storage medium to solve the problem of how to improve the accuracy of electronic pen scanning results in the prior art.

[0005] The first aspect of this application provides an electronic pen scanning method, including:

[0006] The scanning status of the electronic pen is obtained, wherein the scanning status of the electronic pen includes the scanning speed and scanning angle of the electronic pen;

[0007] If the scanning state of the electronic pen is in an abnormal scanning state, a prompt message will be issued; the prompt message is used to prompt the user to adjust the scanning state of the electronic pen; wherein, the abnormal scanning state includes the scanning speed exceeding the target scanning speed range, the target scanning speed range being the scanning speed range determined according to the scanning angle.

[0008] Optionally, the step of issuing a prompt message if the scanning state of the electronic pen is in an abnormal scanning state further includes:

[0009] If the scanning angle of the electronic pen exceeds the preset target scanning angle range, a prompt message will be issued to remind the user to adjust the scanning angle of the electronic pen.

[0010] Optionally, the scanning state of the electronic pen also includes the offset between the scanning direction of the electronic pen and the text direction. The step of issuing a prompt message if the scanning state of the electronic pen is an abnormal scanning state also includes:

[0011] If the offset exceeds a preset offset threshold, a prompt message is issued to remind the user to adjust the scanning direction of the electronic pen.

[0012] Optionally, the scanning status of the electronic pen also includes the condition of the electronic pen's lens. Correspondingly, the step of issuing a prompt message if the electronic pen's scanning status is an abnormal scanning status also includes:

[0013] If the lens of the electronic pen is dirty, a prompt message will be issued to remind the user to clean the lens of the electronic pen.

[0014] Optionally, if the lens is dirty, the electronic pen's lens is dirty, and a prompt message is issued to remind the user to clean the electronic pen's lens, including:

[0015] Obtain a preset number of scanned images obtained by scanning with the electronic pen;

[0016] If the preset number of scanned images contain target areas with identical pixel values, or if the first target image obtained by stitching together the preset number of scanned images contains lines with a length exceeding a preset length, then it is determined that the lens of the electronic pen has a dirty area, and a prompt message is issued to remind the user to clean the lens of the electronic pen.

[0017] Optionally, after issuing the prompt message to remind the user to clean the lens of the electronic pen, the method further includes:

[0018] Based on the preset number of frame images, locate the dirty area of ​​the lens of the electronic pen;

[0019] Based on the location of the dirty area and the preset number of frame images, a second target image that does not contain the dirty area is stitched together;

[0020] Based on the second target image, determine the text scanning result.

[0021] Optionally, the notification message includes:

[0022] The prompt message may be emitted through audio playback, information display, and / or electronic pen vibration.

[0023] A second aspect of this application provides an electronic pen scanning device, comprising:

[0024] An acquisition unit is used to acquire the scanning state of an electronic pen, wherein the scanning state of the electronic pen includes the scanning speed and scanning angle of the electronic pen;

[0025] The prompting unit is used to issue a prompt message if the scanning state of the electronic pen is in an abnormal scanning state; the prompt message is used to prompt the user to adjust the scanning state of the electronic pen; wherein, the abnormal scanning state includes the scanning speed exceeding the target scanning speed range, and the target scanning speed range is a scanning speed range determined according to the scanning angle.

[0026] A third aspect of this application provides an electronic pen, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic pen performs the steps of the electronic pen scanning method described above.

[0027] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes an electronic pen to perform the steps of the electronic pen scanning method.

[0028] The fifth aspect of this application provides a computer program product that, when run on an electronic pen, causes the electronic pen to perform the electronic pen scanning method described in any one of the first aspects.

[0029] The beneficial effects of this application embodiment compared with the prior art are as follows: In this application embodiment, the scanning state of the electronic pen is acquired, including the scanning speed and scanning angle of the electronic pen; then, when it is determined that the scanning state of the electronic pen is an abnormal scanning state, a prompt message is issued to prompt the user to adjust the scanning state of the electronic pen. The abnormal scanning state includes the electronic pen's scanning speed exceeding the target scanning speed range. Since the target scanning speed range is a suitable scanning speed range determined based on the current scanning angle of the electronic pen, the scanning speed of the current electronic pen can be accurately constrained according to the current scanning angle. When the scanning speed exceeds the target scanning speed range, a prompt message is issued to promptly remind the user to adjust the scanning state of the electronic pen, thereby effectively guiding the user to correctly use the electronic pen for text scanning and improving the accuracy of electronic pen scanning and recognition. Attached Figure Description

[0030] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below.

[0031] Figure 1 This is a schematic diagram illustrating the implementation process of an electronic pen scanning method provided in an embodiment of this application;

[0032] Figure 2This is a schematic diagram of an electronic pen scanning device provided in an embodiment of this application;

[0033] Figure 3 This is a schematic diagram of the electronic pen provided in an embodiment of this application. Detailed Implementation

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

[0035] To illustrate the technical solution described in this application, specific embodiments are provided below.

[0036] It should be understood that, when used in this specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or collections thereof.

[0037] It should also be understood that the terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the scope of the application. As used in this specification and the appended claims, the singular forms “a,” “an,” and “the” are intended to include the plural forms unless the context clearly indicates otherwise.

[0038] It should also be further understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0039] As used in this specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrases "if determined" or "if [described condition or event] is detected" may be interpreted, depending on the context, as "once determined," "in response to determination," "once [described condition or event] is detected," or "in response to detection of [described condition or event]."

[0040] Furthermore, in the description of this application, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0041] Currently, when using electronic pens to scan printed text, users often make mistakes due to incorrect usage habits, resulting in improper scanning and thus low accuracy of the scan results.

[0042] To address the aforementioned technical problems, embodiments of this application provide an electronic pen scanning method, apparatus, electronic pen, and storage medium, comprising: acquiring the scanning state of the electronic pen, wherein the scanning state of the electronic pen includes the scanning speed and scanning angle of the electronic pen; if the scanning state of the electronic pen is an abnormal scanning state, issuing a prompt message; the prompt message is used to prompt the user to adjust the scanning state of the electronic pen; wherein the abnormal scanning state includes the scanning speed exceeding a target scanning speed range, the target scanning speed range being a scanning speed range determined based on the scanning angle.

[0043] Since the target scanning speed range is determined based on the current scanning angle of the electronic pen, the scanning speed of the current electronic pen can be accurately constrained according to the current scanning angle. When the scanning speed exceeds the target scanning speed range, a prompt message is issued to remind the user to adjust the scanning state of the electronic pen in a timely manner, thereby effectively guiding the user to use the electronic pen correctly for text scanning and improving the accuracy of electronic pen scanning and recognition.

[0044] In this embodiment, the electronic pen can also be called a scanning pen. In some embodiments, the electronic pen can specifically be a translation pen, which scans and acquires the original text content of the printed text, and then translates the original text content into corresponding translated text content using pre-installed translation software. In other embodiments, the electronic pen can specifically be a reading pen, which, after acquiring the original text content of the printed text, can output the original text content and / or translated text content corresponding to the printed text as audio playback through a pre-installed audio module.

[0045] Example 1:

[0046] Figure 1 A flowchart illustrating an electronic pen scanning method according to an embodiment of this application is shown below:

[0047] In S101, the scanning state of the electronic pen is acquired, wherein the scanning state of the electronic pen includes the scanning speed and scanning angle of the electronic pen.

[0048] In this embodiment of the application, when it is detected that a user is using an electronic pen to scan text, the scanning status of the electronic pen is obtained. For example, if the electronic pen is detected to be powered on and in motion, or if a temperature sensor or infrared sensor detects that the user is holding the electronic pen, it is determined that the user is currently using the electronic pen to scan text.

[0049] In this application embodiment, the scanning state of the electronic pen includes at least the scanning speed and scanning angle. In some embodiments, this scanning state can be acquired by a sensor disposed on the electronic pen.

[0050] The current scan speed can be obtained using any of the following methods:

[0051] (1) Determine the scanning speed based on the scanning displacement and scanning time.

[0052] The electronic pen has a position sensor inside. When the electronic pen is scanning text, the position sensor measures the displacement of the electronic pen, and the scanning speed is obtained by removing the position and taking the scanning time.

[0053] (2) Determine the scanning speed based on the rotation data of the pen tip roller and the scanning time.

[0054] The electronic pen has a roller at the tip. When the electronic pen is scanning text, the displacement of the electronic pen is determined based on the rotation data of the roller (number of rotations, circumference). Then, this displacement is removed and the scanning time is used to obtain the scanning speed.

[0055] (3) Determine the scanning speed based on the acceleration of the electronic pen and the scanning time.

[0056] The electronic pen is equipped with an accelerometer. When the electronic pen is scanning text, the accelerometer measures the acceleration of the pen and determines the current scanning speed based on the acceleration and the scanning time.

[0057] The current scanning angle can be determined by an angle sensor or calculated based on data obtained from accelerometers such as two-axis or six-axis accelerometers.

[0058] In S102, if the scanning state of the electronic pen is in an abnormal scanning state, a prompt message is issued; the prompt message is used to prompt the user to adjust the scanning state of the electronic pen; wherein, the abnormal scanning state includes the scanning speed exceeding the target scanning speed range, and the target scanning speed range is the scanning speed range determined according to the scanning angle.

[0059] In this embodiment, after acquiring the scanning status of the electronic pen, if it is determined that the scanning status is abnormal, a prompt message is issued. This prompt message can promptly remind the user to adjust the scanning status of the electronic pen by adjusting the pen's movement speed, pen grip angle, etc.

[0060] The abnormal scanning state in this application embodiment includes at least the situation where the current scanning speed of the electronic pen exceeds the target scanning speed range. The target scanning speed range is a scanning speed range determined based on the current scanning angle. The target scanning speed range includes a fastest scanning speed threshold and a slowest scanning speed threshold. If the current scanning speed is greater than the fastest scanning speed threshold or less than the slowest scanning speed threshold, then it is determined that the current scanning speed exceeds the target scanning speed range.

[0061] In this embodiment, after executing step S101, the scanning angle of the electronic pen can be obtained to determine the current target scanning speed range. In one embodiment, the electronic pen pre-stores a mapping relationship between the scanning angle and the scanning speed range, which can be stored using a mapping formula or a mapping table. After obtaining the current scanning angle, the mapping relationship is queried to determine the scanning speed range corresponding to the current scanning angle as the current target scanning speed range. In another embodiment, a fastest scanning speed threshold can be determined based on the relationship between the current scanning angle and a preset optimal scanning angle. The target scanning speed range is then determined based on this fastest scanning speed threshold. The closer the scanning angle is to the preset optimal scanning angle, the larger the corresponding fastest scanning speed threshold. That is, even with a better scanning angle, appropriately increasing the scanning speed can still ensure the accuracy of the electronic pen scanning. For example, if the difference between the current scanning angle and the optimal scanning angle is greater than the preset threshold, the current target scanning speed is determined to be 5 cm / s; if the difference between the current scanning angle and the optimal scanning angle is less than or equal to the preset threshold, the current target scanning speed is determined to be 7 cm / s.

[0062] In this embodiment, since the target scanning speed range is determined based on the current scanning angle of the electronic pen, the scanning speed of the current electronic pen can be accurately constrained according to the current scanning angle. When the scanning speed exceeds the target scanning speed range, a prompt message is issued to remind the user to adjust the scanning state of the electronic pen in a timely manner, thereby effectively guiding the user to use the electronic pen correctly for text scanning and improving the accuracy of electronic pen scanning and recognition.

[0063] Optionally, if the scanning state of the electronic pen is in an abnormal scanning state, a prompt message is issued, including:

[0064] If the scanning speed of the electronic pen exceeds the target scanning speed range, a prompt message will be issued to the user to adjust the scanning speed of the electronic pen.

[0065] In this embodiment, when the current scanning speed of the electronic pen is detected to exceed the target scanning speed range, the specific prompt message is a prompt message to remind the user to adjust the scanning speed of the electronic pen. In one embodiment, if the scanning speed of the electronic pen exceeds the target scanning speed range specifically means that the scanning speed of the electronic pen is less than the slowest scanning speed threshold of the target scanning speed range, then the current prompt message specifically includes information to remind the user to increase the scanning speed. In another embodiment, if the scanning speed of the electronic pen exceeds the target scanning speed range specifically means that the scanning speed of the electronic pen is greater than the fastest scanning speed threshold of the target scanning speed range, then the current prompt message specifically includes information to remind the user to decrease the scanning speed.

[0066] In this embodiment, when the abnormal scanning state specifically means that the scanning speed exceeds the target scanning speed range, a prompt message can be issued to accurately instruct the user to adjust the current scanning speed of the electronic pen. Therefore, the user can accurately adjust the scanning state of the electronic pen, ensuring the accuracy of subsequent electronic pen scanning and recognition.

[0067] Optionally, the step of issuing a prompt message if the scanning state of the electronic pen is in an abnormal scanning state further includes:

[0068] If the scanning angle of the electronic pen exceeds the preset target scanning angle range, a prompt message will be issued to remind the user to adjust the scanning angle of the electronic pen.

[0069] In this embodiment, the abnormal scanning state also includes the scanning angle of the electronic pen exceeding a preset target scanning angle range. When it is determined that the scanning angle obtained in step S101 exceeds the preset target scanning angle range, a prompt message is issued to the user prompting the user to adjust the current scanning angle of the electronic pen. In one embodiment, the prompt message includes information indicating the direction of angle adjustment (e.g., tilting to the upper right).

[0070] In this embodiment, in addition to constraining the scanning speed of the electronic pen, the scanning angle is further constrained and prompted by the target scanning angle range, thus further ensuring the accuracy of the electronic pen scanning.

[0071] Optionally, the scanning state of the electronic pen also includes the offset between the scanning direction of the electronic pen and the text direction. The step of issuing a prompt message if the scanning state of the electronic pen is an abnormal scanning state also includes:

[0072] If the offset exceeds a preset offset threshold, a prompt message is issued to remind the user to adjust the scanning direction of the electronic pen.

[0073] In this embodiment, the scanning state of the electronic pen also includes the offset between the scanning direction and the text direction. The scanning direction can be determined by fitting a scanning trajectory based on data collected by a position sensor and / or accelerometer located inside the electronic pen. The text direction can be determined based on the paper orientation of the currently printed text or the pose of the text box in the scanned image obtained by the electronic pen. Specifically, the offset can be the angular difference between the scanning direction and the text direction, or the positional deviation between the end of the scan in the scanning direction and the coordinates of the last character in the text direction.

[0074] Correspondingly, the abnormal scanning state in this embodiment also includes the offset of the scanning direction of the electronic pen from the text direction being greater than a preset offset threshold. When it is determined that the current offset is greater than the offset threshold, a prompt message is issued to prompt the user to adjust the scanning direction of the electronic pen. In one embodiment, the prompt message may include a prompt message prompting the user to adjust the scanning direction of the electronic pen to be parallel to the direction of the text on the paper. For example, the electronic pen may carry a light emitting device, and the electronic pen may emit a ray displayed on the paper, instructing the user to scan and move in the direction of the ray.

[0075] In this embodiment, since the scanning status of the electronic pen includes not only the scanning speed and scanning angle, but also the offset between the scanning direction and the text direction, the current scanning direction can be constrained and prompted by a preset offset threshold, which can further ensure the accuracy of electronic pen scanning.

[0076] Optionally, the scanning status of the electronic pen also includes the condition of the electronic pen's lens. Correspondingly, the step of issuing a prompt message if the electronic pen's scanning status is an abnormal scanning status also includes:

[0077] If the lens of the electronic pen is dirty, a prompt message will be issued to remind the user to clean the lens of the electronic pen.

[0078] In this embodiment, the scanning state of the electronic pen further includes the condition of the pen's lens, specifically the condition of the lens located at the end of the pen used to capture the text image of the currently scanned text. The current condition of the electronic pen's lens can be determined using a preset optical detection algorithm or a scanned image dirt recognition algorithm.

[0079] Correspondingly, the abnormal scanning state in this application embodiment also includes the presence of dirt on the lens of the electronic pen. When it is determined that the lens of the electronic pen is dirty based on the current state of lens dirt, it indicates that the dirt may affect the scanning results of the electronic pen, and a prompt message is issued to remind the user to clean the lens of the electronic pen.

[0080] In this embodiment, when the electronic pen scans text, it further obtains information about the dirt status of the electronic pen's lens. When the electronic pen's lens is dirty, it issues a prompt message to remind the user to clean the electronic pen's lens, thereby enabling timely cleaning of the electronic pen's lens and reducing the impact of dirt on the electronic pen's scanning results.

[0081] Optionally, if the lens is dirty, the electronic pen's lens is dirty, and a prompt message is issued to remind the user to clean the electronic pen's lens, including:

[0082] Obtain a preset number of scanned images obtained by scanning with the electronic pen;

[0083] If the preset number of scanned images contain target areas with identical pixel values, or if the first target image obtained by stitching together the preset number of scanned images contains lines with a length exceeding a preset length, then it is determined that the lens of the electronic pen has a dirty area, and a prompt message is issued to remind the user to clean the lens of the electronic pen.

[0084] In this embodiment of the application, during electronic pen scanning, a preset number of scan images are acquired at preset time intervals or in real time to detect whether there is dirt on the lens.

[0085] When the lens is dirty, due to the obstruction of the dirty area, at the same position in the preset number of scanned images obtained by the electronic pen, there exists an area with completely identical pixel values ​​(called the target area). The pixel values ​​of this target area are usually close to gray or black (i.e., the color of the dirty object). In the first target image obtained by stitching together these preset number of scanned images, there exists a continuous line with uniform pixel values ​​formed by the stitching of the target area. Therefore, when a target area with completely identical pixel values ​​is detected in the preset number of scanned images, or when a line with a length exceeding a preset length is detected in the first target image obtained by stitching together these preset number of scanned images, it can be determined that the target area or line is an interference to the scanned image caused by the dirt on the electronic pen's lens. Therefore, it can be determined that the electronic pen's lens has a dirty area. After determining that the electronic pen's lens has a dirty area, a prompt message can be issued to remind the user to clean the electronic pen's lens.

[0086] Optionally, after issuing the prompt message to remind the user to clean the lens of the electronic pen, the method further includes:

[0087] Based on the preset number of frame images, locate the dirty area of ​​the lens of the electronic pen;

[0088] Based on the location of the dirty area and the preset number of frame images, a second target image that does not contain the dirty area is stitched together;

[0089] Based on the second target image, determine the text scanning result.

[0090] In this embodiment of the application, after issuing a prompt message to the user to clean the lens of the electronic pen, the coordinates of the target area on the lens of the electronic pen can be determined according to the pixel coordinates of the target area in the image in a preset number of frames and the preset mapping relationship, so as to obtain the location of the dirty area of ​​the lens of the electronic pen.

[0091] After locating the dirty area of ​​the electronic pen's lens, based on the location of the dirty area and a preset number of frames, a preset stitching algorithm is used to avoid the image position corresponding to the dirty area when stitching the images, thus obtaining a second target image that does not contain the dirty area.

[0092] Then, based on the text information displayed in the second target image obtained by stitching, which does not contain dirty areas, the current text scanning result is determined.

[0093] In one embodiment, if the size of the dirty area is less than or equal to a preset size (meaning the current dirty area will not completely obstruct the lens's field of view, preventing text scanning and recognition), the text scanning result can be determined based on a second target image that does not contain the dirty area, obtained through the aforementioned stitching process. However, if the size of the dirty area is greater than the preset size, it indicates that the current dirty area will completely prevent text scanning and recognition. In this case, a preset prompt message is sent to the user, advising them to visit a specialized electronic pen repair and maintenance shop for lens cleaning. In one embodiment, the preset prompt message may include the location and telephone number of the nearest electronic pen repair and maintenance shop.

[0094] In this embodiment, even in the case of lens contamination, a second target image that does not contain contamination areas can be obtained by locating and stitching the contamination areas, and the text scanning result can be determined based on the second target image. Therefore, the flexibility and accuracy of electronic pen scanning can be further improved.

[0095] Optionally, the notification message includes:

[0096] The prompt message may be emitted through audio playback, information display, and / or electronic pen vibration.

[0097] In this embodiment, the method of issuing a prompt message may include any one or more of the following: audio playback, image display, and electronic pen vibration. Specifically, the electronic pen may play the audio corresponding to the prompt message through a preset audio module; display the text or image of the prompt message through the electronic pen's display screen; or vibrate the electronic pen through its vibration module.

[0098] In this embodiment, various prompting methods can flexibly prompt users to adjust the scanning state of the electronic pen, thereby improving the scanning accuracy of the electronic pen and enhancing the user experience.

[0099] Optionally, after issuing the prompt message, the following may also be included:

[0100] After a preset time interval, the update scan status of the electronic pen is obtained;

[0101] If the updated scan status is a preset correct scan status, then a preset feedback message is sent to the user, which is used to prompt the user that the current scan is correct.

[0102] In this embodiment of the application, after issuing the prompt message, the scanning status of the electronic pen is retrieved again after a preset time interval to obtain the updated scanning status of the electronic pen.

[0103] If it is determined that the updated scan status is a preset correct scan status, such as the updated scan speed is within the target scan speed range, the scan angle is within the target scan angle, the offset in the scan direction is less than the offset threshold, or the lens dirt has been cleaned, a preset feedback message is sent to the user to indicate that the current scan status is correct and the user can continue with subsequent text scanning.

[0104] In this embodiment of the application, timely feedback information enables users to know whether the adjusted electronic pen scanning status is correct, thereby improving the user experience.

[0105] Optionally, the method further includes:

[0106] Acquire the scanned image obtained by the electronic pen;

[0107] The scanned image is adjusted according to the scanning angle to obtain the target image;

[0108] Based on the target image and the preset text recognition algorithm, the text scanning result is obtained.

[0109] In this embodiment of the application, when the scanning state of the electronic pen is a non-abnormal scanning state and the scanning angle of the electronic pen deviates from the optimal scanning angle, the scanned image scanned by the electronic pen can be obtained first.

[0110] Then, based on the deviation between the current scanning angle and the optimal scanning angle, the scanned image is adjusted to obtain the target image. For example, a text box in the scanned image can be located. Then, based on the deviation between the current scanning angle and the optimal scanning angle, a preset coordinate mapping formula is determined. According to this coordinate mapping formula, the image is mapped to a preset reference coordinate system to obtain the target image.

[0111] Then, the target image is subjected to text recognition using a preset text recognition algorithm to obtain the corresponding text scanning results.

[0112] In this embodiment, since the scanned image can be adjusted based on the scanning angle when the electronic pen performs text scanning and recognition, and the target image is obtained before text recognition, the final text scanning result is more accurate, thus improving the accuracy of electronic pen scanning and recognition.

[0113] It should be understood that the sequence number of each step in the above embodiments does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.

[0114] Example 2:

[0115] Figure 2 The diagram shows a schematic representation of an electronic pen scanning device according to an embodiment of this application. For ease of explanation, only the parts relevant to the embodiment of this application are shown:

[0116] The electronic pen scanning device includes: an acquisition unit 21 and a prompting unit 22. Wherein:

[0117] The acquisition unit 21 is used to acquire the scanning state of the electronic pen, wherein the scanning state of the electronic pen includes the scanning speed and scanning angle of the electronic pen.

[0118] The prompting unit 22 is used to issue a prompt message if the scanning state of the electronic pen is in an abnormal scanning state; the prompt message is used to prompt the user to adjust the scanning state of the electronic pen; wherein, the abnormal scanning state includes the scanning speed exceeding the target scanning speed range, and the target scanning speed range is a scanning speed range determined according to the scanning angle.

[0119] Optionally, the prompting unit 22 further includes:

[0120] The first prompting module is used to issue a prompt message to the user to adjust the scanning angle of the electronic pen if the scanning angle of the electronic pen exceeds the preset target scanning angle range.

[0121] Optionally, the scanning state of the electronic pen also includes the offset between the scanning direction of the electronic pen and the text direction, and the prompting unit 22 further includes:

[0122] The second prompting module is used to issue a prompt message to the user to adjust the scanning direction of the electronic pen if the offset exceeds a preset offset threshold.

[0123] Optionally, the scanning status of the electronic pen also includes the condition of the electronic pen's lens being dirty, and the prompting unit 22 further includes:

[0124] If the lens of the electronic pen is dirty, a prompt message will be issued to remind the user to clean the lens of the electronic pen.

[0125] Optionally, the electronic pen scanning device further includes:

[0126] A dirt recognition unit is used to acquire a preset number of scanned images obtained by the electronic pen.

[0127] If the preset number of scanned images contain target areas with identical pixel values, or if the first target image obtained by stitching together the preset number of scanned images contains lines with a length exceeding a preset length, then it is determined that the lens of the electronic pen has a dirty area, and a prompt message is issued to remind the user to clean the lens of the electronic pen.

[0128] Optionally, the electronic pen scanning device further includes:

[0129] The stitching unit is used to locate the dirty area of ​​the lens of the electronic pen according to the preset number of frame images; stitch together the dirty area and the preset number of frame images to obtain a second target image that does not contain the dirty area; and determine the text scanning result according to the second target image.

[0130] Optionally, the prompting unit 22 may specifically issue the prompting information through audio playback, information display, and / or electronic pen vibration.

[0131] It should be noted that the information interaction and execution process between the above-mentioned devices / units are based on the same concept as the method embodiments of this application. For details on their specific functions and technical effects, please refer to the method embodiments section, and they will not be repeated here.

[0132] Example 3:

[0133] Figure 3 This is a schematic diagram of an electronic pen provided in one embodiment of this application. Figure 3As shown, the electronic pen 3 in this embodiment includes: a processor 30, a memory 31, and a computer program 32 stored in the memory 31 and executable on the processor 30, such as an electronic pen scanning program. When the processor 30 executes the computer program 32, it implements the steps in the various electronic pen scanning method embodiments described above, for example... Figure 1 The steps S101 to S102 are shown. Alternatively, when the processor 30 executes the computer program 32, it implements the functions of each module / unit in the above-described device embodiments, for example... Figure 2 The functions of the acquisition unit 21 to the prompting unit 22 are shown.

[0134] For example, the computer program 32 can be divided into one or more modules / units, which are stored in the memory 31 and executed by the processor 30 to complete this application. The one or more modules / units can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program 32 in the electronic pen 3. For example, the computer program 32 can be divided into an acquisition unit and a prompting unit, with the specific functions of each unit as follows:

[0135] An acquisition unit is used to acquire the scanning state of an electronic pen, wherein the scanning state of the electronic pen includes the scanning speed and scanning angle of the electronic pen;

[0136] The prompting unit is used to issue a prompt message if the scanning state of the electronic pen is in an abnormal scanning state; the prompt message is used to prompt the user to adjust the scanning state of the electronic pen; wherein, the abnormal scanning state includes the scanning speed exceeding the target scanning speed range, and the target scanning speed range is a scanning speed range determined according to the scanning angle.

[0137] The electronic pen may include, but is not limited to, a processor 30 and a memory 31. Those skilled in the art will understand that... Figure 3 This is merely an example of the electronic pen 3 and does not constitute a limitation on the electronic pen 3. It may include more or fewer components than shown, or combine certain components, or different components. For example, the electronic pen may also include input / output devices, network access devices, buses, etc.

[0138] The processor 30 may be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0139] The memory 31 can be an internal storage unit of the electronic pen 3, such as a hard drive or memory of the electronic pen 3. The memory 31 can also be an external storage device of the electronic pen 3, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, or Flash Card equipped on the electronic pen 3. Furthermore, the memory 31 can include both internal storage units and external storage devices of the electronic pen 3. The memory 31 is used to store the computer program and other programs and data required by the electronic pen. The memory 31 can also be used to temporarily store data that has been output or will be output.

[0140] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0141] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0142] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0143] In the embodiments provided in this application, it should be understood that the disclosed device / electronic pen and method can be implemented in other ways. For example, the device / electronic pen embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

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

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

[0146] If the integrated module / unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0147] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this application, and should all be included within the protection scope of this application.

Claims

1. An electronic pen scanning method, characterized in that, include: The scanning status of the electronic pen is obtained, wherein the scanning status of the electronic pen includes the scanning speed and scanning angle of the electronic pen; If the scanning state of the electronic pen is in an abnormal scanning state, a prompt message is issued. The prompt message is used to prompt the user to adjust the scanning state of the electronic pen. The abnormal scanning state includes the scanning speed exceeding the target scanning speed range. The target scanning speed range is a scanning speed range determined based on the scanning angle, used to accurately constrain the current scanning speed of the electronic pen according to the current scanning angle. The target scanning speed range includes a fastest scanning speed threshold and a slowest scanning speed threshold. If the current scanning speed is greater than the fastest scanning speed threshold or less than the slowest scanning speed threshold, it is determined that the current scanning speed exceeds the target scanning speed range. The method further includes: Acquire the scanned image obtained by the electronic pen; When the electronic pen is in a non-abnormal scanning state and there is a certain deviation between the scanning angle of the electronic pen and the optimal scanning angle, the scanned image is adjusted according to the deviation between the current scanning angle and the optimal scanning angle to obtain the target image. Based on the target image and the preset text recognition algorithm, the text scanning result is obtained.

2. The electronic pen scanning method as described in claim 1, characterized in that, The step of issuing a prompt message if the scanning state of the electronic pen is in an abnormal scanning state also includes: If the scanning angle of the electronic pen exceeds the preset target scanning angle range, a prompt message will be issued to remind the user to adjust the scanning angle of the electronic pen.

3. The electronic pen scanning method as described in claim 1, characterized in that, The scanning status of the electronic pen also includes the offset between the scanning direction of the electronic pen and the text direction. If the scanning status of the electronic pen is an abnormal scanning status, a prompt message is issued, which also includes: If the offset exceeds a preset offset threshold, a prompt message is issued to remind the user to adjust the scanning direction of the electronic pen.

4. The electronic pen scanning method as described in claim 1, characterized in that, The scanning status of the electronic pen also includes the condition of the electronic pen's lens. Correspondingly, if the scanning status of the electronic pen is an abnormal scanning status, the step of issuing a prompt message also includes: If the lens of the electronic pen is dirty, a prompt message will be issued to remind the user to clean the lens of the electronic pen.

5. The electronic pen scanning method as described in claim 4, characterized in that, If the lens is dirty, the electronic pen's lens will be prompted to clean the lens, including: Obtain a preset number of scanned images obtained by scanning with the electronic pen; If the preset number of scanned images contain target areas with identical pixel values, or if the first target image obtained by stitching together the preset number of scanned images contains lines with a length exceeding a preset length, then it is determined that the lens of the electronic pen has a dirty area, and a prompt message is issued to remind the user to clean the lens of the electronic pen.

6. The electronic pen scanning method as described in claim 5, characterized in that, After issuing the prompt message to remind the user to clean the lens of the electronic pen, the method further includes: Based on the preset number of scanned images, locate the dirty area of ​​the lens of the electronic pen; Based on the location of the dirty area and the preset number of scanned images, a second target image that does not contain the dirty area is stitched together. Based on the second target image, determine the text scanning result.

7. The electronic pen scanning method according to any one of claims 1 to 6, characterized in that, The notification message includes: The prompt message may be emitted through audio playback, information display, and / or electronic pen vibration.

8. An electronic pen scanning device, characterized in that, include: An acquisition unit is used to acquire the scanning state of an electronic pen, wherein the scanning state of the electronic pen includes the scanning speed and scanning angle of the electronic pen; A prompting unit is configured to issue a prompt message if the scanning state of the electronic pen is in an abnormal scanning state; the prompt message is used to prompt the user to adjust the scanning state of the electronic pen; wherein, the abnormal scanning state includes the scanning speed exceeding the target scanning speed range, the target scanning speed range being a scanning speed range determined based on the scanning angle, used to accurately constrain the current scanning speed of the electronic pen according to the current scanning angle of the electronic pen; wherein, the target scanning speed range includes a fastest scanning speed threshold and a slowest scanning speed threshold, if the current scanning speed is greater than the fastest scanning speed threshold or less than the slowest scanning speed threshold, it is determined that the current scanning speed exceeds the target scanning speed range; The electronic pen scanning device also includes: Acquire the scanned image obtained by the electronic pen; When the electronic pen is in a non-abnormal scanning state and there is a certain deviation between the scanning angle of the electronic pen and the optimal scanning angle, the scanned image is adjusted according to the deviation between the current scanning angle and the optimal scanning angle to obtain the target image. Based on the target image and the preset text recognition algorithm, the text scanning result is obtained.

9. An electronic pen, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it causes the electronic pen to perform the steps of the method as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it causes the electronic pen to perform the steps of the method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Information processing method and electronic pen

    CN104345917A

  • Scanning control system and method of scanning pen

    CN113065542A

  • Lens exception processing method, mobile terminal and storage medium

    CN113573046A