CN107229353B - Empty mouse displacement acquisition method and device - Google Patents

Empty mouse displacement acquisition method and device Download PDF

Info

Publication number
CN107229353B
CN107229353B CN201710322994.2A CN201710322994A CN107229353B CN 107229353 B CN107229353 B CN 107229353B CN 201710322994 A CN201710322994 A CN 201710322994A CN 107229353 B CN107229353 B CN 107229353B
Authority
CN
China
Prior art keywords
attitude angle
empty
determining
empty mouse
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.)
Active
Application number
CN201710322994.2A
Other languages
Chinese (zh)
Other versions
CN107229353A (en
Inventor
陈维亮
董碧峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN201710322994.2A priority Critical patent/CN107229353B/en
Publication of CN107229353A publication Critical patent/CN107229353A/en
Application granted granted Critical
Publication of CN107229353B publication Critical patent/CN107229353B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/0346Pointing 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input 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/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/033Pointing devices displaced or positioned by the user, e.g. mice, trackballs, pens or joysticks; Accessories therefor
    • G06F3/038Control and interface arrangements therefor, e.g. drivers or device-embedded control circuitry
    • G06F3/0383Signal control means within the pointing device

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Position Input By Displaying (AREA)

Abstract

The embodiment of the invention provides a displacement acquisition method and a displacement acquisition device for an empty rat, wherein the method comprises the following steps: acquiring the gravity acceleration of the empty mouse in the current corresponding three-axis direction; determining a first attitude angle corresponding to the air mouse at present according to the gravity acceleration; correcting the first attitude angle; determining the current moving speed of the empty mouse according to the comparison result of the corrected first attitude angle and a second attitude angle corresponding to the original coordinate; and determining the current coordinate corresponding to the empty mouse according to the current moving speed of the empty mouse and the original coordinate corresponding to the empty mouse before moving according to the moving speed. By correcting the first attitude angle, the corrected first attitude angle is compared with the second attitude angle corresponding to the coordinate position where the empty mouse is located last time, so that the adverse effects of noise, over-sensitivity of the empty mouse and the like on the determination of the coordinate position of the empty mouse are overcome.

Description

Empty mouse displacement acquisition method and device
Technical Field
The invention relates to the technical field of empty mice, in particular to a displacement acquisition method and device of an empty mouse.
Background
The air mouse is a wireless mouse, has the characteristics of small volume, convenience in carrying, comfort in operation, no space limitation and the like, is more and more widely applied, and is concerned about in body-sensing interaction fields such as earphones, Virtual Reality (VR), Augmented Reality (AR) and the like. For example, in game application, a mouse-in-air function (also called a body-sensing mouse-in-air) is realized in some body sensing devices, so that a majority of game players can get rid of the traditional mechanical mouse to perform game operation, and the experience is better.
In practical applications, such situations are often encountered: the user does not actually want to move the empty mouse, but the empty mouse moves in a small amplitude for some reason, and the coordinate position of the empty mouse displayed on the display screen is likely to shake due to the high sensitivity of the empty mouse, so that the empty mouse cannot stay at a certain position stably. Therefore, it is urgently needed to provide an effective method for acquiring the real displacement of the empty mouse, so as to avoid the adverse effect of the allergy of the empty mouse on the determination of the coordinate position of the empty mouse on the display screen.
Disclosure of Invention
In view of this, the embodiment of the present invention provides a displacement acquiring method and device for an empty mouse, so as to overcome an adverse effect of over-sensitivity of the empty mouse on determining a coordinate position of the empty mouse on a display screen.
In a first aspect, an embodiment of the present invention provides a displacement acquisition method for an empty rat, including:
acquiring the gravity acceleration of the empty mouse in the current corresponding three-axis direction;
determining a first attitude angle currently corresponding to the empty mouse according to the gravity acceleration;
correcting the first attitude angle;
determining the moving speed of the empty mouse according to the comparison result of the corrected first attitude angle and the second attitude angle;
and determining the current coordinate corresponding to the empty mouse according to the moving speed and the original coordinate of the empty mouse, wherein the second attitude angle corresponds to the original coordinate, and the original coordinate is the coordinate corresponding to the empty mouse before moving according to the moving speed.
Optionally, the first attitude angle comprises: and determining the moving speed of the empty rat according to the comparison result of the corrected first attitude angle and the second attitude angle, wherein the method comprises the following steps:
determining the moving speed V of the empty rat in the X-axis direction according to the following piecewise functionXnAnd a moving speed V in the Y-axis directionYn
Figure BDA0001290376660000021
Figure BDA0001290376660000022
Wherein the content of the first and second substances,
Figure BDA0001290376660000023
and
Figure BDA0001290376660000024
preset speed constants corresponding to the X-axis direction and the Y-axis direction respectively, and the corrected first attitude angle comprises a pitch angle picthnAnd roll angle rollnThe second attitude angle comprises a pitch angle picth corresponding to the original coordinaten-1And a roll angle roll corresponding to the original coordinaten-1,picthcutAnd rollcutRespectively a preset pitch angle threshold value and a preset roll angle threshold value.
Optionally, the determining the current coordinate corresponding to the empty mouse according to the moving speed and the original coordinate of the empty mouse includes:
determining the corresponding current coordinate (X) of the empty mouse according to the following formulan,Yn):
Xn=Xn-1+VXn·Δt
Yn=Yn-1+VYn·Δt
Wherein (X)n-1,Yn-1) And the delta t is the time difference between the acquisition time of the original coordinate and the current time.
In a second aspect, an embodiment of the present invention provides an empty rat displacement acquiring apparatus, including:
the acquisition module is used for acquiring the gravity acceleration of the empty mouse in the current corresponding three-axis direction;
the first determining module is used for determining a first attitude angle currently corresponding to the empty mouse according to the gravity acceleration;
the correction module is used for correcting the first attitude angle;
the second determining module is used for determining the moving speed of the empty mouse according to the comparison result of the corrected first attitude angle and the second attitude angle;
and the third determining module is used for determining the current coordinate corresponding to the empty mouse according to the moving speed and the original coordinate of the empty mouse, wherein the second attitude angle corresponds to the original coordinate, and the original coordinate is the coordinate corresponding to the empty mouse before moving according to the moving speed.
According to the displacement acquisition method and device for the empty mouse, the acceleration sensor can be used for acquiring the gravity acceleration of the empty mouse in the three-axis direction, and the first attitude angle corresponding to the empty mouse at present is determined according to the acquired gravity acceleration. Then, the first attitude angle is corrected, for example, smoothed or denoised, to obtain smooth and clean attitude angle information. And then, comparing the corrected first attitude angle with a second attitude angle corresponding to the coordinate of the empty mouse which is stably stopped on the display screen last time and is called as an original coordinate, so as to determine the current moving speed of the empty mouse according to the comparison result, and further determine the current coordinate corresponding to the empty mouse. Through the comparison of the first attitude angle and the second attitude angle, the adverse effect of the vibration of the empty mouse, which is caused by the user unconsciously, on the determination of the coordinate position of the empty mouse in the display screen can be prevented, and the use experience of the user in carrying out interactive operation by using the empty mouse is further improved, for example, the phenomenon that the empty mouse cannot be stably stopped at the screen position expected by the user due to the fact that the coordinate position of the empty mouse in the display screen moves due to the unconscious vibration of the user on the empty mouse can be avoided. In conclusion, based on the correction of the first attitude angle and the comparison of the first attitude angle and the second attitude angle, the adverse effect of the over-sensitivity of the empty mouse on the determination of the coordinate position of the empty mouse on the display screen can be overcome.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and those skilled in the art can also obtain other drawings according to the drawings without creative efforts.
Fig. 1 is a flowchart of a displacement acquisition method for an empty rat according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram of the corresponding relationship between the attitude angle of the empty mouse and the displacement change of the empty mouse in the coordinate system of the display screen;
FIG. 3 is a flowchart of a second embodiment of a displacement obtaining method for an empty rat according to the present invention;
fig. 4 is a schematic structural diagram of a displacement acquisition device for an empty rat provided in an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The terminology used in the embodiments of the invention is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in the examples of the present invention and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, and "a" and "an" generally include at least two, but do not exclude at least one, unless the context clearly dictates otherwise.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
It should be understood that although the terms first, second, third, etc. may be used to describe XXX in embodiments of the present invention, these XXX should not be limited to these terms. These terms are used only to distinguish XXX. For example, a first XXX may also be referred to as a second XXX, and similarly, a second XXX may also be referred to as a first XXX, without departing from the scope of embodiments of the present invention.
The words "if", as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
It is also noted that the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a good or system that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such good or system. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a commodity or system that includes the element.
It is further worth noting that the order between the steps in the embodiments of the present invention may be adjusted, and is not necessarily performed in the order illustrated below.
Fig. 1 is a flowchart of a first embodiment of a displacement obtaining method for an empty rat according to an embodiment of the present invention, where the displacement obtaining method for an empty rat provided in this embodiment may be executed by a displacement obtaining device for an empty rat, the displacement obtaining device for an empty rat may be implemented as software, or implemented as a combination of software and hardware, and the displacement obtaining device for an empty rat may be integrally disposed in a certain motion sensing device, such as a headset, a head-mounted device used in an AR or VR application scenario, and the like. As shown in fig. 1, the method comprises the steps of:
101. and acquiring the gravity acceleration of the empty mouse in the current corresponding three-axis direction.
In this embodiment, assuming that the empty rat can be specifically implemented as an earphone, a motion sensor may be provided in the earphone to implement the empty rat earphone. Alternatively, the motion sensor may be an acceleration sensor, and is configured to detect gravitational accelerations (Gx, Gy, Gz) respectively corresponding to the empty rat in three XYZ and axes directions, where Gx is a gravitational acceleration corresponding to an X axis direction, Gy is a gravitational acceleration corresponding to a Y axis direction, and Gz is a gravitational acceleration corresponding to a Z axis direction.
It is understood that the three-axis directions correspond to establishing a three-dimensional coordinate system corresponding to a physical space, and the origin of coordinates may be a setting position of the acceleration sensor in the headset. Gx, Gy, Gz correspond to the components of the acceleration of gravity currently measured by the acceleration sensor in the three-axis directions.
In practical application, the acquisition interval of the acceleration sensor can be preset, so that the acceleration sensor can acquire the gravitational acceleration once every other acquisition interval.
102. And determining a first attitude angle corresponding to the air mouse at present according to the gravity acceleration.
Optionally, the first attitude angle may include: pitch angle and roll angle. Specifically, determining a first attitude angle currently corresponding to the empty mouse according to the currently acquired gravitational acceleration (Gx, Gy, Gz) may be implemented as:
determining the current corresponding pitch angle of the empty mouse as follows: batch typen-arcsin (Gx/g); determining the current corresponding roll angle of the empty rat as follows: rolln-arctan (Gy/Gz); wherein g is a preset gravity acceleration constant, and n represents the current moment.
103. And performing correction processing on the first attitude angle.
In practical applications, the empty mouse may send a shaking phenomenon that is not desired by the user for some reason, that is, actually, the user does not want to move the empty mouse, but the shaking phenomenon of the empty mouse objectively occurs, and at this time, a displacement change may occur in a coordinate position corresponding to the empty mouse on the display screen, and the displacement change is not desired, that is, is caused by an allergy of the empty mouse.
Therefore, in order to avoid the phenomenon that the coordinate position of the mouse in the coordinate system of the display screen does not shake, the first attitude angle for determining the coordinate position of the mouse in the display screen may be optionally corrected in advance to obtain true and reliable attitude angle information. The correction processing on the first attitude angle may include, for example, smoothing processing, denoising processing, and the like.
104. And determining the moving speed of the empty mouse according to the comparison result of the corrected first attitude angle and the second attitude angle, wherein the second attitude angle corresponds to the original coordinate.
The original coordinate is a coordinate corresponding to the empty mouse before moving according to the moving speed, namely a coordinate position where the empty mouse stably stays in the display screen for the last time.
105. And determining the current coordinate corresponding to the empty mouse according to the moving speed and the original coordinate of the empty mouse.
The coordinate position at which the mouse was located in the display screen at the previous time may be saved in advance, referred to as an original coordinate, and a posture angle for determining the original coordinate, referred to as a second posture angle.
Therefore, when determining whether the coordinate position of the empty mouse in the display screen needs to be changed and where the coordinate position needs to be changed according to the currently determined first attitude angle, the first attitude angle and the second attitude angle can be compared to determine whether the coordinate position of the empty mouse in the display screen needs to be changed and where the coordinate position needs to be changed according to the degree of angle change of the first attitude angle relative to the second attitude angle.
When the coordinate position of the empty mouse in the display screen is determined to be required to be changed, the moving speed of the coordinate of the empty mouse in the display screen can be determined according to the preset corresponding relation between the attitude angle changing degree and the moving speed of the empty mouse, and then the current corresponding coordinate position of the empty mouse in the display screen is determined based on the moving speed and the original coordinate.
In addition, it should be noted that, when determining the current corresponding coordinate position of the empty mouse on the display screen, it is a process of determining how much distance the empty mouse moves in what direction relative to the original coordinate on the display screen. Wherein the direction of movement may be determined from the difference of the first attitude angle relative to the second attitude angle, i.e. from the direction of change of the first attitude angle relative to the second attitude angle. As shown in fig. 2, a change in the pitch angle causes a change in the X-axis coordinates of the mouse on the display screen, and a change in the roll angle causes a change in the Y-axis coordinates of the mouse on the display screen.
In this embodiment, the gravity acceleration of the empty mouse in the three-axis direction corresponding to the present time is collected, and the first attitude angle corresponding to the empty mouse at the present time is determined according to the collected gravity acceleration. Then, the first attitude angle is corrected, for example, smoothed or denoised, to obtain smooth and clean attitude angle information. And then comparing the corrected first attitude angle with a second attitude angle corresponding to the empty mouse when the empty mouse is located at the original coordinate last time, so as to determine the current moving speed of the empty mouse according to the comparison result, and further determine the current coordinate corresponding to the empty mouse. By comparing the first attitude angle with the second attitude angle, the adverse effect of the shake of the empty mouse unintentionally caused by the user on the determination of the coordinate position of the empty mouse in the display screen can be prevented. In conclusion, based on the correction of the first attitude angle and the comparison of the first attitude angle and the second attitude angle, the adverse effect of the over-sensitivity of the empty mouse on the determination of the coordinate position of the empty mouse on the display screen can be overcome.
Fig. 3 is a flowchart of a second embodiment of the displacement obtaining method for an empty rat according to the embodiment of the present invention, as shown in fig. 3, the method may include the following steps:
201. and acquiring the gravity acceleration of the empty mouse in the current corresponding three-axis direction.
202. And calibrating the gravity acceleration by using the calibration parameters obtained in advance.
Assuming that the currently acquired gravitational acceleration is (Gx, Gy, Gz), and the calibrated gravitational acceleration is (Gx ', Gy ', Gz ').
Specifically, the process of calibrating the gravitational acceleration (Gx, Gy, Gz) may be:
Gx'=kxxGx+kxyGy+kxzGz+offset_x;
Gy'=kyxGx+kyyGy+kyzGz+offset_y;
Gz'=kzxGx+kzyGy+kzzGz+offset_z.
wherein k isxx,kxy,kxz,offset_x,kyx,kyy,kyz,offset_y,kzx,kzy,kzzOffset _ z is a calibration parameter.
The determination process of the calibration parameters can be determined by adopting a six-position method. Taking the specific implementation of the empty rat as the earphone as an example, the calibration parameters can be determined when the earphone leaves the factory. Specifically, the mounting positions of the acceleration sensors in the headset may be adjusted so that the acceleration sensors are located at six different positions, respectively, and the adjustment of the mounting positions may be understood as adjusting the orientations of the XYZ three axes in the three-dimensional coordinate system of the physical space. In addition, at each mounting position, if the acceleration sensor is in an ideal working state, the corresponding theoretical gravitational acceleration value is obtained, and therefore, the calibration parameters can be solved by combining the theoretical gravitational acceleration value corresponding to the acceleration sensor at each mounting position and the actually measured gravitational acceleration value.
The mounting position of the acceleration sensor and the situation of the theoretical gravity acceleration value are shown in the following table:
table 1: calibration reference meter of acceleration sensor
Figure BDA0001290376660000081
By combining the above tables, the conditions of theoretical gravitational acceleration values corresponding to the acceleration sensor at six different placement positions can be known, and further, by combining the actual gravitational acceleration values measured by the acceleration sensor at each placement position, each calibration parameter can be solved according to the following formula:
Gxmeasured in fact=kxxGxTheory of the invention+kxyGyTheory of the invention+kxzGzTheory of the invention+offset_x;
GyMeasured in fact=kyxGxTheory of the invention+kyyGyTheory of the invention+kyzGzTheory of the invention+offset_y;
GzMeasured in fact=kzxGxTheory of the invention+kzyGyTheory of the invention+kzzGzTheory of the invention+offset_z.
203. And determining a first attitude angle corresponding to the air mouse at present according to the calibrated gravity acceleration.
The determination process of the first attitude angle is implemented with reference to the foregoing embodiments, and is not described herein.
204. And smoothing the first attitude angle by combining K third attitude angles, wherein the K third attitude angles correspond to K gravitational accelerations acquired before the gravitational acceleration.
205. And denoising the first attitude angle after the smoothing processing.
In this embodiment, the problem of the vibration of the empty rat can be overcome by adopting a smoothing method. Specifically, for the currently obtained first attitude angle, K third attitude angles may be taken forward to smooth the first attitude angle with the K third attitude angles.
Because the acceleration sensor is preset to continuously collect the gravity acceleration at a certain collection interval, the attitude angle corresponding to the gravity acceleration collected each time can be determined according to the attitude angle determination method. The K third attitude angles are: and the attitude angles respectively corresponding to the K gravity accelerations acquired before the gravity acceleration corresponding to the first attitude angle is acquired.
In practical application, a reasonable value range can be preset, and the value of K can be randomly selected in the value range; alternatively, K may be set to a fixed value in advance. The setting of the value range can be set by combining the acquisition interval of the acceleration sensor, and the shorter the acquisition interval is, the larger the upper limit of the value range can be.
Taking K as 5 as an example, the smoothing process for the first attitude angle may specifically be:
Figure BDA0001290376660000091
wherein the content of the first and second substances,
Figure BDA0001290376660000092
in order to be at a first attitude angle,
Figure BDA0001290376660000093
the smoothed first attitude angle is equivalent to performing average operation on the current first attitude angle and the previous five third attitude angles to obtain the smoothed first attitude angle.
Then, the smoothed first attitude angle may be denoised by, for example, an FFT (fourier) filtering method to filter out a high-frequency noise component in the first attitude angle. The FFT filtering method is high in operation speed and low in power consumption.
206. And comparing the denoised first attitude angle with a second attitude angle by adopting a preset piecewise function to determine the moving speed of the empty mouse, wherein the second attitude angle corresponds to the original coordinate.
The meaning of the original coordinate is referred to the description in the foregoing embodiments, and is not repeated herein.
207. And determining the current coordinate corresponding to the empty mouse according to the moving speed and the original coordinate of the empty mouse.
Specifically, the moving speed V of the mouse in the X-axis direction in the display screen can be determined according to the following piecewise functionXnAnd a moving speed V in the Y-axis directionYn
Figure BDA0001290376660000094
Figure BDA0001290376660000101
Wherein the content of the first and second substances,
Figure BDA0001290376660000102
and
Figure BDA0001290376660000103
preset speed constants corresponding to the X-axis direction and the Y-axis direction respectively, and the corrected first attitude angle comprises a pitch angle picthnAnd roll angle rollnThe second attitude angle includes a pitch angle picth corresponding to the original coordinaten-1And a roll angle roll corresponding to the original coordinatesn-1,picthcutAnd rollcutRespectively a preset pitch angle threshold value and a preset roll angle threshold value.
From the above piecewise function, it can be known that: for the roll angle, if the change degree of the roll angle is small, the position of the mouse in the X-axis direction in the display screen is unchanged, and if the change degree of the roll angle is large, the coordinate moving speed of the mouse in the X-axis direction in the display screen has a direct proportion relation with the change degree of the roll angle. Similarly, for the pitch angle, if the change degree of the pitch angle is small, the position of the mouse in the Y-axis direction in the display screen is not changed, and if the change degree of the pitch angle is large, the coordinate moving speed of the mouse in the Y-axis direction in the display screen has a proportional relation with the change degree of the pitch angle.
The moving speed of the empty mouse in the display screen is determined based on the piecewise function, so that on one hand, the adverse effects of noise and the shaking of the empty mouse on the movement of the empty mouse in the display screen can be removed; on the other hand, the mouse can be left in a 'dead space', namely, the mouse is left at a required position, so that a user can trigger other control operations of the mouse at the position, such as triggering an opening operation of a certain application icon at the position by tapping the mouse, and the like.
Determining the moving speed V of the mouse in the X-axis direction in the display screenXnAnd a moving speed V in the Y-axis directionYnThen, the corresponding current coordinate (X) of the empty mouse in the display screen can be determined according to the following formulan,Yn):
Xn=Xn-1+VXn·Δt
Yn=Yn-1+VYn·Δt
Wherein (X)n-1,Yn-1) And delta t is the time difference between the acquisition time of the original coordinate and the current time.
In practical application, the time interval for determining the coordinate position of the mouse in the display screen may be the same as the acquisition interval of the acceleration sensor, or may be slightly larger than the acquisition interval. When the time difference is consistent with the acquisition interval, the time difference between the acquisition time of the coordinate and the current time may be the duration of the acquisition interval.
In summary, in this embodiment, after acquiring the acceleration of gravity in the three-axis direction corresponding to the empty mouse currently, by performing calibration processing on the acceleration of gravity, smoothing and denoising processing on the first attitude angle determined based on the acceleration of gravity can ensure accuracy and reliability of the attitude angle information used for determining the coordinate position of the empty mouse in the display screen. And then, the coordinate moving speed of the air mouse in the display screen is determined based on the piecewise function, so that the effect of idle staying of the air mouse in the display screen can be realized.
Fig. 4 is a schematic structural diagram of an empty rat displacement acquiring device according to an embodiment of the present invention, and as shown in fig. 4, the device includes: the device comprises an acquisition module 11, a first determination module 12, a correction module 13, a second determination module 14 and a third determination module 15.
And the acquisition module 11 is used for acquiring the gravity acceleration of the empty mouse in the current corresponding three-axis direction.
And the first determining module 12 is configured to determine a first attitude angle currently corresponding to the empty mouse according to the gravitational acceleration.
And the correction module 13 is configured to perform correction processing on the first attitude angle.
And the second determining module 14 is configured to determine the moving speed of the empty rat according to the comparison result of the corrected first attitude angle and the second attitude angle.
And a third determining module 15, configured to determine a current coordinate corresponding to the empty mouse according to the moving speed of the empty mouse and an original coordinate, where the second attitude angle corresponds to the original coordinate, and the original coordinate is a coordinate corresponding to the empty mouse before moving according to the moving speed.
Optionally, the apparatus further comprises: a calibration module 16.
And the calibration module 16 is configured to calibrate the gravitational acceleration by using a calibration parameter obtained in advance.
Optionally, the correction module 13 includes: a smoothing unit 131 and a denoising unit 132.
A smoothing unit 131, configured to smooth the first attitude angle by combining K third attitude angles, where the K third attitude angles correspond to K gravitational accelerations acquired before the gravitational acceleration, and K is a preset value greater than 1.
And the denoising unit 132 is configured to perform denoising processing on the smoothed first attitude angle.
Optionally, the first attitude angle comprises: pitch angle and roll angle, and the first determination module 12 is specifically configured to:
determining the current corresponding pitch angle of the empty mouse as follows: batch typen=-arcsin(Gx/g);
Determining the current corresponding roll angle of the empty rat as follows: rolln=-arctan(Gy/Gz);
Wherein g is a preset gravitational acceleration constant, Gx is a gravitational acceleration corresponding to the X-axis direction, Gy is a gravitational acceleration corresponding to the Y-axis direction, and Gz is a gravitational acceleration corresponding to the Z-axis direction.
Optionally, the second determining module 14 is specifically configured to:
determining the moving speed V of the empty rat in the X-axis direction according to the following piecewise functionXnAnd a moving speed V in the Y-axis directionYn
Figure BDA0001290376660000121
Figure BDA0001290376660000122
Wherein the content of the first and second substances,
Figure BDA0001290376660000123
and
Figure BDA0001290376660000124
preset speed constants corresponding to the X-axis direction and the Y-axis direction respectively, and the second attitude angle comprises a pitch angle picth corresponding to the original coordinaten-1And a roll angle roll corresponding to the original coordinaten-1,picthcutAnd rollcutRespectively a preset pitch angle threshold value and a preset roll angle threshold value.
Thus, optionally, the third determining module 15 is specifically configured to:
determining the corresponding current coordinate (X) of the empty mouse according to the following formulan,Yn):
Xn=Xn-1+VXn·Δt
Yn=Yn-1+VYn·Δt
Wherein (X)n-1,Yn-1) And the delta t is the time difference between the acquisition time of the original coordinate and the current time.
The apparatus shown in fig. 4 can perform the method of the embodiments shown in fig. 1 and fig. 3, and reference may be made to the related description of the embodiments shown in fig. 1 and fig. 3 for parts of this embodiment that are not described in detail. The implementation process and technical effect of the technical solution refer to the description in the embodiment shown in fig. 1 and fig. 3, and are not described herein again.
The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of the present embodiment. One of ordinary skill in the art can understand and implement it without inventive effort.
Finally, it should be noted that: the above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

Claims (10)

1. A displacement acquisition method for an empty rat is characterized by comprising the following steps:
acquiring the gravity acceleration of the empty mouse in the current corresponding three-axis direction;
determining a first attitude angle currently corresponding to the empty mouse according to the gravity acceleration;
correcting the first attitude angle;
determining the moving speed of the empty mouse according to the comparison result of the corrected first attitude angle and the second attitude angle;
and determining the current coordinate corresponding to the empty mouse according to the moving speed and the original coordinate of the empty mouse, wherein the second attitude angle corresponds to the original coordinate, and the original coordinate is the coordinate corresponding to the empty mouse before moving according to the moving speed.
2. The method according to claim 1, wherein before determining the first attitude angle currently corresponding to the empty mouse according to the gravitational acceleration, the method further comprises:
calibrating the gravity acceleration by using a calibration parameter obtained in advance;
the determining of the current corresponding first attitude angle of the empty mouse according to the gravity acceleration comprises the following steps:
and determining a first attitude angle currently corresponding to the empty mouse according to the calibrated gravity acceleration.
3. The method of claim 1, wherein the correction processing of the first attitude angle comprises:
smoothing the first attitude angle by combining K third attitude angles, wherein the K third attitude angles correspond to K gravitational accelerations acquired before the gravitational acceleration, and K is a preset value larger than 1;
and denoising the first attitude angle after the smoothing processing.
4. The method of any of claims 1-3, wherein the first attitude angle comprises: and determining the moving speed of the empty rat according to the comparison result of the corrected first attitude angle and the second attitude angle, wherein the method comprises the following steps:
determining the moving speed V of the empty rat in the X-axis direction according to the following piecewise functionXnAnd a moving speed V in the Y-axis directionYn
Figure FDA0001290376650000021
Figure FDA0001290376650000022
Wherein the content of the first and second substances,
Figure FDA0001290376650000023
and
Figure FDA0001290376650000024
preset speed constants corresponding to the X-axis direction and the Y-axis direction respectively, and the corrected first attitude angle comprises a pitch angle picthnAnd roll angle rollnThe second attitude angle comprises a pitch angle picth corresponding to the original coordinaten-1And a roll angle roll corresponding to the original coordinaten-1,picthcutAnd rollcutRespectively a preset pitch angle threshold value and a preset roll angle threshold value.
5. The method according to claim 4, wherein the determining the current coordinates corresponding to the empty mouse according to the moving speed and the original coordinates of the empty mouse comprises:
determining the corresponding current coordinate (X) of the empty mouse according to the following formulan,Yn):
Xn=Xn-1+VXn·Δt
Yn=Yn-1+VYn·Δt
Wherein (X)n-1,Yn-1) And the delta t is the time difference between the acquisition time of the original coordinate and the current time.
6. An empty rat displacement acquisition device, characterized by comprising:
the acquisition module is used for acquiring the gravity acceleration of the empty mouse in the current corresponding three-axis direction;
the first determining module is used for determining a first attitude angle currently corresponding to the empty mouse according to the gravity acceleration;
the correction module is used for correcting the first attitude angle;
the second determining module is used for determining the moving speed of the empty mouse according to the comparison result of the corrected first attitude angle and the second attitude angle;
and the third determining module is used for determining the current coordinate corresponding to the empty mouse according to the moving speed and the original coordinate of the empty mouse, wherein the second attitude angle corresponds to the original coordinate, and the original coordinate is the coordinate corresponding to the empty mouse before moving according to the moving speed.
7. The apparatus of claim 6, further comprising:
and the calibration module is used for calibrating the gravity acceleration by adopting calibration parameters obtained in advance.
8. The apparatus of claim 6, wherein the correction module comprises:
the smoothing unit is used for smoothing the first attitude angle by combining K third attitude angles, wherein the K third attitude angles correspond to K gravitational accelerations acquired before the gravitational acceleration, and K is a preset value larger than 1;
and the denoising unit is used for denoising the first attitude angle after the smoothing processing.
9. The apparatus of any of claims 6 to 8, wherein the first attitude angle comprises: pitch angle and roll angle, and the second determining module is specifically configured to:
determining the moving speed V of the empty rat in the X-axis direction according to the following piecewise functionXnAnd a moving speed V in the Y-axis directionYn
Figure FDA0001290376650000031
Figure FDA0001290376650000032
Wherein the content of the first and second substances,
Figure FDA0001290376650000033
and
Figure FDA0001290376650000034
preset speed constants corresponding to the X-axis direction and the Y-axis direction respectively, and the corrected first attitude angle comprises a pitch angle picthnAnd roll angle rollnThe second attitude angle comprises a pitch angle picth corresponding to the original coordinaten-1And a roll angle roll corresponding to the original coordinaten-1,picthcutAnd rollcutRespectively a preset pitch angle threshold value and a preset roll angle threshold value.
10. The apparatus of claim 9, wherein the third determining module is specifically configured to:
determining the corresponding current coordinate (X) of the empty mouse according to the following formulan,Yn):
Xn=Xn-1+VXn·Δt
Yn=Yn-1+VYn·Δt
Wherein (X)n-1,Yn-1) And the delta t is the time difference between the acquisition time of the original coordinate and the current time.
CN201710322994.2A 2017-05-09 2017-05-09 Empty mouse displacement acquisition method and device Active CN107229353B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710322994.2A CN107229353B (en) 2017-05-09 2017-05-09 Empty mouse displacement acquisition method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710322994.2A CN107229353B (en) 2017-05-09 2017-05-09 Empty mouse displacement acquisition method and device

Publications (2)

Publication Number Publication Date
CN107229353A CN107229353A (en) 2017-10-03
CN107229353B true CN107229353B (en) 2020-05-22

Family

ID=59933657

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710322994.2A Active CN107229353B (en) 2017-05-09 2017-05-09 Empty mouse displacement acquisition method and device

Country Status (1)

Country Link
CN (1) CN107229353B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107704106B (en) * 2017-10-17 2021-04-09 宁波视睿迪光电有限公司 Attitude positioning method and device and electronic equipment
CN107562211A (en) * 2017-10-20 2018-01-09 网易(杭州)网络有限公司 Cursor anti-fluttering method, device, storage medium and wear display device
CN112486339A (en) * 2020-11-26 2021-03-12 四川长虹电器股份有限公司 Empty mouse button jitter elimination system and method
CN113407045B (en) * 2021-06-28 2023-08-22 北京字节跳动网络技术有限公司 Cursor control method and device, electronic equipment and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289305A (en) * 2011-08-29 2011-12-21 江苏惠通集团有限责任公司 Attitude sensing equipment and positioning method thereof and method for controlling mouse pointer
CN103389808A (en) * 2013-07-18 2013-11-13 华南师范大学 Space mouse and method for obtaining displacement of space mouse
CN103576901A (en) * 2012-08-02 2014-02-12 腾讯科技(深圳)有限公司 Implement method for performing cursor control on screen through handheld electronic device and handheld electronic device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9092073B1 (en) * 2010-05-11 2015-07-28 Contour Design, Inc. Adjustable pointing device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289305A (en) * 2011-08-29 2011-12-21 江苏惠通集团有限责任公司 Attitude sensing equipment and positioning method thereof and method for controlling mouse pointer
CN103576901A (en) * 2012-08-02 2014-02-12 腾讯科技(深圳)有限公司 Implement method for performing cursor control on screen through handheld electronic device and handheld electronic device
CN103389808A (en) * 2013-07-18 2013-11-13 华南师范大学 Space mouse and method for obtaining displacement of space mouse

Also Published As

Publication number Publication date
CN107229353A (en) 2017-10-03

Similar Documents

Publication Publication Date Title
CN107229353B (en) Empty mouse displacement acquisition method and device
KR101708584B1 (en) Method and device for sensing orientation of an object in space in a fixed frame of reference
CN103837157A (en) Motion measuring method and device
CN107063237A (en) A kind of method and apparatus for measuring gestures of object angle
US20170255283A1 (en) Touch Sensitive Processing Method, Apparatus and System for Calibrating Pressure Value to Stylus
JP2021529947A (en) Motion sensor with drift correction
AU2020332884B2 (en) Systems and methods for measuring the rate of angular displacement using magnetic field sensing
CN109960479B (en) Anti-dizziness method and device for display equipment
KR101953958B1 (en) Apparatus and method for precisely estimating attitude
CN111444600A (en) Parameter correction method and system of VR (virtual reality) treadmill and readable storage medium
CN112462793A (en) Sensor-based equipment control method and device and computer equipment
JP6848571B2 (en) Posture calculation device, posture measurement system, and posture calculation method
JP6999542B2 (en) Systems and methods for measuring using portable electronic devices
CN106931965B (en) Method and device for determining terminal posture
CN111839527A (en) Fall detection method and device and computer readable storage medium
CN108225316A (en) The acquisition methods and apparatus and system of attitude of carrier information
JPH10253361A (en) Signal processing method and three-dimensional data input device
CN206291910U (en) The acquisition system of the attitude information of carrier
Sikeridis et al. An imu-based wearable system for automatic pointing during presentations
JP2016109607A (en) Strong motion seismograph, measuring system, and damage state determination method
CA2983574C (en) Initializing an inertial sensor using soft constraints and penalty functions
CN103505195B (en) Method and device for measuring human body pulse and mobile terminal
WO2016165333A1 (en) Method and apparatus for realizing step counting
US11809640B2 (en) Method for detecting movement of ring controller, ring controller, and computer readable medium
CN104281280B (en) A kind of control method of gravity sensing motion

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
GR01 Patent grant
GR01 Patent grant