CN116889729A - Motion sensing boxing game method based on function fitting - Google Patents

Motion sensing boxing game method based on function fitting Download PDF

Info

Publication number
CN116889729A
CN116889729A CN202310659942.XA CN202310659942A CN116889729A CN 116889729 A CN116889729 A CN 116889729A CN 202310659942 A CN202310659942 A CN 202310659942A CN 116889729 A CN116889729 A CN 116889729A
Authority
CN
China
Prior art keywords
boxing
function
game
preset
fitting
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
CN202310659942.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 CN202310659942.XA priority Critical patent/CN116889729A/en
Publication of CN116889729A publication Critical patent/CN116889729A/en
Pending legal-status Critical Current

Links

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/55Controlling game characters or game objects based on the game progress
    • 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
    • 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/80Special adaptations for executing a specific game genre or game mode
    • A63F13/833Hand-to-hand fighting, e.g. martial arts competition
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/10Complex mathematical operations
    • G06F17/15Correlation function computation including computation of convolution operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Theoretical Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Human Computer Interaction (AREA)
  • Mathematical Optimization (AREA)
  • Computational Mathematics (AREA)
  • Mathematical Physics (AREA)
  • Pure & Applied Mathematics (AREA)
  • Mathematical Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computing Systems (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Evolutionary Computation (AREA)
  • Algebra (AREA)
  • Evolutionary Biology (AREA)
  • Databases & Information Systems (AREA)
  • Software Systems (AREA)
  • User Interface Of Digital Computer (AREA)

Abstract

The application discloses a body-sensing boxing game method, a device, equipment and a computer-readable storage medium based on function fitting, wherein the method comprises the following steps: after the body-sensing boxing game is started, acquiring gyroscope data from the bound body-sensing equipment; generating track data of the somatosensory equipment in space according to the gyroscope data; substituting the track data into a preset linear function for fitting to obtain a current boxing function; and calculating the similarity of the current boxing function and the preset boxing function to judge whether the user completes boxing actions meeting the standard. The body feeling boxing game method has the advantages of high motion recognition precision, strong generalization, simplicity, high efficiency and the like.

Description

Motion sensing boxing game method based on function fitting
Technical Field
The present application relates to the field of motion sensing game technologies, and in particular, to a motion sensing boxing game method, device, apparatus and computer readable storage medium based on function fitting.
Background
Somatosensory games are a way of playing a game by capturing physical actions of a user to control the behavior of a character and progress of the game. Boxing-type games are a common type of somatosensory game, and users control game characters to attack and defend by mimicking boxing actions.
There are two main fluid-sensing game schemes on the market:
1. based on a Kinetic architecture, the amplitude and the direction of motion are judged by using a time slot depth image and a human skeleton through a track point model. 2. Based on the machine learning model, a model such as a support vector machine is trained by using gyroscope data, and actions of a user are recognized through the action recognition model.
Both of these schemes have drawbacks:
1. based on the scheme of the Kinetic architecture, generalization performance is limited because different human body structures are greatly different. 2. Based on the scheme of the machine learning model, the recognition accuracy is not high, because gyroscopes have the problem of linear drift, and different gyroscopes have different drift degrees.
Disclosure of Invention
The embodiment of the application provides a body-feeling boxing game method based on function fitting, aiming at improving accuracy and generalization of boxing action recognition in the body-feeling boxing game.
In order to achieve the above object, an embodiment of the present application provides a body-feeling boxing game method based on function fitting, including:
after the body-sensing boxing game is started, acquiring gyroscope data from the bound body-sensing equipment;
generating track data of the somatosensory equipment in space according to the gyroscope data;
substituting the track data into a preset linear function for fitting to obtain a current boxing function;
and calculating the similarity of the current boxing function and the preset boxing function to judge whether the user completes boxing actions meeting the standard.
In one embodiment, generating trajectory data of a somatosensory device from the gyroscope data includes:
generating a grid map composed of a plurality of grid cells and a virtual rigid body matched with the somatosensory equipment on a game terminal for executing the somatosensory game;
updating the position of the virtual rigid body in the grid map according to the gyroscope data;
and recording coordinate data of grid cells passed by the virtual rigid body in the moving process of the virtual rigid body in the grid map as the track data.
In one embodiment, the expression of the preset linear function is as follows:
y=ax+b;
wherein y is a coordinate value of the grid map in the y-axis direction; x is the coordinate value of the x-axis direction in the grid map; a and b are fitting parameters to be solved.
In an embodiment, the predetermined linear function is fitted by a least squares method.
In one embodiment, calculating the similarity between the current boxing function and the preset boxing function to determine whether the user completes the boxing action meeting the standard includes:
calculating absolute value differences corresponding to fitting parameters a and b in the current boxing function and the preset boxing function respectively as a first difference value and a second difference value;
comparing the first difference value and the second difference value with a first preset threshold value and a second preset threshold value respectively, and judging that the user completes boxing action meeting the standard if the following conditions are met:
the first difference is not greater than a first preset threshold and the second difference is not greater than a second preset threshold.
In one embodiment, calculating the similarity between the current boxing function and the preset boxing function to determine whether the user completes the boxing action meeting the standard includes:
performing similarity calculation on the current boxing function and a plurality of preset boxing functions simultaneously to obtain a plurality of similarity values, wherein the preset boxing functions are matched with the preset boxing actions one by one;
if any one of the similarity values accords with the corresponding judging standard, judging that the user finishes boxing action which accords with the standard.
In an embodiment, after determining that the user has completed the motion of body feeling meeting the criteria, the method further comprises:
searching a corresponding boxing instruction in a preset boxing function library according to a preset boxing function corresponding to the current similarity minimum value;
and sending the boxing instruction to a terminal, and controlling a game role in a game picture to execute boxing actions matched with the preset boxing function by the terminal according to the boxing instruction.
In order to achieve the above object, an embodiment of the present application further provides a body-feeling boxing game device based on function fitting, including:
the communication module is used for acquiring gyroscope data from the bound somatosensory equipment after the somatosensory boxing game is started;
the generation module is used for generating track data of the somatosensory equipment in space according to the gyroscope data;
the fitting module is used for substituting the track data into a preset linear function to perform fitting to obtain a current boxing function;
the calculation module is used for calculating the similarity between the current boxing function and the preset boxing function so as to judge whether the user finishes the boxing action meeting the standard.
To achieve the above objective, an embodiment of the present application further provides a function fitting-based body-feeling boxing game device, including a memory, a processor, and a function fitting-based body-feeling boxing game program stored on the memory and executable on the processor, where the processor implements the function fitting-based body-feeling boxing game method according to any one of the above when executing the function fitting-based body-feeling boxing game program.
To achieve the above object, an embodiment of the present application further provides a computer readable storage medium, where a function fitting-based body-feeling boxing game program is stored, where the function fitting-based body-feeling boxing game program, when executed by a processor, implements the function fitting-based body-feeling boxing game method according to any one of the above.
According to the body feeling boxing game method based on function fitting, track data are generated through gyroscope data, the track data are fitted through a linear function, and whether a player completes standard boxing actions is judged based on fitting results, so that different data sets and action types can be quickly adapted through adjusting a preset linear function, the adaptability of the body feeling boxing game to different users can be improved, and the body feeling boxing game method has stronger generalization; in addition, the problem of inconsistent drift degrees of different gyroscopes can be solved to a certain extent by means of fitting through a linear function, the recognition precision is improved, and the recognition of boxing actions is more accurate and reliable. In addition, compared with a complex machine learning model, the linear function fitting mode is relatively simple and efficient, so that not only is the occupation of computing resources reduced, but also the game is excellent in real-time performance and responsiveness, a user can obtain feedback of boxing actions faster, and the immersion and interactive experience of the game are enhanced. Compared with the traditional motion recognition mode of the motion sensing boxing game, the motion sensing boxing game method has the advantages of being high in motion recognition precision, strong in generalization, simple, efficient and the like.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described, and it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings may be obtained according to the structures shown in these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a block diagram of one embodiment of a motion sensing boxing game device in accordance with the present application based on function fitting;
FIG. 2 is a flow chart of an embodiment of a body-sensing boxing game method based on function fitting;
FIG. 3 is a flow chart of another embodiment of a motion sensing boxing game method based on function fitting in accordance with the present application;
FIG. 4 is a block diagram of one embodiment of a motion sensing boxing game device in accordance with the present application based on function fitting.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
In order that the above-described aspects may be better understood, 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 other than those listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application 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. And the use of "first," "second," and "third," etc. do not denote any order, and the terms may be construed as names.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a server 1 (also called a body-sensing boxing game device based on function fitting) of a hardware running environment according to an embodiment of the present application.
The server provided by the embodiment of the application is equipment with display function, such as 'Internet of things equipment', intelligent air conditioner with networking function, intelligent electric lamp, intelligent power supply, AR/VR equipment with networking function, intelligent sound box, automatic driving automobile, PC, intelligent mobile phone, tablet personal computer, electronic book reader, 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 including flash memory, a hard disk, a multimedia card, a card memory (e.g., SD or DX memory, etc.), a magnetic memory, a magnetic disk, an optical disk, etc. The memory 11 may in some embodiments be an internal storage unit of the server 1, such as a hard disk of the server 1. The memory 11 may in other embodiments also be an external storage device of the server 1, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash Card (Flash Card) or the like, which are provided on the server 1.
Further, the memory 11 may also include an internal storage unit of the server 1 as well as an external storage device. The memory 11 may be used not only for storing application software installed in the server 1 and various kinds of data such as codes of the body-sensory boxing game program 10 based on function fitting, etc., but also for temporarily storing data that has been output or is to be output.
The processor 12 may in some embodiments be a central processing unit (Central Processing Unit, CPU), controller, microcontroller, microprocessor or other data processing chip for running program code or processing data stored in the memory 11, for example executing a function fitting based body-impact boxing game program 10 or the like.
The network interface 13 may optionally comprise a standard wired interface, a wireless interface (e.g. WI-FI interface), typically used to establish 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 a network environment may be configured to connect to a 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 the following: 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, light 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 (bluetooth) communication protocol, or combinations thereof.
Optionally, the server may further comprise a user interface, which may comprise a Display (Display), an input unit such as a Keyboard (Keyboard), and optionally 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, or the like. The display may also be referred to as a display screen or a display unit, for displaying information processed in the server 1 and for displaying a visual user interface.
Fig. 1 shows only a server 1 having components 11-13 and a function fitting based body-sensory boxing game program 10, it being 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 may combine certain components, or a different arrangement of components.
In this embodiment, the processor 12 may be configured to call a body-sensory boxing game program based on function fitting stored in the memory 11, and perform the following operations:
after the body-sensing boxing game is started, acquiring gyroscope data from the bound body-sensing equipment;
generating track data of the somatosensory equipment in space according to the gyroscope data;
substituting the track data into a preset linear function for fitting to obtain a current boxing function;
and calculating the similarity of the current boxing function and the preset boxing function to judge whether the user completes boxing actions meeting the standard.
In one embodiment, the processor 12 may be configured to call a function fitting based body impact boxing game program stored in the memory 11 and perform the following operations:
generating a grid map consisting of a plurality of grid cells and a virtual rigid body matched with the somatosensory equipment on a terminal for executing the somatosensory game;
updating the position of the virtual rigid body in the grid map according to the gyroscope data;
and recording coordinate data of grid cells passed by the virtual rigid body in the moving process of the virtual rigid body in the grid map as the track data.
In one embodiment, the processor 12 may be configured to call a function fitting based body impact boxing game program stored in the memory 11 and perform the following operations:
the expression of the preset linear function is as follows:
y=ax+b;
wherein y is a coordinate value of the grid map in the y-axis direction; x is the coordinate value of the x-axis direction in the grid map; a and b are fitting parameters to be solved.
In one embodiment, the processor 12 may be configured to call a function fitting based body impact boxing game program stored in the memory 11 and perform the following operations:
fitting a preset linear function by a least square method, and obtaining fitting parameters a and b by minimizing fitting.
In one embodiment, the processor 12 may be configured to call a function fitting based body impact boxing game program stored in the memory 11 and perform the following operations:
calculating absolute value differences corresponding to fitting parameters a and b in the current boxing function and the preset boxing function respectively as a first difference value and a second difference value;
comparing the first difference value and the second difference value with a first preset threshold value and a second preset threshold value respectively, and judging that the user completes boxing action meeting the standard if the following conditions are met:
the first difference is not greater than a first preset threshold and the second difference is not greater than a second preset threshold.
In one embodiment, the processor 12 may be configured to call a function fitting based body impact boxing game program stored in the memory 11 and perform the following operations:
performing similarity calculation on the current boxing function and a plurality of preset boxing functions simultaneously to obtain a plurality of similarity values, wherein the preset boxing functions are matched with the preset boxing actions one by one;
if any one of the similarity values accords with the corresponding judging standard, judging that the user finishes boxing action which accords with the standard.
In one embodiment, the processor 12 may be configured to call a function fitting based body impact boxing game program stored in the memory 11 and perform the following operations:
searching a corresponding boxing instruction according to a preset boxing function with highest similarity with the current boxing function;
and sending the boxing instruction to the game terminal, and controlling the game characters in the game picture to execute boxing actions by the game terminal according to the boxing instruction.
Based on the hardware architecture of the body-feeling boxing game device based on function fitting, the embodiment of the body-feeling boxing game method based on function fitting is provided. The application discloses a body feeling boxing game method based on function fitting, which aims to improve accuracy and generalization of boxing action recognition in a body feeling boxing game.
Referring to fig. 2, fig. 2 is an embodiment of a body-sensing boxing game method based on function fitting according to the present application, wherein the body-sensing boxing game method based on function fitting comprises the following steps:
s10, acquiring gyroscope data from the bound somatosensory equipment after the somatosensory boxing game is started.
Among these, the motion sensing boxing game is a virtual reality game based on motion sensing technology, and by using special sensors and devices, a player can participate in a boxing experience in a real manner. In contrast to conventional gamepads or keyboards, a body-sensing boxing game converts the real actions and gestures of a player into boxing actions in the game by capturing them.
Alternatively, the body-feeling boxing game can be a web-based web game, an html 5-based applet, or an independently-running app.
Somatosensory devices are a class of devices used to capture, recognize and translate physical actions of players. They typically include sensors, controllers, and associated hardware components, intended for use in conjunction with interactive experience techniques such as electronic games, virtual reality, augmented reality, and the like. In the technical scheme of the application, the somatosensory equipment collects somatosensory data of a user, wherein the somatosensory data comprises three-axis angular velocity data and three-axis acceleration data.
Alternatively, the somatosensory device adopted in the technical scheme of the application comprises, but is not limited to, a mobile phone with a gyroscope, a bracelet, a watch, a ring, a handle, a wrist strap and the like.
Further, the gyroscope measures the direction and angular velocity of the device by sensing the force and acceleration of rotation and rotation to output gyroscope data. Gyroscopes typically provide a data output in three axes (X, Y, Z). For each axis, the gyroscope will provide a continuously varying value indicative of the rotational rate or angular change in that axis. These values are typically expressed in units of angular velocity (e.g., degrees/second) or units of angle (e.g., degrees).
Alternatively, the connection between the motion sensing device and the game terminal can be realized by USB, bluetooth or 2.4G, and the game terminal is a terminal running motion sensing game, and can be a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm machine, or a fixed terminal such as a desktop computer, a home host machine, etc.
After the motion sensing boxing game is started, the game terminal can obtain gyroscope data from the motion sensing device based on a connection protocol with the motion sensing device.
S20, generating track data of the somatosensory device in space according to the gyroscope data.
Wherein the trajectory data is used for recording a motion trajectory of the somatosensory device in space to represent a boxing action trajectory of the user.
Specifically, the gyroscope data may be converted into spatial coordinate values by a rotation matrix, a quaternion algorithm, or the like, and the spatial coordinate values are mapped with a time sequence to generate trajectory data of the somatosensory device in space.
It should be noted that when converting gyroscope data, we can perform preprocessing such as filtering, interpolation, normalization, etc. on the data to improve the quality and usability of the data.
S30, substituting the track data into a preset linear function for fitting to obtain a current boxing function.
Wherein the predetermined linear function is a mathematical function model selected according to specific body-feel boxing game requirements and designs, which is essentially a mathematical representation of the predetermined standard boxing action. Accordingly, the current boxing function is a mathematical representation of the current boxing action of the user.
In the technical scheme of the application, the expression of the preset linear function is as follows:
y=ax+b;
wherein y is a coordinate value of the grid map in the y-axis direction; x is the coordinate value of the x-axis direction in the grid map; a and b are fitting parameters to be solved.
Specifically, a and b represent the slope and intercept, respectively, of the linear function described above.
It will be appreciated that the linear function y=ax+b is a simple and intuitive linear function expression that is easy to understand and implement. Meanwhile, due to the simple characteristic, the method can be quickly calculated in practical application, so that fitting efficiency is improved. Furthermore, the slope parameter a reflects the degree of inclination of the fitting line, and the intercept parameter b represents the intersection of the fitting line with the coordinate axis. The values of these parameters can be used to interpret the fit results so that the current boxing action can be visually represented.
Of course, the design of the present application is not limited thereto, and in other embodiments, other linear functions may be used as the preset linear function, such as y=mx; y=a 0 +a 1 x 1 +a 2 x 2 +...+a n x n ;y=a 0 +a 1 x 1 +a 2 x 1 2 +...+a n x 1 n Etc.
Alternatively, a predetermined linear function may be fitted by a least square method, and the required fitting parameters a and b may be found by a minimum fit.
Specifically, the steps of fitting a preset linear function by the least square method and calculating the fitting parameters a and b are specifically as follows:
(1) Calculating the mean value of the independent variable x and the dependent variable y in the track data, which are respectively expressed asAnd->
(2) Calculating the deviation between each data sample point and the mean value, respectively expressed asAnd
(3) Calculating the slope:
(4) Calculating intercept:
it will be appreciated that linear functions generally have relatively stable properties over a range. Thus, although the drift degree of different gyroscopes can be different, the fitting of the linear function can approximately capture the overall trend of the gyroscope data, so that the data change in a smaller range can obtain a better fitting effect. Therefore, the influence of different gyroscope drift degrees can be balanced to a certain extent through linear function fitting, and the recognition accuracy is improved.
Moreover, the linear function fitting method is simple and efficient to calculate relative to more complex nonlinear functions or machine learning models. It does not need a lot of training data and complex training process, nor complex parameter tuning. This makes the linear function fit easier to implement and apply, reducing the complexity of processing gyroscope data.
In addition, different data sets and action types can be quickly adapted by adjusting a preset linear function, so that the adaptability of the body-feeling boxing game to different users can be improved, and the action recognition scheme has stronger generalization.
It should be noted that the design of the present application is not limited thereto, and in other embodiments, the preset linear function may be fitted by a gradient descent method, a maximum likelihood method, or the like.
S40, calculating the similarity of the current boxing function and the preset boxing function to judge whether the user finishes the boxing action meeting the standard.
The similarity is a measurement index for measuring the similarity or the proximity degree between the current boxing function and the preset boxing function. Because the current boxing function and the preset boxing function are mathematical expressions of the current boxing action and the preset standard boxing action of the user respectively, the similarity is used for representing the similarity degree of the current boxing action and the preset standard boxing action of the user in the technical scheme of the application.
Specifically, the preset boxing function can be designed and input by a professional according to standard boxing actions, and can also be generated and updated by the system according to the boxing actions customized by the user.
Alternatively, the similarity between the current boxing function and the preset boxing function can be calculated through the measuring methods such as Euclidean distance, cosine similarity, pearson correlation coefficient and the like.
Specifically, after the similarity between the current boxing function and the preset boxing function is calculated, the similarity can be compared with a preset threshold value, if the similarity is larger than the preset threshold value, the user can be judged to finish boxing action meeting the standard, and at the moment, the game role can be controlled to punch. Otherwise, judging that the user does not complete the boxing action meeting the standard, and at the moment, not controlling the game character to perform boxing.
It can be understood that in the body-feeling boxing game method based on function fitting in the technical scheme of the application, track data are generated through gyroscope data, the track data are fitted through a linear function, and whether a player completes standard boxing action is judged based on a fitting result, so that different data sets and action types can be quickly adapted by adjusting a preset linear function, the adaptability of the body-feeling boxing game to different users can be improved, and the body-feeling boxing game has stronger generalization; in addition, the problem of inconsistent drift degrees of different gyroscopes can be solved to a certain extent by means of fitting through a linear function, the recognition precision is improved, and the recognition of boxing actions is more accurate and reliable. In addition, compared with a complex machine learning model, the linear function fitting mode is relatively simple and efficient, so that not only is the occupation of computing resources reduced, but also the game is excellent in real-time performance and responsiveness, a user can obtain feedback of boxing actions faster, and the immersion and interactive experience of the game are enhanced. Compared with the traditional motion recognition mode of the motion sensing boxing game, the motion sensing boxing game method has the advantages of being high in motion recognition precision, strong in generalization, simple, efficient and the like.
In some embodiments, generating trajectory data of a somatosensory device from the gyroscope data comprises:
s21, generating a grid map formed by a plurality of grid units and a virtual rigid body matched with the somatosensory equipment on a game terminal for executing the somatosensory game.
Among these, the grid map is an image representation method that divides a space into regular grid cells. It divides the entire space into discrete small areas, each of which is referred to as a grid cell, which may be square, rectangular or other shape. Each grid cell has a unique identifier and coordinates that represent its location throughout the map. In the technical scheme of the application, the grid map is used for representing the layout of the game scene. Each grid cell may correspond to a region or grid of fixed size for recording the position of the virtual rigid body in the game.
Specifically, after the body-sensing boxing game is started, a grid map can be constructed based on preset initialization parameters, and the grid map can be a two-dimensional map (such as a plane map) or a three-dimensional map (such as a stereoscopic scene). It should be noted that, according to the preset initialization parameters, the size of each grid cell and the coordinate value of each grid cell are determined while generating the grid map.
Further, a rigid body refers to an object having a fixed shape and mass in the physical world, and not being deformed or bent. The virtual rigid body is then a virtual model with corresponding physical properties. In the technical scheme of the application, the virtual rigid body is used for recording the moving track of the somatosensory equipment in the grid map.
S22, updating the position of the virtual rigid body in the grid map according to the gyroscope data.
Specifically, the gyroscope data can be converted into coordinate values of the grid map by a motion equation, an integral method (such as an euler method or a Longer-Kutta method) and the like, so as to update the position of the virtual rigid body in the grid map.
S23, recording coordinate data of grid cells passing through in the moving process of the virtual rigid body in the grid map as the track data.
Specifically, a data structure may be created to store coordinate data of grid cells through which the virtual rigid body passes, and the trajectory data may be represented using data structures such as arrays, lists, matrices, and the like. In the game process, the coordinate values of the grid unit where the virtual rigid body is located can be recorded into a track data structure according to the time sequence to be used as track data of the somatosensory equipment in the space.
It will be appreciated that the above scheme may convert a continuous sequence of coordinates into a discrete sequence of grid cells by representing the trajectory data of the somatosensory device as processed grid coordinates. In this way, small changes between adjacent coordinates in the middle are removed, so that redundancy and repetition of data can be reduced, representation and storage of the data are optimized, and calculation efficiency of a motion track can be improved.
In some embodiments, calculating the similarity of the current boxing function and the preset boxing function to determine whether the user completes the boxing action meeting the standard comprises:
s31, calculating absolute values of differences corresponding to fitting parameters a and b in the current boxing function and the preset boxing function as a first difference value and a second difference value.
In particular, the method comprises the steps of,
the first difference value= | presets the parameter a of the boxing function-the parameter a| of the current boxing function;
the second difference= | presets the parameter b of the boxing function-the parameter b| of the current boxing function.
It can be understood that by calculating the absolute value of the difference, we can ignore specific positive and negative values of the fitting parameters, reducing the problem to a magnitude comparison of the difference. This has the advantage that the absolute value of the difference provides an indication of the similarity of the boxing action, whether the fitting parameters are increasing or decreasing.
S32, comparing the first difference value and the second difference value with a first preset threshold value and a second preset threshold value respectively, and judging that the user completes boxing action meeting the standard if the following conditions are met:
the first difference is not greater than a first preset threshold and the second difference is not greater than a second preset threshold.
Specifically, if the first difference is not greater than the first preset threshold and the second difference is not greater than the second preset threshold, determining that the user completes the boxing action meeting the standard. Otherwise, if the first difference value is greater than the first preset threshold value and/or the second difference value is greater than the second preset threshold value, judging that the user does not complete the boxing action meeting the standard.
It should be noted that, the first preset threshold and the second preset threshold may be adaptively adjusted according to specific somatosensory game requirements (such as game difficulty, game positioning, etc.), which is not particularly limited in the present application.
It can be understood that, compared with the calculation of the difference value of each point in the boxing function or other more complex similarity calculation methods, the scheme can judge the similarity of boxing actions by calculating the absolute value of the difference value of the slope and the intercept in the boxing function, and greatly simplify the calculation process on the premise of ensuring the accuracy of similarity calculation so as to improve the calculation efficiency and the response speed of games.
In some embodiments, calculating the similarity of the current boxing function and the preset boxing function to determine whether the user completes the boxing action meeting the standard comprises:
s41, performing similarity calculation on the current boxing function and a plurality of preset boxing functions simultaneously to obtain a plurality of similarity values, wherein the preset boxing functions are matched with the preset boxing actions one by one.
Specifically, a set of preset boxing functions may be defined in advance, each corresponding to a specific boxing action standard. These preset boxing functions may be standard boxing actions determined in advance, or template boxing functions obtained by training data.
When judging whether the user completes the standard boxing action, the similarity between the current boxing function and each preset boxing function can be calculated at the same time, and a similarity result is output for each preset boxing function.
S42, if any one of the similarity values accords with the corresponding judging standard, judging that the user finishes boxing action which accords with the standard.
The corresponding judgment standard means that each preset boxing function has a respective judgment standard, taking the technical scheme provided in the steps S31-S32 as an example, the terminal designs a corresponding first preset threshold and a corresponding second preset threshold for each preset boxing function so as to judge the similarity of the current boxing function and different preset boxing functions. By the arrangement, misjudgment can be reduced to the greatest extent, the action recognition precision is improved, and obvious distinction can be made between different boxing actions.
Specifically, after all the similarity values are obtained, each similarity value may be traversed, and each similarity value may be compared with its corresponding judgment standard during the traversal process. If any similarity value meets the corresponding standard, the user can be judged to finish boxing action meeting the standard.
It will be appreciated that by performing similarity calculation and determination of the current boxing function with a plurality of preset boxing functions, flexibility and fault tolerance of the game may be improved. The user's boxing action may be different from a single preset boxing function due to individual differences, skill levels, etc., but may still be determined to be a standard-compliant boxing action as long as its similarity to any one preset boxing function reaches a set threshold.
In some embodiments, after determining that the user has completed a motion-sensing action that meets the criteria, the method further comprises:
and S150, searching a corresponding boxing instruction according to a preset boxing function with highest similarity with the current boxing function.
Specifically, the similarity of the current boxing function and the preset boxing function can be calculated by calculating the absolute value of the fitting parameter difference value. Further, according to the absolute value of the difference value of the fitting parameters, a preset boxing function with the minimum absolute value of the difference value of the fitting parameters of the current boxing function is selected as the preset boxing function with the highest similarity with the current boxing function.
It is worth to say that, when comparing the absolute value of the difference value of each preset boxing function fitting parameter, the similarity is determined according to the absolute value of the difference value of the parameter a, and when the absolute value of the difference value of the parameter a is the same, the similarity is determined according to the absolute value of the difference value of the parameter b.
Further, aiming at a preset boxing function with highest similarity, searching a corresponding boxing instruction. Each preset boxing function is associated with a particular boxing action standard, so that a corresponding boxing instruction can be determined according to the preset boxing function.
And S160, sending the boxing instruction to the game terminal, and controlling the game characters in the game picture to execute boxing actions by the game terminal according to the boxing instruction.
Specifically, after determining the boxing instruction, the game degree transmits the boxing instruction to the game terminal, and after receiving the boxing instruction, the game terminal controls the game character in the game picture to execute corresponding boxing actions according to the instruction, which can include action animation of the character, boxing effect and the like.
It can be understood that after the user is judged to finish the boxing action conforming to the standard, the corresponding boxing instruction is searched according to the preset boxing function with the highest similarity and is sent to the game terminal, and the game terminal can control the game role to execute the corresponding boxing action according to the instruction, so that the recognition precision of the boxing action can be improved, different boxing actions can be realized, the actions of the player are more directly related to the actions of the game role, and the reality and participation degree of the game are increased.
In addition, referring to fig. 4, the embodiment of the application further provides a body-feeling boxing game device based on function fitting, which comprises:
the communication module 110 is configured to obtain gyroscope data from the bound somatosensory device after the somatosensory boxing game is started;
a generating module 120, configured to generate trajectory data of the somatosensory device in space according to the gyroscope data;
the fitting module 130 is configured to substitute the trajectory data into a preset linear function to perform fitting, so as to obtain a current boxing function;
the calculating module 140 is configured to calculate a similarity between the current boxing function and a preset boxing function to determine whether the user completes a boxing operation that meets the standard.
The steps implemented by the functional modules of the body-sensing boxing game device based on function fitting can refer to the embodiments of the body-sensing boxing game method based on function fitting of the application, and are not repeated herein.
In addition, the embodiment of the application also provides a computer readable storage medium, which can be any one or any combination of a plurality of 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 the body-feeling boxing game program 10 based on function fitting, and the specific embodiment of the computer readable storage medium of the present application is substantially the same as the above-mentioned body-feeling boxing game method based on function fitting and the specific embodiment of the server 1, and will not be repeated herein.
It will be appreciated by those skilled in the art that embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application 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 application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations 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 application 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. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present application without departing from the spirit or scope of the application. Thus, it is intended that the present application also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.

Claims (10)

1. A body-feel boxing game method based on function fitting, comprising:
after the body-sensing boxing game is started, acquiring gyroscope data from the bound body-sensing equipment;
generating track data of the somatosensory equipment in space according to the gyroscope data;
substituting the track data into a preset linear function for fitting to obtain a current boxing function;
and calculating the similarity of the current boxing function and the preset boxing function to judge whether the user completes boxing actions meeting the standard.
2. A function fitting based body-sensory boxing game method in accordance with claim 1, wherein generating trajectory data of a body-sensory device from the gyroscope data comprises:
generating a grid map composed of a plurality of grid cells and a virtual rigid body matched with the somatosensory equipment on a game terminal for executing the somatosensory game;
updating the position of the virtual rigid body in the grid map according to the gyroscope data;
and recording coordinate data of grid cells passed by the virtual rigid body in the moving process of the virtual rigid body in the grid map as the track data.
3. A method of motion sensing boxing game based on function fitting in accordance with claim 1, wherein the expression of the predetermined linear function is as follows:
y=ax+b;
wherein y is a coordinate value of the grid map in the y-axis direction; x is the coordinate value of the x-axis direction in the grid map; a and b are fitting parameters to be solved.
4. A function fitting based body-feel boxing game method in accordance with claim 3, wherein the predetermined linear function is fitted by a least square method and the fitting parameters a and b are found by a minimum fit.
5. A method of function fitting based body-feel boxing game as in claim 3, wherein calculating the similarity of the current boxing function to the preset boxing function to determine whether the user has completed a standard-compliant boxing action comprises:
calculating absolute value differences corresponding to fitting parameters a and b in the current boxing function and the preset boxing function respectively as a first difference value and a second difference value;
comparing the first difference value and the second difference value with a first preset threshold value and a second preset threshold value respectively, and judging that the user completes boxing action meeting the standard if the following conditions are met:
the first difference is not greater than a first preset threshold and the second difference is not greater than a second preset threshold.
6. A method of function fitting based body-feel boxing game as in claim 3, wherein calculating the similarity of the current boxing function to the preset boxing function to determine whether the user has completed a standard-compliant boxing action comprises:
performing similarity calculation on the current boxing function and a plurality of preset boxing functions simultaneously to obtain a plurality of similarity values, wherein the preset boxing functions are matched with the preset boxing actions one by one;
if any one of the similarity values accords with the corresponding judging standard, judging that the user finishes boxing action which accords with the standard.
7. The function fitting based motion sensing boxing game method in accordance with claim 6, wherein after determining that the user has completed motion sensing action in accordance with the criteria, the method further comprises:
searching a corresponding boxing instruction according to a preset boxing function with highest similarity with the current boxing function;
and sending the boxing instruction to the game terminal, and controlling the game characters in the game picture to execute boxing actions by the game terminal according to the boxing instruction.
8. A motion sensing boxing game device based on function fitting, comprising:
the communication module is used for acquiring gyroscope data from the bound somatosensory equipment after the somatosensory boxing game is started;
the generation module is used for generating track data of the somatosensory equipment in space according to the gyroscope data;
the fitting module is used for substituting the track data into a preset linear function to perform fitting to obtain a current boxing function;
the calculation module is used for calculating the similarity between the current boxing function and the preset boxing function so as to judge whether the user finishes the boxing action meeting the standard.
9. A function fitting based body motion boxing game device, comprising a memory, a processor and a function fitting based body motion boxing game program stored on the memory and executable on the processor, wherein the processor implements the function fitting based body motion boxing game method as in any one of claims 1-7 when executing the function fitting based body motion boxing game program.
10. A computer readable storage medium, wherein a function fitting based body-feel boxing game program is stored on the computer readable storage medium, which when executed by a processor, implements the function fitting based body-feel boxing game method as claimed in any one of claims 1-7.
CN202310659942.XA 2023-06-05 2023-06-05 Motion sensing boxing game method based on function fitting Pending CN116889729A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310659942.XA CN116889729A (en) 2023-06-05 2023-06-05 Motion sensing boxing game method based on function fitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310659942.XA CN116889729A (en) 2023-06-05 2023-06-05 Motion sensing boxing game method based on function fitting

Publications (1)

Publication Number Publication Date
CN116889729A true CN116889729A (en) 2023-10-17

Family

ID=88311399

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310659942.XA Pending CN116889729A (en) 2023-06-05 2023-06-05 Motion sensing boxing game method based on function fitting

Country Status (1)

Country Link
CN (1) CN116889729A (en)

Similar Documents

Publication Publication Date Title
US9144744B2 (en) Locating and orienting device in space
US20130010071A1 (en) Methods and systems for mapping pointing device on depth map
CN109034397A (en) Model training method, device, computer equipment and storage medium
CN106325509A (en) Three-dimensional gesture recognition method and system
CN111027403A (en) Gesture estimation method, device, equipment and computer readable storage medium
CN105107200A (en) Face change system and method based on real-time deep somatosensory interaction and augmented reality technology
Arsenault et al. Gesture recognition using Markov Systems and wearable wireless inertial sensors
CN104407696A (en) Virtual ball simulation and control method of mobile device
CN114949839A (en) Swimming posture-based motion sensing game method
CN116196611A (en) Somatosensory game method based on waving action
CN116889729A (en) Motion sensing boxing game method based on function fitting
CN116637359A (en) Somatosensory jump game method based on units engine
CN116650952A (en) Somatosensory skiing game method based on function fitting
CN116637360A (en) Motion sensing table tennis game method based on function fitting
CN116603237A (en) Somatosensory tennis game method based on function fitting
CN117504294A (en) Method for realizing somatosensory basketball game based on function fitting
CN116637363A (en) Somatosensory game method based on units engine
CN116637362A (en) Somatosensory running game method based on units engine
CN116637361A (en) Body feeling boxing game method based on units engine
CN116650953A (en) Somatosensory tennis game method based on units engine
US20230398431A1 (en) Implementing translation action based motion sensing game
CN117018594A (en) Somatosensory game method based on apple watch
WO2015030623A1 (en) Methods and systems for locating substantially planar surfaces of 3d scene
KR101605740B1 (en) Method for recognizing personalized gestures of smartphone users and Game thereof
CN117379791A (en) Somatosensory game method for realizing beating action recognition based on function fitting

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