CN111078029A - Air mouse information determination method, device, equipment and storage medium - Google Patents
Air mouse information determination method, device, equipment and storage medium Download PDFInfo
- Publication number
- CN111078029A CN111078029A CN201911231048.2A CN201911231048A CN111078029A CN 111078029 A CN111078029 A CN 111078029A CN 201911231048 A CN201911231048 A CN 201911231048A CN 111078029 A CN111078029 A CN 111078029A
- Authority
- CN
- China
- Prior art keywords
- angular velocity
- air mouse
- data
- determining
- roll angle
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/0346—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor with detection of the device orientation or free movement in a 3D space, e.g. 3D mice, 6-DOF [six degrees of freedom] pointers using gyroscopes, accelerometers or tilt-sensors
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/01—Input arrangements or combined input and output arrangements for interaction between user and computer
- G06F3/03—Arrangements for converting the position or the displacement of a member into a coded form
- G06F3/033—Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
- G06F3/038—Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
Abstract
The invention discloses a method, a device, equipment and a storage medium for determining air mouse information, wherein the method comprises the steps of determining roll angle data when an air mouse moves; acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves; determining a moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity; and mapping the movement track to a display screen according to the roll angle data. The scheme ensures that the air mouse has small calculated amount during control, the track movement is smoother, and the data processing speed is accelerated.
Description
Technical Field
The invention relates to the technical field of computers, in particular to an air mouse information determination method, device, equipment and storage medium.
Background
The air mouse is an information input and control device with a brand new concept and different from the conventional mouse principle. When the user uses the air mouse, the user can wave hands in the air to finish the operation of displaying information.
In the process of implementing the invention, the inventor finds that the prior art has the following defects: in a control mechanism for realizing the air mouse, a course angle and a pitch angle of a human hand are determined through data collected by a gyroscope sensor, so that a course angular velocity and a pitch angular velocity of the human hand are determined, the course angular velocity of the human hand is mapped into a track for the mouse to move up and down, and the pitch angular velocity of the human hand is mapped into a track for the mouse to move left and right. Meanwhile, the course angle and the pitch angle and the corresponding course angular velocity and pitch angular velocity are required to be calculated simultaneously in the mode, the calculated amount is large, the CPU load is high, the sensitivity of the air mouse is poor when the air mouse is used, and in the design of a small-capacity chip, the algorithm of the mode runs slowly, the memory consumption is high, and even the air mouse cannot be used normally.
Disclosure of Invention
In view of this, embodiments of the present invention provide a method, an apparatus, a device, and a storage medium for determining air mouse information, so that the air mouse has a small calculation amount during control, and the track movement is smoother, thereby further increasing the data processing speed.
In a first aspect, an embodiment of the present invention provides an air mouse information determining method, including:
determining roll angle data when the air mouse moves;
acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves;
determining a moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity;
and mapping the movement track to a display screen according to the roll angle data.
Optionally, the determining roll angle data when the air mouse moves includes:
acquiring angular velocity data acquired by a gyroscope, and constructing a differential equation according to the angular velocity data;
and calculating the differential equation to obtain roll angle data when the air mouse moves.
Optionally, the constructing a differential equation according to the angular velocity data includes:
and determining a compensation value of the angular velocity data, and constructing a quaternion differential equation after compensating the angular velocity data.
Optionally, the determining a compensation value of the angular velocity data includes:
acquiring acceleration data acquired by a gyroscope, converting the acceleration data from a three-dimensional vector into a unit vector, and transforming a coordinate system to obtain an accelerometer calculation value;
and determining a compensation value of the angular velocity data according to the acceleration data and the acceleration calculation value.
Optionally, the compensating the angular velocity data includes:
integrating the compensation value by using the set first parameter;
and compensating the angular velocity data according to the integration result and a second parameter.
Optionally, the constructing a differential equation according to the angular velocity data includes:
and setting an initial attitude by using a norm of a quaternion, and constructing a quaternion differential equation according to the angular velocity data.
Optionally, the calculating the differential equation to obtain roll angle data when the air mouse moves includes:
and calculating the quaternary differential equation by using a first-order Picard algorithm, and performing orthogonalization processing on the quaternion to obtain roll angle data when the air mouse moves.
Optionally, the determining the movement track of the air mouse according to the first axial angular velocity and the second axial angular velocity includes:
determining the up-and-down movement track of the mouse according to the first axial angular velocity;
and determining the left-right movement track of the mouse according to the second axial angular velocity.
Optionally, the mapping the movement track to a display screen according to the roll angle data includes:
and converting the moving track from a machine body coordinate system to a geographical coordinate system according to the roll angle data, and mapping the moving track to a display screen.
Optionally, after the mapping the movement track to the display screen according to the roll angle data, the method includes:
determining sensitivity data of the air mouse;
and controlling the track displayed in the display screen according to the sensitivity data.
In a second aspect, an embodiment of the present invention further provides an air mouse information determining apparatus, including:
the roll angle determining module is used for determining roll angle data when the air mouse moves;
the angular velocity determination module is used for acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves;
the first track determining module is used for determining the moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity;
and the second track determining module is used for mapping the moving track to a display screen according to the roll angle data.
In a third aspect, an embodiment of the present invention further provides an air mouse information determining apparatus, including: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the air mouse information determination method of the first aspect.
In a fourth aspect, embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform the air mouse information determination method according to the first aspect.
According to the air mouse information determining method, the device, the equipment and the storage medium, the roll angle data when the air mouse moves are determined, the first axial angular velocity and the second axial angular velocity when the air mouse moves are obtained, the moving track of the air mouse is determined according to the first axial angular velocity and the second axial angular velocity, and the moving track is mapped to the display screen according to the roll angle data, so that the problems that in the prior art, the air mouse information data is large in calculated amount when processed, the CPU load is high, and the air mouse is poor in sensitivity when used are solved, the calculated amount is small when the air mouse is controlled, the track movement is smooth, and the data processing speed is further accelerated.
Drawings
Other features, objects and advantages of the invention will become more apparent upon reading of the detailed description of non-limiting embodiments made with reference to the following drawings:
FIG. 1 is a flowchart of an air mouse information determination method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another air mouse information determination method according to an embodiment of the present invention;
FIG. 3 is a flowchart of another air mouse information determination method according to an embodiment of the present invention;
FIG. 4 is a flowchart of another air mouse information determination method according to an embodiment of the present invention;
FIG. 5 is a flowchart of another air mouse information determination method according to an embodiment of the present invention;
FIG. 6 is a flowchart of another air mouse information determination method according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an air mouse information determination apparatus according to a sixth embodiment of the present invention;
fig. 8 is a schematic structural diagram of an air mouse information determining apparatus according to a seventh embodiment of the present invention.
Detailed Description
The present application will be described in further detail with reference to the following drawings and examples. It is to be understood that the specific embodiments described herein are for purposes of illustration and not limitation. It should be further noted that, for the convenience of description, only some of the structures related to the present application are shown in the drawings, not all of the structures.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action or object from another entity or action or object without necessarily requiring or implying any actual such relationship or order between such entities or actions or objects. For example, "first" and "second" of the first operation instruction and the second operation instruction are used to distinguish two different instruction operations.
The air mouse information determination method provided in the embodiment of the present application may be executed by an air mouse information determination device, where the air mouse information determination device may be implemented in a software and/or hardware manner, and the air mouse information determination device may be formed by two or more physical entities or may be formed by one physical entity. For example, the air mouse information determination device may be a smart pen, a smart mouse, or the like.
For the convenience of understanding, the air mouse information determination device is exemplarily described by the intelligent pen in the embodiment. Specifically, the embodiment of the present application describes a method for determining air mouse information by taking an example of running an intelligent pen application having an air mouse function.
Fig. 1 is a flowchart of an air mouse information determining method according to an embodiment of the present disclosure. Referring to fig. 1, the method for determining air mouse information specifically includes:
s101, determining roll angle data when the air mouse moves.
The air mouse is information input and control equipment with a brand-new concept and different from a conventional mouse principle, and the function of the air mouse can realize that a user wave hands in the air to finish the operation of displaying information, for example, the user moves the hands rightwards, and a cursor displayed in a corresponding display screen also moves rightwards so as to realize an interaction function. Specifically, if the customized equipment with the air mouse function is worn on the hand, and if the intelligent pen with the air mouse function is integrated, the intelligent pen can realize the man-machine interaction with the display screen equipment, and if the wireless mouse with the air mouse function is integrated.
The roll angle refers to an included angle between a horizontal axis of a carrier (such as an intelligent pen) and a horizontal line, a right-hand system is formed by defining the right (x axis), the front (y axis) and the upper (z axis) of the carrier, an angle rotating around a forward axis is a roll angle, an angle rotating around a rightward axis is a pitch angle, and an angle rotating around an upward axis is a heading angle. In the prior art, the heading angular speed of a human hand is mapped into a vertical mouse moving track, the pitching angular speed of the human hand is mapped into a horizontal mouse moving track, and the air mouse information is determined by calculating the heading angle and the pitching angle.
In one embodiment, when a user holds the intelligent pen to move, the gyroscope is used for collecting angular velocity data, a differential equation is constructed according to the angular velocity data, and the differential equation is calculated to obtain roll angle data when the air mouse moves. Optionally, the gyroscope may determine angular velocities and accelerations for a plurality of axes for a six-axis gyroscope. The determination of the angular velocity includes: when the gyroscope rotates relative to a shell (such as a smart pen shell object) at an angle, an elastic element integrated in the gyroscope generates an elastic constraint moment opposite to the deflection direction of the gyroscope, the moment is converted into a voltage and then is read by the chip through ic after being converted by adc, and the specific measuring range can be set to be 125'/s, 250'/s, 500'/s, 1000'/s and 200'/s, and if the measuring range is x '/s, the angular speed required to be calculated is yLSB/('/s), and the formula y is 65 x.
S102, obtaining a first axial angular velocity and a second axial angular velocity when the air mouse moves.
In one embodiment, taking a right-hand example consisting of three directions of right (x-axis), front (y-axis), and up (z-axis) defined in S101 as an example, the first axis is the x-axis, and the second axis is the z-axis. The first axial angular velocity and the second axial angular velocity, namely the angular velocities in the x-axis direction and the z-axis direction, of the air mouse during movement can be acquired through the gyroscope. The principle and manner of determination are the same as those described above, and are not described herein again.
S103, determining the moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity.
In one embodiment, a first axial angular velocity (x axial angular velocity) is determined as the up-and-down movement velocity of the air mouse, and a second axial (z axial angular velocity) is determined as the left-and-right movement velocity of the mouse. The original angular velocity collected by the gyroscope is thus mapped to the speed of movement of the air mouse in different directions. After obtaining the moving speeds in different directions, the moving trajectory in the direction can be determined accordingly, for example, taking the up-down moving trajectory of the mouse as an example, if the moving speed is x in the initial state, and the moving speed is y after one sampling period s, then the moving distance in the direction is l ═ y-x) s/2. In an embodiment, the up-down and left-right movement tracks of the mouse can be determined by the acceleration collected by the gyroscope, or the two tracks are combined, optionally, different weight values can be set according to the time length, the angular velocity weight value is greater than the acceleration weight value in a short time range, and the angular velocity weight value is less than the acceleration weight value in a long time range.
And S104, mapping the movement track to a display screen according to the roll angle data.
In step S103, the determined movement track of the air mouse in the up-down and left-right directions is a movement track in the body coordinate system, and the movement track is mapped to the display screen according to the roll angle data, that is, the movement track of the air mouse in the body coordinate system is mapped to the geographical coordinate system by the roll angle and displayed in the display screen.
In one embodiment, a user may interact with the display screen by holding the smart pen by hand, for example, the display screen displays a mouse arrow, and when the user holds the smart pen to move in the up-down, left-right directions, the mouse arrow in the display screen may correspondingly move synchronously along the track.
Optionally, taking the determined roll angle as roll as an example, a two-dimensional rotation matrix is constructed by using the roll angle, and xDeal and yDeal are defined as unprocessed offsets transmitted to the mouse arrow, and the calculation method is as follows:
yDeal=penGyroscope->gyroscopeY*cos(roll)- penGyroscope->gyroscopeZ*sin(roll);
xDeal=penGyroscope->gyroscopeY*sin(roll)+ penGyroscope->gyroscopeZ*cos(roll)
after specific values of xDeal and yDeal are obtained, controlling a mouse arrow to perform corresponding display on a display screen, where an exemplary coordinate point corresponding to xDeal and yDeal is (100,200), displaying the mouse arrow at the position of the coordinate point (100,200) on the display screen, and displaying the mouse arrow at the corresponding position according to the calculation result to form a movement track in the display screen through continuous calculation in multiple cycles.
In the technical scheme provided by the embodiment, the movement track in the display screen is obtained by determining the roll angle to perform mapping processing of coordinate system transformation on the acquired original angular speed data, compared with the speed change mapping which directly uses a pitch angle and a course angle, the calculation amount is small, the calculation speed is high, the movement of the mouse track is smoother, when gyroscope data are used, data configuration can be performed according to the initialization range of the gyroscope, the most suitable range is selected, and an integer is taken for calculation according to the problem that the speed of calculating floating point numbers by a chip is too low, meanwhile, a sine inverse trigonometric function realized by design is adopted, and the data calculation is accelerated by using a mode of selecting reference values from numerical values.
In one embodiment, after acquiring the data collected by the spirometer, 8-window depth filtering and first-order low-pass filtering are performed on the collected data to improve the accuracy of the collected data.
Fig. 2 is a flowchart of another air mouse information determining method according to an embodiment of the present invention, which shows a specific method for determining roll angle data when an air mouse moves. Specifically, referring to fig. 2, the method for determining air mouse information specifically includes:
s201, angular velocity data acquired by a gyroscope are acquired, a compensation value of the angular velocity data is determined, a quaternion differential equation is constructed after the angular velocity data are compensated, and the differential equation is calculated to obtain roll angle data when the air mouse moves.
In one embodiment, after angular velocity data acquired by a gyroscope is acquired, a compensation value of the angular velocity data is determined, the angular velocity data is compensated, a quaternion differential equation is constructed, and then a roll angle is obtained through calculation. Illustratively, (gx, gy, gz) is the measured angular velocity, (exInt, eyInt, ezInt) is the determined corresponding compensation value, the compensation value is combined with PID correction compensation to the measured angular velocity, and then construction of a quaternion differential equation is carried out to calculate roll angle data.
S202, acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves.
S203, determining the moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity.
And S204, mapping the moving track to a display screen according to the very-glue-rolling transverse rolling angle data.
In the technical scheme provided by this embodiment, the angular velocity data acquired by the gyroscope is acquired, the compensation value of the angular velocity data is determined, the quaternion differential equation is constructed after the angular velocity data is compensated, and the differential equation is calculated to obtain roll angle data when the air mouse moves, so that the determination precision of the air mouse information is further improved, and the mouse moving track is more accurate.
Fig. 3 is a flowchart of another air mouse information determination method according to an embodiment of the present invention, which shows a specific method for determining a compensation value of angular velocity data. Specifically, referring to fig. 3, the method for determining air mouse information specifically includes:
and S301, acquiring angular velocity data acquired by a gyroscope.
S302, acquiring acceleration data acquired by a gyroscope, converting the acceleration data from a three-dimensional vector into a unit vector, and transforming a coordinate system to obtain an acceleration calculation value.
In one embodiment, the gyroscope is a six-axis gyroscope and can acquire angular velocity data and gravitational acceleration data, and in the process of determining the compensation value, the acceleration data is converted from a three-dimensional vector into a unit vector, and a coordinate system is transformed to obtain an acceleration calculation value. Specifically, ax, ay, az are set as three-dimensional vectors formed by the acceleration values acquired by ic, and the three-dimensional vectors are converted into unit vectors by a formula sqrt (ax × ax + ay × ay + az × az). After the unit vector is obtained, the gravity vector under the geographic coordinate system is converted into a coordinate system of the machine body according to the cosine matrix and the definition of the Euler angle (specifically, three elements of the third column of the directional cosine matrix formula), and then vx, vy and vz are obtained. The specific formula is as follows:
calculating to obtain:
vx=2*(q1*q3-q0*q2)
vy=2*(q0*q1+q2*q3)
vz=q0*q0-q1*q1-q2*q2+q3*q3
and S303, determining a compensation value of the angular velocity data according to the acceleration data and the acceleration calculation value.
As described in S302, (ax, ay, az) is measured acceleration data, vx, vy, and vz are calculated acceleration calculation values, and the error between gravity (ex, ey, ez) is calculated by a vector product, which is as follows:
ex=(ay*vz-az*vy)
ey=(az*vx-ax*vz)
ez=(ax*vy-ay*vx)
s304, compensating the angular velocity data, constructing a quaternion differential equation, and calculating the differential equation to obtain roll angle data when the air mouse moves.
S305, acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves.
S306, determining the moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity.
S307, mapping the moving track to a display screen according to the very-glue-rolling transverse rolling angle data.
In the technical scheme provided by the embodiment, acceleration data acquired by the gyroscope are acquired, the acceleration data are converted from three-dimensional vectors into unit vectors, an acceleration calculated value is obtained after coordinate system transformation, and a compensation value of angular velocity data is determined according to the acceleration data and the acceleration calculated value.
Fig. 4 is a flowchart of another air mouse information determination method according to an embodiment of the present invention, which shows a specific method for compensating angular velocity data. Referring to fig. 4, the method for determining air mouse information specifically includes:
s401, acquiring angular velocity data acquired by a gyroscope.
S402, acquiring acceleration data acquired by a gyroscope, converting the acceleration data from a three-dimensional vector into a unit vector, and transforming a coordinate system to obtain an acceleration calculation value.
And S403, determining a compensation value of the angular velocity data according to the acceleration data and the acceleration calculation value.
S404, integrating the compensation value by using the set first parameter, and compensating the angular velocity data according to the integration result and the second parameter.
In one embodiment, after the compensation value is determined, the corresponding angular velocity data compensation is performed.
Specifically, after the errors ex, ey, ez are determined in S303, the integral of the errors is defined (exInt, eyInt, ezInt), and the Ki parameter (the set first parameter) in the PID correction is defined, and a specific formula for integrating the errors is as follows:
exInt=exInt+ex*Ki
eyInt=eyInt+ey*Ki
ezInt=ezInt+ez*Ki
compensating the angular velocity data according to the integration result and a second parameter, specifically, compensating a compensation value to the measured angular velocity by combining a Kp parameter (a set second parameter) in the PID correction, so as to realize error PI correction, which is specifically as follows:
gx=gx+Kp*ex+exInt
gy=gy+Kp*ey+eyInt
gz=gz+Kp*ez+ezInt
s405, constructing a quaternion differential equation, and calculating the differential equation to obtain roll angle data when the air mouse moves.
S406, acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves.
S407, determining the moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity.
And S408, mapping the movement track to a display screen according to the very-glue-rolling transverse rolling angle data.
In the technical scheme provided by this embodiment, the compensation value is integrated by using the set first parameter, and the angular velocity data is compensated according to the integration result and the second parameter.
Fig. 5 is a flowchart of another air mouse information determining method according to an embodiment of the present invention, which provides a specific method for calculating a differential equation to obtain roll angle data when an air mouse moves. Referring to fig. 5, the method for determining air mouse information specifically includes:
and S501, acquiring angular velocity data acquired by a gyroscope.
S502, acquiring acceleration data acquired by a gyroscope, converting the acceleration data from a three-dimensional vector into a unit vector, and transforming a coordinate system to obtain an acceleration calculation value.
S503, determining a compensation value of the angular velocity data according to the acceleration data and the acceleration calculation value.
S504, integrating the compensation value by using the set first parameter, and compensating the angular velocity data according to the integration result and the second parameter.
And S505, constructing a quaternion differential equation, calculating the quaternion differential equation by using a first-order grad algorithm, and performing quaternion orthogonalization to obtain roll angle data when the air mouse moves.
In one embodiment, a quaternion norm is used to represent the initial attitude of the smart pen, the quaternion may represent the pair of shaft angles and the rotation is represented by q [ w (xyz) ], four parameters are defined, i.e., float q0 ═ 1, q1 ═ 0, q2 ═ 0, q3 ═ 0, w ═ q0, x ═ q1, y ═ q2, and z ═ q3, i.e., the quaternion norm, to represent the initial attitude quaternion, thereby constructing a quaternion differential equation.
Specifically, the quaternary differential equation matrix form is expressed as follows:
where wx, wy, wz respectively represent the angular velocity components of the body coordinate system along the respective axes (x, y and z) with respect to the geographic coordinate system.
In one embodiment, after obtaining the compensated angular velocity values gx, gy, and gz (replacing wx, wy, and wz), a first order graduate algorithm is used to solve the quaternary differential equation, which is as follows:
q0=q0+(-q1*gx-q2*gy-q3*gz)*halfT
q1=q1+(q0*gx+q2*gz-q3*gy)*halfT
q2=q2+(q0*gy-q1*gz+q3*gx)*halfT
q3=q3+(q0*gz+q1*gy-q2*gx)*halfT
where halfT is half the time of the sampling period.
The quaternion orthogonalization is performed as follows:
norm=sqrt(q0*q0+q1*q1+q2*q2+q3*q3);
q0=q0/norm;
q1=q1/norm;
q2=q2/norm;
q3=q3/norm;
specifically, after the quaternion result is obtained, roll angle data is determined according to the following formula, wherein roll represents roll angle:
*roll=fast_atan2(2*(q0*q1+q2*q3),1-2*(q1*q1+q2*q2))
s506, acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves.
And S507, determining the moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity.
And S508, mapping the moving track to a display screen according to the very-glue-rolling transverse rolling angle data.
In the technical scheme provided by this embodiment, a quaternion differential equation is constructed, a first-order pycard algorithm is used to calculate the quaternion differential equation, quaternion orthogonalization processing is performed to obtain roll angle data when the air mouse moves, and when the roll angle is solved, a mathematical sine inverse trigonometric function realized by self design is adopted, and the operation is accelerated by selecting a reference value from numerical values.
Fig. 6 is a flowchart of another air mouse information determining method according to an embodiment of the present invention, which provides a specific method for air mouse sensitivity control. Referring to fig. 6, the method for determining air mouse information specifically includes:
s601, acquiring angular velocity data acquired by a gyroscope.
And S602, acquiring acceleration data acquired by a gyroscope, converting the acceleration data from a three-dimensional vector into a unit vector, and transforming a coordinate system to obtain an acceleration calculation value.
S603, determining a compensation value of the angular velocity data according to the acceleration data and the acceleration calculation value.
S604, integrating the compensation value by using the set first parameter, and compensating the angular velocity data according to the integration result and the second parameter.
S605, constructing a quaternion differential equation, calculating the quaternion differential equation by utilizing a first-order Picard algorithm, and performing quaternion orthogonalization to obtain roll angle data when the air mouse moves.
And S606, acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves.
S607, determining the moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity.
S608, mapping the moving track to a display screen according to the very-glue-rolling transverse rolling angle data, determining sensitivity data of the air mouse, and controlling the track displayed in the display screen according to the sensitivity data.
In one embodiment, the sensitivity of the mouse operation is controlled by the equation y kx + b.
Specifically, Yr and Xr are defined as processed offset transmitted to the mouse, K is a sensitivity threshold, and the offset of the processed mouse is calculated as follows:
Yr=K*yDeal
Xr=K*xDeal
and calculating to obtain Yr and Xr, and displaying the mouse moving track in the display screen according to the values of the Yr and the Xr.
In the technical scheme provided by the embodiment, the air mouse has stronger control flexibility by utilizing the sensitivity data, can meet the diversified requirements of users, and realizes customized interaction.
Fig. 7 is a schematic structural diagram of an air mouse information determination apparatus according to a sixth embodiment of the present invention. Referring to fig. 7, the air mouse information determination apparatus includes: roll angle determination module 701, angular velocity determination module 702, first trajectory determination module 703 and second trajectory determination module 704.
The roll angle determining module 701 is configured to determine roll angle data when the air mouse moves; the angular velocity determination module 702 is configured to obtain a first axial angular velocity and a second axial angular velocity when the air mouse moves; the first track determining module 703 is configured to determine a moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity; the second track determining module 704 is configured to map the movement track into a display screen according to the roll angle data.
According to the technical scheme provided by the embodiment, the roll angle data when the air mouse moves is determined, the first axial angular velocity and the second axial angular velocity when the air mouse moves are obtained, the moving track of the air mouse is determined according to the first axial angular velocity and the second axial angular velocity, and the moving track is mapped to the display screen according to the roll angle data, so that the problems that in the prior art, the air mouse has large calculated amount when information data is processed, the CPU load is high, and the air mouse has poor sensitivity when in use are solved, the calculated amount is small when the air mouse is controlled, the track moves more smoothly, and the data processing speed is further accelerated.
Optionally, the roll angle determining module 701 is specifically configured to:
acquiring angular velocity data acquired by a gyroscope, and constructing a differential equation according to the angular velocity data;
and calculating the differential equation to obtain roll angle data when the air mouse moves.
Optionally, the roll angle determining module 701 is specifically configured to:
and determining a compensation value of the angular velocity data, and constructing a quaternion differential equation after compensating the angular velocity data.
Optionally, the roll angle determining module 701 is specifically configured to: acquiring acceleration data acquired by a gyroscope, converting the acceleration data from a three-dimensional vector into a unit vector, and transforming a coordinate system to obtain an accelerometer calculation value;
and determining a compensation value of the angular velocity data according to the acceleration data and the acceleration calculation value.
Optionally, the roll angle determining module 701 is specifically configured to:
integrating the compensation value by using the set first parameter;
and compensating the angular velocity data according to the integration result and a second parameter.
Optionally, the roll angle determining module 701 is specifically configured to:
and setting an initial attitude by using a norm of a quaternion, and constructing a quaternion differential equation according to the angular velocity data.
Optionally, the roll angle determining module 701 is specifically configured to:
and calculating the quaternary differential equation by using a first-order Picard algorithm, and performing orthogonalization processing on the quaternion to obtain roll angle data when the air mouse moves.
Optionally, the first trajectory determining module 703 is specifically configured to:
determining the up-and-down movement track of the mouse according to the first axial angular velocity;
and determining the left-right movement track of the mouse according to the second axial angular velocity.
Optionally, the second trajectory determination module 704 is specifically configured to;
and converting the moving track from a machine body coordinate system to a geographical coordinate system according to the roll angle data, and mapping the moving track to a display screen.
Optionally, the second trajectory determination module 704 is further configured to:
after the movement track is mapped into a display screen according to the roll angle data, determining sensitivity data of the air mouse;
and controlling the track displayed in the display screen according to the sensitivity data.
The air mouse information determination device provided by the embodiment can be used for executing the air mouse information determination method provided by any of the above embodiments, and has corresponding functions and beneficial effects.
Fig. 8 is a schematic structural diagram of an air mouse information determining apparatus according to a seventh embodiment of the present invention. In this embodiment, a description is given by taking an intelligent pen as an example of an air mouse information determination device. As shown in fig. 8, the smart pen includes at least one processor 61, at least one network interface 62, a user interface 63, a memory 64, and at least one communication bus 65.
Wherein a communication bus 65 is used to enable the connection communication between these components.
The user interface 62 may comprise buttons, a camera, and the optional user interface 63 may comprise a standard wired interface, a wireless interface. The network interface 62 may optionally include a standard wired interface, a wireless interface (e.g., a Wi-Fi interface), among others.
The Memory 64 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). Optionally, the memory 64 includes a non-transitory computer-readable medium. The memory 64 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 64 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing the various method embodiments described above, and the like; the storage data area may store data and the like referred to in the above respective method embodiments. The memory 64 may optionally be at least one memory device located remotely from the processor 61. As shown in fig. 8, the memory 64, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and an operating application program of the smart pen.
In the smart pen 60 shown in fig. 8, the user interface 63 is mainly used for providing an input interface for a user to obtain an instruction input by the user; and the processor 61 may be configured to call the operation application of the smart pen stored in the memory 64 and specifically perform the relevant operations in the air mouse information determination method in the above embodiment.
The air mouse information determination device provided above may be used to execute the air mouse information determination method provided in any of the above embodiments, and has corresponding functions and advantageous effects.
Embodiments of the present invention also provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are configured to perform a method for determining air mouse information, including:
determining roll angle data when the air mouse moves;
acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves;
determining a moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity;
and mapping the movement track to a display screen according to the roll angle data.
Of course, the storage medium containing the computer-executable instructions provided in the embodiments of the present invention is not limited to the operation of the interface interactive display described above, and may also perform the relevant operation in the air mouse information determination method provided in any embodiment of the present invention, and has corresponding functions and advantages.
From the above description of the embodiments, it is obvious for those skilled in the art that the present invention can be implemented by software and necessary general hardware, and certainly, can also be implemented by hardware, but the former is a better embodiment in many cases. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, and the computer software product may be stored in a computer-readable storage medium, such as a floppy disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a FLASH Memory (FLASH), a hard disk or an optical disk of a computer, and includes several instructions to enable a computer device (which may be a robot, a personal computer, a server, or a network device) to execute the method for determining air mouse information according to any embodiment of the present invention.
It should be noted that, in the above air mouse information determining apparatus, each unit and each module included in the air mouse information determining apparatus are only divided according to functional logic, but are not limited to the above division, as long as the corresponding function can be realized; in addition, specific names of the functional units are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present invention.
It should be understood that portions of the present invention may be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, the various steps or methods may be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any one or combination of the following techniques, which are known in the art, may be used: a discrete logic circuit having a logic gate circuit for implementing a logic function on a data signal, an application specific integrated circuit having an appropriate combinational logic gate circuit, a Programmable Gate Array (PGA), a Field Programmable Gate Array (FPGA), or the like.
In the description herein, references to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., mean that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the invention. In this specification, the schematic representations of the terms used above do not necessarily refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples.
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims (13)
1. An air mouse information determination method is characterized by comprising the following steps:
determining roll angle data when the air mouse moves;
acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves;
determining a moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity;
and mapping the movement track to a display screen according to the roll angle data.
2. The method of claim 1, wherein determining roll angle data for the air mouse as it moves comprises:
acquiring angular velocity data acquired by a gyroscope, and constructing a differential equation according to the angular velocity data;
and calculating the differential equation to obtain roll angle data when the air mouse moves.
3. The method of claim 2, wherein said constructing a differential equation from said angular velocity data comprises:
and determining a compensation value of the angular velocity data, and constructing a quaternion differential equation after compensating the angular velocity data.
4. The method of claim 3, wherein said determining a compensation value for said angular velocity data comprises:
acquiring acceleration data acquired by a gyroscope, converting the acceleration data from a three-dimensional vector into a unit vector, and transforming a coordinate system to obtain an accelerometer calculation value;
and determining a compensation value of the angular velocity data according to the acceleration data and the acceleration calculation value.
5. The method of claim 3, wherein the compensating the angular velocity data comprises:
integrating the compensation value by using the set first parameter;
and compensating the angular velocity data according to the integration result and a second parameter.
6. The method of claim 2, wherein said constructing a differential equation from said angular velocity data comprises:
and setting an initial attitude by using a norm of a quaternion, and constructing a quaternion differential equation according to the angular velocity data.
7. The method of claim 6, wherein the calculating the differential equation to obtain roll angle data when the air mouse moves comprises:
and calculating the quaternary differential equation by using a first-order Picard algorithm, and performing orthogonalization processing on the quaternion to obtain roll angle data when the air mouse moves.
8. The method according to any one of claims 1-7, wherein determining the movement trajectory of the air mouse according to the first axial angular velocity and the second axial angular velocity comprises:
determining the up-and-down movement track of the mouse according to the first axial angular velocity;
and determining the left-right movement track of the mouse according to the second axial angular velocity.
9. The method according to any one of claims 1-7, wherein said mapping said movement trajectory into a display screen in accordance with said roll angle data comprises:
and converting the moving track from a machine body coordinate system to a geographical coordinate system according to the roll angle data, and mapping the moving track to a display screen.
10. The method according to any one of claims 1-7, comprising, after said mapping said movement trajectory into a display screen in dependence on said roll angle data:
determining sensitivity data of the air mouse;
and controlling the track displayed in the display screen according to the sensitivity data.
11. An air mouse information determining apparatus, comprising:
the roll angle determining module is used for determining roll angle data when the air mouse moves;
the angular velocity determination module is used for acquiring a first axial angular velocity and a second axial angular velocity when the air mouse moves;
the first track determining module is used for determining the moving track of the air mouse according to the first axial angular velocity and the second axial angular velocity;
and the second track determining module is used for mapping the moving track to a display screen according to the roll angle data.
12. An air mouse information determination device, comprising: a memory and one or more processors;
the memory for storing one or more programs;
when executed by the one or more processors, cause the one or more processors to implement the air mouse information determination method of any one of claims 1-10.
13. A storage medium containing computer-executable instructions for performing the air mouse information determination method of any one of claims 1-10 when executed by a computer processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911231048.2A CN111078029A (en) | 2019-12-05 | 2019-12-05 | Air mouse information determination method, device, equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911231048.2A CN111078029A (en) | 2019-12-05 | 2019-12-05 | Air mouse information determination method, device, equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN111078029A true CN111078029A (en) | 2020-04-28 |
Family
ID=70312887
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911231048.2A Pending CN111078029A (en) | 2019-12-05 | 2019-12-05 | Air mouse information determination method, device, equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111078029A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113407045A (en) * | 2021-06-28 | 2021-09-17 | 北京字节跳动网络技术有限公司 | Cursor control method and device, electronic equipment and storage medium |
CN113721777A (en) * | 2021-09-08 | 2021-11-30 | 得力集团有限公司 | Control method and device of mouse pointer, electronic equipment and storage medium |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100103096A1 (en) * | 2007-07-06 | 2010-04-29 | Sony Corporation | Input apparatus, control apparatus, control system, control method, and handheld apparatus |
CN102165395A (en) * | 2008-06-27 | 2011-08-24 | 莫韦公司 | Hand held pointing device with roll compensation |
CN102411440A (en) * | 2011-12-27 | 2012-04-11 | 上海大学 | Wireless head-controlled mouse based on accelerometer and gyro sensor |
US20130151195A1 (en) * | 2011-12-13 | 2013-06-13 | Stmicroelectronics S.R.L. | System and method for compensating orientation of a portable device |
JP2014174638A (en) * | 2013-03-06 | 2014-09-22 | Nippon Telegr & Teleph Corp <Ntt> | Pointed position calculation device, display pointing system, method and program |
CN109883444A (en) * | 2019-02-25 | 2019-06-14 | 航天科工防御技术研究试验中心 | A kind of attitude angle coupling error compensation method, device and electronic equipment |
EP3771968A1 (en) * | 2019-07-31 | 2021-02-03 | STMicroelectronics S.r.l. | Low-power tilt-compensated pointing method and corresponding pointing electronic device |
-
2019
- 2019-12-05 CN CN201911231048.2A patent/CN111078029A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100103096A1 (en) * | 2007-07-06 | 2010-04-29 | Sony Corporation | Input apparatus, control apparatus, control system, control method, and handheld apparatus |
CN102165395A (en) * | 2008-06-27 | 2011-08-24 | 莫韦公司 | Hand held pointing device with roll compensation |
US20130151195A1 (en) * | 2011-12-13 | 2013-06-13 | Stmicroelectronics S.R.L. | System and method for compensating orientation of a portable device |
CN102411440A (en) * | 2011-12-27 | 2012-04-11 | 上海大学 | Wireless head-controlled mouse based on accelerometer and gyro sensor |
JP2014174638A (en) * | 2013-03-06 | 2014-09-22 | Nippon Telegr & Teleph Corp <Ntt> | Pointed position calculation device, display pointing system, method and program |
CN109883444A (en) * | 2019-02-25 | 2019-06-14 | 航天科工防御技术研究试验中心 | A kind of attitude angle coupling error compensation method, device and electronic equipment |
EP3771968A1 (en) * | 2019-07-31 | 2021-02-03 | STMicroelectronics S.r.l. | Low-power tilt-compensated pointing method and corresponding pointing electronic device |
Non-Patent Citations (3)
Title |
---|
LEYVI_HSING: "详解互补滤波四元数中向量叉积与陀螺仪角速度补偿问题", 《HTTPS://BLOG.CSDN.NET/LEYVI_HSING/ARTICLE/DETAILS/54293690》 * |
徐军辉: "《导弹惯性仪器及系统测试技术》", 31 December 2018 * |
徐振平: "《普通高等教育"十三五"规划教材 机器人控制技术基础 基于Arduino的四旋翼飞行器设计与实现》", 31 December 2017 * |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113407045A (en) * | 2021-06-28 | 2021-09-17 | 北京字节跳动网络技术有限公司 | Cursor control method and device, electronic equipment and storage medium |
CN113407045B (en) * | 2021-06-28 | 2023-08-22 | 北京字节跳动网络技术有限公司 | Cursor control method and device, electronic equipment and storage medium |
CN113721777A (en) * | 2021-09-08 | 2021-11-30 | 得力集团有限公司 | Control method and device of mouse pointer, electronic equipment and storage medium |
CN113721777B (en) * | 2021-09-08 | 2024-01-30 | 得力集团有限公司 | Control method and device of mouse pointer, electronic equipment and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
KR101073062B1 (en) | Method and Device for inputting force intensity and rotation intensity based on motion sensing | |
US20080042973A1 (en) | System for sensing yaw rate using a magnetic field sensor and portable electronic devices using the same | |
CN105359054B (en) | Equipment is positioned and is orientated in space | |
EP3680863B1 (en) | Information processing device, information processing method, and program | |
US20120086725A1 (en) | System and Method for Compensating for Drift in a Display of a User Interface State | |
JPH067371B2 (en) | 3D computer input device | |
CN101606119A (en) | Input media, control device, control system, control method and hand-held device | |
CN102289306A (en) | Attitude sensing equipment and positioning method thereof as well as method and device for controlling mouse pointer | |
CN109211277A (en) | The state of vision inertia odometer determines method, apparatus and electronic equipment | |
EP3268848A1 (en) | Attitude detecting device | |
CN103837157A (en) | Motion measuring method and device | |
Zhilenkov et al. | Based on MEMS sensors man-machine interface for mechatronic objects control | |
CN103940442A (en) | Location method and device adopting accelerating convergence algorithm | |
CN111078029A (en) | Air mouse information determination method, device, equipment and storage medium | |
CN102375567A (en) | Penicillar indicator device, displacement information providing method and displacement information providing system | |
CN112306261A (en) | Low-power consumption tilt compensation pointing method and corresponding pointing electronic equipment | |
CN108885493A (en) | Method, holder, motion sensing control device and the system of motion sensing control device control holder | |
JP6174646B2 (en) | Computer program for 3-axis operation of objects in virtual space | |
CN109866217B (en) | Robot mileage positioning method, device, terminal equipment and computer storage medium | |
US20170199585A1 (en) | Processing unit, computer program amd method to control a cursor on a screen according to an orientation of a pointing device | |
CN103116411A (en) | Positioning pointer position method and system | |
CN107391005B (en) | Method for controlling cursor movement on host screen and game handle | |
CN106774941B (en) | Touch screen terminal 3D virtual role moves the solution to conflict with scene camera | |
CN112328099A (en) | Low power pointing method and electronic device implementing the same | |
Katusin | Glove for Augmented and Virtual Reality |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20200428 |