CN-121996082-A - Dictionary pen, dictionary pen control method, dictionary pen control device, storage medium and electronic equipment
Abstract
The application relates to a dictionary pen, a control method and device of the dictionary pen, a storage medium and an electronic device. The dictionary pen comprises a camera, a laser transmitter, a laser emitter and a processor, wherein the camera is arranged on one side of a pen point of the dictionary pen and is used for acquiring target images, the laser transmitter is arranged on one side of the pen point of the dictionary pen and is used for transmitting laser outwards from one side of the pen point, a first included angle exists between the transmitting angle of the laser and the central axis of the camera, the acquired target images comprise contact patterns formed by the laser irradiating an obstacle in front of the dictionary pen, and the processor is used for determining target distances between the pen point of the dictionary pen and the obstacle according to the target images and starting target functions matched with the target distances according to different target distances. The application solves the technical problems that the function of the dictionary pen can not be started or the starting efficiency is low.
Inventors
- WU WANGYANG
- GAO YANG
- WU YINGHUI
- Chai Gailan
Assignees
- 网易有道(杭州)智能科技有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20241106
Claims (10)
- 1. A dictionary pen, comprising: the camera is arranged at one side of the pen point of the dictionary pen and is used for collecting target images; the laser emitter is arranged on one side of the pen point of the dictionary pen and is used for emitting laser outwards from one side of the pen point, a first included angle exists between the emitting angle of the laser and the central axis of the camera, and the collected target image comprises a contact pattern formed by the laser irradiating on an obstacle in front of the dictionary pen; And the processor is used for determining the target distance between the pen point of the dictionary pen and the obstacle according to the target image, and starting a target function matched with the target distance according to the difference of the target distances.
- 2. The dictionary pen of claim 1, wherein the determining a target distance between the tip of the dictionary pen and the obstacle from the target image comprises: Determining a position of the contact pattern on the target image; and when the position is positioned in a target area, determining the target distance according to the position, wherein the target area is an area in the target image.
- 3. The dictionary pen of claim 2, wherein the determining the target distance from the location comprises: Determining a first distance between the contact pattern and a first fixed edge of the target image according to the position, wherein the first fixed edge is an edge determined in advance from four edges of the target image; Determining the shortest distance from a first intersection point to the first fixed edge in the target image as a second distance, wherein the first intersection point is the intersection point of the central axis and the obstacle, and determining the target distance according to the ratio of the first distance to the second distance.
- 4. A dictionary pen as claimed in claim 3, wherein the contact pattern is proximate to and does not exceed a second fixed side of the target image, which is a side adjacent to the first fixed side determined in advance from four sides of the target image, and is not coincident with the first intersection point, and the contact line is parallel to the first fixed side of the target image when the contact pattern is a line.
- 5. A dictionary pen as claimed in claim 3, wherein said determining the target distance from the ratio of the first distance to the second distance comprises: And determining the h by using an objective function of h on alpha, beta, h1, h2 and m/n, wherein the h is the target distance, the alpha is the first included angle, the beta is the second included angle, the h1 is the first height, the distance from the camera to the pen point is represented, the h2 is the second height, the distance from the second intersection point of the laser and the central axis to the pen point is represented, the m/n is the ratio, and the alpha, beta, h1 and h2 are fixed values.
- 6. The dictionary pen of claim 3, wherein determining a ratio of the first distance to the second distance comprises: identifying a first number of pixel points on a shortest path from the contact point to the first fixed edge when the contact pattern is the contact point; when the contact pattern is the contact line, identifying a first number of pixel points on a shortest path from any point on the contact line to the first fixed edge; Identifying a second number of pixel points on the shortest path from the intersection point of the central axis of the camera and the target image to the first fixed edge; a ratio of the first number to the second number is determined as a ratio of the first distance to the second distance.
- 7. A method for controlling a dictionary pen, comprising: Controlling a camera of the dictionary pen to acquire a target image, wherein the camera of the dictionary pen is arranged on one side of a pen point of the dictionary pen; Controlling a laser emitter of the dictionary pen to emit laser, wherein the laser emitter is arranged on one side of the pen point of the dictionary pen, a first included angle exists between the emitting angle of the laser and the central axis of the camera, and the collected target image comprises a contact pattern formed by the laser irradiating on an obstacle in front of the dictionary pen; And determining a target distance between the pen point of the dictionary pen and the obstacle according to the target image, and starting a target function matched with the target distance according to the difference of the target distances.
- 8. A dictionary pen control device, comprising: The first control module is used for controlling the camera of the dictionary pen to acquire a target image, wherein the camera of the dictionary pen is arranged at one side of a pen point of the dictionary pen; The second control module is used for controlling a laser emitter of the dictionary pen to emit laser, wherein the laser emitter is arranged on one side of the pen point of the dictionary pen, a first included angle exists between the emitting angle of the laser and the central axis of the camera, and the collected target image comprises a contact pattern formed by the laser irradiating on an obstacle in front of the dictionary pen; and the determining module is used for determining the target distance between the pen point of the dictionary pen and the obstacle according to the target image, and starting a target function matched with the target distance according to the difference of the target distances.
- 9. An electronic device comprising at least one communication interface, at least one bus connected to the at least one communication interface, at least one processor connected to the at least one bus, at least one memory connected to the at least one bus, wherein a computer program is stored in the memory, which processor, when executing the computer program, controls the dictionary pen of any one of claims 1 to 6 or implements the control method of the dictionary pen of claim 7.
- 10. A computer-readable storage medium storing computer-executable instructions for controlling the dictionary pen of any one of the above claims 1 to 6 of the present application or implementing the control method of the dictionary pen of claim 7.
Description
Dictionary pen, dictionary pen control method, dictionary pen control device, storage medium and electronic equipment Technical Field The present application relates to the field of electronic pens, and in particular, to a dictionary pen, a method and apparatus for controlling the dictionary pen, a storage medium, and an electronic device. Background With the development of the internet, the dictionary pens of the related art can scan text from books on a desktop or perform other functions by being held by a user. In the prior art, a retractable movable foot or a pressure sensing element on a dictionary pen is generally used for triggering the control of the timing of starting functions such as scanning. And because the dictionary pen can be knocked, dropped, and the like, the movable telescopic legs and the pressure-sensitive elements are easily damaged or the sensitivity is reduced. In this case, the activation of the function of the dictionary pen is affected. Disclosure of Invention The application provides a dictionary pen, a control method and device of the dictionary pen, a storage medium and electronic equipment, and aims to solve the technical problem that the function of the dictionary pen cannot be started or the starting efficiency is low. The application provides a dictionary pen, which comprises a camera, a laser emitter, a processor and a target function, wherein the camera is arranged on one side of a pen head of the dictionary pen and is used for collecting target images, the laser emitter is arranged on one side of the pen head of the dictionary pen and is used for emitting laser outwards from one side of the pen head, a first included angle exists between the emitting angle of the laser and the central axis of the camera, the collected target images comprise contact patterns formed by the laser irradiated on an obstacle in front of the dictionary pen, and the processor is used for determining target distances between the pen head of the dictionary pen and the obstacle according to the target images and starting the target function matched with the target distances according to the difference of the target distances. In one embodiment, the two laser transmitters are respectively positioned at two sides of the camera, the emitted laser forms the first included angle with the central axis of the camera, the emitted laser is axisymmetric with the central axis, the target distance between the pen point of the dictionary pen and the obstacle is determined according to the target image, the method comprises the steps of randomly determining one laser transmitter as a first laser transmitter from the two laser transmitters, determining a first position of a first contact pattern formed by the laser of the first laser transmitter and the obstacle on the target image, determining the target distance according to the first position when the first position is positioned in a target area, determining a second position of a second contact pattern formed by the laser of the other laser transmitter and the obstacle on the target image when the first position is positioned outside the target area, determining the abnormal contact pattern according to the second position when the second position is positioned inside the target area, and determining the abnormal contact pattern when the second position is positioned outside the target area. In one embodiment, the laser transmitters comprise two laser transmitters respectively positioned at two sides of the camera, the transmitted lasers respectively form the first included angle with the central axis of the camera, the laser transmitters are axisymmetric around the central axis, the intersection point of the laser of the two laser transmitters is arranged in the pen point, the target distance between the pen point of the dictionary pen and the obstacle is determined according to the target image, the method comprises the steps of determining the first distance between the laser transmitters and the obstacle according to the position of the contact pattern in the target image, determining the first distance between the laser transmitters and the first fixed edge of the target image, wherein the first contact pattern is formed by the laser transmitters and the obstacle, the first fixed edge is the edge determined in advance from the four edges of the target image, determining the shortest distance between the first intersection point in the target image and the first fixed edge is the second distance, determining the ratio between the first distance and the second distance between the first laser transmitters and the obstacle according to the target image, determining the second distance between the laser transmitters and the first fixed edge of the target image, and the second distance between the laser transmitters and the second fixed edge is the second fixed edge, and determining the distance between the laser transmitters and the target image is the seco