Air mouse positioning method, electronic equipment and computer readable storage medium
By obtaining the attitude change information and current position information of the aerial mouse, and performing attitude compensation and angle correction, the problem of insufficient UWB technology is solved and the accuracy of the aerial mouse positioning is improved.
Patent Information
- Application Number
- CN202411759036.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-03
- Publication Date
- 2024-12-31
AI Technical Summary
When the existing aerial mouse positioning method collects data through UWB technology, the accuracy is poor, resulting in low positioning accuracy.
By obtaining the attitude change information and current position information of the air mouse during movement, performing attitude compensation processing, determining the target spatial coordinates and target angle offset, and then correcting the projection coordinates to improve positioning accuracy.
It improves the accuracy of obtaining target spatial position of the aerial mouse and the positioning accuracy of projection coordinates, and enhances the accuracy of aerial mouse control.
Smart Images

Figure CN119225544A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of mouse positioning technology, and in particular to an air mouse positioning method, electronic equipment and a computer-readable storage medium. Background Art
[0002] Smart TV is a common household appliance. Traditional smart TVs use buttons in the remote control to control the movement of the screen cursor to select the content on the smart TV screen. As the content of smart TVs becomes more and more diverse, traditional remote controls are too cumbersome to control and are gradually replaced by air mice with more flexible control methods. The air mouse moves the cursor position on the screen by moving the spatial position to achieve the control of the air mouse. The control process of the air mouse requires accurate positioning of the cursor position.
[0003] At present, the air mouse positioning method is to obtain the cursor position on the screen through the data collected by the UWB (Ultra Wide Band) positioning device. However, the original collected data of UWB has poor accuracy, resulting in low accuracy of air mouse positioning. Summary of the invention
[0004] The main technical problem solved by the present application is to provide an air mouse positioning method, an electronic device and a computer-readable storage medium, which can improve the accuracy of positioning.
[0005] In order to solve the above technical problems, the present application provides an air mouse positioning method.
[0006] In one embodiment, an air mouse positioning method is applied to an air mouse, and the method includes: obtaining posture change information of the air mouse during movement and current position information of the air mouse, wherein the current position information includes the current spatial coordinates of the air mouse and the current projection coordinates of the air mouse relative to a display device; performing posture compensation processing on the current spatial coordinates according to the posture change information to obtain target spatial coordinates; determining a target angle offset according to first orientation information of the display device relative to the air mouse when the air mouse is at the target spatial coordinates and second orientation information of the air mouse relative to the display device when the air mouse is at the current spatial coordinates; and correcting the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device.
[0007] In one embodiment, the posture change information includes the target rotation angle of the air mouse, and the step of performing posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates includes: constructing a rotation matrix according to the target rotation angle; and determining the product of the rotation matrix and the current space coordinates as the target space coordinates.
[0008] In one embodiment, the posture change information includes the target rotation angle of the air mouse, and obtaining the posture change information of the air mouse during movement includes: obtaining a first angular acceleration of the air mouse in a first direction, a second angular acceleration in a second direction, and a third triangular acceleration in a third direction, wherein the first direction, the second direction, and the third direction are perpendicular to each other; obtaining the Euclidean norm between the first angular acceleration and the third angular acceleration; and performing an inverse tangent function calculation on the ratio between the second angular acceleration and the Euclidean norm to obtain the target rotation angle of the air mouse.
[0009] In one embodiment, the target spatial coordinates include first spatial coordinates in a first direction and second spatial coordinates in a second direction, the first orientation information includes a first horizontal angle, the second orientation information includes a second horizontal angle, and the target angle offset includes a target horizontal angle offset; The step of determining the target angle offset based on the first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates includes: performing an inverse tangent function calculation on the ratio between the first space coordinate and the second space coordinate to obtain a first horizontal angle; and determining the difference between the first horizontal angle and the second horizontal angle as the target horizontal angle offset.
[0010] In one embodiment, the target space coordinates include a first space coordinate in a first direction and a third space coordinate in a third direction, the first orientation information includes a first horizontal angle and a first pitch angle, the second orientation information includes a second pitch angle, and the target angle offset includes a target pitch angle offset; The step of determining the target angle offset based on the first position information of the display device relative to the air mouse when the air mouse is in the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is in the current space coordinates includes: performing a sine function calculation on the first horizontal angle to obtain a sine value; calculating the product between the sine value and the third space coordinate to obtain a first product term; performing an inverse tangent function calculation on the ratio between the first product term and the first space coordinate to obtain a first pitch angle; and determining the difference between the first pitch angle and the second pitch angle as the target pitch angle offset.
[0011] In one embodiment, the step of correcting the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device includes: obtaining the projection distance between the air mouse and the display device; determining the product of the tangent function value of the target angle offset and the projection distance as the distance increment; and determining the sum of the distance increment and the current projection coordinates as the target projection coordinates.
[0012] In one embodiment, the posture change information includes a target rotation angle of the air mouse, and obtaining the posture change information of the air mouse during movement further includes: collecting the angular velocity of the air mouse during movement; preprocessing the angular velocity to obtain the preprocessed angular velocity; determining the mouse state of the air mouse based on a comparison result between the preprocessed angular velocity and a preset angular velocity threshold; and determining the target rotation angle of the air mouse based on the mouse state of the air mouse.
[0013] In one embodiment, the step of determining the target rotation angle of the air mouse according to the mouse state of the air mouse includes: in response to the mouse state of the air mouse being in a stable state, determining the target rotation angle; in response to the mouse state of the air mouse being in a shaking state, reacquiring the angular velocity of the air mouse during movement, and returning to the step of preprocessing the angular velocity to obtain the preprocessed angular velocity.
[0014] In order to solve the above technical problems, the present application provides an electronic device, including a memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the above air mouse positioning method.
[0015] In order to solve the above technical problems, the present application provides a computer-readable storage medium, including: storing program data, and the program data is used to implement the above air mouse positioning method when executed by a processor.
[0016] The above scheme obtains the posture change information of the air mouse during movement and the current position information of the air mouse, the current position information includes the current space coordinates of the air mouse and the current projection coordinates of the air mouse relative to the display device; performs posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates; determines the target angle offset according to the first orientation information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second orientation information of the air mouse relative to the display device when the air mouse is at the current space coordinates; performs correction processing on the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device. Thus, by performing posture compensation on the current space coordinates of the air mouse through the posture change information of the air mouse, the accuracy of obtaining the target space position of the air mouse can be improved, and then the current projection coordinates are corrected according to the target angle offset determined by the first orientation information when the air mouse is at the target space coordinates and the second orientation information when the air mouse is at the current space coordinates, so as to further improve the positioning accuracy of the target projection coordinates. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which: Figure 1 is a flow chart of an exemplary embodiment of an air mouse positioning method shown in the present application; Figure 2 It is a structural schematic diagram of an air mouse end in an air mouse positioning device shown in the present application; Figure 3 It is a structural schematic diagram of a base station end in an air mouse positioning device shown in the present application; Figure 4 is a schematic diagram of the angle change of the air mouse before and after movement shown in the present application; Figure 5 yes Figure 1 A flow chart of an exemplary embodiment of step S110 in the air mouse positioning method is shown; Figure 6 is a schematic diagram of the measurement direction of the inertial measurement unit shown in this application; Figure 7 yes Figure 1 A flow chart of another exemplary embodiment of step S110 in the air mouse positioning method is shown; Figure 8 yes Figure 1 A flow chart of an exemplary embodiment of step S120 in the air mouse positioning method is shown; Fig. 9 yes Figure 1 A flow chart of an exemplary embodiment of step S130 in the air mouse positioning method is shown; Fig.10 is a schematic diagram of the target horizontal angle offset shown in the present application; Fig.11 is a schematic diagram of the target pitch angle offset shown in the present application; Fig.12 yes Figure 1 A flow chart of another exemplary embodiment of step S130 in the air mouse positioning method is shown; Fig.13 yes Figure 1 A flow chart of an exemplary embodiment of step S140 in the air mouse positioning method is shown; Fig.14 is a schematic diagram of the positional relationship between the air mouse and the display device shown in the present application; Fig.15 is a block diagram of an air mouse positioning device shown in an exemplary embodiment of the present application; Fig.16 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application; Fig.17 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0018] The technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It will be appreciated that the specific embodiments described herein are only used to explain the present application, rather than to limit the present application. It should also be noted that, for ease of description, only some but not all structures related to the present application are shown in the drawings. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in the art without making creative work are within the scope of protection of the present application.
[0019] First of all, it should be noted that smart TVs are common household appliances. Traditional smart TVs use buttons in the remote control to control the movement of the screen cursor to select the content on the smart TV screen. As the content of smart TVs becomes more and more diverse, traditional remote controls are too cumbersome to control and are gradually replaced by air mice with more flexible control methods. The air mouse moves the cursor position on the screen by moving the spatial position to achieve the control of the air mouse. The control process of the air mouse requires accurate positioning of the cursor position.
[0020] At present, the air mouse positioning method is to obtain the cursor position on the screen through the data collected by the UWB (Ultra Wide Band) positioning device. However, the original collected data of UWB has poor accuracy, resulting in low accuracy of air mouse positioning.
[0021] Based on this, the present application proposes an air mouse positioning method, an electronic device and a computer-readable storage medium. Figure 1 , Figure 1 It is a flowchart of an exemplary embodiment of the air mouse positioning method shown in the present application.
[0022] The execution subject of the air mouse positioning method can be a terminal device or a server or other processing device, wherein the terminal device can be a user equipment (UE), a computer, a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, an air mouse, etc. The execution subject of the air mouse positioning method can also be an air mouse positioning device. In some possible implementations, the air mouse positioning method can be implemented by a processor calling a computer-readable instruction stored in a memory.
[0023] The air mouse positioning device is a device for positioning the air mouse relative to the cursor of the display device. The air mouse positioning device can be an air mouse.
[0024] The air mouse positioning device may include an air mouse terminal and a base station terminal connected to the air mouse terminal. Figure 2 As shown, the air mouse end includes a UWB antenna, a UWB module, an IMU (Inertial Measurement Unit) module and a Bluetooth module. The UWB antenna is used to collect electrical signals. The UWB antenna includes three antennas, two RX (receiving) antennas as receiving antennas, and one TRX antenna to realize time division multiplexing of RX and TX (transmitting). The UWB module on the air mouse end is used to process the electrical signals to obtain the distance, pitch angle and horizontal angle of the base station relative to the air mouse. The IMU module is used to collect the angular acceleration and angular velocity of the air mouse in all directions. The Bluetooth module is used to transmit information with the base station. The air mouse positioning device also includes a button module, which is used to read button information. The structure of the base station end is shown as follows Figure 3As shown, the base station includes a UWB antenna, a UWB module and a Bluetooth module. The UWB antenna at the base station includes two RX antennas and one TRX antenna. The UWB module at the base station is used to obtain the spatial distance, horizontal angle and pitch angle of the air mouse relative to the base station based on the electrical signal collected by the UWB antenna. The Bluetooth module is used to transmit information with the air mouse. The Bluetooth chip in the Bluetooth module can execute the air mouse positioning method.
[0025] Specifically, the air mouse positioning method of this embodiment includes the following steps: Step S110, acquiring posture change information of the air mouse during movement and current position information of the air mouse, where the current position information includes current spatial coordinates of the air mouse and current projection coordinates of the air mouse relative to the display device.
[0026] The posture change information is the change information in the process of changing from one posture to another. The posture change information can be the change information of the current posture compared with the initial posture, where the current posture is the posture after the air mouse moves, and the initial posture is the posture before the air mouse moves. For example, the posture change information can be the rotation angle information, that is, the angle change of the current angle after the air mouse moves compared with the initial angle before the air mouse moves.
[0027] The air mouse positioning device obtains the posture change information of the air mouse during the movement. As an example, the air mouse positioning device collects the initial angle before the air mouse moves and the current angle after the movement through the acquisition device, and uses the difference between the current angle and the initial angle as the posture change information. The acquisition device can be an inertial measurement unit IMU or MPU6050 (InvenSense Motion Processing Unit 6050) sensor.
[0028] The current position information is the coordinates corresponding to the current position of the air mouse. The current position information includes the current spatial coordinates of the air mouse and the current projection coordinates of the air mouse relative to the display device.
[0029] The current spatial coordinates are the three-dimensional coordinates of the air mouse in the three-dimensional space after the air mouse moves. As an example, the air mouse positioning device measures the current position of the air mouse through a coordinate measuring device, and uses the measured three-dimensional coordinates of the current position of the air mouse as the current position coordinates. For example, the coordinate measuring device can be a three-dimensional laser scanner. As another example, the air mouse positioning device obtains the spatial distance and acquisition azimuth information between the air mouse and the base station in the display device; performs coordinate calculation on the spatial distance and acquisition azimuth information to obtain Cartesian coordinates, and uses the Cartesian coordinates as the current position coordinates.
[0030] The collected orientation information is the angle of the air mouse relative to the display device when it is at the current position coordinate before compensation processing. The collected orientation information may include the collected pitch angle and the collected horizontal angle. The angle change of the air mouse before and after moving is as follows: Figure 4 As shown in the figure, in the XYZ coordinate system, the three RX antennas of the air mouse are located on the XZ plane, and the base station TX antenna of the display device is located in the XY plane. Before the air mouse moves, the initial pitch angle of the air mouse relative to the display device is , the initial horizontal angle of the air mouse relative to the display device is After the air mouse moves, the pitch angle of the air mouse relative to the display device is collected , the horizontal angle of the air mouse relative to the display device is .
[0031] For example, the spatial distance, the collected azimuth information and the current position coordinates satisfy the following formula:
[0032] in, Indicates the current position coordinates, Indicates the horizontal angle of acquisition, `Indicates the pitch angle of the acquisition, Indicates spatial distance.
[0033] In one embodiment, the current projection coordinates are the two-dimensional projection coordinates of the air mouse relative to the display device after the air mouse moves, that is, the cursor coordinates in the display device. The current projection coordinates include a first current projection coordinate in a first direction and a second current projection coordinate in a third direction. As an example, the air mouse positioning device obtains the relative displacement between the current spatial coordinates after the air mouse moves and the initial spatial coordinates before the air mouse moves; after the relative displacement is reduced according to a preset ratio, the relative projection displacement is obtained; the sum of the initial projection coordinates of the air mouse relative to the display device and the relative projection displacement is determined as the current projection coordinates of the air mouse relative to the display device. Among them, the initial spatial coordinates are the spatial coordinates before the air mouse moves, and the initial projection coordinates are the two-dimensional projection coordinates of the air mouse relative to the display device before the air mouse moves. As another example, the air mouse positioning device obtains the spatial distance, the acquisition horizontal angle, and the acquisition pitch angle through UMB; the spatial distance, the acquisition horizontal angle, and the acquisition pitch angle are calculated to obtain the current projection coordinates. For example, the spatial distance, the acquisition horizontal angle, the acquisition pitch angle, and the current projection coordinates satisfy the following formula:
[0034]
[0035] in, represents the first current projection coordinate, Represents the second current projection coordinates.
[0036] Step S120: Perform posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates.
[0037] The posture compensation process is a process of compensating the current posture of the air mouse. For example, the posture compensation process may be a process of correcting or adjusting the deviation of the current posture of the air mouse.
[0038] The target space coordinates are the space coordinates after the current space coordinates of the air mouse are compensated, and include the first space coordinates in the first direction, the second space coordinates in the second direction, and the third space coordinates in the third direction.
[0039] The air mouse positioning device performs posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates. Specifically, the posture change information includes the target rotation angle, and the air mouse positioning device determines the corresponding target compensation value from the preset compensation value mapping table according to the angle range of the target rotation angle; the sum of the target compensation value and the current space coordinates is determined as the target space coordinates; the preset compensation value mapping table stores a one-to-one correspondence between the preset angle range and the preset target compensation value. For example, if the target rotation angle is within the preset first angle range, the first target compensation value corresponding to the preset first angle range is determined from the preset compensation value mapping table, and the sum of the first target compensation value and the current space coordinates is determined as the target space coordinates.
[0040] Step S130, determining a target angle offset according to first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates.
[0041] The first orientation information is the orientation information of the display device relative to the air mouse after compensation processing. The first orientation information may be a first pitch angle and / or a first horizontal angle. Specifically, the air mouse positioning device measures the first pitch angle and / or the first horizontal angle of the display device relative to the air mouse through a positioning device to obtain the first orientation information. The positioning device may be a UWB.
[0042] The target angle offset is the offset of one angle relative to another angle. For example, the target angle offset may be the offset of a first pitch angle relative to a second pitch angle. For another example, the target angle offset may be the offset of a first horizontal angle relative to a second horizontal angle. The target angle offset may include a target horizontal angle offset and / or a target pitch angle offset.
[0043] The second orientation information is the angle of the air mouse relative to the display device. The second orientation information may include a second pitch angle and a second horizontal angle.
[0044] The air mouse positioning device determines the target angle offset according to the first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates. For example, the air mouse positioning device obtains the difference between the first horizontal angle and the second horizontal angle, and determines the difference as the target horizontal angle offset.
[0045] Step S140: Correct the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device.
[0046] The target projection coordinates are the two-dimensional projection coordinates of the air mouse relative to the display device after posture compensation. The target projection coordinates include a first target projection coordinate in a first direction and a second target projection coordinate in a third direction.
[0047] The air mouse positioning device corrects the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device. Specifically, the air mouse positioning device determines the corresponding target correction coefficient from the preset correction coefficient table according to the offset range of the target angle offset of the air mouse; determines the product between the target correction coefficient and the current projection coordinates as the target projection coordinates; the preset correction coefficient table stores a one-to-one correspondence between the preset offset range and the preset correction coefficient. For example, in response to the target angle offset of the air mouse being in the first preset offset range, the air mouse positioning device searches the preset correction coefficient table according to the first preset offset range, and uses the correction coefficient corresponding to the first preset offset range found as the target correction coefficient; and determines the product between the target correction coefficient and the current projection coordinates as the target projection coordinates.
[0048] It can be seen that by acquiring the posture change information of the air mouse during the movement and the current position information of the air mouse, the current position information includes the current space coordinates of the air mouse and the current projection coordinates of the air mouse relative to the display device; performing posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates; determining the target angle offset according to the first orientation information of the display device relative to the air mouse when the air mouse is in the target space coordinates and the second orientation information of the air mouse relative to the display device when the air mouse is in the current space coordinates; correcting the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device. Therefore, by performing posture compensation on the current space coordinates of the air mouse through the posture change information of the air mouse, the accuracy of obtaining the target space position of the air mouse can be improved, and then the current projection coordinates are corrected according to the target angle offset determined by the first orientation information when the air mouse is in the target space coordinates and the second orientation information when the air mouse is in the current space coordinates, so as to further improve the positioning accuracy of the target projection coordinates.
[0049] Based on the above embodiments, the embodiments of the present application adopt Figure 5 This chapter explains in detail how to obtain the posture change information of the air mouse during movement. Figure 5 , Figure 5 yes Figure 1 The flowchart of an exemplary embodiment of step S110 in the air mouse positioning method is shown. Specifically, the posture change information in step S110 includes the target rotation angle of the air mouse, and the process of obtaining the posture change information of the air mouse during movement includes the following steps: Step S510, obtaining a first angular acceleration in a first direction, a second angular acceleration in a second direction, and a third angular acceleration in a third direction of the air mouse, wherein the first direction, the second direction, and the third direction are perpendicular to each other.
[0050] Angular acceleration refers to the change in angular velocity per unit time. The first angular acceleration is the angular acceleration of the air mouse in the first direction, for example, the first angular acceleration is the angular acceleration of the air mouse in the X-axis direction; the second angular acceleration is the angular acceleration of the air mouse in the second direction, for example, the second angular acceleration is the angular acceleration of the air mouse in the Y-axis direction; the third angular acceleration is the angular acceleration of the air mouse in the third direction, for example, the third angular acceleration is the angular acceleration of the air mouse in the Z-axis direction. It should be noted that the X-axis, Y-axis and Z-axis can be coordinate axes in the geodetic coordinate system, and the angular acceleration can be represented by a vector in the geodetic coordinate system.
[0051] The air mouse positioning device obtains the first angular acceleration of the air mouse in the first direction, the second angular acceleration in the second direction, and the third triangular acceleration in the third direction. As an example, the air mouse positioning device measures the first angular acceleration of the air mouse in the first direction, the second angular acceleration in the second direction, and the third triangular acceleration in the third direction through an angular acceleration acquisition device. As another example, the air mouse positioning device measures the initial angular acceleration of the air mouse in the first direction, the initial angular acceleration in the second direction, and the initial angular acceleration in the third direction through an angular acceleration acquisition device; calibrates the initial angular acceleration in each direction, and obtains the first angular acceleration of the air mouse in the first direction, the second angular acceleration in the second direction, and the third triangular acceleration in the third direction, respectively. Among them, the angular acceleration acquisition device can be an inertial measurement unit IMU, or a gyroscope.
[0052] In one embodiment, the air mouse positioning device uses an inertial measurement unit to collect angular velocity. The inertial measurement unit includes a three-axis acceleration sensor and a three-axis velocity sensor, such as Figure 6 As shown, g represents the direction of gravity. In the XYZ coordinate system, the Z axis is opposite to the direction of gravity. The X axis, Y axis, and Z axis are perpendicular to each other. The first angular acceleration is the angular acceleration of the air mouse in the X axis direction. The second angular acceleration is the angular acceleration of the air mouse in the Y-axis direction. , the third angular acceleration is the angular acceleration of the air mouse in the Z-axis direction .
[0053] The air mouse positioning device calibrates the initial angular acceleration in each direction, and obtains the first angular acceleration of the air mouse in the first direction, the second angular acceleration in the second direction, and the third triangular acceleration in the third direction. Specifically, the air mouse positioning device determines the difference between the initial angular velocity in the first direction and the preset angular acceleration calibration parameter as the first angular acceleration of the air mouse in the first direction; the air mouse positioning device determines the difference between the initial angular velocity in the second direction and the preset angular acceleration calibration parameter as the second angular acceleration of the air mouse in the second direction; the air mouse positioning device determines the difference between the initial angular velocity in the third direction and the preset angular acceleration calibration parameter as the third triangular acceleration of the air mouse in the third direction. It should be noted that the preset angular acceleration calibration parameter can be the pre-read angular acceleration of the inertial measurement unit in a stationary state when it is powered on.
[0054] Step S520: Obtain the Euclidean norm between the first angular acceleration and the third angular acceleration.
[0055] The Euclidean norm is the distance between two vectors. For example, the Euclidean norm can be the distance between the first angular acceleration and the third angular acceleration.
[0056] The air mouse positioning device obtains the Euclidean norm between the first angular acceleration and the third angular acceleration. Specifically, the first angular acceleration, the third angular acceleration and the Euclidean norm satisfy the following formula: F=
[0057] in, represents the first angular acceleration, represents the third angular acceleration, and F represents the Euclidean norm.
[0058] Step S530: Perform an inverse tangent function calculation on the ratio between the second angular acceleration and the Euclidean norm to obtain the target rotation angle of the air mouse.
[0059] The inverse tangent function is the inverse function of the tangent function. The inverse tangent function can be expressed as or arctan .
[0060] The air mouse positioning device performs an inverse tangent function calculation on the ratio between the second angular acceleration and the Euclidean norm to obtain the target rotation angle of the air mouse. Specifically, the second angular acceleration, the Euclidean norm and the target rotation angle satisfy the following formula:
[0061] in, represents the second angular acceleration, Indicates the target rotation angle.
[0062] In one embodiment, the first angular acceleration, the second angular acceleration, the third angular acceleration and the target rotation angle satisfy the following formula:
[0063] Based on the above examples, please continue to refer to Figure 7 , Figure 7 yes Figure 1 The flowchart of another exemplary embodiment of step S110 in the air mouse positioning method is shown. Specifically, the process of obtaining the posture change information of the air mouse during the movement in step S110 includes the following steps: Step S710: collecting the angular velocity of the air mouse during its movement.
[0064] Angular velocity refers to the change in angle per unit time. Angular velocity can be the change in angle of the air mouse in a plane per unit time. For example, angular velocity can be the change in angle on the XZ plane. , or the angle change on the XY plane .
[0065] The air mouse positioning device collects the angular velocity of the air mouse during movement. Exemplarily, the air mouse positioning device collects the angular velocity of the air mouse during movement through an angular velocity collection device. The angular velocity collection device can be an inertial measurement unit IMU or an angular velocity sensor.
[0066] Step S720: pre-process the angular velocity to obtain the pre-processed angular velocity.
[0067] Preprocessing refers to processing data in advance. For example, preprocessing can be data cleaning, data completion, etc.
[0068] The air mouse positioning device preprocesses the angular velocity to obtain the preprocessed angular velocity. Specifically, the air mouse positioning device calibrates the angular velocity to obtain the calibrated angular velocity; the calibrated angular velocity is used as the preprocessed angular velocity. For example, the air mouse positioning device obtains the difference between the angular velocity and the preset calibration parameter, and determines the difference as the preprocessed angular velocity. It should be noted that the preset calibration parameter corresponding to the inertial measurement unit IMU can be the pre-read angular velocity of the inertial measurement unit in a stationary state when it is powered on.
[0069] Step S730: Determine the mouse state of the air mouse according to the comparison result between the preprocessed angular velocity and the preset angular velocity threshold.
[0070] The comparison result may include that the preprocessed angular velocity is greater than or equal to a preset angular velocity threshold, and that the preprocessed angular velocity is less than the preset angular velocity threshold.
[0071] The mouse state refers to the movement state of the air mouse. The mouse state includes the stable state and the shaking state.
[0072] The air mouse positioning device determines the mouse state of the air mouse according to the comparison result between the preprocessed angular velocity and the preset angular velocity threshold. Specifically, in response to the preprocessed angular velocity being greater than or equal to the preset angular velocity threshold, the air mouse positioning device determines that the mouse state of the air mouse is a shaking state; in response to the preprocessed angular velocity being less than the preset angular velocity threshold, the air mouse positioning device determines that the mouse state of the air mouse is a stable state.
[0073] Step S740: determine the target rotation angle of the air mouse according to the mouse state of the air mouse.
[0074] The air mouse positioning device determines the target rotation angle of the air mouse according to the mouse state of the air mouse. Specifically, the air mouse positioning device determines the target rotation angle in response to the mouse state of the air mouse being in a stable state; in response to the mouse state of the air mouse being in a shaking state, reacquires the angular velocity of the air mouse during the movement, and returns to step S720.
[0075] The detailed steps of determining the target rotation angle by the air mouse positioning device can refer to step S510, step S520 and step S530 in the above embodiment, which will not be repeated here.
[0076] Furthermore, in response to the air mouse being in a shaking state, the air mouse positioning device reacquires the current position information of the air mouse until the air mouse is in a stable state, and continues to execute step S120 according to the reacquired current position information of the air mouse and the determined target rotation angle.
[0077] Based on the above embodiments, the embodiments of the present application adopt Figure 8 This chapter elaborates on how to perform posture compensation on the current space coordinates according to the posture change information to obtain the target space coordinates. Figure 8 , Figure 8 yes Figure 1 The flowchart of an exemplary embodiment of step S120 in the air mouse positioning method is shown. Specifically, step S120 performs posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates includes the following steps: Step S810: construct a rotation matrix according to the target rotation angle.
[0078] A rotation matrix is a matrix constructed from trigonometric values of the rotation angle.
[0079] In one embodiment, the rotation matrix may be as follows:
[0080] in, Indicates the target rotation angle.
[0081] Step S820: determine the product of the rotation matrix and the current space coordinates as the target space coordinates.
[0082] The air mouse positioning device determines the product between the rotation matrix and the current space coordinates as the target space coordinates. For example, the rotation matrix, the current space coordinates and the target space coordinates satisfy the following formula:
[0083] Among them, the current space coordinates are expressed as , the target space coordinates are expressed as , represents the first space coordinate, represents the second space coordinate, Represents the third space coordinate.
[0084] It can be seen that a rotation matrix is constructed according to the target rotation angle, and the product between the rotation matrix and the current space coordinate is determined as the target space coordinate. Thus, the posture compensation of the current space coordinate is achieved.
[0085] Based on the above examples, please refer to Fig. 9 , Fig. 9 yes Figure 1 The flowchart of an exemplary embodiment of step S130 in the air mouse positioning method is shown. Specifically, the process of determining the target angle offset according to the first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates in step S130 includes the following steps: Step S910: Perform an inverse tangent function calculation on the ratio between the first space coordinate and the second space coordinate to obtain a first horizontal angle.
[0086] The air mouse positioning device performs an inverse tangent function calculation on the ratio between the first spatial coordinate and the second spatial coordinate to obtain a first horizontal angle. For example, the first spatial coordinate, the second spatial coordinate and the first horizontal angle satisfy the following formula:
[0087] in, Indicates the first horizontal angle.
[0088] Step S920: determine the difference between the first horizontal angle and the second horizontal angle as the target horizontal angle offset.
[0089] The air mouse positioning device determines the difference between the first horizontal angle and the second horizontal angle as the target horizontal angle offset. Fig.10 , Fig.10 is a schematic diagram of the target horizontal angle offset. As shown in the left figure, the air mouse is perpendicular to the base station in the display device, and the first horizontal angle is equal to the second horizontal angle. As shown in the right figure, the air mouse is not perpendicular to the base station in the display device, and the spatial distance between the air mouse and the base station in the display device is R. In the xy coordinate system with the air mouse as the origin, the first horizontal angle of the display device relative to the air mouse is In the xy coordinate system with the base station in the display device as the origin, the second horizontal angle of the air mouse relative to the display device is , the target horizontal angle offset between the first horizontal angle and the second horizontal angle is .
[0090] Specifically, the first horizontal angle, the second horizontal angle and the target horizontal angle offset satisfy the following formula:
[0091] in, Indicates the target horizontal angle offset, Indicates the second horizontal angle.
[0092] On the basis of the above-mentioned embodiment, the embodiment of the present application shows another exemplary embodiment of step S130. Specifically, the air mouse positioning device determines the target angle offset according to the first orientation information of the display device relative to the air mouse when the air mouse is in the target space coordinates and the second orientation information of the air mouse relative to the display device when the air mouse is in the current space coordinates, including: performing a sine function calculation on the first horizontal angle to obtain a sine value; calculating the product between the sine value and the third space coordinate to obtain a first product term; performing an inverse tangent function calculation on the ratio between the first product term and the first space coordinate to obtain a first pitch angle; and determining the difference between the first pitch angle and the second pitch angle as the target pitch angle offset.
[0093] The air mouse positioning device determines the difference between the first pitch angle and the second pitch angle as the target pitch angle offset. For details, please refer to Fig.11 , Fig.11 is a schematic diagram of the target pitch angle offset. As shown in the left figure, the air mouse is perpendicular to the base station in the display device, and the first pitch angle is equal to the second pitch angle. As shown in the right figure, the air mouse is not perpendicular to the base station in the display device, and the spatial distance between the air mouse and the base station in the display device is R. In the xy coordinate system with the air mouse as the origin, the first pitch angle of the display device relative to the air mouse is In the xy coordinate system with the base station in the display device as the origin, the second pitch angle of the air mouse relative to the display device is , the target pitch angle offset between the first pitch angle and the second pitch angle is .
[0094] In one embodiment, the first horizontal angle, the third spatial coordinate, the first spatial coordinate and the first pitch angle satisfy the following formula:
[0095] in, represents the first pitch angle, Indicates the first horizontal angle, represents the third space coordinates, Represents the first space coordinate.
[0096] In one embodiment, the first pitch angle, the second pitch angle and the target pitch angle offset satisfy the following formula:
[0097] in, Indicates the target pitch angle offset, Indicates the second pitch angle.
[0098] See also Fig.12 , Fig.12 yes Figure 1 The flowchart of another exemplary embodiment of step S130 in the air mouse positioning method is shown. Specifically, the process of determining the target angle offset according to the first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates in step S130 includes the following steps: Step S1210: Acquire an initial angle offset according to first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates.
[0099] The initial angle offset may include an initial horizontal angle offset and / or an initial pitch angle offset.
[0100] The air mouse positioning device obtains the initial angle offset according to the first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates. Specifically, the air mouse positioning device determines the difference between the first horizontal angle and the second horizontal angle as the initial horizontal angle offset; and determines the difference between the first pitch angle and the second pitch angle as the initial pitch angle offset.
[0101] S1220: Filter the initial target angle offset to obtain a target angle offset.
[0102] Filtering refers to the process of extracting useful information from data while suppressing and removing unnecessary components. The filtering process may be Kalman filtering.
[0103] The air mouse positioning device performs filtering processing on the initial target angle offset to obtain the target angle offset. Specifically, the air mouse positioning device performs initialization processing on the filtering parameters to obtain the initialized filtering parameters; the initialized filtering parameters include a preset state transfer matrix, a preset prediction error matrix, a preset measurement error matrix, a preset observation matrix, an initialization state value, and an initialization covariance matrix; the initialization state value is iteratively updated according to the preset state transfer matrix to obtain the current prior estimation value; the initialization covariance matrix is iteratively updated according to the preset state transfer matrix and the preset prediction error matrix to obtain the current prior covariance matrix; the current filtering gain is obtained according to the preset observation matrix, the preset measurement error matrix, the current prior estimation value, and the current prior covariance matrix; the current posterior estimation value is calculated according to the preset observation matrix, the measurement matrix, the current filtering gain, and the current prior estimation value; the target angle offset is included in the measurement matrix; the current posterior covariance matrix is calculated according to the current prior covariance matrix, the preset observation matrix, and the current posterior estimation value.
[0104] The air mouse positioning device iteratively updates the initialization state value according to the preset state transfer matrix to obtain the current prior estimation value. For example, the current prior estimation value satisfies the following formula:
[0105] in, represents the kth prior estimate, that is, the current prior estimate, ` represents the preset state transfer matrix, The k-1th prior estimate, k is an integer, when k is 2, is the first prior estimate, that is, the initialization state value.
[0106] The air mouse positioning device iteratively updates the initialized covariance matrix according to the preset state transfer matrix and the preset prediction error matrix to obtain the current prior covariance matrix. For example, the current prior covariance matrix satisfies the following formula:
[0107] in, represents the kth prior covariance matrix, that is, the current prior covariance matrix, represents the k-1th prior covariance matrix, when k is 2, is the first prior covariance matrix, that is, the initialization covariance matrix, Represents the preset prediction error matrix.
[0108] The air mouse positioning device obtains the current filter gain according to the preset observation matrix, the preset measurement error matrix, the current prior estimation value and the current prior covariance matrix. For example, the current filter gain satisfies the following formula:
[0109] in, represents the current filter gain, H represents the preset observation matrix, represents the preset measurement error matrix, Represents the inverse function.
[0110] The air mouse positioning device calculates the current a posteriori estimate value according to the preset observation matrix, the measurement matrix, the current filter gain and the current a priori estimate value. For example, the current a posteriori estimate value satisfies the following formula:
[0111] in, represents the kth posterior estimate, that is, the current posterior estimate, Represents the measurement matrix, which can be expressed as follows:
[0112] The measurement matrix of the air mouse positioning device includes the target angle offset; the current posterior covariance matrix is calculated based on the current prior covariance matrix, the preset observation matrix and the current posterior estimate. For example, the current posterior covariance matrix satisfies the following formula:
[0113] in, represents the kth posterior covariance matrix, that is, the current posterior covariance matrix.
[0114] It can be seen that the initial angle offset is obtained according to the first position information of the display device relative to the air mouse when the air mouse is in the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is in the current space coordinates; the initial target angle offset is filtered to obtain the target angle offset. Therefore, the trajectory jitter caused by data errors is reduced by filtering, making the target angle offset more accurate, so that the process of the air mouse controlling the display device is smoother.
[0115] Based on the above embodiments, the embodiments of the present application adopt Fig.13 This chapter describes in detail how to correct the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device. Fig.13 , Fig.13 yes Figure 1 The flowchart of an exemplary embodiment of step S140 in the air mouse positioning method is shown. Specifically, step S140 corrects the current projection coordinates according to the target angle offset of the air mouse, and the process of obtaining the target projection coordinates of the air mouse relative to the display device includes the following steps: Step S1310: Obtain the projection distance between the air mouse and the display device.
[0116] Projection distance refers to the distance from the air mouse to the display device.
[0117] The air mouse positioning device obtains the projection distance between the air mouse and the display device. As an example, the air mouse positioning device uses a distance measuring device to measure the distance between the air mouse and the display device, determines the measurement data as the spatial distance, and calculates the spatial distance to obtain the projection distance. The distance measuring device can be a tape measure, a laser rangefinder, or a UWB.
[0118] Please continue reading Fig.14 , Fig.14 FIG. 2 shows a schematic diagram of the positional relationship between the air mouse and the display device in this embodiment. Fig.14 As shown, the display device includes a screen and a base station behind the screen. The base station is used as the coordinate origin to construct a geodetic coordinate system XYZ. The spatial distance between the air mouse and the display device is R, and the projection distance between the air mouse and the display device is r. The current projection coordinate of the air mouse relative to the display device is point A, and the target projection coordinate of the air mouse relative to the display device is point B.
[0119] In one embodiment, the second pitch angle, the second horizontal angle, the spatial distance and the projection distance satisfy the following formula:
[0120] in, Indicates the projection distance.
[0121] Step S1320: Determine the product of the tangent function value of the target angle offset and the projection distance as the distance increment.
[0122] The distance delta is the change in distance between two coordinates.
[0123] The air mouse positioning device determines the product of the tangent function value of the target angle offset and the projection distance as the distance increment. Specifically, the air mouse positioning device determines the product of the target horizontal angle offset and the projection distance as the first distance increment; and determines the product of the target pitch angle offset and the projection distance as the second distance increment.
[0124] In one embodiment, the target horizontal angle offset, the projection distance and the first distance increment satisfy the following formula:
[0125] in, Indicates the first distance increment.
[0126] In one embodiment, the target pitch angle offset, the projection distance, and the second distance increment satisfy the following formula:
[0127] in, Indicates the second distance increment.
[0128] Step S1330: determine the sum of the distance increment and the current projection coordinates as the target projection coordinates.
[0129] The air mouse positioning device determines the sum of the distance increment and the current projection coordinate as the target projection coordinate. Specifically, the air mouse positioning device determines the sum of the first distance increment and the first current projection coordinate as the first target projection coordinate in the first direction; the air mouse positioning device determines the sum of the second distance increment and the second current projection coordinate as the second target projection coordinate in the third direction.
[0130] In one embodiment, the first distance increment, the first current projection coordinates and the first target projection coordinates satisfy the following formula:
[0131] in, Represents the first target projection coordinates.
[0132] In one embodiment, the second distance increment, the second current projection coordinates and the second target projection coordinates satisfy the following formula:
[0133] in, Represents the second target projection coordinates.
[0134] Furthermore, the air mouse positioning device inputs the target projection coordinates into the control terminal in the display device according to a preset standard protocol, and controls the screen to display a cursor at the target projection coordinates through the control terminal.
[0135] It can be seen that the projection distance between the air mouse and the display device is obtained, the product of the tangent function value of the target angle offset and the projection distance is determined as the distance increment, and the sum of the distance increment and the current projection coordinates is determined as the target projection coordinates. In this way, the current projection coordinates are corrected, and the accuracy of the air mouse in positioning the projection coordinates is improved.
[0136] Fig.15 FIG. 1 is a block diagram of an air mouse positioning device shown in an exemplary embodiment of the present application. Fig.15 As shown, the exemplary air mouse positioning device 1500 includes: an acquisition module 1510, a posture compensation module 1520, a target angle offset determination module 1530 and a correction module 1540. Specifically: The acquisition module 1510 is used to acquire the posture change information of the air mouse during movement and the current position information of the air mouse, wherein the current position information includes the current space coordinates of the air mouse and the current projection coordinates of the air mouse relative to the display device.
[0137] The posture compensation module 1520 is used to perform posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates.
[0138] A target angle offset determination module 1530, configured to determine a target angle offset according to first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates; The correction module 1540 is used to correct the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device.
[0139] In this exemplary air mouse positioning device, by acquiring the posture change information of the air mouse during the movement and the current position information of the air mouse, the current position information includes the current space coordinates of the air mouse and the current projection coordinates of the air mouse relative to the display device; performing posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates; determining the target angle offset according to the first orientation information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second orientation information of the air mouse relative to the display device when the air mouse is at the current space coordinates; performing correction processing on the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device. Thus, by performing posture compensation on the current space coordinates of the air mouse according to the posture change information of the air mouse, the accuracy of obtaining the target space position of the air mouse can be improved, and then the current projection coordinates are corrected according to the target angle offset determined according to the first orientation information when the air mouse is at the target space coordinates and the second orientation information when the air mouse is at the current space coordinates, so as to further improve the positioning accuracy of the target projection coordinates.
[0140] The functions of each module can be found in the embodiment of the air mouse positioning method, which will not be described in detail here.
[0141] In order to implement the air mouse positioning method of the above embodiment, the present application proposes another electronic device, which can be specifically referred to as Fig.16 , Fig.16 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application.
[0142] The electronic device 1600 includes a memory 1601 and a processor 1602 , wherein the memory 1601 and the processor 1602 are coupled.
[0143] The memory 1601 is used to store program data, and the processor 1602 is used to execute the program data to implement the air mouse positioning method of the above embodiment.
[0144] In this embodiment, the processor 1602 may also be referred to as a CPU (Central Processing Unit). The processor 1602 may be an integrated circuit chip having signal processing capabilities. The processor 1602 may also be a general-purpose processor, a digital signal processor, an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, or a discrete hardware component. A general-purpose processor may be a microprocessor or the processor 1602 may also be any conventional processor, etc.
[0145] The present application also provides a computer-readable storage medium, such as Fig.17 As shown, the computer-readable storage medium 1700 is used to store program data 1701. When the program data 1701 is executed by the processor, it is used to implement the air mouse positioning method in the method embodiment of the present application.
[0146] The method involved in the embodiment of the air mouse positioning method of the present application, when implemented in the form of a software functional unit and sold or used as an independent product, can be stored in a device, such as a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including several instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0147] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. An air mouse positioning method, characterized in that: The method is applied to an air mouse, and the method comprises: Acquire posture change information of the air mouse during movement and current position information of the air mouse, wherein the current position information includes current spatial coordinates of the air mouse and current projection coordinates of the air mouse relative to a display device; Performing posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates; Determine a target angle offset according to first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates; The current projection coordinates are corrected according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device.
2. The air mouse positioning method according to claim 1, characterized in that: The posture change information includes the target rotation angle of the air mouse, and the step of performing posture compensation processing on the current space coordinates according to the posture change information to obtain the target space coordinates includes: Constructing a rotation matrix according to the target rotation angle; The product of the rotation matrix and the current space coordinates is determined as the target space coordinates.
3. The air mouse positioning method according to claim 1, characterized in that: The posture change information includes the target rotation angle of the air mouse, and the acquiring of the posture change information of the air mouse during the movement includes: Acquire a first angular acceleration of the air mouse in a first direction, a second angular acceleration in a second direction, and a third angular acceleration in a third direction, wherein the first direction, the second direction, and the third direction are perpendicular to each other; Obtaining a Euclidean norm between the first angular acceleration and the third angular acceleration; An inverse tangent function is performed on the ratio of the second angular acceleration to the Euclidean norm to obtain a target rotation angle of the air mouse.
4. The air mouse positioning method according to claim 1, characterized in that: The target space coordinates include first space coordinates in a first direction and second space coordinates in a second direction, the first orientation information includes a first horizontal angle, the second orientation information includes a second horizontal angle, and the target angle offset includes a target horizontal angle offset; The step of determining the target angle offset according to the first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates comprises: Performing an inverse tangent function calculation on the ratio between the first spatial coordinate and the second spatial coordinate to obtain a first horizontal angle; A difference between the first horizontal angle and the second horizontal angle is determined as the target horizontal angle offset.
5. The air mouse positioning method according to claim 1, characterized in that: The target space coordinates include a first space coordinate in a first direction and a third space coordinate in a third direction, the first orientation information includes a first horizontal angle and a first pitch angle, the second orientation information includes a second pitch angle, and the target angle offset includes a target pitch angle offset; The step of determining the target angle offset according to the first position information of the display device relative to the air mouse when the air mouse is at the target space coordinates and the second position information of the air mouse relative to the display device when the air mouse is at the current space coordinates comprises: Performing a sine function calculation on the first horizontal angle to obtain a sine value; Calculating the product between the sine value and the third spatial coordinate to obtain a first product term; Performing an inverse tangent function calculation on a ratio between the first product term and the first spatial coordinate to obtain a first pitch angle; A difference between the first pitch angle and the second pitch angle is determined as the target pitch angle offset.
6. The air mouse positioning method according to claim 1, characterized in that: The step of correcting the current projection coordinates according to the target angle offset of the air mouse to obtain the target projection coordinates of the air mouse relative to the display device includes: Obtaining a projection distance between the air mouse and the display device; Determine the product of the tangent function value of the target angle offset and the projection distance as the distance increment; The sum of the distance increment and the current projection coordinates is determined as the target projection coordinates.
7. The air mouse positioning method according to claim 1, characterized in that: The posture change information includes the target rotation angle of the air mouse, and the acquiring of the posture change information of the air mouse during the movement process further includes: Collecting the angular velocity of the air mouse during movement; Preprocessing the angular velocity to obtain a preprocessed angular velocity; Determining the mouse state of the air mouse according to a comparison result between the preprocessed angular velocity and a preset angular velocity threshold; A target rotation angle of the air mouse is determined according to a mouse state of the air mouse.
8. The air mouse positioning method according to claim 7, characterized in that: The step of determining the target rotation angle of the air mouse according to the mouse state of the air mouse comprises: In response to the mouse state of the air mouse being a stable state, determining the target rotation angle; In response to the mouse state of the air mouse being a shaking state, the angular velocity of the air mouse during the movement is reacquired, and the step of preprocessing the angular velocity to obtain the preprocessed angular velocity is returned.
9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory stores program instructions, and the processor retrieves the program instructions from the memory to execute the air mouse positioning method according to any one of claims 1-8.
10. A computer-readable storage medium, characterized in that: include: Program data is stored, and when the program data is executed by a processor, it is used to implement the air mouse positioning method according to any one of claims 1 to 8.
Citation Information
Patent Citations
Air mouse and methods and devices for controlling mouse pointer movement
CN102262460A
Air mouse information determination method and device, equipment and storage medium
CN111078029A
Laser operation path guiding method and computer equipment thereof and laser operation path guiding system
CN111345898A
Image registration method and device, multispectral camera, unmanned equipment and storage medium
CN113496505A
Mouse control method and device for vehicle-mounted display screen, electronic equipment and vehicle
CN118860133A
Cited By
Display control method, electronic device, and system
WO2026158324A1