Cursor position updating method and device and electronic equipment

文档序号:115206 发布日期:2021-10-19 浏览:20次 中文

阅读说明:本技术 光标位置更新方法、装置和电子设备 (Cursor position updating method and device and electronic equipment ) 是由 谢昂 黄翀宇 罗晨 鲁威 于 2021-07-27 设计创作,主要内容包括:本公开实施例公开了光标位置更新方法、装置和电子设备。该方法的一具体实施方式包括:获取输入设备的传感器数据;利用传感器数据,对输入设备的设备姿态进行追踪,得到设备姿态估计,其中,设备姿态估计以预设第一坐标系下的欧拉角和预设第二坐标系下的欧拉角进行表征,在第一坐标系中表征输入设备的俯仰角的欧拉角不同于在第二坐标系中表征输入设备的俯仰角的欧拉角;基于设备姿态估计在第一坐标系下的欧拉角和设备姿态估计在第二坐标系下的欧拉角,确定目标角的变化量,利用目标角的变化量,对目标设备上呈现的光标的位置进行更新。该实施方式可以保障在各种极端设备姿态以及使用场景下的光标位置的准确性以及光标的可用性。(The embodiment of the disclosure discloses a cursor position updating method and device and electronic equipment. One embodiment of the method comprises: acquiring sensor data of an input device; tracking the equipment attitude of the input equipment by utilizing sensor data to obtain equipment attitude estimation, wherein the equipment attitude estimation is characterized by an Euler angle under a preset first coordinate system and an Euler angle under a preset second coordinate system, and the Euler angle for characterizing the pitch angle of the input equipment in the first coordinate system is different from the Euler angle for characterizing the pitch angle of the input equipment in the second coordinate system; and determining the variation of the target angle based on the Euler angle of the equipment attitude estimation in the first coordinate system and the Euler angle of the equipment attitude estimation in the second coordinate system, and updating the position of the cursor presented on the target equipment by using the variation of the target angle. The implementation mode can guarantee the accuracy of the cursor position and the usability of the cursor under various extreme equipment postures and use scenes.)

1. A cursor position updating method, comprising:

obtaining sensor data for an input device, wherein the input device is used to control a position of a cursor presented on a target device;

tracking the equipment attitude of the input equipment by using the sensor data to obtain equipment attitude estimation, wherein the equipment attitude estimation is characterized by an Euler angle under a preset first coordinate system and an Euler angle under a preset second coordinate system, and the Euler angle for characterizing the pitch angle of the input equipment in the first coordinate system is different from the Euler angle for characterizing the pitch angle of the input equipment in the second coordinate system;

determining a variation of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and updating a position of a cursor presented on the target device by using the variation of the target angle, wherein the target angle comprises an azimuth angle of the input device and a pitch angle of the input device.

2. The method of claim 1, wherein tracking the device pose of the input device using the sensor data to obtain a device pose estimate comprises:

tracking the equipment attitude of the target equipment by using the sensor data to obtain equipment attitude estimation represented in a quaternion form;

converting the device attitude estimation characterized in the form of quaternion into a device attitude estimation characterized in an Euler angle under a preset first coordinate system, and converting the device attitude estimation characterized in the form of quaternion into a device attitude estimation characterized in an Euler angle under a preset second coordinate system.

3. The method of claim 1, wherein the first coordinate system is a northeast coordinate system, wherein an azimuth angle of the device attitude estimate in the northeast coordinate system characterizes an azimuth angle of the input device, and wherein a pitch angle of the device attitude estimate in the northeast coordinate system characterizes a pitch angle of the input device; and

the determining a variation of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and updating the position of the cursor presented on the target device by using the variation of the target angle includes:

determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is greater than a preset first angle;

and if the angle is smaller than or equal to the first angle, updating the position of the cursor presented on the target equipment by using the variation of the azimuth angle and the variation of the pitch angle in the northeast coordinate system.

4. The method of claim 1, wherein the first coordinate system is a northeast coordinate system and the second coordinate system is a northeast coordinate system, wherein an azimuth angle of the device attitude estimate in the northeast coordinate system characterizes an azimuth angle of the input device, wherein a pitch angle of the device attitude estimate in the northeast coordinate system characterizes a pitch angle of the input device, wherein a pitch angle of the device attitude estimate in the northeast coordinate system characterizes an azimuth angle of the input device, and wherein a roll angle of the device attitude estimate in the northeast coordinate system characterizes a pitch angle of the input device; and

the determining a variation of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and updating the position of the cursor presented on the target device by using the variation of the target angle includes:

determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is greater than a preset first angle;

if the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than the first angle, determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset second angle, wherein the second angle is larger than the first angle;

and if the angle is larger than the second angle, updating the position of the cursor presented on the target equipment by using the variable quantity of the pitch angle and the variable quantity of the roll angle in the northeast coordinate system.

5. The method of claim 1, wherein the first coordinate system is a northeast coordinate system and the second coordinate system is a northeast coordinate system, wherein an azimuth angle of the device attitude estimate in the northeast coordinate system characterizes an azimuth angle of the input device, wherein a pitch angle of the device attitude estimate in the northeast coordinate system characterizes a pitch angle of the input device, wherein a pitch angle of the device attitude estimate in the northeast coordinate system characterizes an azimuth angle of the input device, and wherein a roll angle of the device attitude estimate in the northeast coordinate system characterizes a pitch angle of the input device; and

the determining a variation of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and updating the position of the cursor presented on the target device by using the variation of the target angle includes:

determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is greater than a preset first angle;

if the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than the first angle, determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset second angle, wherein the second angle is larger than the first angle;

and if the angle is smaller than or equal to the second angle, performing weighted average processing on the variation of the azimuth angle in the northeast coordinate system and the variation of the pitch angle in the northeast coordinate system to obtain fused angle variation, and updating the position of the cursor in the horizontal direction presented on the target device by using the fused angle variation.

6. The method according to claim 5, wherein after the updating the position of the cursor in the horizontal direction presented on the target device by the fused amount of angular change, the method further comprises:

updating a position in a vertical direction of a cursor presented on the target device with a variation amount of a roll angle in the northeast coordinate system.

7. A cursor position updating apparatus, comprising:

an acquisition unit configured to acquire sensor data of an input device, wherein the input device is configured to control a position of a cursor presented on a target device;

a tracking unit, configured to track a device attitude of the input device by using the sensor data to obtain a device attitude estimate, where the device attitude estimate is characterized by an euler angle in a preset first coordinate system and an euler angle in a preset second coordinate system, and the euler angle in the first coordinate system that characterizes the pitch angle of the input device is different from the euler angle in the second coordinate system that characterizes the pitch angle of the input device;

a first updating unit, configured to determine a variation of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update a position of a cursor presented on the target device by using the variation of the target angle, where the target angle includes an azimuth angle of the input device and a pitch angle of the input device.

8. An electronic device, comprising:

one or more processors;

a storage device having one or more programs stored thereon,

when executed by the one or more processors, cause the one or more processors to implement the method of any one of claims 1-6.

9. A computer-readable medium, on which a computer program is stored which, when being executed by a processor, carries out the method according to any one of claims 1-6.

Technical Field

The embodiment of the disclosure relates to the technical field of computers, in particular to a cursor position updating method and device and electronic equipment.

Background

The air mouse utilizes inertial sensors such as an accelerometer, a gyroscope, a magnetometer and the like built in a portable input device (such as a remote controller, a smart phone and the like) to map the attitude change of the device in a three-dimensional space to the corresponding cursor position change on an output device (such as a computer, a television and the like), so that the somatosensory mouse control of the output device is realized.

The attitude of the device in the three-dimensional space is usually expressed by an euler angle, and the representation of the spatial attitude of the device by using the euler angle is intuitive and understandable, but has a limitation, namely "gimbal deadlock", that when the device is in a condition that two rotating shafts coincide during the spatial rotation process, one degree of freedom of rotation is lost, so that the euler angle cannot accurately represent the spatial attitude of the device, and the representation result of the euler angle in the scene is unpredictable. If the device using the euler angle as the posture representation mode is in a posture vertically pointing to the sky or the ground, the pitch angle reaches a critical value (90 degrees or-90 degrees), which results in that the rotation effect of the azimuth angle and the roll angle is equivalent, so that the whole rotation representation system loses one degree of freedom, the representation of the azimuth angle and the roll angle is extremely unstable, the behavior of the mouse cursor is uncontrolled, and the user experience is influenced.

Disclosure of Invention

This disclosure is provided to introduce concepts in a simplified form that are further described below in the detailed description. This disclosure is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.

The embodiment of the disclosure provides a cursor position updating method and device and electronic equipment, which can guarantee the accuracy of a cursor position and the usability of a cursor under various extreme equipment postures and use scenes.

In a first aspect, an embodiment of the present disclosure provides a cursor position updating method, including: acquiring sensor data of an input device, wherein the input device is used for controlling the position of a cursor presented on a target device; tracking the equipment attitude of the input equipment by utilizing sensor data to obtain equipment attitude estimation, wherein the equipment attitude estimation is characterized by an Euler angle under a preset first coordinate system and an Euler angle under a preset second coordinate system, and the Euler angle for characterizing the pitch angle of the input equipment in the first coordinate system is different from the Euler angle for characterizing the pitch angle of the input equipment in the second coordinate system; and determining the variation of the target angle based on the Euler angle of the device attitude estimation in the first coordinate system and the Euler angle of the device attitude estimation in the second coordinate system, and updating the position of a cursor presented on the target device by using the variation of the target angle, wherein the target angle comprises an azimuth angle of the input device and a pitch angle of the input device.

In a second aspect, an embodiment of the present disclosure provides a cursor position updating apparatus, including: an acquisition unit configured to acquire sensor data of an input device, wherein the input device is configured to control a position of a cursor presented on a target device; the tracking unit is used for tracking the equipment attitude of the input equipment by utilizing the sensor data to obtain equipment attitude estimation, wherein the equipment attitude estimation is characterized by an Euler angle under a preset first coordinate system and an Euler angle under a preset second coordinate system, and the Euler angle for representing the pitch angle of the input equipment in the first coordinate system is different from the Euler angle for representing the pitch angle of the input equipment in the second coordinate system; and the first updating unit is used for determining the variation of the target angle based on the Euler angle of the device attitude estimation in the first coordinate system and the Euler angle of the device attitude estimation in the second coordinate system, and updating the position of the cursor presented on the target device by using the variation of the target angle, wherein the target angle comprises the azimuth angle of the input device and the pitch angle of the input device.

In a third aspect, an embodiment of the present disclosure provides an electronic device, including: one or more processors; a storage device for storing one or more programs which, when executed by one or more processors, cause the one or more processors to implement the cursor position updating method as in the first aspect.

In a fourth aspect, the disclosed embodiments provide a computer readable medium, on which a computer program is stored, which when executed by a processor, implements the steps of the cursor position updating method according to the first aspect.

According to the cursor position updating method, the cursor position updating device and the electronic equipment, sensor data of input equipment are firstly acquired; then, the device attitude of the input device may be tracked by using the sensor data to obtain a device attitude estimate, where the device attitude estimate is characterized by an euler angle in a preset first coordinate system and an euler angle in a preset second coordinate system, and the euler angle in the first coordinate system that characterizes the pitch angle of the input device is different from the euler angle in the second coordinate system that characterizes the pitch angle of the input device; finally, the change amount of the target angle including the azimuth angle of the input device and the pitch angle of the input device may be determined based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and the position of the cursor displayed on the target device may be updated using the change amount of the target angle. By the method, when the Euler angles are used as a data source for updating the mouse cursor, the attitude detection of the equipment and the dynamic change of the definition mode of the Euler angles and the representation sequence of the corresponding Euler angles are carried out, so that the problem of ' universal joint deadlock ' of the Euler angles and the cursor instability phenomenon caused by the universal joint deadlock ' are avoided, and the accuracy of the cursor position and the usability of the cursor in various extreme equipment attitudes and use scenes can be guaranteed.

Drawings

The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale.

FIG. 1 is an exemplary system architecture diagram in which various embodiments of the present disclosure may be applied;

FIG. 2 is a flow diagram for one embodiment of a cursor position update method according to the present disclosure;

FIG. 3 is a flow diagram of yet another embodiment of a cursor position update method according to the present disclosure;

FIG. 4 is a schematic diagram illustrating one embodiment of a cursor position updating apparatus according to the present disclosure;

FIG. 5 is a schematic block diagram of a computer system suitable for use in implementing an electronic device of an embodiment of the present disclosure.

Detailed Description

Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.

It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.

The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.

It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.

It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.

The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.

FIG. 1 illustrates an exemplary system architecture 100 to which embodiments of the cursor position update method of the present disclosure may be applied.

As shown in fig. 1, the system architecture 100 may include input devices 1011, 1012, a network 102, and output devices 1031, 1032. Network 102 is used to provide a medium for communication links between input devices 1011, 1012 and output devices 1031, 1032. Network 102 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.

A user may interact with output devices 1031, 1032 over network 102 using input devices 1011, 1012 to send or receive messages or the like, e.g., a user may send sensor data of input devices 1011, 1012 to output devices 1031, 1032. The output devices 1031, 1032 may have various communication client applications installed thereon, such as video-type applications, instant messaging software, and the like.

The input devices 1011, 1012 may be hardware or software. When the input devices 1011, 1012 are hardware, various electronic devices may be used to control the output devices, including but not limited to remote controls, smart phones, etc. When the input devices 1011, 1012 are software, they may be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.

The output devices 1031, 1032 may acquire sensor data of the input devices 1011, 1012; then, the device attitude of the input devices 1011 and 1012 can be tracked by using the sensor data to obtain device attitude estimation; finally, the change amount of the target angle may be determined based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and the position of the cursor presented on the output device 1031, 1032 may be updated using the change amount of the target angle.

The output devices 1031 and 1032 may be hardware or software. When the output devices 1031, 1032 are hardware, they may be various electronic devices having display screens and supporting information interaction, including but not limited to televisions, tablets, laptop computers, and the like. When the output devices 1031, 1032 are software, they may be installed in the electronic devices listed above. It may be implemented as multiple pieces of software or software modules (e.g., multiple pieces of software or software modules to provide distributed services) or as a single piece of software or software module. And is not particularly limited herein.

It should be further noted that the cursor position updating method provided by the embodiment of the present disclosure is generally executed by the output devices 1031, 1032, in this case, the cursor position updating apparatus is generally disposed in the output devices 1031, 1032.

It should be understood that the number of input devices, networks, and output devices in fig. 1 is merely illustrative. There may be any number of input devices, networks, and output devices, as desired for an implementation.

With continued reference to FIG. 2, a flow 200 of one embodiment of a cursor position update method according to the present disclosure is shown. The cursor position updating method comprises the following steps:

step 201, sensor data of an input device is acquired.

In the present embodiment, the execution subject of the cursor position updating method (e.g., the output device shown in fig. 1) may acquire sensor data of the input device. The input devices described above are typically used to control the position of a cursor presented on a target device. The input device may be paired with the target device in advance. By way of example, the input devices described above may include, but are not limited to: remote controller and smart phone, the target device may be a device that may include but is not limited to: computers and televisions.

Here, if the input device incorporates inertial sensors such as an accelerometer, a gyroscope, and a magnetometer, the sensor data may include acceleration, angular velocity, and magnetic field information (magnetic field intensity and direction).

Step 202, tracking the device attitude of the input device by using the sensor data to obtain the device attitude estimation.

In this embodiment, the executing body may track the device posture of the input device by using the sensor data to obtain a device posture estimate. Specifically, the executing body may track the device pose of the input device by using a preset sensor fusion algorithm. The above-mentioned sensor fusion algorithm may include, but is not limited to: kalman filtering method, and multi-bayes estimation method. The sensor fusion algorithm may also be characterized as an attitude estimation model, that is, the executing entity may also input the sensor data into a pre-trained attitude estimation model to obtain the device attitude estimation of the input device.

Here, the above-mentioned device attitude estimation is characterized by an euler angle in a preset first coordinate system and an euler angle in a preset second coordinate system. The first and second coordinate systems typically need to follow right-hand rules. The attitude of the device in three-dimensional space is usually expressed by euler angles, which are usually expressed by three direction angles of azimuth (horizontal declination angle between the current pointing direction of the device and the magnetic north pole), pitch angle (up-down pitch angle between the plane of the device and the ground plane), and roll angle (left-right roll angle between the plane of the device and the ground plane), that is, the spatial attitude of the device can be realized by three rotations.

In the first coordinate system, the euler angle that represents the pitch angle of the input device is generally different from the euler angle that represents the pitch angle of the input device in the second coordinate system. Specifically, if the euler angle that represents the pitch angle of the input device in the first coordinate system is a pitch angle, the euler angle that represents the pitch angle of the input device in the second coordinate system is an azimuth angle or a roll angle; if the euler angle for representing the pitch angle of the input device in the first coordinate system is an azimuth angle, the euler angle for representing the pitch angle of the input device in the second coordinate system is a pitch angle or a roll angle; if the euler angle for representing the pitch angle of the input device in the first coordinate system is a roll angle, the euler angle for representing the pitch angle of the input device in the second coordinate system is an azimuth angle or a pitch angle.

Step 203, based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, determining the variation of the target angle, and updating the position of the cursor presented on the target device by using the variation of the target angle.

In this embodiment, the execution body may determine the amount of change in the target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system. The target angle typically includes an azimuth angle of the input device and a pitch angle of the input device.

As an example, if the euler angle representing the pitch angle of the input device in the first coordinate system is an azimuth angle and the euler angle representing the pitch angle of the input device in the second coordinate system is a roll angle, the execution body may compare the azimuth angle of the device attitude estimation in the first coordinate system with a preset angle threshold. If the azimuth angle in the first coordinate system is equal to or less than the angle threshold, the variation of the azimuth angle in the first coordinate system may be determined as the variation of the target angle. If the azimuth angle in the first coordinate system is greater than the angle threshold, the amount of change in the roll angle in the second coordinate system may be determined as the amount of change in the target angle.

When angles are compared, the absolute values of the angles are compared.

Thereafter, the executing body may update the position of the cursor displayed on the target device by using the amount of change in the target angle. Specifically, since the target angle includes an azimuth angle of the input device and a pitch angle of the input device, the execution body may determine a product of a variation in the azimuth angle of the input device and a preset first step as a moving distance of a cursor presented on the target device in a horizontal direction, and may determine a product of a variation in the pitch angle of the input device and a preset second step as a moving distance of the cursor presented on the target device in a vertical direction, thereby implementing updating of a cursor position. The lengths of the first step and the second step may be the same or different.

The method provided by the above embodiment of the disclosure can avoid the "gimbal deadlock" problem of the euler angles and the cursor instability phenomenon caused by the gimbal deadlock problem of the euler angles by detecting the attitude of the device and dynamically changing the definition mode of the euler angles and the corresponding euler angle representation sequence when the euler angles are used as the data source for updating the mouse cursor, so that the accuracy of the cursor position and the usability of the cursor in various extreme device attitudes and use scenes can be guaranteed.

In some optional implementations, the executing body may track the device pose of the input device by using the sensor data to obtain a device pose estimate by: the execution body may track the device attitude of the target device using the sensor data to obtain a device attitude estimate represented in the form of a quaternion. In order to solve the problem of rotational variation in a three-dimensional space, the device attitude estimation may be characterized in terms of quaternions, as opposed to a two-dimensional space of complex numbers. Quaternions are made up of real numbers plus three imaginary units. Quaternions can be understood as four-dimensional spaces, the three imaginary parts can be understood as three orthogonal bases of three-dimensional spaces, and the real parts are perpendicular to the three-dimensional spaces. The posture of the output device in the three-dimensional space can be efficiently represented by using the form of quaternion. Since at this stage there is no processing of the relevant data for the cursor position involved, the device pose estimate can be more efficiently represented in the form of a quaternion.

Then, the executing body may convert the device attitude estimate represented in the form of a quaternion into a device attitude estimate represented in an euler angle in a preset first coordinate system, and may convert the device attitude estimate represented in the form of a quaternion into a device attitude estimate represented in an euler angle in a preset second coordinate system. Here, the conversion may be performed by using an existing conversion formula of quaternion and euler angle, and a specific conversion formula is not described herein again.

In some alternative implementations, the first coordinate system may be an East-North-Up (ENU) coordinate system having an X-axis (East axis) pointing generally East to the earth, a Y-axis (North axis) pointing generally North to the earth, and a Z-axis (sky axis) pointing generally perpendicular to the earth's surface and pointing upward. The northeast coordinate system may also be referred to as a station center coordinate system. The azimuth angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, and the pitch angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device.

The execution body may determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle, by: the execution body may determine whether the pitch angle of the device attitude estimation in the northeast coordinate system is greater than a preset first angle (e.g., 50 degrees). If the pitch angle in the northeast coordinate system is less than or equal to the first angle, the execution body may update the position of the cursor displayed on the target device by using the variation of the azimuth angle and the variation of the pitch angle in the northeast coordinate system.

Specifically, the executing body may determine a product of a variation of an azimuth angle in the northeast coordinate system and a preset first step as a moving distance of the cursor presented on the target device in the horizontal direction, and may determine a product of a variation of a pitch angle in the northeast coordinate system and a preset second step as a moving distance of the cursor presented on the target device in the vertical direction, thereby implementing an update of the cursor position. The lengths of the first step and the second step may be the same or different.

In some alternative implementations, the first coordinate system may be a northeast celestial coordinate system having an X-axis generally pointing east of the earth, a Y-axis generally pointing north of the earth, and a Z-axis generally perpendicular to the earth's surface and pointing upward. The second coordinate system may be a North-East-Down (NED) coordinate system having an X-axis (North axis) generally pointing North of the earth, a Y-axis (East axis) generally pointing East of the earth, and a Z-axis (ground axis) generally perpendicular to the earth's surface and pointing downward. The azimuth angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, the pitch angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device, the pitch angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, and the roll angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device.

The execution body may determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle, by: the executing body may determine whether the pitch angle of the device attitude estimation in the northeast coordinate system is greater than a preset first angle (e.g., 50 degrees); if the pitch angle in the northeast coordinate system is greater than the first angle, the execution body may determine whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is greater than a preset second angle (e.g., 80 degrees). Here, the second angle is generally larger than the first angle. If the pitch angle in the northeast coordinate system is greater than the second angle, the execution body may update the position of the cursor displayed on the target device using the change amount of the pitch angle and the change amount of the roll angle in the northeast coordinate system.

Specifically, the executing body may determine a product of a change amount of a pitch angle in the northeast coordinate system and a preset first step as a moving distance of the cursor presented on the target device in the horizontal direction, and may determine a product of a change amount of a roll angle in the northeast coordinate system and a preset second step as a moving distance of the cursor presented on the target device in the vertical direction, thereby implementing the update of the cursor position. The lengths of the first step and the second step may be the same or different.

In some alternative implementations, the first coordinate system may be a northeast celestial coordinate system having an X-axis generally pointing east of the earth, a Y-axis generally pointing north of the earth, and a Z-axis generally perpendicular to the earth's surface and pointing upward. The second coordinate system may be a northeast coordinate system having an X-axis generally pointing north of the earth, a Y-axis generally pointing east of the earth, and a Z-axis generally perpendicular to the surface of the earth and pointing downward. The azimuth angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, the pitch angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device, the pitch angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, and the roll angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device.

The execution body may determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle, by: the execution body may determine whether the pitch angle of the device attitude estimation in the northeast coordinate system is greater than a preset first angle (e.g., 50 degrees). If the pitch angle in the northeast coordinate system is greater than the first angle, the execution body may determine whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is greater than a preset second angle (e.g., 80 degrees). Here, the second angle is generally larger than the first angle. If the pitch angle in the northeast coordinate system is smaller than or equal to the second angle, the execution body may perform weighted average processing on the variation of the azimuth angle in the northeast coordinate system and the variation of the pitch angle in the northeast coordinate system to obtain a fused angle variation. In the weighted average processing, the weight may be adjusted according to a position of the pitch angle in the northeast coordinate system in a section between the first angle and the second angle. Generally, the closer the pitch angle in the northeast coordinate system is to the first angle, the higher the weight corresponding to the variation in the azimuth angle in the northeast coordinate system is, and the lower the weight corresponding to the variation in the pitch angle in the northeast coordinate system is; conversely, the closer the pitch angle in the northeast coordinate system is to the second angle, the smaller the weight corresponding to the variation in the azimuth angle in the northeast coordinate system is, and the larger the weight corresponding to the variation in the pitch angle in the northeast coordinate system is.

Then, the executing body may update the position of the cursor in the horizontal direction presented on the target device by using the fused angle change amount. Specifically, the executing body may determine a product of the fused angle variation and a preset first step as a moving distance of the cursor presented on the target device in the horizontal direction, so as to update a position of the cursor in the horizontal direction. Here, the executing body may determine a product of a variation of the pitch angle in the northeast coordinate system and a preset second step as a moving distance of the cursor presented on the target device in the vertical direction, so as to update a position of the cursor in the vertical direction. The lengths of the first step and the second step may be the same or different.

In some alternative implementations, the executing body may update a position in a vertical direction of a cursor presented on the target device with a variation of a roll angle in the northeast coordinate system. Specifically, the executing body may determine a product of a variation of the roll angle in the northeast coordinate system and a preset second step as a moving distance of the cursor presented on the target device in the vertical direction, so as to update a position of the cursor in the vertical direction.

With further reference to FIG. 3, a flow 300 of yet another embodiment of a cursor position update method is shown. The flow 300 of the cursor position updating method includes the following steps:

step 301, sensor data of an input device is acquired.

Step 302, tracking the device attitude of the input device using the sensor data to obtain a device attitude estimate.

In the present embodiment, the steps 301-302 can be performed in a similar manner to the steps 201-202, and will not be described herein again.

Step 303, determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is greater than a preset first angle.

Here, the X-axis of the northeast sky coordinate system is generally pointing east to the earth, the Y-axis is generally pointing north to the earth, and the Z-axis is generally perpendicular to the earth's surface and pointing upward. The northeast coordinate system may also be referred to as a station center coordinate system. The azimuth angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, and the pitch angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device.

In this embodiment, an executing body of the cursor position updating method (e.g., the output device shown in fig. 1) may determine whether the pitch angle of the device attitude estimation in the northeast coordinate system is greater than a preset first angle (e.g., 50 degrees).

And 304, if the angle is smaller than or equal to the first angle, updating the position of the cursor presented on the target device by using the variation of the azimuth angle and the variation of the pitch angle in the northeast coordinate system.

In this embodiment, if it is determined in step 303 that the pitch angle in the northeast coordinate system is smaller than or equal to the first angle, the execution body may update the position of the cursor displayed on the target device by using the variation of the azimuth angle and the variation of the pitch angle in the northeast coordinate system.

Specifically, the executing body may determine a product of a variation of an azimuth angle in the northeast coordinate system and a preset first step as a moving distance of the cursor presented on the target device in the horizontal direction, and may determine a product of a variation of a pitch angle in the northeast coordinate system and a preset second step as a moving distance of the cursor presented on the target device in the vertical direction, thereby implementing an update of the cursor position. The lengths of the first step and the second step may be the same or different.

And 305, if the angle is larger than the first angle, determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset second angle.

In this embodiment, if it is determined in step 303 that the pitch angle in the northeast coordinate system is greater than the first angle, the executive body may determine whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is greater than a preset second angle (e.g., 80 degrees). Here, the second angle is generally larger than the first angle.

And step 306, if the angle is larger than the second angle, updating the position of the cursor presented on the target device by using the variable quantity of the pitch angle and the variable quantity of the roll angle in the northeast coordinate system.

In this embodiment, if it is determined in step 305 that the pitch angle in the northeast coordinate system is greater than the second angle, the execution body may update the position of the cursor displayed on the target device using the change amount of the pitch angle and the change amount of the roll angle in the northeast coordinate system.

Specifically, the executing body may determine a product of a change amount of a pitch angle in the northeast coordinate system and a preset first step as a moving distance of the cursor presented on the target device in the horizontal direction, and may determine a product of a change amount of a roll angle in the northeast coordinate system and a preset second step as a moving distance of the cursor presented on the target device in the vertical direction, thereby implementing the update of the cursor position. The lengths of the first step and the second step may be the same or different.

And 307, if the angle is smaller than or equal to the second angle, performing weighted average processing on the variation of the azimuth angle in the northeast coordinate system and the variation of the pitch angle in the northeast coordinate system to obtain a fused angle variation, and updating the position of the cursor in the horizontal direction presented on the target device by using the fused angle variation.

In this embodiment, if it is determined in step 305 that the pitch angle in the northeast coordinate system is equal to or smaller than the second angle, the execution body may perform weighted average processing on the variation of the azimuth angle in the northeast coordinate system and the variation of the pitch angle in the northeast coordinate system to obtain the merged angle variation. In the weighted average processing, the weight may be adjusted according to a position of the pitch angle in the northeast coordinate system in a section between the first angle and the second angle.

Then, the executing body may update the position of the cursor in the horizontal direction presented on the target device by using the fused angle change amount. Specifically, the executing body may determine a product of the fused angle variation and a preset first step as a moving distance of the cursor presented on the target device in the horizontal direction, so as to update a position of the cursor in the horizontal direction. Here, the execution body may perform weighted average processing on the change amount of the pitch angle in the northeast coordinate system and the change amount of the roll angle in the northeast coordinate system, and update the position in the vertical direction of the cursor presented on the target device with the merged angle change amount as a second angle change amount. Specifically, the executing body may determine a product of the second angle variation and a preset second person step length as a moving distance of the cursor displayed on the target device in the vertical direction, so as to update a position of the cursor in the vertical direction. The lengths of the first step and the second step may be the same or different.

Generally, the closer the pitch angle in the northeast coordinate system is to the first angle, the greater the weight corresponding to the variation in the azimuth angle and the variation in the pitch angle in the northeast coordinate system is, and the smaller the weight corresponding to the variation in the pitch angle and the variation in the roll angle in the northeast coordinate system is; conversely, the closer the pitch angle in the northeast coordinate system is to the second angle, the smaller the weight corresponding to the variation in the azimuth angle and the variation in the pitch angle in the northeast coordinate system is, and the larger the weight corresponding to the variation in the pitch angle and the variation in the roll angle in the northeast coordinate system is.

As can be seen from fig. 3, compared with the embodiment corresponding to fig. 2, the flow 300 of the cursor position updating method in this embodiment embodies the steps of monitoring the pitch angle (the pitch angle representing the input device) in the northeast sky coordinate system when the euler angle defined by the northeast sky coordinate system is used as the data source for cursor updating, and updating the position of the cursor by using the euler angle in the northeast earth coordinate system when there is a risk of "gimbal deadlock". Therefore, according to the scheme described in the embodiment, when the northeast coordinate system is used for representing the pitch angle of the input device and the risk of universal joint deadlock exists, the position of the cursor can be updated by using the Euler angle which is used for representing the pitch angle of the input device in the northeast coordinate system, so that the accuracy of the cursor position in various extreme device postures and using scenes and the usability of the cursor can be guaranteed.

With further reference to fig. 4, as an implementation of the methods shown in the above-mentioned figures, the present disclosure provides an embodiment of a cursor position updating apparatus, which corresponds to the method embodiment shown in fig. 2, and which can be applied in various electronic devices.

As shown in fig. 4, the cursor position updating device 400 of the present embodiment includes: an acquisition unit 401, a tracking unit 402 and a first updating unit 403. The acquiring unit 401 is configured to acquire sensor data of an input device, where the input device is used to control a position of a cursor presented on a target device; the tracking unit 402 is configured to track an apparatus attitude of the input apparatus by using the sensor data, so as to obtain an apparatus attitude estimate, where the apparatus attitude estimate is characterized by an euler angle in a preset first coordinate system and an euler angle in a preset second coordinate system, and the euler angle in the first coordinate system, which characterizes a pitch angle of the input apparatus, is different from the euler angle in the second coordinate system, which characterizes the pitch angle of the input apparatus; the first updating unit 403 is configured to determine a variation of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device by using the variation of the target angle, where the target angle includes an azimuth angle of the input device and a pitch angle of the input device.

In this embodiment, the specific processes of the acquiring unit 401, the tracking unit 402 and the first updating unit 403 of the cursor position updating device 400 can refer to step 201, step 202 and step 203 in the corresponding embodiment of fig. 2.

In some optional implementations, the tracking unit 402 may be further configured to track the device pose of the input device by using the sensor data to obtain a device pose estimate: the tracking unit 402 may track the device attitude of the target device by using the sensor data to obtain a device attitude estimate represented in a form of a quaternion; then, the device attitude estimation represented in the form of quaternion may be converted into a device attitude estimation represented in an euler angle in a preset first coordinate system, and the device attitude estimation represented in the form of quaternion may be converted into a device attitude estimation represented in an euler angle in a preset second coordinate system.

In some alternative implementations, the first coordinate system may be a northeast coordinate system, the azimuth angle of the device attitude estimate in the northeast coordinate system may be indicative of the azimuth angle of the input device, and the pitch angle of the device attitude estimate in the northeast coordinate system may be indicative of the pitch angle of the input device; and the first updating unit 403 may be further configured to determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle by: the first updating unit 403 may determine whether the pitch angle of the device attitude estimate in the northeast coordinate system is greater than a preset first angle; if the angle is smaller than or equal to the first angle, the first updating unit 403 may update the position of the cursor displayed on the target device by using the variation of the azimuth angle and the variation of the pitch angle in the northeast coordinate system.

In some alternative implementations, the first coordinate system may be a northeast coordinate system, the second coordinate system may be a northeast coordinate system, the azimuth angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, the pitch angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device, the pitch angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, and the roll angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device; and the first updating unit 403 may be further configured to determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle by: the first updating unit 403 may determine whether the pitch angle of the device attitude estimate in the northeast coordinate system is greater than a preset first angle; if the angle is greater than the first angle, the first updating unit 403 may determine whether the pitch angle of the device attitude estimation in the northeast coordinate system is greater than a preset second angle, where the second angle is greater than the first angle; if the angle is larger than the second angle, the first updating unit 403 may update the position of the cursor displayed on the target device by using the change amount of the pitch angle and the change amount of the roll angle in the northeast coordinate system.

In some alternative implementations, the first coordinate system may be a northeast coordinate system, the second coordinate system may be a northeast coordinate system, the azimuth angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, the pitch angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device, the pitch angle of the device attitude estimate in the northeast coordinate system may represent the azimuth angle of the input device, and the roll angle of the device attitude estimate in the northeast coordinate system may represent the pitch angle of the input device; and the first updating unit 403 may be further configured to determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle by: the first updating unit 403 may determine whether the pitch angle of the device attitude estimate in the northeast coordinate system is greater than a preset first angle; if the angle is greater than the first angle, the first updating unit 403 may determine whether the pitch angle of the device attitude estimation in the northeast coordinate system is greater than a preset second angle, where the second angle is greater than the first angle; if the angle is equal to or smaller than the second angle, the first updating unit 403 may perform weighted average processing on the variation of the azimuth angle in the northeast coordinate system and the variation of the pitch angle in the northeast coordinate system to obtain a fused angle variation, and update the horizontal position of the cursor displayed on the target device by using the fused angle variation.

In some alternative implementations, the cursor position updating apparatus 400 may include: a second update unit (not shown in the figure). The second updating unit may be configured to update a position in a vertical direction of a cursor displayed on the target device with a change amount of the roll angle in the northeast coordinate system.

Referring now to FIG. 5, a block diagram of an electronic device (e.g., the output device of FIG. 1) 500 suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in the embodiments of the present disclosure may include, but are not limited to, mobile terminals such as notebook computers, PAD (tablet), PMP (portable multimedia player), and the like, and fixed terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 5 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.

As shown in fig. 5, electronic device 500 may include a processing means (e.g., central processing unit, graphics processor, etc.) 501 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)502 or a program loaded from a storage means 508 into a Random Access Memory (RAM) 503. In the RAM503, various programs and data necessary for the operation of the electronic apparatus 500 are also stored. The processing device 501, the ROM 502, and the RAM503 are connected to each other through a bus 504. An input/output (I/O) interface 505 is also connected to bus 504.

Generally, the following devices may be connected to the I/O interface 505: input devices 506 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 507 including, for example, a Liquid Crystal Display (LCD), speakers, vibrators, and the like; and a communication device 509. The communication means 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. While fig. 5 illustrates an electronic device 500 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided. Each block shown in fig. 5 may represent one device or may represent multiple devices as desired.

In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method illustrated in the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 509, or installed from the storage means 508, or installed from the ROM 502. The computer program, when executed by the processing device 501, performs the above-described functions defined in the methods of embodiments of the present disclosure. It should be noted that the computer readable medium described in the embodiments of the present disclosure may be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In embodiments of the disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In embodiments of the present disclosure, however, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.

The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device. The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring sensor data of an input device, wherein the input device is used for controlling the position of a cursor presented on a target device; tracking the equipment attitude of the input equipment by utilizing sensor data to obtain equipment attitude estimation, wherein the equipment attitude estimation is characterized by an Euler angle under a preset first coordinate system and an Euler angle under a preset second coordinate system, and the Euler angle for characterizing the pitch angle of the input equipment in the first coordinate system is different from the Euler angle for characterizing the pitch angle of the input equipment in the second coordinate system; and determining the variation of the target angle based on the Euler angle of the device attitude estimation in the first coordinate system and the Euler angle of the device attitude estimation in the second coordinate system, and updating the position of a cursor presented on the target device by using the variation of the target angle, wherein the target angle comprises an azimuth angle of the input device and a pitch angle of the input device.

Computer program code for carrying out operations for embodiments of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).

The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.

According to one or more embodiments of the present disclosure, there is provided a cursor position updating method including: acquiring sensor data of an input device, wherein the input device is used for controlling the position of a cursor presented on a target device; tracking the device attitude of the input device by using the sensor data to obtain a device attitude estimate, wherein the device attitude estimate is characterized by an euler angle in a preset first coordinate system and an euler angle in a preset second coordinate system, and the euler angle in the first coordinate system, which characterizes the pitch angle of the input device, is different from the euler angle in the second coordinate system, which characterizes the pitch angle of the input device; determining a variation of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and updating a position of a cursor presented on the target device by using the variation of the target angle, wherein the target angle includes an azimuth angle of the input device and a pitch angle of the input device.

According to one or more embodiments of the present disclosure, tracking the device pose of the input device by using the sensor data to obtain a device pose estimate includes: tracking the equipment attitude of the target equipment by using the sensor data to obtain equipment attitude estimation represented in a quaternion form; and converting the device attitude estimation represented in the form of quaternion into a device attitude estimation represented in an Euler angle under a preset first coordinate system, and converting the device attitude estimation represented in the form of quaternion into a device attitude estimation represented in an Euler angle under a preset second coordinate system.

In accordance with one or more embodiments of the present disclosure, the first coordinate system is a northeast coordinate system, the azimuth angle of the device attitude estimate in the northeast coordinate system characterizes the azimuth angle of the input device, and the pitch angle of the device attitude estimate in the northeast coordinate system characterizes the pitch angle of the input device; and determining a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and updating a position of a cursor presented on the target device using the change amount of the target angle, the method including: determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset first angle; and if the angle is smaller than or equal to the first angle, updating the position of the cursor presented on the target equipment by using the variation of the azimuth angle and the variation of the pitch angle in the northeast coordinate system.

In accordance with one or more embodiments of the present disclosure, the first coordinate system is a northeast coordinate system, the second coordinate system is a northeast coordinate system, an azimuth of the device attitude estimate in the northeast coordinate system characterizes an azimuth of the input device, a pitch of the device attitude estimate in the northeast coordinate system characterizes a pitch of the input device, a pitch of the device attitude estimate in the northeast coordinate system characterizes an azimuth of the input device, a roll of the device attitude estimate in the northeast coordinate system characterizes a pitch of the input device; and determining a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and updating a position of a cursor presented on the target device using the change amount of the target angle, the method including: determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset first angle; if the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than the first angle, determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset second angle, wherein the second angle is larger than the first angle; if the angle is larger than the second angle, the position of the cursor displayed on the target device is updated by using the change amount of the pitch angle and the change amount of the roll angle in the northeast coordinate system.

In accordance with one or more embodiments of the present disclosure, the first coordinate system is a northeast coordinate system, the second coordinate system is a northeast coordinate system, an azimuth of the device attitude estimate in the northeast coordinate system characterizes an azimuth of the input device, a pitch of the device attitude estimate in the northeast coordinate system characterizes a pitch of the input device, a pitch of the device attitude estimate in the northeast coordinate system characterizes an azimuth of the input device, a roll of the device attitude estimate in the northeast coordinate system characterizes a pitch of the input device; and determining a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and updating a position of a cursor presented on the target device using the change amount of the target angle, the method including: determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset first angle; if the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than the first angle, determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset second angle, wherein the second angle is larger than the first angle; and if the angle is smaller than or equal to the second angle, performing weighted average processing on the variation of the azimuth angle in the northeast coordinate system and the variation of the pitch angle in the northeast coordinate system to obtain fused angle variation, and updating the position of the cursor in the horizontal direction presented on the target device by using the fused angle variation.

According to one or more embodiments of the present disclosure, after the updating the position of the cursor in the horizontal direction presented on the target device by using the fused angle change amount, the method further includes: and updating the position of the cursor in the vertical direction presented on the target device by using the variation of the roll angle in the northeast coordinate system.

According to one or more embodiments of the present disclosure, there is provided a cursor position updating apparatus including: an acquisition unit configured to acquire sensor data of an input device, wherein the input device is used to control a position of a cursor presented on a target device; a tracking unit configured to track a device attitude of the input device using the sensor data to obtain a device attitude estimate, wherein the device attitude estimate is characterized by an euler angle in a preset first coordinate system and an euler angle in a preset second coordinate system, and the euler angle in the first coordinate system that characterizes the pitch angle of the input device is different from the euler angle in the second coordinate system that characterizes the pitch angle of the input device; a first updating unit configured to determine a variation of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update a position of a cursor presented on the target device using the variation of the target angle, wherein the target angle includes an azimuth angle of the input device and a pitch angle of the input device.

According to one or more embodiments of the present disclosure, the tracking unit may be further configured to track the device pose of the input device by using the sensor data to obtain a device pose estimate by: tracking the equipment attitude of the target equipment by using the sensor data to obtain equipment attitude estimation represented in a quaternion form; and converting the device attitude estimation represented in the form of quaternion into a device attitude estimation represented in an Euler angle under a preset first coordinate system, and converting the device attitude estimation represented in the form of quaternion into a device attitude estimation represented in an Euler angle under a preset second coordinate system.

In accordance with one or more embodiments of the present disclosure, the first coordinate system is a northeast coordinate system, the azimuth angle of the device attitude estimate in the northeast coordinate system characterizes the azimuth angle of the input device, and the pitch angle of the device attitude estimate in the northeast coordinate system characterizes the pitch angle of the input device; and the first updating unit may be further configured to determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle by: determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset first angle; and if the angle is smaller than or equal to the first angle, updating the position of the cursor presented on the target equipment by using the variation of the azimuth angle and the variation of the pitch angle in the northeast coordinate system.

In accordance with one or more embodiments of the present disclosure, the first coordinate system is a northeast coordinate system, the second coordinate system is a northeast coordinate system, an azimuth of the device attitude estimate in the northeast coordinate system characterizes an azimuth of the input device, a pitch of the device attitude estimate in the northeast coordinate system characterizes a pitch of the input device, a pitch of the device attitude estimate in the northeast coordinate system characterizes an azimuth of the input device, a roll of the device attitude estimate in the northeast coordinate system characterizes a pitch of the input device; and the first updating unit may be further configured to determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle by: determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset first angle; if the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than the first angle, determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset second angle, wherein the second angle is larger than the first angle; if the angle is larger than the second angle, the position of the cursor displayed on the target device is updated by using the change amount of the pitch angle and the change amount of the roll angle in the northeast coordinate system.

In accordance with one or more embodiments of the present disclosure, the first coordinate system is a northeast coordinate system, the second coordinate system is a northeast coordinate system, an azimuth of the device attitude estimate in the northeast coordinate system characterizes an azimuth of the input device, a pitch of the device attitude estimate in the northeast coordinate system characterizes a pitch of the input device, a pitch of the device attitude estimate in the northeast coordinate system characterizes an azimuth of the input device, a roll of the device attitude estimate in the northeast coordinate system characterizes a pitch of the input device; and the first updating unit may be further configured to determine a change amount of a target angle based on the euler angle of the device attitude estimation in the first coordinate system and the euler angle of the device attitude estimation in the second coordinate system, and update the position of the cursor presented on the target device with the change amount of the target angle by: determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset first angle; if the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than the first angle, determining whether the pitch angle of the equipment attitude estimation in the northeast coordinate system is larger than a preset second angle, wherein the second angle is larger than the first angle; and if the angle is smaller than or equal to the second angle, performing weighted average processing on the variation of the azimuth angle in the northeast coordinate system and the variation of the pitch angle in the northeast coordinate system to obtain fused angle variation, and updating the position of the cursor in the horizontal direction presented on the target device by using the fused angle variation.

According to one or more embodiments of the present disclosure, the apparatus further comprises: a second updating unit for updating a position in a vertical direction of a cursor presented on the target device with a variation of a roll angle in the northeast coordinate system.

The units described in the embodiments of the present disclosure may be implemented by software or hardware. The described units may also be provided in a processor, and may be described as: a processor includes an acquisition unit, a tracking unit, and a first update unit. The names of these units do not in some cases constitute a limitation of the unit itself, and for example, the acquisition unit may also be described as a "unit that acquires sensor data of an input device".

The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the invention in the embodiments of the present disclosure is not limited to the specific combination of the above-mentioned features, but also encompasses other embodiments in which any combination of the above-mentioned features or their equivalents is made without departing from the inventive concept as defined above. For example, the above features and (but not limited to) technical features with similar functions disclosed in the embodiments of the present disclosure are mutually replaced to form the technical solution.

21页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:光标移动方法、装置和电子设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类