CN114949839A - Swimming posture-based motion sensing game method - Google Patents

Swimming posture-based motion sensing game method Download PDF

Info

Publication number
CN114949839A
CN114949839A CN202210667237.XA CN202210667237A CN114949839A CN 114949839 A CN114949839 A CN 114949839A CN 202210667237 A CN202210667237 A CN 202210667237A CN 114949839 A CN114949839 A CN 114949839A
Authority
CN
China
Prior art keywords
data
player
swimming
preset
game
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
Application number
CN202210667237.XA
Other languages
Chinese (zh)
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.)
Shenzhen Shimi Network Technology Co ltd
Original Assignee
Shenzhen Shimi Network Technology 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 Shenzhen Shimi Network Technology Co ltd filed Critical Shenzhen Shimi Network Technology Co ltd
Priority to CN202210667237.XA priority Critical patent/CN114949839A/en
Publication of CN114949839A publication Critical patent/CN114949839A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Human Computer Interaction (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The invention discloses a swimming gesture-based motion sensing game method, equipment and a computer-readable storage medium, wherein the method comprises the following steps: after a preset game type motion sensing game is started, acquiring original player posture data detected by a motion sensing device; performing Kalman filtering on the original data of the player posture to estimate the real posture data of the player; selecting axis data matched with a preset target axis from the real attitude data as target attitude data; judging whether the player finishes the set swimming action or not according to the target posture data and the preset wave peak value; if yes, the game character of the player is controlled to perform swimming action. The method has the advantages of high swimming action recognition precision and good game experience of players.

Description

Swimming posture-based motion sensing game method
Technical Field
The invention relates to the technical field of motion sensing games, in particular to a swimming posture-based motion sensing game method, equipment and a computer-readable storage medium.
Background
Currently, the motion sensing game architecture on the market is generally based on an Inertial Measurement Unit (IMU) motion sensing architecture. During the game, a player needs to wear a specific IMU device, the IMU device can detect the motion posture data of the user, and the system can convert the motion posture data into action instructions which can be recognized by the game, so that an object in the game can perform actions basically consistent with the actions.
However, the IMU architecture has problems that, in the game process, problems such as gyroscope drift, angle random walk, rate machine walk, rate slope and the like easily occur, so that the action accuracy is low, and the player action is easily misjudged.
Disclosure of Invention
The embodiment of the application aims to improve the identification precision of swimming actions of a player by providing a body sensing game method based on swimming postures.
In order to achieve the above object, an embodiment of the present application provides a method for a motion sensing game based on a swimming stroke, including:
after a preset game type motion sensing game is started, acquiring original player posture data detected by a motion sensing device;
performing Kalman filtering on the original data of the player posture to estimate the real posture data of the player;
selecting axis data matched with a preset target axis from the real attitude data as target attitude data;
judging whether the player finishes the set swimming action or not according to the target posture data and the preset wave peak value;
if yes, the game character of the player is controlled to perform swimming action.
In one embodiment, kalman filtering the raw player pose data comprises:
performing primary filtering on the player posture original data to improve the smoothness of the data;
and performing Kalman filtering fusion on the primary filtered player attitude raw data.
In one embodiment, the primary filtering of the raw player pose data to improve data smoothness comprises:
performing primary filtering on the player posture raw data by adopting moving average filtering, wherein the output value of a moving window of the moving average filtering is set to be the minimum of the square sum of each sampling value in the window, and then X satisfies the following formula:
Figure BDA0003693320860000021
wherein, the formula (2) is obtained by solving the limit of the formula (1), wherein, N is the filtering order of the sliding window, X is the output value of the sliding window, and X is the output value of the sliding window K Are the sample values in a sliding window.
In one embodiment, before the primary filtering of the raw player pose data to promote smoothness of the data, the method further comprises:
performing the moving average filtering of different filtering orders on a preset data set;
generating a waveform diagram after filtering of a preset data set;
and confirming the filtering order when the moving average filtering is carried out on the original data of the player posture according to the oscillogram.
In one embodiment, kalman filtering the raw player attitude data further comprises:
judging whether the signal-to-noise ratio of the player posture original data is not greater than a preset value or not;
if yes, primary filtering is conducted on the original data of the player posture.
In an embodiment, before selecting axis data matching a preset target axis from the real pose data as target pose data, the method further includes:
and selecting an axis with the largest signal fluctuation from the three-axis acceleration and the three-axis gyroscope as a preset target axis according to a preset data set associated with the preset swimming type motion sensing game.
In one embodiment, determining whether the player has finished the set swimming action according to the target posture data and the preset crest value includes:
and if the peak value of the target posture data is larger than the preset wave peak value and the time interval between the peak value of the current target posture data and the peak value of the previous target posture data is larger than the preset time threshold, judging that the player finishes the set swimming action.
In one embodiment, a game character for controlling a player to perform a swimming action includes:
if the player is judged to finish the set swimming action, the preset counter counts up by one;
and controlling the player character to move to a preset target position, and playing the swimming animation of the player character.
In order to achieve the above object, an embodiment of the present invention further provides a swimming-gesture-based motion-sensing game device, including a memory, a processor, and a swimming-gesture-based motion-sensing game program stored in the memory and executable on the processor, where the processor implements the swimming-gesture-based motion-sensing game method according to any one of the above items when executing the swimming-gesture-based motion-sensing game program.
To achieve the above object, an embodiment of the present application further provides a computer-readable storage medium, on which a swimming-gesture-based body-sensing game program is stored, and when executed by a processor, the swimming-gesture-based body-sensing game program implements a swimming-gesture-based body-sensing game method as described in any one of the above.
According to the swimming posture-based motion sensing game method, real posture data of a player are estimated by performing Kalman filtering on an original player posture signal, then axis data matched with a preset target axis are selected from the real posture data to serve as target posture data, and finally whether the set swimming action is finished by the player is judged according to the target posture data and a preset wave peak value, so that the recognition precision of the action of the player can be improved, the delay of the action of the player and a game instruction can be reduced, and the game experience of the player is further improved. Therefore, compared with the traditional motion sensing game method, the motion sensing game method has the advantages of high swimming gesture recognition precision and good game experience of players.
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, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a block diagram of an embodiment of a swimming gesture-based motion sensing game apparatus according to the present invention;
FIG. 2 is a schematic flow chart of an embodiment of a swimming-gesture-based motion-sensing game method according to the present invention;
FIG. 3 is a schematic flow chart of another embodiment of the swimming-gesture-based motion-sensing game method according to the present invention;
fig. 4 is a schematic flow chart of a motion sensing game method based on swimming gestures according to another embodiment of the invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and do not limit the invention.
For a better understanding of the above technical solutions, exemplary embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be embodied in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention may be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by one and the same item of hardware. The use of "first," "second," and "third," etc. do not denote any order, and such words are to be interpreted as names.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a server 1 (also called a swimming-gesture-based motion sensing game device) in a hardware operating environment according to an embodiment of the present invention.
The server provided by the embodiment of the invention comprises equipment with a display function, such as Internet of things equipment, an intelligent air conditioner with a networking function, an intelligent lamp, an intelligent power supply, AR/VR equipment with a networking function, an intelligent sound box, an automatic driving automobile, a PC, a smart phone, a tablet personal computer, an electronic book reader, a portable computer and the like.
As shown in fig. 1, the server 1 includes: memory 11, processor 12, and network interface 13.
The memory 11 includes at least one type of readable storage medium, which includes a flash memory, a hard disk, a multimedia card, a card type memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, and the like. The memory 11 may in some embodiments be an internal storage unit of the server 1, for example a hard disk of the server 1. The memory 11 may also be an external storage device of the server 1 in other embodiments, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, provided on the server 1.
Further, the memory 11 may also include an internal storage unit of the server 1 and also an external storage device. The memory 11 may be used not only to store application software installed in the server 1 and various types of data, such as codes of the body-sensory game program 10 based on a swimming stroke, but also to temporarily store data that has been output or is to be output.
The processor 12 may be a Central Processing Unit (CPU), controller, microcontroller, microprocessor or other data Processing chip in some embodiments, and is used for running program codes stored in the memory 11 or Processing data, such as executing the swimming gesture-based motion sensing game program 10.
The network interface 13 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), typically used for establishing a communication connection between the server 1 and other electronic devices.
The network may be the internet, a cloud network, a wireless fidelity (Wi-Fi) network, a Personal Area Network (PAN), a Local Area Network (LAN), and/or a Metropolitan Area Network (MAN). Various devices in the network environment may be configured to connect to the communication network according to various wired and wireless communication protocols. Examples of such wired and wireless communication protocols may include, but are not limited to, at least one of: transmission control protocol and internet protocol (TCP/IP), User Datagram Protocol (UDP), hypertext transfer protocol (HTTP), File Transfer Protocol (FTP), ZigBee, EDGE, IEEE 802.11, optical fidelity (Li-Fi), 802.16, IEEE 802.11s, IEEE 802.11g, multi-hop communications, wireless Access Points (APs), device-to-device communications, cellular communication protocol, and/or bluetooth (Blue Tooth) communication protocol, or a combination thereof.
Optionally, the server may further comprise a user interface, which may include a Display (Display), an input unit such as a Keyboard (Keyboard), and an optional user interface may also include a standard wired interface, a wireless interface. Alternatively, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, an OLED (Organic Light-Emitting Diode) touch device, or the like. The display, which may also be referred to as a display screen or display unit, is used for displaying information processed in the server 1 and for displaying a visualized user interface.
While fig. 1 shows only a server 1 with components 11-13 and a swimming gesture-based body-sensory game program 10, it will be understood by those skilled in the art that the structure shown in fig. 1 does not constitute a limitation of the server 1, and may include fewer or more components than shown, or some components in combination, or a different arrangement of components.
In this embodiment, the processor 12 may be configured to call the swimming stroke-based body-sensing game program stored in the memory 11, and perform the following operations:
after a preset game type motion sensing game is started, acquiring original player posture data detected by a motion sensing device;
performing Kalman filtering on the original data of the player posture to estimate the real posture data of the player;
selecting axis data matched with a preset target axis from the real attitude data as target attitude data;
judging whether the player finishes the set swimming action or not according to the target posture data and the preset wave peak value;
if yes, the game character of the player is controlled to perform swimming action.
In one embodiment, the processor 12 may be configured to call the swimming stroke-based somatosensory game program stored in the memory 11, and perform the following operations:
performing primary filtering on the player posture raw data to improve the smoothness degree of the data;
and performing Kalman filtering fusion on the primary filtered player attitude raw data.
In one embodiment, the processor 12 may be configured to call the swimming stroke-based somatosensory game program stored in the memory 11, and perform the following operations:
performing primary filtering on the player posture raw data by adopting moving average filtering, wherein the output value of a moving window of the moving average filtering is set to be the minimum of the square sum of each sampling value in the window, and then X satisfies the following formula:
Figure BDA0003693320860000071
Figure BDA0003693320860000072
wherein, the formula (2) is obtained by solving the limit of the formula (1), wherein, N is the filtering order of the sliding window, X is the output value of the sliding window, and X is the output value of the sliding window K Are the sample values in a sliding window.
In one embodiment, the processor 12 may be configured to call the swimming stroke-based somatosensory game program stored in the memory 11, and perform the following operations:
performing the moving average filtering of different filtering orders on a preset data set;
generating a waveform diagram after filtering of a preset data set;
and confirming the filtering order when the moving average filtering is carried out on the original data of the player posture according to the oscillogram.
In one embodiment, the processor 12 may be configured to call the swimming stroke-based somatosensory game program stored in the memory 11, and perform the following operations:
judging whether the signal-to-noise ratio of the player posture original data is not greater than a preset value or not;
if yes, primary filtering is conducted on the original data of the player posture.
In one embodiment, processor 12 may be configured to invoke a swimming stroke-based somatosensory game program stored in memory 11 and perform the following operations:
and selecting an axis with the largest signal fluctuation from the three-axis acceleration and the three-axis gyroscope as a preset target axis according to a preset data set associated with the preset swimming type motion sensing game.
In one embodiment, the processor 12 may be configured to call the swimming stroke-based somatosensory game program stored in the memory 11, and perform the following operations:
and if the peak value of the target posture data is larger than the preset wave peak value and the time interval between the peak value of the current target posture data and the peak value of the previous target posture data is larger than the preset time threshold, judging that the player finishes the set swimming action.
In one embodiment, the processor 12 may be configured to call the swimming stroke-based somatosensory game program stored in the memory 11, and perform the following operations:
if the player is judged to finish the set swimming action, the preset counter counts up by one;
and controlling the player character to move to a preset target position, and playing the swimming animation of the player character.
Based on the hardware architecture of the swimming-gesture-based motion-sensing game device, the embodiment of the swimming-gesture-based motion-sensing game method is provided. The invention provides a body sensing game method based on swimming postures, aiming at improving the identification precision of swimming actions of a player.
Referring to fig. 2, fig. 2 is a diagram illustrating an embodiment of a swimming-gesture-based motion-sensing game method according to the present invention, the swimming-gesture-based motion-sensing game method includes the following steps:
and S10, acquiring the original data of the player posture detected by the body sensing device after the preset game type body sensing game is started.
The game-type motion sensing game is a game that simulates a real swimming motion, for example, a breaststroke motion sensing game that simulates a breaststroke motion, a freestyle motion sensing game that simulates a freestyle motion, and other motion sensing games that simulate a swimming motion such as butterfly or backstroke, and the like, and examples thereof are not limited to these.
Further, the preset swimming-type feeling game runs on a terminal, and the terminal can be a desktop computer, a notebook computer, a game host, a portable game host, a smart phone, a tablet computer, a smart watch, a smart television and the like.
Here, the motion sensing device refers to a device capable of detecting posture data of a player, and in general, the motion sensing device is configured to include a six-axis IMU sensor including a three-axis accelerometer and a three-axis gyroscope, the six-axis IMU sensor detecting posture data of the player by detecting a change in three-axis acceleration and a change in three-axis angular velocity of the player. Specifically, the motion sensing device is wearable, and the form thereof includes, but is not limited to, the following: bracelet, glove watch, headband, hat, vest, body-building ring, game handle.
Further, before playing, the motion sensing device needs to establish communication connection with the terminal, and wired connection or wireless connection can be established between the motion sensing device and the terminal. For example, when the somatosensory device establishes a wired connection with the terminal, the wired connection can be based on at least one of a USB2.0 protocol, a USB3.0 protocol, a thunder and lightning 3 protocol and a thunder and lightning 4 protocol; and when the somatosensory device is wirelessly connected with the terminal, the somatosensory device can be based on at least one of a Bluetooth protocol, a WiFi protocol, an infrared protocol, a 2.4G communication protocol and an NFC protocol. After the body sensing device is in communication connection with the terminal and a preset swimming type body sensing game is started, the body sensing device sends the detected gesture original signal of the player to the terminal through at least one of the communication protocols. The original signals are unfiltered triaxial acceleration signals and triaxial gyroscope signals detected by the somatosensory device.
And S20, performing Kalman filtering on the original player posture data to estimate the real posture data of the player.
Among them, Kalman filtering (Kalman filtering) is an algorithm that performs optimal estimation on a system state by inputting and outputting observation data through a system using a linear system state equation. The optimal estimation can also be seen as a filtering process, since the observed data includes the effects of noise and interference in the system. That is, kalman filtering is performed on the original player attitude data, so that noise in the original player attitude data can be reduced, and attitude data closer to the true action attitude of the player can be obtained. It can be understood that the terminal can more accurately judge whether the player performs the swimming action or not by the real posture data.
Specifically, a Kalman filtering algorithm can be fixed in the motion sensing game, so that Kalman filtering can be performed on the original player posture data when the original player posture data are received.
And S30, selecting axis data matched with a preset target axis from the real attitude data as target attitude data.
It should be noted that the raw data of the posture of the player transmitted from the motion sensing device generally includes data of six axes including three-axis acceleration data and three-axis gyroscope data. The preset target axis is one of the six axes, in which the signals/data can most experience the swimming posture of the player, in other words, the terminal can judge whether the player performs the related swimming action only according to the data of the preset target axis. The preset target axis is matched with a swimming type motion sensing game currently operated by the terminal, so that the preset target can reflect the swimming action of the player most accurately.
Specifically, after the terminal runs a preset swimming type body feeling game, the terminal can determine a preset target axis matched with the current swimming type body feeling game according to the swimming gesture required by the current swimming type body feeling game. After Kalman filtering is carried out on the original player attitude data to obtain real attitude data, the terminal directly screens out attitude data associated with a preset target axis from the real attitude data to serve as target data. For example, if the preset target axis is the Y-axis of a three-axis accelerometer, the data of the Y-axis of the accelerometer is obtained from the real player posture data as the target data.
It can be understood that the data volume can be reduced through the mode, the calculation amount of the terminal is further reduced, the judgment speed of the terminal on the swimming posture of the player is improved, the delay from the action of the player to the game action is reduced, and the game experience of the player is improved.
And S40, judging whether the player finishes the set swimming action according to the target posture data and the preset wave peak value.
Here, the set swimming motion is a swimming motion matching the current swimming type motion sensing game. For example, a breaststroke somatosensory game requires a player to complete a breaststroke action, and a freestyle somatosensory game requires a player to complete a freestyle action.
Specifically, after the target posture data is obtained, the target posture data may be converted into a waveform diagram, and then a peak value of the waveform diagram is obtained and compared with a preset peak value to determine whether the player has finished the set swimming action. Specifically, if the maximum peak value of the waveform in the waveform chart converted from the target data is larger than the preset peak value, it can be determined that the player has completed the set swimming action. It should be noted that the waveform chart itself is a representation of data, and when determining whether or not the player has finished the set swimming action, the peak value can be directly calculated from the raw data based on a specific data mapping relationship.
It can be understood that whether the set swimming action is finished by the player is judged by the mode, the calculated amount of the terminal can be reduced on the basis of ensuring the judgment precision of the action of the player, so that the judgment speed of the action of the player is improved, the delay from the action of the player to the game action is reduced, and the game experience of the player is improved.
And S50, if yes, controlling the game character of the player to perform swimming action.
The game character refers to a character image of a player in a game, and the character image can adopt a first person perspective or a third person perspective. In addition, the game role is not limited, and can be adaptively adjusted according to the game content and the type.
Specifically, after determining that the player has correctly completed the set swimming motion, the terminal controls the player's game character to execute the set swimming motion so as to complete the mapping from the player's body-sensing motion to the game operation command. For example, when a player is playing a breaststroke motion sensing game, if the player completes a standard breaststroke motion, the game character in the terminal will also perform the corresponding breaststroke motion and will think of the target orientation (usually forward) moving.
The swimming-posture-based motion sensing game method estimates real posture data of a player by performing Kalman filtering on an original player posture signal, selects axis data matched with a preset target axis from the real posture data as target posture data, and finally judges whether the player finishes a set swimming action according to the target posture data and a preset wave peak value. Therefore, compared with the traditional motion sensing game method, the motion sensing game method has the advantages of high swimming gesture recognition precision and good game experience of players.
As shown in FIG. 3, in some embodiments, Kalman filtering of the raw player pose data includes:
and S21, performing primary filtering on the original data of the player posture to improve the smoothness of the data.
Specifically, the smoothness of the promoted data is that the waveform of the filtered original player posture data is smoother than that of the original data, and the essence is that the data with obvious abnormality in the original player posture data is filtered out through primary filtering, so that the smoothness of the waveform is promoted.
For example, the raw data of the player posture may be primarily filtered by using a sliding average method, a variance method and a normalization method.
And S22, performing Kalman filtering fusion on the primary filtered player posture raw data.
Specifically, after primary filtering is performed on the raw data of the player posture, kalman filtering can be performed on the raw data of the player posture.
It can be understood that the credibility of the original player posture data detected by the motion sensing device can be improved by performing primary filtering on the original player posture data, and thus, the matching degree between the actual player posture data and the actual swimming posture of the player can be improved after Kalman filtering.
In some embodiments, the primary filtering of the raw player pose data to promote data smoothness comprises:
performing primary filtering on the player posture raw data by adopting moving average filtering, wherein the output value of a moving window of the moving average filtering is set to be the minimum of the square sum of each sampling value in the window, and then X satisfies the following formula:
Figure BDA0003693320860000121
Figure BDA0003693320860000122
wherein, the formula (2) is obtained by solving the limit according to the formula (1), wherein, N is the filtering order of the sliding window, X is the output value of the sliding window, and X is the output value of the sliding window K Are the sample values in a sliding window.
Specifically, the moving average filtering is to set a sliding window to slide on data along the time direction, output one value as a filtered value at each sliding, and slide only the length of one sample value at each sliding. Here, the filtering order of the sliding window can also be understood as the length of the window, i.e. the number of sampling values that the window can cover, and the sampling values refer to the original data of the player posture.
Usually, the output value of the sliding window is the average value of each sample value in the window, and in the technical solution of the present application, the sum of the output value of the sliding window and the square of each sample value in the window is required to be minimum. Thus, compared with the mode of outputting the average value, the method can be more approximate to the true value, namely, the filtering effect on the noise in the data is better.
It can be understood that the player posture raw data can be effectively and stably waveshaped in the above manner. Of course, the design of the present application is not limited thereto, and in other embodiments, the raw data of the player pose may be primarily filtered by a conventional moving average method.
As shown in fig. 4, in some embodiments, before primary filtering the raw player pose data to promote smoothness of the data, the method further comprises:
and S110, performing the moving average filtering with different filtering orders on a preset data set.
The preset data set refers to a data set established by collecting posture data when the player performs the set swimming action.
And S120, generating a waveform diagram after filtering of the preset data set.
Specifically, after the filtering is finished, a corresponding waveform diagram can be generated for each time of filtered data, wherein the horizontal axis of the waveform diagram is time, and the vertical axis of the waveform diagram is the amplitude of the wave.
And S130, confirming a filtering order when the player posture original data is subjected to the moving average filtering according to the oscillogram.
Specifically, before the primary filtering is performed on the raw data of the player gesture, we can also filter the preset data set by using the same filtering method (i.e. moving average filtering), and only when the preset data set is filtered, we simultaneously use a sliding window with multiple filtering orders. Since the preset data set is a known data set, we can determine which filtering order sliding window can achieve the best smoothing effect by observing the filtered oscillogram, and meanwhile, can avoid the overfitting of the filtering result.
It can be understood that the best filtering order can be obtained through the above method, and then the best primary filtering effect can be obtained.
In some embodiments, kalman filtering the raw player pose data further comprises:
judging whether the signal-to-noise ratio of the player posture original data is not greater than a preset value or not; if yes, primary filtering is conducted on the original data of the player posture.
The signal-to-noise ratio can represent the proportion of noise in the data, the larger the signal-to-noise ratio is, the less noise in the data is indicated, and the smaller the signal-to-noise ratio is, the more noise in the data is indicated.
In particular, player pose raw data typically includes valid information (i.e., accurate information) and invalid information (i.e., noise), then if we use S i Representing valid information, by C i And if the invalid information is represented, the sum of the valid information is:
Figure BDA0003693320860000141
the sum of invalid information is:
Figure BDA0003693320860000142
and carrying out arithmetic averaging on the sum of the effective information and the sum of the ineffective information to obtain an arithmetic-averaged signal-to-noise ratio:
Figure BDA0003693320860000143
therefore, after the signal-to-noise ratio of the player raw data is obtained in the above manner, the signal-to-noise ratio can be compared with a preset value, if the signal-to-noise ratio is smaller than or equal to (i.e., not greater than) the preset value, it is indicated that the noise in the player posture data is more, and at this time, the player posture raw data needs to be primarily filtered. On the contrary, if the signal-to-noise ratio is not greater than the preset value, it indicates that the noise in the player posture data is less, and at this time, the primary filtering may not be performed on the player posture raw data, so as to save the terminal calculation amount and the calculation time.
It can be understood that whether the primary filtering is carried out on the player posture data or not is judged through the mode, the terminal can adaptively carry out the primary filtering on the player posture original data, and then the data precision and the terminal calculation speed can be considered simultaneously, unnecessary calculation waste is avoided, and the judgment speed of the swimming action of the player is improved.
In some embodiments, before selecting axis data matching a preset target axis from the real pose data as target pose data, the method further comprises:
and selecting an axis with the largest signal fluctuation from the three-axis acceleration and the three-axis gyroscope as a preset target axis according to a preset data set associated with the preset swimming type motion sensing game.
It should be noted that, although the three-axis accelerometer and the three-axis gyroscope can generate signals in all six axes when the player performs a swimming action, the fluctuation of the signal strength of one axis is relatively the most severe, and the signal associated with the axis with the largest fluctuation of the signal strength can reflect the swimming posture of the player most in the signals of the six axes, so that the swimming posture of the player can be recognized only according to the signal of the axis. The preset data set associated with the preset swimming type body sensing game is a data set established by collecting player posture data when a player performs a set swimming action. The preset data set is a known data set with label information, and the data of each axis in the known data set is converted into a waveform diagram, and then the waveform diagram of each axis is observed, so that the signal fluctuation of which axis is the largest in a complete swimming action can be determined. The intensity of change of the waveform can be determined by the maximum amplitude of the wave and the duration of the maximum amplitude, and generally, the larger the maximum amplitude of a certain axis is, the longer the duration of the maximum amplitude is, the maximum intensity of change of the signal of the axis can be considered.
In some embodiments, determining whether the player has finished the set swimming action according to the target posture data and the preset crest value includes:
and if the peak value of the target posture data is larger than the preset wave peak value and the time interval between the peak value of the current target posture data and the peak value of the previous target posture data is larger than the preset time threshold, judging that the player finishes the set swimming action.
Here, the current target posture data is the player posture data for which the motion posture determination is being performed, and the previous target posture data is the posture data for which it is determined that the player has completed one swimming stroke. In other words, the current target gesture data and the previous target gesture data can be understood as gesture data matched by two adjacent swimming motions.
Specifically, after the target posture data is obtained, the target posture data can be converted into a wave pattern, the wave peak value of the wave pattern is obtained and compared with the preset wave peak value, and if the wave peak value of the wave pattern obtained by conversion in the target data is larger than the preset wave peak value and the time interval between the current peak value and the last peak value is larger than the preset time threshold value, it can be determined that the player currently completes the set swimming action. The preset time length threshold is set to ensure the identification precision of the swimming postures of the player, and can further avoid the interference of other misoperation of the player on the swimming postures of the player.
It can be understood that, by the above-described manner, the accuracy of determination of the swimming posture of the player can be enhanced.
In some embodiments, controlling a player's game character to perform a swimming action includes:
s210, if the player is judged to finish the set swimming action, the preset counter counts up by one.
Specifically, the preset counter is a counter for counting the number of times the swimming action of the player is completed. The total swimming action times of the player can be calculated through the counter, and whether the swimming target of the player is finished or not can be judged according to the total swimming times. Specifically, when the value of the counter is equal to a preset number, it can be determined that the player has completed the swimming target.
S220, controlling the player character to move to a preset target position, and playing swimming animation of the player character.
Specifically, when the count of the counter is +1, it is considered that the player has completed the set swimming motion, and at this time, the player character is controlled to move to a preset target position, which is usually a terminal position set in the game, and a swimming animation of the player character is played. The swimming animation of the player character can be played, and the game action is consistent with the player action, so that the game experience of the player is improved.
In addition, the embodiment of the present invention further provides a computer-readable storage medium, which may be any one of or any combination of a hard disk, a multimedia card, an SD card, a flash memory card, an SMC, a Read Only Memory (ROM), an Erasable Programmable Read Only Memory (EPROM), a portable compact disc read only memory (CD-ROM), a USB memory, and the like. The computer-readable storage medium includes a swimming-gesture-based motion-sensing game program 10, and the specific embodiment of the computer-readable storage medium of the present invention is substantially the same as the specific embodiment of the swimming-gesture-based motion-sensing game method and the server 1 described above, and will not be described again here.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (10)

1. A motion sensing game method based on swimming gestures is characterized by comprising the following steps:
after a preset game type motion sensing game is started, obtaining original data of the posture of a player, which are detected by a motion sensing device;
performing Kalman filtering on the original data of the player posture to estimate the real posture data of the player;
selecting axis data matched with a preset target axis from the real attitude data as target attitude data;
judging whether the player finishes the set swimming action or not according to the target posture data and the preset wave peak value;
if yes, the game character of the player is controlled to perform swimming action.
2. The method for a swimming gesture-based somatosensory game according to claim 1, wherein the kalman filtering is performed on the raw player gesture data, comprising:
performing primary filtering on the player posture raw data to improve the smoothness degree of the data;
and performing Kalman filtering fusion on the primary filtered player attitude raw data.
3. The method of swimming stroke based motion sensing gaming of claim 2, wherein the primary filtering of the raw player gesture data to improve data smoothness comprises:
performing primary filtering on the player posture raw data by adopting moving average filtering, wherein the output value of a moving window of the moving average filtering is set to be the minimum of the square sum of each sampling value in the window, and then X satisfies the following formula:
Figure FDA0003693320850000011
Figure FDA0003693320850000012
wherein, the formula (2) is obtained by solving the limit according to the formula (1), wherein, N is the filtering order of the sliding window, X is the output value of the sliding window, and X is the output value of the sliding window K Are the sample values in a sliding window.
4. The method of swimming gesture-based body-sensory game of claim 3, wherein prior to primary filtering the raw player gesture data to promote smoothness of the data, the method further comprises:
performing the moving average filtering of different filtering orders on a preset data set;
generating a waveform diagram after filtering of a preset data set;
and confirming the filtering order when the moving average filtering is carried out on the original data of the player posture according to the oscillogram.
5. The method for swimming stroke based motion sensing gaming of claim 2, wherein kalman filtering the raw player gesture data further comprises:
judging whether the signal-to-noise ratio of the player posture original data is not greater than a preset value or not;
if yes, primary filtering is conducted on the original data of the player posture.
6. The swimming-gesture-based body-sensory game method according to claim 1, wherein before selecting axis data matching a preset target axis from the real gesture data as target gesture data, the method further comprises:
and selecting an axis with the largest signal fluctuation from the three-axis acceleration and the three-axis gyroscope as a preset target axis according to a preset data set associated with the preset swimming type motion sensing game.
7. The method for a body-sensory game based on swimming postures of claim 1, wherein the step of determining whether the player has finished the set swimming action according to the target posture data and the preset crest value comprises:
and if the peak value of the target posture data is larger than the preset wave peak value and the time interval between the peak value of the current target posture data and the peak value of the previous target posture data is larger than the preset time threshold, judging that the player finishes the set swimming action.
8. The method for a swimming stroke-based body sensing game according to claim 1, wherein controlling a game character of a player to perform a swimming stroke comprises:
if the player is judged to finish the set swimming action, the preset counter counts up by one;
and controlling the player character to move to a preset target position, and playing the swimming animation of the player character.
9. A swimming gesture-based body-sensing game apparatus comprising a memory, a processor, and a swimming gesture-based body-sensing game program stored on the memory and executable on the processor, the processor implementing the swimming gesture-based body-sensing game method according to any one of claims 1 to 8 when executing the swimming gesture-based body-sensing game program.
10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a swimming stroke-based body-sensory game program, which when executed by a processor implements a swimming stroke-based body-sensory game method according to any one of claims 1 to 8.
CN202210667237.XA 2022-06-14 2022-06-14 Swimming posture-based motion sensing game method Pending CN114949839A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210667237.XA CN114949839A (en) 2022-06-14 2022-06-14 Swimming posture-based motion sensing game method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210667237.XA CN114949839A (en) 2022-06-14 2022-06-14 Swimming posture-based motion sensing game method

Publications (1)

Publication Number Publication Date
CN114949839A true CN114949839A (en) 2022-08-30

Family

ID=82961887

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210667237.XA Pending CN114949839A (en) 2022-06-14 2022-06-14 Swimming posture-based motion sensing game method

Country Status (1)

Country Link
CN (1) CN114949839A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115414664A (en) * 2022-08-31 2022-12-02 深圳十米网络科技有限公司 Data transmission method of motion sensing device
CN115414669A (en) * 2022-08-31 2022-12-02 深圳十米网络科技有限公司 Motion sensing game method and device based on running posture and computer readable storage medium

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013029512A (en) * 2011-07-28 2013-02-07 Memsic Inc System and method for portable electronic device that detect attitude and angular velocity using magnetic sensor and accelerometer
US20140278229A1 (en) * 2012-06-22 2014-09-18 Fitbit, Inc. Use of gyroscopes in personal fitness tracking devices
CN106325527A (en) * 2016-10-18 2017-01-11 深圳市华海技术有限公司 Human body action identification system
CN107016384A (en) * 2017-06-05 2017-08-04 深圳天珑无线科技有限公司 Step-recording method, mobile terminal and the storage medium of recognizable type of sports
CN107233730A (en) * 2016-08-31 2017-10-10 浙江玛拉蒂智能家具科技有限公司 Intelligent seat, intelligent interactive system and the method for game are controlled based on gesture recognition
CN112169307A (en) * 2019-07-05 2021-01-05 任天堂株式会社 Storage medium, information processing system, information processing apparatus, and information processing method
CN114534254A (en) * 2022-01-26 2022-05-27 广州三七极创网络科技有限公司 Method, device, equipment and medium for controlling virtual object in game

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013029512A (en) * 2011-07-28 2013-02-07 Memsic Inc System and method for portable electronic device that detect attitude and angular velocity using magnetic sensor and accelerometer
US20140278229A1 (en) * 2012-06-22 2014-09-18 Fitbit, Inc. Use of gyroscopes in personal fitness tracking devices
US20180042526A1 (en) * 2012-06-22 2018-02-15 Fitbit, Inc. Biometric monitoring device with immersion sensor and swim stroke detection and related methods
CN107233730A (en) * 2016-08-31 2017-10-10 浙江玛拉蒂智能家具科技有限公司 Intelligent seat, intelligent interactive system and the method for game are controlled based on gesture recognition
CN106325527A (en) * 2016-10-18 2017-01-11 深圳市华海技术有限公司 Human body action identification system
CN107016384A (en) * 2017-06-05 2017-08-04 深圳天珑无线科技有限公司 Step-recording method, mobile terminal and the storage medium of recognizable type of sports
CN112169307A (en) * 2019-07-05 2021-01-05 任天堂株式会社 Storage medium, information processing system, information processing apparatus, and information processing method
CN114534254A (en) * 2022-01-26 2022-05-27 广州三七极创网络科技有限公司 Method, device, equipment and medium for controlling virtual object in game

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115414664A (en) * 2022-08-31 2022-12-02 深圳十米网络科技有限公司 Data transmission method of motion sensing device
CN115414669A (en) * 2022-08-31 2022-12-02 深圳十米网络科技有限公司 Motion sensing game method and device based on running posture and computer readable storage medium

Similar Documents

Publication Publication Date Title
CN114949839A (en) Swimming posture-based motion sensing game method
EP2177029B1 (en) Object detection using video input combined with tilt angle information
EP2371434A2 (en) Image generation system, image generation method, and information storage medium
EP3007030A1 (en) Portable device and control method via gestures
CN105874409A (en) Information processing system, information processing method, and program
USRE48417E1 (en) Object direction using video input combined with tilt angle information
CN116196611A (en) Somatosensory game method based on waving action
CN115414669A (en) Motion sensing game method and device based on running posture and computer readable storage medium
CN114926908A (en) Motion sensing game method based on baton swinging gesture
CN116173492A (en) Motion sensing game method based on boxing motion
CN117138325A (en) Motion sensing rope skipping game method based on function fitting
CN116129518A (en) Somatosensory operation method based on gesture recognition
CN116271785A (en) Somatosensory game method based on slapping action
CN115845356A (en) Motion sensing game method based on swiping action
CN114904258A (en) Motion sensing game method based on translation motion
CN115337627A (en) Boxing motion sensing game method and device and computer readable storage medium
CN115006840A (en) Somatosensory online game method, device and computer-readable storage medium
CN116251343A (en) Somatosensory game method based on throwing action
CN115282589A (en) Somatosensory game method based on rope skipping action
CN115531867A (en) Operation method of running somatosensory game
CN117991901A (en) Motion-based somatosensory game method
CN115445201A (en) Skating motion sensing game method and device and computer readable storage medium
CN115253270A (en) Table tennis ball feeling game method
CN116271783A (en) Somatosensory tug-of-war game method, device, equipment and computer readable storage medium
CN115869611A (en) Somatosensory game method based on climbing action

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