METHOD AND SYSTEM FOR RECOGNIZING 2D MOVEMENT TRACK BASED ON SMART WATCH
20230076452 · 2023-03-09
Assignee
Inventors
Cpc classification
G06F3/017
PHYSICS
H04L67/12
ELECTRICITY
G01C19/5776
PHYSICS
H04L12/12
ELECTRICITY
G06F3/0346
PHYSICS
G01C21/183
PHYSICS
H04M2250/12
ELECTRICITY
H04M1/72448
ELECTRICITY
G01C21/16
PHYSICS
International classification
H04L12/28
ELECTRICITY
H04L67/12
ELECTRICITY
Abstract
A method and a system for recognizing a two-dimensional (2D) movement track based on a smart watch is provided. The method comprises: acquiring accelerometer signal data and gyroscope signal data of the smart watch; estimating a tilt angle of the smart watch by using the accelerometer signal data and correcting the gyroscope signal data by using the tilt angle; and calculating angle value information of the smart watch by using the corrected gyroscope signal data and estimating a coordinate point. According to the present application, the movement track of the smart watch can be accurately estimated by using the accelerometer and the gyroscope built in the smart watch.
Claims
1. A method for recognizing a two-dimensional (2D) movement track based on a smart watch, comprising: acquiring accelerometer signal data and gyroscope signal data of the smart watch; estimating a tilt angle of the smart watch by using the accelerometer signal data and correcting the gyroscope signal data by using the tilt angle; and calculating angle value information of the smart watch by using the corrected gyroscope signal data and estimating a coordinate point.
2. The method for recognizing the 2D movement track based on the smart watch according to claim 1, wherein estimating the tilt angle of the smart watch by using the accelerometer signal data and correcting the gyroscope signal data by using the tilt angle comprises following sub-steps: recording X, Y, and Z axis data of the accelerometer signal data as a.sub.x a.sub.y
a.sub.z, respectively, and recording X, Y, and Z axis data of the gyroscope signal data as g.sub.x
g.sub.y
g.sub.z, respectively; calculating an energy value e=a.sub.x.sup.2+a.sub.y.sup.2+a.sub.z.sup.2 of the accelerometer signal data, initializing an energy count c=0, and setting an energy threshold e.sub.threshold and an energy count threshold c.sub.threshold; judging whether the energy value e of the accelerometer signal data is less than or equal to the energy threshold, and if the energy value e of the accelerometer signal data is less than or equal to the energy threshold, updating energy count information c=c+1; judging whether the energy count c is greater than or equal to the energy count threshold c.sub.threshold, and if the energy count c is greater than or equal to the energy count threshold c.sub.threshold, updating tilt angle information represented by
=g.sub.y×cosθ+g.sub.z×sinθ,
=g.sub.y×(−sinθ)+g.sub.z×cosθ, wherein
is the corrected gyroscope y-axis angular velocity signal data, and
is the corrected gyroscope z-axis angular velocity signal data.
3. The method for recognizing the 2D movement track based on the smart watch according to claim 2, wherein the energy count threshold is set to c.sub.threshold=f×0.1, and the energy threshold is set to e.sub.threshold=0.04, wherein f is a data sampling frequency.
4. The method for recognizing the 2D movement track based on the smart watch according to claim 2, wherein the calculating of the angle value information of the smart watch by using the corrected gyroscope signal data and estimating the coordinate point comprises: setting a time interval θ.sub.y=∫
dt Δ θ.sub.z=∫
dt, wherein θ.sub.x is a roll angle, θ.sub.y is a pitch angle, and θ.sub.z is a yaw angle; and setting base vectors in a two-dimensional Cartesian coordinate system as unit vectors
5. The method for recognizing the 2D movement track based on the smart watch according to claim 1, further comprising: broadcasting the coordinate point to a maintained list of clients after the estimated coordinate point is obtained.
6. The method for recognizing the 2D movement track based on the smart watch according to claim 1, wherein the acquired accelerometer signal data and gyroscope signal data of the smart watch are processed using Butterworth filtering.
7. A system for recognizing a 2D movement track based on a smart watch, comprising: an acquisition module configured for acquiring accelerometer signal data and gyroscope signal data of the smart watch; an estimation module configured for estimating a tilt angle of the smart watch by using the accelerometer signal data and correcting the gyroscope signal data by using the tilt angle; and a calculation module configured for calculating angle value information of the smart watch by using the corrected gyroscope signal data and estimating a coordinate point.
8. The system for recognizing the 2D movement track based on the smart watch according to claim 7, further comprising: a monitoring protocol unit configured for listening to a request to connect to the system and maintaining a list of connected clients; and a broadcast transmission unit configured for broadcasting the coordinate point to the maintained list of connected clients.
9. A non-transitory computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the method according to claim 1 when executed by a processor.
10. A computer device, comprising a non-transitory memory and a processor, wherein a computer program capable of being executed by the processor is stored in the non-transitory memory, and the computer program implements the method according to claim 1 when executed by the processor.
11. The non-transitory computer-readable storage medium according to claim 9, wherein estimating the tilt angle of the smart watch by using the accelerometer signal data and correcting the gyroscope signal data by using the tilt angle comprises following sub-steps: recording X, Y, and Z axis data of the accelerometer signal data as a.sub.x a.sub.y
a.sub.z, respectively, and recording X, Y, and Z axis data of the gyroscope signal data as g.sub.x
g.sub.y
g.sub.z, respectively; calculating an energy value e=a.sub.x.sup.2+a.sub.y.sup.2+a.sub.z.sup.2 of the accelerometer signal data, initializing an energy count c=0, and setting an energy threshold e.sub.threshold and an energy count threshold c.sub.threshold; judging whether the energy value e of the accelerometer signal data is less than or equal to the energy threshold, and if the energy value e of the accelerometer signal data is less than or equal to the energy threshold, updating energy count information c=c+1; judging whether the energy count c is greater than or equal to the energy count threshold c.sub.threshold, and if the energy count c is greater than or equal to the energy count threshold c.sub.threshold updating tilt angle information represented by
=g.sub.y×cosθ+g.sub.z×sinθ,
=g.sub.y×(−sinθ)+g.sub.z×cosθ, wherein
is the corrected gyroscope y-axis angular velocity signal data, and
is the corrected gyroscope z-axis angular velocity signal data.
12. The non-transitory computer-readable storage medium according to claim 11, wherein the energy count threshold is set to c.sub.threshold=f×0.1, and the energy threshold is set to e.sub.threshold=0.04, wherein f is a data sampling frequency.
13. The non-transitory computer-readable storage medium according to claim 11, wherein the calculating of the angle value information of the smart watch by using the corrected gyroscope signal data and estimating the coordinate point comprises: setting a time interval θ.sub.y=∫
dt
θ.sub.z=∫
dt, wherein θ.sub.x is a roll angle, θ.sub.y is a pitch angle, and θ.sub.z is a yaw angle; and setting base vectors in a two-dimensional Cartesian coordinate system as unit vectors
14. The non-transitory computer-readable storage medium according to claim 9, further comprising: broadcasting the coordinate point to a maintained list of clients after the estimated coordinate point is obtained.
15. The non-transitory computer-readable storage medium according to claim 9, wherein the acquired accelerometer signal data and gyroscope signal data of the smart watch are processed using Butterworth filtering.
16. The computer device according to claim 10, wherein estimating the tilt angle of the smart watch by using the accelerometer signal data and correcting the gyroscope signal data by using the tilt angle comprises following sub-steps: recording X, Y, and Z axis data of the accelerometer signal data as a.sub.x a.sub.y
a.sub.z, respectively, and recording X, Y, and Z axis data of the gyroscope signal data as g.sub.x
g.sub.y
g.sub.z, respectively; calculating an energy value e=a.sub.x.sup.2+a.sub.y.sup.2+a.sub.z.sup.2 of the accelerometer signal data, initializing an energy count c=0, and setting an energy threshold e.sub.threshold and an energy count threshold c.sub.threshold; judging whether the energy value e of the accelerometer signal data is less than or equal to the energy threshold, and if the energy value e of the accelerometer signal data is less than or equal to the energy threshold, updating energy count information c=c+1; judging whether the energy count c is greater than or equal to the energy count threshold c.sub.threshold, and if the energy count c is greater than or equal to the energy count threshold c.sub.threshold updating tilt angle information represented by
=g.sub.y×cosθ+g.sub.z×sinθ,
=g.sub.y×(−sinθ)+g.sub.z×cosθ, wherein
is the corrected gyroscope y-axis angular velocity signal data and
is the corrected gyroscope z-axis angular velocity signal data.
17. The computer device according to claim 16, wherein the energy count threshold is set to c.sub.threshold=f×0.1, and the energy threshold is set to e.sub.threshold=0.04, wherein f is a data sampling frequency.
18. The computer device according to claim 16, wherein the calculating of the angle value information of the smart watch by using the corrected gyroscope signal data and estimating the coordinate point comprises: setting a time interval θ.sub.y=∫
dt
θ.sub.z=∫
dt, wherein θ.sub.x is a roll angle, θ.sub.y is a pitch angle, and θ.sub.z is a yaw angle; and setting base vectors in a two-dimensional Cartesian coordinate system as unit vectors
19. The computer device according to claim 10, further comprising: broadcasting the coordinate point to a maintained list of clients after the estimated coordinate point is obtained.
20. The computer device according to claim 10, wherein the acquired accelerometer signal data and gyroscope signal data of the smart watch are processed using Butterworth filtering.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0023] The following drawings are only for schematic illustration and explanation of the present application, and are not intended to limit the scope of the present application, wherein:
[0024]
[0025]
[0026]
DETAILED DESCRIPTION
[0027] In order to make the objectives, technical schemes, design methods and advantages of the present application more clear, the present application will be further illustrated in detail below by specific embodiments with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate the present application, but not to limit the present application.
[0028] In all examples shown and discussed herein, any specific value should be construed as exemplary only rather than limiting. Thus, other examples of the exemplary embodiments may have different values.
[0029] Techniques, methods, and devices known to those of ordinary skills in the relevant art may not be discussed in detail, but the techniques, methods, and devices should be considered as a part of the specification where appropriate.
[0030] Now referring to
[0031] Step S1, acquiring signals of an accelerometer and a gyroscope sensor of the smart watch.
[0032] For example, the accelerometer and the gyroscope built in the smart watch are used for signal acquisition to acquire acceleration signal data and gyroscope signal data of the smart watch. Furthermore, in order to eliminate noise or anomalous data, the acquired signals can be filtered, for example, processing the acquired data using Butterworth filtering.
[0033] The accelerometer can sense an acceleration in any direction, and characterize the magnitude and direction of an axial acceleration by measuring the force on the smart watch in a certain axial direction. The gyroscope measures an angle between a vertical axis of a gyroscope rotor and the smart watch in a three-dimensional coordinate system, calculates an angular velocity, and thereby judges the motion state of an object in the three-dimensional space through the angle and the angular velocity. Taking a three-axis accelerometer and a three-axis gyroscope as examples, the signal data of the accelerometer and the gyroscope in three axes x, y and z can be obtained, and the data can reflect the gesture movement condition of a user as the smart watch is snugly attached to the wrist of the user.
[0034] Step S2, estimating a tilt angle by using the accelerometer signal data and correcting the gyroscope signal data.
[0035] In this step, the tilt angle of the smart watch is estimated by using the accelerometer signal data, and the gyroscope signal data is corrected.
[0036] Specifically, referring to
[0037] initializing the tilt angle θ to 0, and at the moment, cosθ and sinθ are 1 and 0, respectively;
[0038] acquiring and using the Butterworth-filtered accelerometer X, Y, Z axis data represented by a.sub.z a.sub.y
a.sub.z, acquiring and using the Butterworth-filtered gyroscope X, Y, Z axis data represented by g.sub.z
g.sub.y
g.sub.z, and recording a sensor sampling frequency of the smart watch device as f (Hz);
[0039] calculating an energy value e=a.sub.x.sup.2+a.sub.y.sup.2+a.sub.z.sup.2 of the accelerometer data, initializing an energy count c=0, setting an energy threshold e.sub.threshold=0.04 and an energy count threshold c.sub.threshold=f×0.1, and estimating the tilt angle θ by using the accelerometer signal data;
[0040] judging whether the energy value e is less than or equal to the energy threshold, and if yes, updating energy count information: c=c+1;
[0041] judging whether the energy count c is greater than or equal to the energy count threshold c.sub.threshold, if yes, updating tilt angle θ information:
and if no, proceeding to the next step; and
[0042] correcting gyroscope y-axis and z-axis angular velocity signal data by using the tilt angle θ information, represented by =g.sub.y×cosθ+g.sub.z×sinθ,
=g.sub.y×(−sinθ)+g.sub.z×cosθ, wherein
is the corrected gyroscope y-axis data, and
is the corrected gyroscope z-axis data.
[0043] It should be understood that the energy threshold and the count threshold of the embodiments of the present application may be set to appropriate values according to application scenarios and the like, and the present application is not limited thereto.
[0044] Step S3, calculating angle values of the smart watch in the current state by using the corrected gyroscope signal data.
[0045] In this step, the angle value information (Euler angles) of the smart watch in the current state is calculated by using the corrected gyroscope signal data, and a current coordinate point (x, y) is further estimated, wherein the angle value information is shown in
[0046] The specific procedures comprise: setting a time interval
for two samplings of the gyroscope data; integrating the corrected gyroscope angular velocity signal data over time, represented by θ.sub.x=∫g.sub.xdt θ.sub.y=∫
dt
θ.sub.z=∫
dt, wherein θ.sub.x is the roll angle, θ.sub.y is the pitch angle, θ.sub.z is the yaw angle; and defining basis vectors and estimating a coordinate point, for example, setting the base vectors in a two-dimensional vertical coordinate system as unit vectors
[0047] Step S4, transmitting results to a connected client.
[0048] For example, the coordinate point is transmitted to the client connected to the system by using protocols such as Bluetooth, Wi-Fi and the like. The specific procedures comprise: listening to a request to connect to the system by using protocols such as Bluetooth, Wi-Fi and the like after the system is started, and is maintaining a list of clients in connection; and broadcasting the coordinate point to the maintained list of clients after a gesture signal is detected by the system for recognizing the 2D movement track.
[0049] Correspondingly, the present application further provides a system for recognizing a 2D movement track based on a smart watch, for implementing one or more aspects of the method described above.
[0050] For example, the system comprises: a signal acquisition module configured for acquiring signal data of an accelerometer and a gyroscope sensor of the smart watch and processing the acquired data by using Butterworth filtering; a signal correction module configured for estimating a tilt angle of the smart watch by using the accelerometer signal data and correcting the gyroscope signal data; a calculation detection module for calculating angle values (a pitch angle, a yaw angle and a roll angle) of the smart watch in the current state by using the corrected gyroscope signal data and estimating the current coordinate point (x, y); and a data transmission module for transmitting the coordinate point to a client connected to the system by using protocols such as Bluetooth, Wi-Fi and the like.
[0051] Moreover, the signal correction module further comprises:
[0052] a data acquisition and recording unit configured for acquiring and using the Butterworth-filtered accelerometer X, Y and Z axis data represented by a.sub.x a.sub.y
a.sub.z and acquiring and using the Butterworth-filtered gyroscope X, Y and Z axis data represented by g.sub.x
g.sub.y
g.sub.z; for recording a sensor sampling frequency of the smart watch device as f; and for initializing the tilt angle θ to 0, wherein at the moment, cosθ and sinθ are 1 and 0, respectively;
[0053] a calculation setting parameter unit configured for calculating an energy value e=a.sub.x.sup.2+a.sub.y.sup.2+a.sub.z.sup.2 of the accelerometer data, initializing an energy count c=0 , and setting an energy threshold e.sub.threshold=0.04 and an energy count threshold c.sub.threshold=f×0.1;
[0054] a judging unit configured for judging whether the energy value e is less than or equal to the energy threshold, and if yes, updating energy count information: c=c+1; and for judging whether the energy count c is greater than or equal to the energy count threshold c.sub.threshold, if yes, updating tilt angle θ information:
and if no, proceeding to the correction angular velocity unit; and
[0055] a correction angular velocity unit configured for correcting gyroscope y-axis is and z-axis angular velocity signal data by using the tilt angle θ information: =g.sub.y×cosθ+g.sub.z×sinθ,
=g.sub.y×(−sinθ)+g.sub.z×cosθ, wherein
is the corrected gyroscope y-axis data, and
is the corrected gyroscope z-axis data.
[0056] Moreover, the calculation detection module further comprises:
[0057] an angular velocity integration unit configured for setting a time interval
tor two samplings of the gyroscope data; integrating the corrected gyroscope angular velocity signal data over time: θ.sub.x=∫g.sub.xdt θ.sub.y=
dt
θ.sub.z=∫
dt, wherein, θ.sub.x is a roll angle, θ.sub.y is a pitch angle, and θ.sub.z is a yaw angle; and
[0058] a coordinate point calculation unit configured for setting base vectors in a two-dimensional Cartesian coordinate system as unit vectors
[0059] Moreover, the data transmission module further comprises:
[0060] a monitoring protocol unit configured for listening to a request to connect to the system by using protocols such as Bluetooth, Wi-Fi and the like after the system is started, and maintaining a list of clients in connection; and
[0061] a broadcast transmission unit configured for broadcasting the coordinate point to the maintained list of clients after a gesture signal is detected by the system for recognizing the 2D movement track.
[0062] In summary, the present application can plot a displacement diagram of the movement track of the watch by combining and using the accelerometer and the gyroscope built in the smart watch, and further achieves manipulation to the target device by using gesture tracking.
[0063] It should be noted that although the procedures are described in a specific order, they are not necessarily executed in the specific order above, and in fact, some of the steps may be executed concurrently or even in a changed order as long as the required functions are achieved.
[0064] The present application may be a system, a method and/or a computer program product. The computer program product may include a computer readable storage medium having computer readable program instructions loaded thereon for causing a processor to implement various aspects of the present application.
[0065] The computer readable storage medium may be a tangible device that holds is and stores the instructions for use by an instruction execution device. The computer readable storage medium may include, but is not limited to, for example, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing. More specific examples (non-exhaustive list) of the computer readable storage medium include: a portable computer disk, a hard disk drive, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disc (DVD), a memory stick, a floppy disk, a mechanical encoding device such as punch card or in-groove raised structure having instructions stored thereon, and any suitable combination of the foregoing.
[0066] While various embodiments of the present application have been described above, the descriptions are exemplary, not exhaustive, and not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The terms used herein are chosen in order to best explain the principles of the embodiments, the practical application or technical improvements in the market, or to enable others of ordinary skill in the art to understand the embodiments disclosed herein.