CN117504294A - Method for realizing somatosensory basketball game based on function fitting - Google Patents

Method for realizing somatosensory basketball game based on function fitting Download PDF

Info

Publication number
CN117504294A
CN117504294A CN202311574861.6A CN202311574861A CN117504294A CN 117504294 A CN117504294 A CN 117504294A CN 202311574861 A CN202311574861 A CN 202311574861A CN 117504294 A CN117504294 A CN 117504294A
Authority
CN
China
Prior art keywords
somatosensory
track
calculating
motion
shooting
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
CN202311574861.6A
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 CN202311574861.6A priority Critical patent/CN117504294A/en
Publication of CN117504294A publication Critical patent/CN117504294A/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
    • A63F13/57Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game
    • A63F13/573Simulating properties, behaviour or motion of objects in the game world, e.g. computing tyre load in a car race game using trajectories of game objects, e.g. of a golf ball according to the point of impact
    • 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/812Ball games, e.g. soccer or baseball
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/22Matching criteria, e.g. proximity measures
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8005Athletics
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/80Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game specially adapted for executing a specific type of game
    • A63F2300/8011Ball

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Human Computer Interaction (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method, a device, equipment and a computer readable storage medium for realizing a somatosensory basketball game based on function fitting, wherein the method comprises the following steps: after the motion sensing game is started, acquiring gesture data from the bound motion sensing equipment, wherein the gesture data comprises gyroscope data and acceleration data; calculating an observation track of motion of the somatosensory equipment in space according to the gesture data; calculating a predicted track of motion of the somatosensory equipment in space according to the gesture data and the pre-fitted shooting model; calculating the similarity between the observation track and a plurality of predicted tracks; identifying the type of shooting actions completed by the user according to the similarity; and executing the game operation according to the identified shooting action type. The method for realizing the somatosensory basketball game based on function fitting has the advantages of high flexibility, strong adaptability and the like.

Description

Method for realizing somatosensory basketball game based on function fitting
Technical Field
The present invention relates to the field of motion sensing game technologies, and in particular, to a method, an apparatus, a device, and a computer readable storage medium for implementing a motion sensing basketball game based on function fitting.
Background
In the current body-sensory gaming field, in order to provide a more realistic, interactive user experience, developers often use various sensor technologies to capture and map the actual movements of the user into the gaming environment. Conventional somatosensory control systems typically use sensors such as accelerometers, gyroscopes, etc. to obtain pose information of the user device. And then judging whether the user finishes the set shooting action or not by calculating the motion trail.
The problem with this approach is that most conventional approaches use a single shot action model for judgment, have limited adaptability to user actions, and are difficult to cover the variety of shot poses that a user may take, with insufficient flexibility.
Disclosure of Invention
The embodiment of the application aims to improve the flexibility and adaptability of identifying the somatosensory shooting actions of the user by providing the method for realizing the somatosensory basketball game based on function fitting.
To achieve the above object, an embodiment of the present application provides a method for implementing a motion sensing basketball game based on function fitting, including:
after the motion sensing game is started, acquiring gesture data from the bound motion sensing equipment, wherein the gesture data comprises gyroscope data and acceleration data;
Calculating an observation track of motion of the somatosensory equipment in space according to the gesture data;
calculating a predicted track of motion of the somatosensory device in space according to the gesture data and a pre-fitted shooting model, wherein the pre-fitted shooting model is provided with a plurality of shooting models;
calculating the similarity between the observation track and a plurality of predicted tracks;
identifying the type of shooting actions completed by the user according to the similarity;
and executing the game operation according to the identified shooting action type.
In an embodiment, the acceleration data includes x-axis acceleration data, y-axis acceleration data, and z-axis acceleration data;
calculating an observation track of motion of the somatosensory device in space according to the gesture data, wherein the observation track comprises the following steps:
calculating a pitch angle of the somatosensory equipment according to the gyroscope data;
respectively calculating displacement of the somatosensory equipment in the x-axis direction and the y-axis direction according to the x-axis acceleration data and the z-axis acceleration data;
and obtaining the motion track of the somatosensory equipment in the vertical plane according to the pitch angle and the displacement of the somatosensory equipment in the x-axis direction and the y-axis direction, and taking the motion track as the observation track.
In an embodiment, according to the pitch angle and the displacement of the somatosensory device in the x-axis direction and the y-axis direction, obtaining a motion track of the somatosensory device in a vertical plane includes:
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 displacement of the pitch angle and the somatosensory equipment in the x-axis direction and the y-axis direction;
and generating the motion trail according to the coordinates of the grid cells passing through in the process of moving the virtual rigid body in the grid map.
In one embodiment, calculating a predicted trajectory of motion of the somatosensory device in space from the pose data and the pre-fitted shot model comprises:
calculating a pitch angle of the somatosensory equipment according to the attitude data;
calculating displacement of the somatosensory equipment in the front-back direction according to the x-axis acceleration data and the pitch angle;
inputting the displacement in the front-rear direction as an independent variable into a shooting model, and calculating the displacement in the vertical direction of the somatosensory equipment;
and generating the predicted track according to the displacement in the front-rear direction and the displacement in the vertical direction.
In an embodiment, calculating the similarity of the observed trajectory and the plurality of predicted trajectories includes:
according to a dynamic time warping algorithm, the observation track and the prediction track are respectively expressed as two sequences consisting of a plurality of points;
Calculating the distance between every two points in the two sequences according to the Euclidean distance, and constructing a distance matrix;
starting from the upper left corner of the distance matrix, searching for a shortest path reaching the lower right corner, and taking the sum of the distances on the paths as the similarity between the observation track and the predicted track.
In an embodiment, calculating the similarity between the observed track and the plurality of predicted tracks further includes:
and normalizing the similarity.
In one embodiment, performing a game operation according to the identified type of shooting action includes:
confirming basketball movement tracks according to the identified shooting action types;
obtaining a shooting result according to the basketball track;
and generating corresponding shooting animation and game feedback according to the basketball movement track and the shooting result.
In order to achieve the above object, an embodiment of the present application further provides a device for implementing a motion sensing basketball game based on function fitting, including:
the acquisition module is used for acquiring gesture data from the bound somatosensory equipment after the somatosensory game is started, wherein the gesture data comprise gyroscope data and acceleration data;
the observation module is used for calculating the observation track of the motion of the somatosensory equipment in the space according to the gesture data;
The prediction module is used for calculating a predicted track of motion of the somatosensory equipment in space according to the gesture data and the pre-fitted shooting model;
the calculation module is used for calculating the similarity between the observation track and a plurality of predicted tracks;
the identification module is used for identifying the type of shooting actions completed by the user according to the similarity;
and the execution module is used for executing game operation according to the identified shooting action type.
To achieve the above objective, an embodiment of the present application further provides a device for implementing a motion sensing basketball game based on function fitting, which includes a memory, a processor, and a program stored in the memory and capable of being executed on the processor, where the processor implements the motion sensing basketball game based on function fitting according to any one of the above methods when executing the program for implementing the motion sensing basketball game based on function fitting.
To achieve the above object, an embodiment of the present application further provides a computer readable storage medium, where a program for implementing a motion sensing basketball game based on function fitting is stored on the computer readable storage medium, where the program for implementing the motion sensing basketball game based on function fitting implements the method for implementing the motion sensing basketball game based on function fitting according to any one of the above embodiments when executed by a processor.
According to the method for realizing the somatosensory basketball game based on function fitting, the observation track and the plurality of prediction tracks of the somatosensory device when the user shoots are calculated by acquiring gesture data and a plurality of pre-fitted shooting models, then the similarity between the observation track and the plurality of prediction tracks is compared to identify the type of shooting actions completed by the user, and finally the game operation is executed by the identified type of shooting actions, compared with the existing scheme that whether the user completes setting shooting actions after calculating the motion track by the gesture data, the technical scheme of the method has the following advantages:
1. higher flexibility: by comparing the observed and predicted trajectories, the system can accommodate a variety of shot action types, not limited to one or a few of the pre-set types. This allows the system more flexibility in being able to identify and respond to a wider variety of user shooting actions.
2. Personalized adaptability: by predicting the trajectory, the system may achieve better personalized adaptability between different users. The somatosensory actions of each user may be different, and by means of predicting the trajectories, the system can adapt and understand the personalized action styles of different users more sensitively.
3. Enhancing user experience: by comparing the actual observation trajectory with the predicted trajectory, the system can provide a more realistic and user-friendly interactive experience. This helps to enhance the user's immersion and participation in somatosensory basketball games.
4. Accuracy promotes: by comparing the similarity of the track shape and direction, the system can more accurately determine the type of shooting action of the user. Compared with the method for judging whether the shooting action is completed or not according to the gesture data, the method has higher accuracy.
Drawings
In order to more clearly illustrate the embodiments of the present invention 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 invention, 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 an apparatus for implementing a motion sensing basketball game based on function fitting in accordance with the present invention;
FIG. 2 is a flow chart of an embodiment of a method for implementing a motion sensing basketball game based on function fitting according to the present invention;
FIG. 3 is a block diagram of one embodiment of an apparatus for implementing a motion sensing basketball game based on function fitting in accordance with the present invention.
The achievement of the objects, functional features and advantages of the present invention 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 invention.
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 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. And the use of "first," "second," and "third," etc. do not denote any order, and the terms may be construed as names.
Referring to fig. 1, fig. 1 is a schematic structural diagram of a server 1 (also called a device for realizing a motion sensing basketball game based on function fitting) of a hardware running environment according to an embodiment of the present invention.
The server provided by the embodiment of the invention 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 to store application software installed in the server 1 and various types of data, such as codes of the program 10 for realizing a motion sensing basketball game based on function fitting, but also to temporarily store 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, such as executing the program 10 for implementing a motion sensing basketball game based on function fitting, etc.
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 illustrates only a server 1 having components 11-13 and a program 10 for implementing a motion sensing basketball game based on function fitting, it will be understood by those skilled in the art that the configuration illustrated in fig. 1 is not limiting of the server 1 and may include fewer or more components than illustrated, or may combine certain components, or a different arrangement of components.
In this embodiment, the processor 12 may be configured to call a program stored in the memory 11 for implementing a motion sensing basketball game based on function fitting, and perform the following operations:
after the motion sensing game is started, acquiring gesture data from the bound motion sensing equipment, wherein the gesture data comprises gyroscope data and acceleration data;
Calculating an observation track of motion of the somatosensory equipment in space according to the gesture data;
calculating a predicted track of motion of the somatosensory device in space according to the gesture data and a pre-fitted shooting model, wherein the pre-fitted shooting model is provided with a plurality of shooting models;
calculating the similarity between the observation track and a plurality of predicted tracks;
identifying the type of shooting actions completed by the user according to the similarity;
and executing the game operation according to the identified shooting action type.
In one embodiment, the processor 12 may be configured to invoke a program stored in the memory 11 that implements a motion sensing basketball game based on function fitting and perform the following operations:
calculating a pitch angle of the somatosensory equipment according to the gyroscope data;
respectively calculating displacement of the somatosensory equipment in the x-axis direction and the y-axis direction according to the x-axis acceleration data and the z-axis acceleration data;
and obtaining the motion track of the somatosensory equipment in the vertical plane according to the pitch angle and the displacement of the somatosensory equipment in the x-axis direction and the y-axis direction, and taking the motion track as the observation track.
In one embodiment, the processor 12 may be configured to invoke a program stored in the memory 11 that implements a motion sensing basketball game based on function fitting 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 displacement of the pitch angle and the somatosensory equipment in the x-axis direction and the y-axis direction;
and generating the motion trail according to the coordinates of the grid cells passing through in the process of moving the virtual rigid body in the grid map.
In one embodiment, the processor 12 may be configured to invoke a program stored in the memory 11 that implements a motion sensing basketball game based on function fitting and perform the following operations:
calculating a pitch angle of the somatosensory equipment according to the attitude data;
calculating displacement of the somatosensory equipment in the front-back direction according to the x-axis acceleration data and the pitch angle;
inputting the displacement in the front-rear direction as an independent variable into a shooting model, and calculating the displacement in the vertical direction of the somatosensory equipment;
and generating the predicted track according to the displacement in the front-rear direction and the displacement in the vertical direction.
In one embodiment, the processor 12 may be configured to invoke a program stored in the memory 11 that implements a motion sensing basketball game based on function fitting and perform the following operations:
According to a dynamic time warping algorithm, the observation track and the prediction track are respectively expressed as two sequences consisting of a plurality of points;
calculating the distance between every two points in the two sequences according to the Euclidean distance, and constructing a distance matrix;
starting from the upper left corner of the distance matrix, searching for a shortest path reaching the lower right corner, and taking the sum of the distances on the paths as the similarity between the observation track and the predicted track.
In one embodiment, the processor 12 may be configured to invoke a program stored in the memory 11 that implements a motion sensing basketball game based on function fitting and perform the following operations:
and normalizing the similarity.
In one embodiment, the processor 12 may be configured to invoke a program stored in the memory 11 that implements a motion sensing basketball game based on function fitting and perform the following operations:
confirming basketball movement tracks according to the identified shooting action types;
obtaining a shooting result according to the basketball track;
and generating corresponding shooting animation and game feedback according to the basketball movement track and the shooting result.
Based on the hardware architecture of the equipment for realizing the somatosensory basketball game based on function fitting, the embodiment of the method for realizing the somatosensory basketball game based on function fitting is provided. The invention discloses a method for realizing a somatosensory basketball game based on function fitting, which aims to improve the flexibility and adaptability of identifying somatosensory shooting actions of users.
Referring to fig. 2, fig. 2 is an embodiment of a method for implementing a motion sensing basketball game based on function fitting according to the present invention, the method for implementing a motion sensing basketball game based on function fitting includes the following steps:
a method for realizing a somatosensory basketball game based on function fitting is characterized by comprising the following steps:
s10, after the motion sensing game is started, acquiring gesture data from the bound motion sensing equipment, wherein the gesture data comprise gyroscope data and acceleration data.
The somatosensory basketball game is a somatosensory game based on somatosensory technology, and can be a virtual reality game or a traditional 2D or 3D game. In contrast to conventional gamepads or keyboards, a somatosensory basketball game converts the actual actions and gestures of a user into shooting actions in the game by capturing them.
Alternatively, the somatosensory basketball game can be a web-based web game, an html 5-based applet, or an independently running app.
Further, somatosensory devices are a class of devices used to capture, identify and translate the physical actions of a user. 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 device comprises an acceleration sensor and a gyroscope, wherein the acceleration sensor can acquire three-axis acceleration data (x-axis acceleration data, y-axis acceleration data and z-axis acceleration data) when the somatosensory device moves, wherein the x-axis represents a front-back direction, the y-axis represents a left-right direction and the z-axis represents an up-down direction. The gyroscope can acquire triaxial angular velocity data when the body-lifting sensing equipment moves.
Alternatively, the somatosensory device adopted in the technical scheme of the application comprises, but is not limited to, a mobile phone, a bracelet, a watch, a ring, a handle, a wrist strap and the like.
Specifically, the binding of the somatosensory device and the game terminal can be realized through communication modes such as USB, WIFI, bluetooth or 2.4G, and the game terminal is a terminal for running the somatosensory game, and can be a mobile terminal such as a mobile phone, a tablet computer, a notebook computer, a palm machine and the like, or a fixed terminal such as a desktop computer, a home host machine and the like.
After binding is completed, when the user terminal starts the somatosensory basketball game on the game terminal, the terminal can periodically receive or acquire gyroscope data and acceleration data from the somatosensory device based on a connection protocol with the somatosensory device.
S20, calculating the observation track of the motion of the somatosensory device in space according to the gesture data.
Wherein, the observation track refers to motion path data of the somatosensory device obtained from the actual shooting action of the user. This motion path data may be considered a shot action trajectory when the user performs a shot action.
Specifically, the gyroscope data provides angular velocity information of the device rotation, on the basis of which attitude data (pitch angle, roll angle, yaw angle) of the somatosensory device in space can be calculated by a quaternion algorithm, euler angle algorithm, or the like. The acceleration data provides acceleration information of the somatosensory equipment in three directions in space, and displacement data of the somatosensory equipment in the three directions can be obtained by integrating the acceleration information.
Then, by fusing the gyroscope data and the acceleration data using a sensor fusion algorithm, such as kalman filtering or complementary filtering, more accurate device direction and motion information can be obtained. And then, converting the fused gesture data into a motion track in space, and obtaining the observation track of the somatosensory equipment.
In addition, by smoothing the calculated trajectory data, jitter or instability due to sensor errors or disturbances can be eliminated.
S30, calculating a predicted track of motion of the somatosensory device in space according to the gesture data and the pre-fitted shooting models, wherein the pre-fitted shooting models are provided in plurality.
Where the pre-fitted shot model is a mathematical function or equation that is pre-designed and fitted to simulate different types of shooting actions. Each model typically represents a particular type of shooting action, such as a direct shot, a small curvature parabolic shot, a medium curvature parabolic shot, a high curvature parabolic shot, and so on. The purpose of these models is to provide a theoretical prediction of the user's shooting action to compare with the actual observed trajectory to determine the user's specific action type.
It is worth noting that different shots may be fitted using different mathematical models. The selection of the model may be based on previous kinematic studies, physical laws, or learned from actual data by machine learning methods.
Further, the predicted trajectory is calculated using a pre-fitted shot model and current pose data to simulate a theoretical path of a shooting motion that the user may take. This trajectory is generated based on the mathematical model and the user's current motion sensing device pose data.
Specifically, compared with an observation track, the prediction track is a theoretical shooting track calculated by using a pre-fitted shooting model and current gesture data, and is a prediction path of actions possibly performed by a user by the system, and the observation track is a track of shooting actions of the user actually measured by the somatosensory device, and is an actual path of actual actions of the user in space.
Specifically, based on gesture data collected by the somatosensory device and the pre-fitted shooting model, part of data or all of the data can be collected from the gesture data and used as independent variables, and the independent variables are input into the pre-fitted shooting model to calculate trajectory data of the somatosensory device, and based on different shooting models, the trajectory data are output to obtain a plurality of different prediction trajectories.
S40, calculating the similarity between the observation track and the plurality of predicted tracks.
Where similarity is an indicator for measuring the degree of similarity between two tracks or datasets. In the scheme of the application, the similarity of the observation track and the prediction track is used for measuring the proximity degree of the observation track and the prediction track in space, so that the type of shooting action actually performed by a user is judged.
Alternatively, the similarity between the observed track and the predicted track may be calculated by measuring the fraiche distance, euclidean distance, cosine similarity, pearson correlation coefficient, and the like.
S50, identifying the type of shooting actions completed by the user according to the similarity.
Specifically, after the similarity between the observation track and the plurality of prediction tracks is calculated, the shooting model corresponding to the maximum similarity can be selected by comparing the magnitudes of the plurality of similarities, and then the shooting action type corresponding to the current action of the user is determined based on the shooting model.
It should be noted that, in some embodiments, a basic threshold may be set, where the basic threshold is used to determine whether the user completes the type of shooting action corresponding to the predicted track only when the similarity between the observed track and the predicted track is greater than the set threshold. Otherwise, the system will determine that the user did not complete the satisfactory shooting action, and the current shot is considered incomplete.
S60, executing game operation according to the identified shooting action type.
Specifically, upon identifying the user's type of shooting action, the identified user's type of shooting action may be mapped to a corresponding operation or effect in the game. For example, playing different basketball motion pictures, providing different game feedback (e.g., game score, background sound, game special effects, etc.), etc., according to different types of shooting actions.
Through the step, the system can intelligently execute corresponding game operations according to the somatosensory shooting action types of the users, so that the users can obtain more personalized and satisfactory experience in the somatosensory basketball game.
It can be appreciated that, according to the method for realizing the somatosensory basketball game based on function fitting, by acquiring gesture data and a plurality of pre-fitted shooting models to calculate an observation track and a plurality of prediction tracks of somatosensory equipment when a user shoots, then by comparing the similarity between the observation track and the plurality of prediction tracks, to identify the type of shooting actions completed by the user, and finally by executing game operations through the identified type of shooting actions, compared with the existing scheme that whether the user completes setting shooting actions after calculating motion tracks through gesture data, the technical scheme of the method has the following advantages:
1. higher flexibility: by comparing the observed and predicted trajectories, the system can accommodate a variety of shot action types, not limited to one or a few of the pre-set types. This allows the system more flexibility in being able to identify and respond to a wider variety of user shooting actions.
2. Personalized adaptability: by predicting the trajectory, the system may achieve better personalized adaptability between different users. The somatosensory actions of each user may be different, and by means of predicting the trajectories, the system can adapt and understand the personalized action styles of different users more sensitively.
3. Enhancing user experience: by comparing the actual observation trajectory with the predicted trajectory, the system can provide a more realistic and user-friendly interactive experience. This helps to enhance the user's immersion and participation in somatosensory basketball games.
4. Accuracy promotes: by comparing the similarity of the track shape and direction, the system can more accurately determine the type of shooting action of the user. Compared with the method for judging whether the shooting action is completed or not according to the gesture data, the method has higher accuracy.
In some embodiments, calculating an observed trajectory of motion of the somatosensory device in space from the pose data comprises:
s21, calculating the pitch angle of the somatosensory equipment according to the gyroscope data.
Specifically, the attitude angle (specifically, pitch angle, roll angle, and yaw angle) of the somatosensory device can be calculated by the algorithm such as the quaternion algorithm and the euler angle algorithm. Wherein the angular velocity of the motion sensing device rotating about the y-axis may be obtained to calculate the pitch angle of the motion sensing device.
S22, respectively calculating the displacement of the somatosensory device in the x-axis direction and the y-axis direction according to the x-axis acceleration data and the z-axis acceleration data.
Wherein the x-axis acceleration data provides acceleration information when the motion sensing device moves in the front-rear direction, and the z-axis acceleration data provides acceleration information when the motion sensing device moves in the up-down direction.
Specifically, after the acceleration data is obtained from the motion sensing device, the acceleration data needs to be filtered and calibrated to remove possible noise and errors. The filtering may employ a digital filter to smooth the data, and the calibration may be adjusted based on the initial state of the device.
And then, performing double integration on the processed acceleration data to obtain the displacement of the somatosensory device in the x-axis direction and the z-axis direction respectively.
S23, according to the pitch angle and the displacement of the somatosensory equipment in the x-axis direction and the y-axis direction, obtaining a motion track of the somatosensory equipment in a vertical plane, and taking the motion track as the observation track.
Specifically, after obtaining the pitch angle of the somatosensory device and the displacement information of the pitch angle in the x-axis and the y-axis directions, coordinate system conversion needs to be performed on the displacement data to ensure that the data is in a global coordinate system.
And then, calculating the motion track of the somatosensory equipment in the vertical plane by using a mathematical model (such as a trigonometric function) by using the pitch angle and displacement information. The model may employ projections in three-dimensional space or other geometric calculation methods taking into account the influence of the pitch angle.
Finally, to ensure the accuracy of the trajectory observation, the motion trajectory obtained by calculation needs to be smoothed to reduce possible noise and instability. The smoothing process may employ a sliding average or other digital filtering technique.
It will be appreciated that the shot motion trajectory is typically a trajectory that varies significantly only in the vertical plane, so that in calculating the observed trajectory of the somatosensory device, only the somatosensory device trajectory data in the vertical plane may be calculated. Through steps S21 to S23, it is achieved that the motion sensing device trajectory in the vertical plane is calculated as the observation trajectory using only the x-axis and z-axis acceleration data, the motion sensing device pitch angle calculation. The arrangement helps to improve the calculation efficiency, reduce unnecessary calculation and ensure accurate capture of shooting actions of the user.
In some embodiments, according to the pitch angle and the displacement of the somatosensory device in the x-axis direction and the y-axis direction, obtaining a motion track of the somatosensory device in a vertical plane comprises:
s231, generating a grid map formed by a plurality of grid units and a virtual rigid body matched with the somatosensory equipment on the 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 motion sensing basketball 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.
S232, updating the position of the virtual rigid body in the grid map according to the displacement of the pitch angle and the somatosensory equipment in the x-axis direction and the y-axis direction.
Specifically, the orientation position of the virtual rigid body can be updated by using the pitch angle of the somatosensory device and the displacement of the somatosensory device in the x-axis direction and the y-axis direction, so that the orientation and the position of the virtual rigid body in the virtual environment are ensured to be consistent with the actual actions of the user.
S233, generating the motion track according to coordinates of grid cells passing through in the process of moving the virtual rigid body in the grid map.
Specifically, a data structure may be created to store the coordinate data of the grid cells through which the virtual rigid body passes, and the coordinate data may be represented using a data structure such as an array, a list, a matrix, or 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 the motion track of the somatosensory equipment in the space.
It will be appreciated that by the above steps, the trajectory data of the somatosensory device may be represented as processed grid coordinates, and the continuous sequence of coordinates may be converted into a discrete sequence of grid cells. 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 a predicted trajectory of motion of the somatosensory device in space from the pose data and the pre-fitted shot model comprises:
s31, calculating the pitch angle of the somatosensory equipment according to the attitude data.
Specifically, the attitude angle (specifically, pitch angle, roll angle, and yaw angle) of the somatosensory device can be calculated by the algorithm such as the quaternion algorithm and the euler angle algorithm. Wherein the angular velocity of the motion sensing device rotating about the y-axis may be obtained to calculate the pitch angle of the motion sensing device.
S32, calculating the displacement of the somatosensory equipment in the front-rear direction according to the x-axis acceleration data and the pitch angle.
Here, the displacement in the front-rear direction obtained in step S32 means a displacement in the front-rear direction (x-axis) of the motion sensing device in the global coordinate system. The global coordinate system is a fixed coordinate system, typically with respect to the entire space or environment. Its origin, axis and direction are fixed relative to the whole environment and do not change with the movement of the object. This makes it possible to be a fixed reference point for describing the position and movement of the object throughout the environment.
Specifically, in step S32, coordinate system conversion may be performed using the calculated pitch angle, and the coordinate system of the apparatus may be converted into a geodetic coordinate system. The displacement is then calculated by integrating the acceleration data on the x-axis in the front-rear direction of the geodetic coordinate system. This process is based on newton's kinematic formula, converting acceleration into displacement.
S33, inputting the displacement in the front-rear direction into a shooting model as an independent variable, and calculating the displacement in the vertical direction of the somatosensory equipment.
It is understood that, as in step S32, the displacement of the somatosensory device in the vertical direction obtained in step S33 refers to the displacement of the somatosensory device in the vertical direction (z axis) in the global coordinate system.
Specifically, in step S33, the pre-fitted shooting model may take as input the displacement of the somatosensory device in the front-rear direction, and output the displacement of the somatosensory device in the vertical direction (of the global coordinate system). The displacement of the somatosensory device output by the shooting model in the vertical direction (z axis) of the global coordinate system represents the corresponding position change of the somatosensory device in the vertical direction when the somatosensory device moves in the front-back direction under the standard shooting action. In other words, the pre-fit of the shot model adapts itself to the particular type of shooting action. Thus, the outputted vertical displacement should be able to reflect the expected positional change of the user when shooting in a standard manner.
For example, the pre-fitted shot model may be a plurality of parabolic functions with different constant and independent variable parameters.
S34, generating the predicted track according to the displacement in the front-rear direction and the displacement in the vertical direction.
Specifically, after the displacement of the somatosensory device in the front-rear direction and the vertical direction of the global coordinate system is determined, the x-axis and z-axis coordinate positions of the somatosensory device in the global coordinate system can be obtained. And connecting the continuous coordinate positions to obtain the predicted track of the somatosensory equipment in the vertical plane. The predicted trajectory may be used for comparison with an observed trajectory of the somatosensory device in a vertical plane.
It is worth noting that the predicted trajectory may be smoothed in order to reduce possible noise and instability. The smoothing process may employ digital filtering techniques or other mathematical methods.
It can be understood that the displacement of the somatosensory device in the front-back direction and the displacement of the somatosensory device in the vertical direction can be integrated to generate a prediction track through the steps, so that the motion path of the somatosensory device in the vertical plane when a user shoots a basket is effectively simulated. Thereby contributing to an improvement in computational efficiency and reduction in unnecessary computation.
In some embodiments, calculating the similarity of the observed trajectory to a plurality of the predicted trajectories comprises:
s41, according to a dynamic time warping algorithm, the observation track and the prediction track are respectively expressed as two sequences consisting of a plurality of points.
Among these, the dynamic time warping (Dynamic Time Warping, DTW) algorithm is a method for comparing the similarity between two sequences, and is particularly suitable for the case where the timing relationship and elasticity between the two sequences are considered. It is often used to deal with alignment and similarity measurement problems of time series data. The dynamic time warping (Dynamic Time Warping, DTW) algorithm is a method for comparing the similarity between two sequences, and is particularly suitable for the case where the timing relationship and elasticity between two sequences are considered. It is often used to deal with alignment and similarity measurement problems of time series data.
Specifically, the observation track and the prediction track may be discretized into a plurality of points by a method of interval sampling, or the observation track and the prediction track may be divided into a plurality of points directly according to time stamps in the running action section.
Further, the coordinates of each point may be taken as one element in the sequence, forming two sequences.
S42, calculating the distance between every two points in the two sequences according to the Euclidean distance, and constructing a distance matrix.
Specifically, the euclidean distance is a straight line distance calculation method between points, and can be obtained by calculating euclidean distances between coordinates. The calculated distances may be constructed as a distance matrix.
S43, starting from the upper left corner of the distance matrix, searching for a shortest path reaching the lower right corner, and taking the sum of the distances on the paths as the similarity between the observation track and the prediction track.
Specifically, finding a shortest path to the lower right corner can be accomplished by:
1. from the start point, it moves to the adjacent point according to a certain rule. The following three movement rules are commonly used: move to the right: moving a cell rightward from the current position; moving downwards: moving downwards a cell from the current position; move downward to the right: move one cell down to the right from the current position.
2. In the moving process, the adjacent point with the smallest distance is selected as the next moving target point. This may be determined by comparing the distance values of adjacent points.
3. Steps 1 and 2 are repeated until the bottom right corner (end point) of the distance matrix is reached. At this time, the point on the path is the shortest path.
Further, after the shortest path is determined, the point on this path represents the optimal point selected during the sequence alignment, i.e., the point of minimum distance. The sum of the distances of the shortest paths is the similarity measure between the observed track and the predicted track.
It will be appreciated that the use of a Dynamic Time Warping (DTW) algorithm to calculate the similarity of the observed and predicted trajectories has the following advantages:
1. consider the timing relationship: the DTW algorithm is capable of capturing a timing relationship in sequence data and is therefore suitable for comparing data having a temporal dependency, such as a time series, a motion trajectory, and the like. It considers not only the similarity between sequence elements, but also their correspondence over time.
2. Elastic matching: the DTW algorithm has certain elasticity and can process the situation that two sequences have certain offset or different lengths in time sequence. It finds the best alignment by allowing the sequences to stretch and compress non-linearly on the time axis so that the sequences remain consistent in time.
3. The generalization capability is strong: the DTW algorithm has a better generalization capability for sequences of different lengths, shapes, speeds and amplitudes. It does not rely on a fixed model or assumption, but rather dynamically adjusts the alignment path based on the characteristics of the input data, and is therefore applicable to a variety of different sequence data.
4. The robustness is strong: the DTW algorithm is robust to noise and local variations. By computing the distance matrix and finding the shortest path, it can be somewhat resistant to noise, local interference, or incomplete alignment in the data.
5. Is not affected by scaling: when the DTW algorithm calculates the distance, the optimal path is found through dynamic programming, and the optimal path is not influenced by the overall scaling or translation of the sequence. This makes it suitable for sequence data that need to be compared at different scales or positions.
In some embodiments, calculating the similarity of the observed trajectory to a plurality of the predicted trajectories further comprises: and normalizing the similarity.
Specifically, the normalization process may be accomplished by:
1. determining the maximum value and the minimum value of the similarity: first, the maximum and minimum values of the similarity calculation need to be determined. This may be determined by the maximum and minimum similarity in the sample dataset, or set according to the specific needs of the problem.
2. Linear normalization of similarity: linear normalization is a commonly used normalization method that can linearly map similarity values to a specified range, such as [0,1] or [ -1,1].
For the range [0,1], the formula can be used: normalized similarity= (original similarity-minimum similarity)/(maximum similarity-minimum similarity);
for the range [ -1,1], the formula can be used: normalized similarity = 2 ((original similarity-minimum similarity)/(maximum similarity-minimum similarity)) -1;
the original similarity is a calculated similarity value.
It can be appreciated that by normalizing the similarity, the dimensional influence of the similarity value can be eliminated, and the similarity value is ensured to be within a certain range, so that the similarity value is more interpretable and comparable. Therefore, the similarity degree between the observation track and the predicted track can be judged more conveniently, and corresponding action judgment can be carried out according to the requirement.
In some embodiments, performing a game operation according to the identified type of shooting action includes:
s61, confirming basketball movement tracks according to the identified shooting action types.
Specifically, the basketball trajectory may be identified by matching the type of shooting motion identified in step S50 with a predefined basketball trajectory model. Each action type corresponds to a different basketball flight path, such as a small curve parabola, a medium curve parabola, a large curve parabola, a straight line, etc.
S62, determining a shooting result according to the basketball track.
Specifically, after determining the basketball trajectory, the system further analyzes the determined basketball trajectory, taking into account factors such as the initial velocity, angle, etc. of the basketball, to determine whether the basketball was successfully played or reached a predetermined goal, i.e., to determine the outcome of the shot. Such as determining whether the basketball has properly entered the basket, has been scraped or has failed to hit the target. This step determines the score or performance of the user in the game.
And S63, generating corresponding shooting animation and game feedback according to the basketball movement track and the shooting result.
Specifically, the system generates corresponding shooting animations (such as visual effects of basketball flight, performance of goal, etc.) and game feedback (such as score prompts, sound effects of hitting targets, etc.) according to the confirmed basketball motion trail and shooting results, so as to enhance the game experience of the user.
Through the steps, the system realizes analysis and feedback of the shooting actions of the user, so that the user can obtain more real and rich experience in the game, and the interestingness and interactivity of the game are improved.
In addition, referring to fig. 3, an embodiment of the present invention further provides a device for implementing a motion sensing basketball game based on function fitting, where the device for implementing the motion sensing basketball game based on function fitting includes:
An acquiring module 110, configured to acquire gesture data from the bound somatosensory device after the somatosensory game is started, where the gesture data includes gyroscope data and acceleration data;
an observation module 120, configured to calculate an observation track of motion of the somatosensory device in space according to the gesture data;
a prediction module 130 for calculating a predicted trajectory of motion of the somatosensory device in space from the pose data and the pre-fitted shooting model;
a calculating module 140, configured to calculate similarities between the observed track and a plurality of predicted tracks;
an identification module 150, configured to identify a type of shooting action completed by the user according to the similarity;
an execution module 160 for executing a game operation according to the identified type of shooting action.
The steps implemented by each functional module of the device for implementing the motion sensing basketball game based on function fitting may refer to each embodiment of the method for implementing the motion sensing basketball game based on function fitting according to the present invention, which is not described herein.
In addition, the embodiment of the invention 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 a program 10 for implementing the motion sensing basketball game based on function fitting, and the specific embodiment of the computer readable storage medium of the present invention is substantially the same as the above-mentioned method for implementing the motion sensing basketball game based on function fitting and the specific embodiment of the server 1, which are not described herein.
It will be appreciated by those skilled in the art that 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 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 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. 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 invention.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention 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 method for implementing a somatosensory basketball game based on function fitting, comprising:
after the motion sensing game is started, acquiring gesture data from the bound motion sensing equipment, wherein the gesture data comprises gyroscope data and acceleration data;
calculating an observation track of motion of the somatosensory equipment in space according to the gesture data;
calculating a predicted track of motion of the somatosensory device in space according to the gesture data and a pre-fitted shooting model, wherein the pre-fitted shooting model is provided with a plurality of shooting models;
calculating the similarity between the observation track and a plurality of predicted tracks;
identifying the type of shooting actions completed by the user according to the similarity;
and executing the game operation according to the identified shooting action type.
2. The method for implementing a motion sensing basketball game based on function fitting of claim 1, wherein the acceleration data comprises x-axis acceleration data, y-axis acceleration data, and z-axis acceleration data;
Calculating an observation track of motion of the somatosensory device in space according to the gesture data, wherein the observation track comprises the following steps:
calculating a pitch angle of the somatosensory equipment according to the gyroscope data;
respectively calculating displacement of the somatosensory equipment in the x-axis direction and the y-axis direction according to the x-axis acceleration data and the z-axis acceleration data;
and obtaining the motion track of the somatosensory equipment in the vertical plane according to the pitch angle and the displacement of the somatosensory equipment in the x-axis direction and the y-axis direction, and taking the motion track as the observation track.
3. The method for realizing a motion sensing basketball game based on function fitting according to claim 2, wherein obtaining a motion track of the motion sensing device in a vertical plane according to the pitch angle and the displacement of the motion sensing device in the x-axis direction and the y-axis direction comprises:
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 displacement of the pitch angle and the somatosensory equipment in the x-axis direction and the y-axis direction;
and generating the motion trail according to the coordinates of the grid cells passing through in the process of moving the virtual rigid body in the grid map.
4. The method for implementing a motion sensing basketball game based on function fitting of claim 1, wherein calculating a predicted trajectory of motion of a motion sensing device in space from the gesture data and a pre-fitted shooting model comprises:
calculating a pitch angle of the somatosensory equipment according to the attitude data;
calculating displacement of the somatosensory equipment in the front-back direction according to the x-axis acceleration data and the pitch angle;
inputting the displacement in the front-rear direction as an independent variable into a shooting model, and calculating the displacement in the vertical direction of the somatosensory equipment;
and generating the predicted track according to the displacement in the front-rear direction and the displacement in the vertical direction.
5. The method for implementing a motion sensing basketball game based on function fitting of claim 1, wherein calculating the similarity of the observed trajectory to a plurality of the predicted trajectories comprises:
according to a dynamic time warping algorithm, the observation track and the prediction track are respectively expressed as two sequences consisting of a plurality of points;
calculating the distance between every two points in the two sequences according to the Euclidean distance, and constructing a distance matrix;
starting from the upper left corner of the distance matrix, searching for a shortest path reaching the lower right corner, and taking the sum of the distances on the paths as the similarity between the observation track and the predicted track.
6. The method for implementing a motion sensing basketball game based on function fitting of claim 5, wherein calculating the similarity of said observed trajectory to a plurality of said predicted trajectories further comprises:
and normalizing the similarity.
7. The method for implementing a motion sensing basketball game based on function fitting of claim 1, wherein performing a game operation based on the identified type of shooting action comprises:
confirming basketball movement tracks according to the identified shooting action types;
obtaining a shooting result according to the basketball track;
and generating corresponding shooting animation and game feedback according to the basketball movement track and the shooting result.
8. A device for realizing a motion sensing basketball game based on function fitting, comprising:
the acquisition module is used for acquiring gesture data from the bound somatosensory equipment after the somatosensory game is started, wherein the gesture data comprise gyroscope data and acceleration data;
the observation module is used for calculating the observation track of the motion of the somatosensory equipment in the space according to the gesture data;
the prediction module is used for calculating a predicted track of motion of the somatosensory equipment in space according to the gesture data and the pre-fitted shooting model;
The calculation module is used for calculating the similarity between the observation track and a plurality of predicted tracks;
the identification module is used for identifying the type of shooting actions completed by the user according to the similarity;
and the execution module is used for executing game operation according to the identified shooting action type.
9. An apparatus for implementing a motion sensing basketball game based on function fitting, comprising a memory, a processor, and a program stored on the memory and executable on the processor for implementing the motion sensing basketball game based on function fitting, wherein the processor, when executing the program for implementing the motion sensing basketball game based on function fitting, implements a method for implementing the motion sensing basketball game based on function fitting as claimed in any one of claims 1-7.
10. A computer readable storage medium, wherein a program for realizing a motion sensing basketball game based on function fitting is stored on the computer readable storage medium, and when the program for realizing the motion sensing basketball game based on function fitting is executed by a processor, the method for realizing the motion sensing basketball game based on function fitting according to any one of claims 1-7 is realized.
CN202311574861.6A 2023-11-22 2023-11-22 Method for realizing somatosensory basketball game based on function fitting Pending CN117504294A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311574861.6A CN117504294A (en) 2023-11-22 2023-11-22 Method for realizing somatosensory basketball game based on function fitting

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311574861.6A CN117504294A (en) 2023-11-22 2023-11-22 Method for realizing somatosensory basketball game based on function fitting

Publications (1)

Publication Number Publication Date
CN117504294A true CN117504294A (en) 2024-02-06

Family

ID=89766063

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311574861.6A Pending CN117504294A (en) 2023-11-22 2023-11-22 Method for realizing somatosensory basketball game based on function fitting

Country Status (1)

Country Link
CN (1) CN117504294A (en)

Similar Documents

Publication Publication Date Title
KR101881620B1 (en) Using a three-dimensional environment model in gameplay
US20130010071A1 (en) Methods and systems for mapping pointing device on depth map
WO2017020766A1 (en) Scenario extraction method, object locating method and system therefor
US9144744B2 (en) Locating and orienting device in space
US20140009384A1 (en) Methods and systems for determining location of handheld device within 3d environment
CN104769640A (en) Using a plurality of sensors for mapping and localization
WO2019092698A1 (en) Device, system and method for improving motion estimation using a human motion model
Porzi et al. Visual-inertial tracking on android for augmented reality applications
CN111178170B (en) Gesture recognition method and electronic equipment
KR20200145698A (en) Method and terminal unit for providing 3d assembling puzzle based on augmented reality
CN108027647B (en) Method and apparatus for interacting with virtual objects
CN117504294A (en) Method for realizing somatosensory basketball game based on function fitting
US20220223065A1 (en) Robot control system for coding education
CN116637359A (en) Somatosensory jump game method based on units engine
CN117379791A (en) Somatosensory game method for realizing beating action recognition based on function fitting
CN114202799A (en) Method and device for determining change speed of controlled object, electronic equipment and storage medium
CN116637362A (en) Somatosensory running game method based on units engine
CN116637363A (en) Somatosensory game method based on units engine
CN116650953A (en) Somatosensory tennis game method based on units engine
CN116650952A (en) Somatosensory skiing game method based on function fitting
CN116889729A (en) Motion sensing boxing game method based on function fitting
CN116637361A (en) Body feeling boxing game method based on units engine
CN117357901A (en) Method for realizing somatosensory badminton game based on function fitting
CN116637360A (en) Motion sensing table tennis game method based on function fitting
Rahardjo et al. Combination of hardware and microservices-based vr game controller using mahony filter

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