Disclosure of Invention
The embodiment of the application provides a method, a device, equipment and a storage medium for processing fitness data, which are used for assisting a user in performing fitness by standard actions.
In a first aspect, an embodiment of the present application provides a method for processing fitness data, which is implemented by a computer device, the method including:
playing first voice information, wherein the first voice information is used for indicating a user to execute a preset body-building action by adopting an instrument with a first weight;
acquiring a plurality of human body depth values of each time point of the user in the process of executing a preset body-building action through time-of-flight TOF equipment, wherein the human body depth values comprise depth values of each body area divided according to preset rules, and each human body depth value is an average value of depth values of each pixel point in the corresponding body area;
determining whether the fitness action of the user meets the specification at each time point according to the plurality of human body depth values at each time point and the depth value range of each body area at each time point, wherein the depth value range of each body area at each time point is a range determined by the depth values of the body areas when the user is instructed to perform the preset fitness action by adopting a second weight of equipment in advance, and the second weight is smaller than the first weight;
and when the body-building action of the user is determined to be not in accordance with the specification at least one target time point, pushing prompt information, wherein the prompt information is used for prompting that the body-building action of the user at the at least one target time point is not in accordance with the specification and is in an irregular body area.
In a possible design of the first aspect, before determining whether the fitness action of the user meets the norm at each time point according to the plurality of human body depth values at each time point and the range of depth values for each body area at the time point, the method further includes:
playing second voice information, wherein the second voice information is used for indicating a user to execute the preset body-building action by adopting the second weight instrument;
acquiring a plurality of human body depth values of each time point of the user in the process of executing the preset body-building action through the TOF equipment;
and aiming at each time point, determining the depth value range of each body area corresponding to the time point according to the plurality of human body depth values of the time point and a preset threshold value.
In this possible design, the determining whether the user's fitness action meets the specification at each time point according to the plurality of human body depth values at each time point and the depth value range of each body area at the time point includes:
for each time point, determining whether each human body depth value corresponding to the time point is within the depth value range of the corresponding body area;
if the human body depth value of at least one body area is not in the corresponding depth value range at the time point, determining that the body-building action of the user is not standard at the time point;
and if the human body depth value of each body area is in the corresponding depth value range at the time point, determining that the fitness action of the user is standard at the time point.
In another possible design of the first aspect, the obtaining, by the TOF device, a plurality of human body depth values of the user at each time point during the execution of the preset fitness action includes:
acquiring a depth map of the human body of the user at each time point in the process of executing a preset body-building action through the TOF equipment, wherein the depth map comprises a depth value of each pixel of the human body;
for each time point, carrying out region division on the human body in the depth map according to the preset rule to obtain sub-depth maps of a plurality of body regions;
and calculating the average value of the depth values of all pixels in the sub-depth maps of the body area aiming at each body area to obtain the human body depth value of the body area.
In yet another possible design of the first aspect, the pushing a prompt when it is determined that the exercise performance of the user does not meet the specification at the at least one target time point includes:
when it is determined that the body-building action of the user does not meet the specification at least one target time point, displaying body areas where the body-building action of the user does not meet the specification and is not normal at the at least one target time point;
and when the body building action of the user is determined to be not in accordance with the specification at least one target time point, the user is reminded of the body building action of the user in accordance with the specification and the irregular body area at the at least one target time point through voice.
In a second aspect, an embodiment of the present application provides an apparatus for processing fitness data, which is applied to a computer device, the apparatus including:
the playing module is used for playing first voice information, and the first voice information is used for indicating a user to execute a preset body-building action by adopting an instrument with a first weight;
the acquiring module is used for acquiring a plurality of human body depth values of each time point of the user in the process of executing the preset body building action through time-of-flight TOF equipment, wherein the human body depth values comprise depth values of each body area divided according to preset rules, and each human body depth value is an average value of depth values of each pixel point in the corresponding body area;
a determining module, configured to determine whether the exercise action of the user at each time point meets a specification according to a plurality of human body depth values at each time point and a depth value range of each body area at the time point, where the depth value range of each body area at each time point is a range determined by the depth values of the body areas when the user is instructed in advance to perform the preset exercise action with a second weight of equipment, and the second weight is smaller than the first weight;
the pushing module is used for pushing prompt information when the body-building action of the user is determined to be not in accordance with the specification at least one target time point, and the prompt information is used for prompting that the body-building action of the user at the at least one target time point is not in accordance with the specification and in an irregular body area.
In a possible design of the second aspect, the playing module is further configured to play second voice information, where the second voice information is used to instruct the user to perform the preset exercise action with the second weight of the apparatus;
the acquisition module is further used for acquiring a plurality of human body depth values of each time point of the user in the process of executing the preset body-building action through the TOF equipment;
the determining module is further configured to determine, for each time point, a depth value range of each body area corresponding to the time point according to the plurality of human body depth values of the time point and a preset threshold.
In this possible design, the determining module determines whether the exercise action of the user at each time point meets the specification according to the plurality of human body depth values at each time point and the depth value range of each body area at each time point, and is specifically configured to:
for each time point, determining whether each human body depth value corresponding to the time point is within the depth value range of the corresponding body area;
if the human body depth value of at least one body area is not in the corresponding depth value range at the time point, determining that the body-building action of the user is not standard at the time point;
and if the human body depth value of each body area is in the corresponding depth value range at the time point, determining that the fitness action of the user is standard at the time point.
In another possible design of the second aspect, the obtaining module is specifically configured to:
acquiring a depth map of the human body of the user at each time point in the process of executing a preset body-building action through the TOF equipment, wherein the depth map comprises a depth value of each pixel of the human body;
for each time point, carrying out region division on the human body in the depth map according to the preset rule to obtain sub-depth maps of a plurality of body regions;
and calculating the average value of the depth values of all pixels in the sub-depth maps of the body area aiming at each body area to obtain the human body depth value of the body area.
In yet another possible design of the second aspect, the pushing module is specifically configured to:
when it is determined that the body-building action of the user does not meet the specification at least one target time point, displaying body areas where the body-building action of the user does not meet the specification and is not normal at the at least one target time point;
and when the body building action of the user is determined to be not in accordance with the specification at least one target time point, the user is reminded of the body building action of the user in accordance with the specification and the irregular body area at the at least one target time point through voice.
In a third aspect, an embodiment of the present application provides a computer device, including: a processor, a memory;
the memory stores computer-executable instructions;
the processor executes the computer-executable instructions to cause the computer device to perform the method of processing fitness data as described in the first aspect and in various possible designs above.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, in which computer-executable instructions are stored, and when the computer-executable instructions are executed by a processor, the computer-executable instructions are used to implement the method for processing fitness data as described in the first aspect and various possible designs.
In a fifth aspect, embodiments of the present application provide a computer program product comprising a computer program, which when executed by a processor, is configured to implement the method for processing fitness data as described in the first aspect and in various possible designs.
In the method, first voice information is played, the first voice information is used for indicating a user to execute a preset body-building action by adopting an instrument with a first weight, then a plurality of human body depth values of each time point in the process of executing the preset body-building action by the user are obtained through a time-of-flight TOF (time of flight) device, the plurality of human body depth values comprise depth values of each body area divided according to preset rules, each human body depth value is an average value of the depth values of each pixel point in the corresponding body area, whether the body-building action of the user accords with a standard at each time point is determined according to the plurality of human body depth values of each time point and the depth value range of each body area of each time point, and whether the body-building action of the user accords with the standard at each time point is determined according to the depth values of the body areas when the user executes the preset body-building action by adopting an instrument with a second weight in advance And finally, when the body building action of the user is determined to be out of specification at least one target time point, pushing prompt information, wherein the prompt information is used for prompting the user that the body building action of the user at the at least one target time point is out of specification and in an out-of-specification body area. According to the technical scheme, the depth value of the body area under the body-building action is judged from the time sequence, and the technical problem that a user is assisted to build the body with standard actions is solved.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
Before introducing the embodiments of the present application, the background of the present application is explained first:
in modern society, people pay more and more attention to maintaining their own bodies, and more people walk close to gymnasiums to carry out body training. The body-building physical training has a lot of actions, and how to measure whether the actions are standard or not is a long-term troubling problem for many people.
The existing methods mainly comprise the following steps:
1. the self-learning method is characterized in that the user can improve the action quality by learning the body-building data and comparing with the action, video and the like of the user.
2. And the coach is guided by the professional coach to act.
3. The method comprises the steps of utilizing a camera to capture actions, and judging the normative of the actions through Artificial Intelligence (AI) and video technical means.
However, the above-described conventional method has the following problems:
1. the method is greatly related to the subjective thought of an individual, the correct and wrong actions are difficult to be judged accurately, and even the joint, muscle and other conditions are damaged due to the wrong method.
2. High cost and is not suitable for large-area popularization. In addition, the coach can shoot a lot of videos for achieving the effect, and the fitness place is often a private place, so that the video can be badly flowed out.
3. The adopted recognized individual actions are compared with the so-called standard actions in a mode, but in the actual process, the actions of each person are different, the weight, the height, the body proportion and the joint softness are different, and the measurement by using the same so-called template is difficult.
On the basis of the above technical problem, fig. 1 is a schematic view of an application scenario of a fitness data processing method provided in an embodiment of the present application, and as shown in fig. 1, the application scenario includes: a user 11, acomputer device 12 and a Time of flight (TOF) device 13.
The number of TOF devices 13 may be at least one, and the TOF device 13 may be a TOF camera, as shown in fig. 1, and may include two TOF cameras, and the captured view angles are denoted asview angle 1 andview angle 2.
Optionally, the TOF device 13 is used to accurately acquire the depth information of the human body in front of the TOF device 13.
In one possible implementation, while the user 11 is exercising in the high-weight mode, the TOF device 13 captures the body depth information of the user 11 in real time and transmits to thecomputer device 12, and thecomputer device 12 determines whether the current exercise action of the user 11 is normative or not according to the body depth information of the user 11 and the depth value range of each body area at the current time point, and displays the result on the display interface of thecomputer device 12.
It is to be understood that what is not disclosed in the application scenarios, as well as other possible implementations, are detailed by the following embodiments.
In order to solve the technical problems, the technical conception process of the inventor is as follows: the muscle is a human body tissue controlled by cranial nerves, and when a plurality of people complete small-weight body-building actions, the muscle can fully focus attention to control the muscle force of an exercise area, think the accuracy of the actions, coordinate other fixed parts of the body and do not participate in compensating the force as much as possible, and the actions at the moment are relatively standard. In the formal training process, heavy actions stimulate muscles to begin to exert force to contract, exhaustion signals are transmitted to the brain, the brain can subconsciously control nearby muscles to compensate for the currently contracted muscles, for example, the deltoid muscle drives the trapezius, and the training effect is obviously reduced at the moment.
Further, the TOF apparatus is an imaging device that measures distance using laser time of flight, and calculates the distance to an object using the time difference between the emission of light waves from a laser emitter and the return of the light waves. Utilize TOF equipment, accurate human position before the acquisition equipment, form etc. because every user's action is all different, weight, height, body proportion, joint compliance all inequality, can avoid the problem that prior art exists when utilizing TOF equipment to carry out human information's acquisition.
The following describes the technical solution of the present application in detail by using the application scenario shown in fig. 1 through the following specific embodiments. It should be noted that the following specific embodiments may be combined with each other, and the same or similar concepts or processes may not be described in detail in some embodiments. Embodiments of the present application will be described below with reference to the accompanying drawings.
Fig. 2 is a schematic flowchart of a first embodiment of a method for processing fitness data according to an embodiment of the present application. As shown in fig. 2, the method for processing fitness data is applied to a computer device, and comprises the following steps:
and step 21, playing the first voice message.
The first voice message is used for indicating the user to execute a preset body-building action by adopting an instrument with a first weight.
In this step, the computer device sends a reminder to the user who needs to perform the auxiliary fitness such that the user performs a preset fitness action using the instrument of the first weight.
Optionally, the first weight of the apparatus may be an apparatus that performs a preset fitness action in a heavy weight mode, and the preset fitness action may be a flat barbell bench press, a flat dumbbell bench press, or the like.
In one possible implementation, the speech module of the computer device plays: the user is asked to perform a flat barbell bench press using a 20kg (full weight) barbell.
In this case, the first weight may be set according to the user's own selection, and may be larger than the second weight described below.
In addition, in order to meet the requirement that the computer equipment acquires the human body depth information of the user in the follow-up process, a countdown mode can be adopted at the same time, and the user is reminded to start to execute the preset body building action by adopting the equipment with the first weight after the countdown is finished.
And step 22, acquiring a plurality of human body depth values of each time point of the user in the process of executing the preset body-building action through the TOF equipment.
Wherein, a plurality of human depth values include the depth value of every health region according to presetting rule division, and every human depth value is the average value of the depth value of every pixel in the corresponding health region.
In this step, the TOF device is a camera device that measures distance by using laser flight time, the distance to the object is calculated by using the time difference between the light wave emitted from the laser emitter and the object and the return time, and the human body shape of the user in front of the TOF device, that is, the human body depth value of the fitness user, can be accurately obtained by using the TOF camera.
Optionally, fig. 3 is a schematic diagram of a principle of use of a TOF apparatus provided in an embodiment of the present application, and as shown in fig. 3, the schematic diagram includes: direct time-of-flight techniques and indirect time-of-flight techniques.
First, for the direct time-of-flight technique, a laser emitting unit emits pulsed light to a three-dimensional object (e.g., a user for fitness), the pulsed light is reflected on the three-dimensional object, a receiving unit is detected to receive the pulsed light, and a timer counts the time from the emitting to the receiving process in the whole process
The speed of the pulsed light is
Distance of three-dimensional object from light source
Comprises the following steps:
second, for indirect time-of-flight techniques, the laser emitting unit emits a continuous wave modulation (modulation frequency) to a three-dimensional object (e.g., a user for fitness)
) Reflecting on a three-dimensional target, detecting the receiving of the receiving unit, and detecting the phase change of the continuous wave by the phase change unit in the whole process
The velocity of the continuous wave is
Distance of three-dimensional object from light source
Comprises the following steps:
one possible implementation of thisstep 22 is as follows:
step 1, acquiring a depth map of a human body at each time point of a user in the process of executing a preset body-building action through TOF equipment.
Wherein the depth map includes a depth value, i.e., d, of each pixel of the human body.
Optionally, after the computer device plays the first voice message to the user and the user is ready, the user performs a preset body-building action by using the apparatus with the first weight, and the TOF device starts to acquire the depth map of the human body of the user at each time point in the preset body-building action.
In one possible implementation, after the countdown is finished, the user performs a flat barbell bench press with 15kg of barbells, the duration of the action is 10s, and the TOF acquires a depth map of the human body corresponding to each second within 10s (the time interval is 1s as an example).
And 2, carrying out region division on the human body in the depth map according to a preset rule aiming at each time point to obtain sub-depth maps of a plurality of body regions.
Optionally, the human depth map corresponding to each time point is divided according to a preset rule, and the division manner may be that the human depth map is equally divided according to the area of the map, or the human depth map is divided according to the human body part, so as to obtain sub-depth maps of a plurality of body regions.
It should be understood that the dividing manner of the human body depth map corresponding to each time point needs to be consistent with the dividing manner corresponding to the depth value range of each body region at the time point described below.
In one possible implementation, the human body in the depth map is divided into regions, and at the 1 st second, the depth map corresponding to the 1 st second is divided into 20 regions, so as to obtain sub-depth maps of the 20 body regions.
And 3, calculating the average value of the depth values of all pixels in the sub-depth maps of the body area aiming at each body area to obtain the human body depth value of the body area.
Optionally, for the sub-depth map corresponding to each body area, in order to facilitate comparison with the depth value range of each body area, the depth values of all pixels in the sub-depth map may be averaged to obtain a depth average value of the body area, that is, a human depth value of the body area.
In one possible implementation, in the sub-depth map of the 19 th body area in the 1 st second corresponding depth map, the depth values of all pixels may be 19.662, 19.663, 19.659, 19.668 … … 19.663, 19.667, and the resulting depth average is 19.667, then the human depth value of the 19 th body area is 19.667.
Optionally, as an example, fig. 4 is a schematic diagram of a human depth value provided in the embodiment of the present application. As shown in fig. 4:
at time 0-T1 (taking the 1 st second, 2 nd … … th second as an example), the human depth value for the 1 st body area is shown as a black dot at each time.
And step 23, determining whether the fitness action of the user meets the specification at each time point according to the plurality of human body depth values at each time point and the depth value range of each body area at each time point.
Wherein the range of depth values for each body area at each time point is a range determined by the depth values for the body area that previously indicated when the user performed the preset fitness action with an instrument of a second weight, the second weight being less than the first weight.
In this step, for each time point, the depth value of the human body in each body area and the depth value range of the body area corresponding to the human body depth value at the time point need to be sequentially compared, so as to determine whether the exercise of the user is standard at the time point, and also determine the specific body area where the irregular exercise occurs.
Alternatively, the determination of the range of depth values for each body region for each point in time is explained in more detail by the embodiment shown in fig. 5.
In one possible implementation, at second 5, the depth value of the 19 th body area is 19.667, and at second 5, the depth value of the 19 th body area ranges from 19.665 to 19.669, and then the fitness action profile of the 19 th body area corresponding to second 5 is determined.
In one possible implementation, at the 5 th second, the depth value of the human body in the 10 th body area is 17.667, and at the 5 th second corresponding depth value of the 10 th body area in the range of 16.665-16.669, it is determined that the fitness action of the 10 th body area corresponding to the 5 th second is not normative.
In summary, the exercise activity of the user at the 5 th second is not in compliance with the specification, specifically, the 10 th body area.
It should be understood that the numerical values in the embodiments of the present application are examples.
And 24, when the body-building action of the user is determined to be not in accordance with the standard at the at least one target time point, pushing prompt information.
Wherein the prompt message is used for prompting the user that the body-building action at the at least one target time point is not in accordance with the standard and is not in accordance with the standard body area.
In this step, after the whole preset fitness action is completed, the computer device determines that the specific time point (the time point is the target time point) is not in accordance with the standard, and pushes prompt information to the user.
Optionally, the prompting of the user may be sent by the computer device, or may be sent by the computer device to the third-party device and sent by the third-party device.
Optionally, a possible implementation of this step is any of:
and 1, when the body building action of the user is determined to be out of specification at least one target time point, displaying the body area of the user, of which the body building action at the at least one target time point is out of specification and is not in specification.
In one possible implementation, upon determining that the user's workout activity is not within specification at second 5, a display on the computer device displays "body area 10 in second 5 (left arm wrist) is not within specification, please the user's attention".
And 2, when the body building action of the user is determined to be not in accordance with the specification at the at least one target time point, the user is reminded of the body building action of the user in accordance with the specification and the irregular body area by voice at the at least one target time point.
In one possible implementation, upon determining that the user's workout activity is not within specification at the 5 th second, the playback unit of the computer device plays "left arm wrist area is not within specification for the 5 th second, please the user's attention".
Further, in some possible implementations, taking the 5 th second as an example, the depth value range of each body area in the 5 th second may be differentiated from the corresponding human depth value, and the magnitude of the differentiated value is indicated in different colors in the screen, for example, green-red is gradually changed, green is normally fitted, that is, the differentiated value is small, the human depth value may be in the corresponding depth value range, red may prompt muscle compensation to cause data change, and at this time, the user is prompted to keep the standard of the action posture as much as possible, that is, red indicates that the human depth value is not in the corresponding depth value range, and the deeper the red depth is, the larger the deviation is.
According to the method for processing fitness data, the first voice information is played, then the time of flight TOF equipment is used for obtaining the multiple human body depth values of each time point in the process of executing the preset fitness action by the user, then whether the fitness action of the user meets the standard at each time point is determined according to the multiple human body depth values of each time point and the depth value range of each body area of each time point, and finally when the fitness action of the user does not meet the standard at least one target time point, prompt information is pushed. According to the technical scheme, the depth value of the body area under the body-building action is judged from the time sequence, and the technical problem that a user is assisted to build the body with standard actions is solved.
Based on the above embodiments, fig. 5 is a schematic flowchart of a second embodiment of a method for processing fitness data according to the present application. As shown in fig. 5, beforestep 23, the method for processing fitness data further includes the following steps:
and step 51, playing the second voice message.
And the second voice message is used for instructing the user to execute the preset body-building action by adopting the second weight of the equipment.
In this step, the computer device sends a reminder to the user who needs to perform the assisted fitness, so that the user performs a preset fitness action with the instrument of the second weight.
Optionally, the second weight of the apparatus may be an apparatus that performs a preset body-building action in a low weight mode, the preset body-building action may be a flat barbell bench press, a flat dumbbell bench press, or the like, and the preset body-building action is consistent with the preset body-building action for assisting body-building when the user needs to adopt a high weight mode.
In one possible implementation, the speech module of the computer device plays: the user is asked to perform a flat barbell bench press using a 2kg (small, less than the second weight) barbell.
In addition, in order to meet the requirement that the computer device obtains the human depth value range of the user in the subsequent process, a countdown mode can be adopted at the same time to remind the user to start to adopt the second weight of the equipment to execute the preset fitness action after the countdown is finished.
And step 52, acquiring a plurality of human body depth values of each time point of the user in the process of executing the preset body-building action through the TOF equipment.
In this step, consistent with the step ofstep 22 described above, the difference is that the user employs the second weight of the apparatus to perform the predetermined exercise motion.
It will be appreciated that when performing the predetermined exercise movement using the apparatus of the second weight and performing the predetermined exercise movement using the apparatus of the first weight, it is necessary to ensure that the timing of the exercise movement is consistent.
And 53, aiming at each time point, determining the depth value range of each body area corresponding to the time point according to the plurality of human body depth values of the time point and a preset threshold value.
In this step, in each time point, after the human depth value of the different body area corresponding to each time point is determined instep 52, since the user cannot achieve the complete consistency with the body motion in the previous training in the new training, a certain error may exist in practice, and at this time, a preset threshold may be set to optimize the influence caused by the error.
Optionally, for different areas or time points, the size of the preset threshold may be determined according to actual needs.
In one possible implementation, the preset threshold may be 0.002, taking the human depth value 15.333 of the 3 rd body area of the 5 th second as an example, and the depth value of the body area ranges from 15.331 to 15.335.
In one possible implementation, the preset threshold may be 0.003, taking the human depth value 16.333 of the 4 th body area at the 6 th second as an example, and the depth value of the body area ranges from 16.330-16.336.
According to the method for processing fitness data, second voice information is played, the second voice information is used for indicating a user to execute a preset fitness action by adopting a second weight instrument, a plurality of human body depth values of the user at each time point in the process of executing the preset fitness action are obtained through TOF equipment, and then, for each time point, the depth value range of each body area corresponding to the time point is determined according to the plurality of human body depth values of the time point and a preset threshold value. According to the technical scheme, the depth value range of the body area is determined by the user in the small-weight fitness mode, and a realization basis is provided for realizing the follow-up more accurate judgment of the fitness action specification of the user in the large-weight fitness mode.
Further, fig. 6 is a schematic flow chart of a third embodiment of a method for processing fitness data according to the embodiment of the present application. As shown in fig. 6, thestep 23 may include the following steps:
and step 61, determining whether each human body depth value corresponding to each time point is in the depth value range of the corresponding body area or not aiming at each time point.
In this step, in the exercise mode with heavy weight and light weight, the body-building action normative and the consistency of the action should be relatively consistent for the same set of exercise actions, so that the exercise action compliance can be indicated.
Optionally, when the user performs the preset body-building action to build the body, at the corresponding time point in the body-building process, the action at each time point may be presented in the form of the human depth value after being processed in the above manner, and for each time point, it is determined whether the human depth value of each body area exists in the depth value range corresponding to the corresponding body area, so as to determine whether the body-building action of the user is normal at the time point.
And step 62, if the human body depth value of at least one body area is not in the corresponding depth value range at the time point, determining that the body-building action of the user is not standard at the time point.
In this step, when there is at least one human depth value of the body area greater than or less than the corresponding depth value range in the currently determined time point, it is indicated that the motion of the body area is not standard.
In one possible implementation, at the 5 th second, the depth value of the 19 th body area is 19.667, and at the 5 th second, the depth value range of the 19 th body area is 19.665-19.669, the fitness action of the 19 th body area corresponding to the 5 th second is determined to be normative, the depth value of the 10 th body area is 17.667, and at the 5 th second, the depth value range of the 10 th body area is 16.665-16.669, the fitness action of the 10 th body area corresponding to the 5 th second is determined to be non-normative.
In one possible implementation, at the 7 th second, the depth value of the human body in the 16 th body area is 19.663, and at the 7 th second corresponding depth value of the 16 th body area is in the range of 19.665-19.669, it is determined that the fitness action for the 16 th body area corresponding to the 7 th second is not normative.
In summary, the exercise movement of the user at the 5 th second is not in compliance with the specification, specifically the 10 th body area, and the exercise movement at the 7 th second is not in compliance with the specification, specifically the 16 th body area.
And step 63, if the human body depth value of each body area is in the corresponding depth value range at the time point, determining that the fitness action of the user is standard at the time point.
In this step, when there is at least one human depth value of the body area located in the corresponding depth value range at the currently determined time point, it is indicated that the motion of the body area is not standard.
In one possible implementation, at the 5 th second, the human body depth values of the 1 st to 20 th body areas are all located in the depth value range corresponding to the respective body area, and then it is determined that the fitness actions of the respective body areas corresponding to the 5 th second are normative.
In one possible implementation, at the 7 th second, the human body depth values of the 1 st to 20 th body areas are all located in the depth value range corresponding to the respective body area, and then it is determined that the fitness action of the respective body area corresponding to the 7 th second is normal.
In summary, the exercise motions of the user at the 5 th and 7 th seconds are in compliance with the specification.
The method for processing fitness data provided in the embodiment of the application determines, for each time point, whether each human depth value corresponding to the time point is within a depth value range of a corresponding body area, determines that a fitness action of a user is not standard at the time point if the human depth value of at least one body area is not within the corresponding depth value range at the time point, and determines that the fitness action of the user is standard at the time point if the human depth value of each body area is within the corresponding depth value range at the time point. According to the technical scheme, the standardization of the body-building action of the user is determined by starting from the range of the depth value and the depth value of the human body.
Based on the above embodiments, fig. 7 is a schematic flowchart of a fourth embodiment of a method for processing fitness data according to the embodiment of the present application. As shown in fig. 7, the flow is a specific implementation in a practical use process, and the schematic flow diagram includes a user, a computer device, and a display screen of the computer device (or may be a display screen independent of the computer device).
The method specifically comprises the following steps:
step 1, initializing a scene by computer equipment;
step 2, a user stands still in a shooting area of TOF equipment;
step 3, the computer equipment sends a display prompt to a display screen;
step 4, keeping the display screen still, and counting down;
step 5, the user starts to finish the small-weight body-building action after the countdown is finished;
step 6, the computer equipment receives the human body depth information acquired by the TOF equipment and establishes a depth value range of each body area at each time point;
step 7, the computer equipment sends a prompt of successful establishment to a display screen;
step 8, successfully establishing display on a display screen, keeping the display still, and counting down;
9, finishing the heavy weight fitness action after the user finishes counting down;
step 10, receiving human body depth information acquired by TOF equipment in real time by computer equipment, and comparing the human body depth information with the depth value range of each body area at the time point;
step 11, the computer equipment sends a comparison result prompt to a display screen;
and step 12, displaying a comparison result.
The method for processing fitness data comprises the steps that firstly, a computer device initializes a scene, a user is static in a shooting area of a TOF device, the computer device sends a display prompt to a display screen, the display of the display screen keeps static, countdown is performed, the user starts to finish a small-weight fitness action after the countdown is finished, the computer device receives human body depth information obtained by the TOF device and establishes a depth value range of each body area at each time point, the computer device sends a prompt of successful establishment to the display screen, the display screen displays the successful establishment and displays the static state and countdown, the user starts to finish a large-weight fitness action after the countdown is finished, the computer device receives the human body depth information obtained by the TOF device in real time and compares the human body depth information with the depth value range of each body area at the time point, and sends a comparison result prompt to the display screen, and displaying the comparison result. This embodiment has realized the body-building action that probably exists to the user and has not standardized the definite and in time remind, avoids the damage that user's malfunction arouses etc..
Based on the above method embodiment, fig. 8 is a schematic structural diagram of a fitness data processing device according to an embodiment of the present application. As shown in fig. 8, the exercise data processing device is a computer device, and the device includes:
theplaying module 81 is configured to play first voice information, where the first voice information is used to instruct a user to perform a preset fitness action by using an instrument with a first weight;
an obtainingmodule 82, configured to obtain, through a time-of-flight TOF device, a plurality of human body depth values at each time point in a process of performing a preset fitness action by a user, where the plurality of human body depth values include a depth value of each body area divided according to a preset rule, and each human body depth value is an average value of depth values of each pixel point in the corresponding body area;
a determiningmodule 83, configured to determine whether the exercise action of the user at each time point meets the specification according to the plurality of human body depth values at each time point and the depth value range of each body area at each time point, where the depth value range of each body area at each time point is a range determined by the depth values of the body area when the user is instructed in advance to perform a preset exercise action with an apparatus of a second weight, and the second weight is smaller than the first weight;
and the pushingmodule 84 is configured to, when it is determined that the exercise motions of the user are not in compliance with the specification at the at least one target time point, push a prompt message, where the prompt message is used to prompt the user that the exercise motions at the at least one target time point are in compliance with the specification and in an out-of-specification body area.
In a possible design of the embodiment of the present application, the playingmodule 81 is further configured to play second voice information, where the second voice information is used to instruct the user to perform a preset exercise action with a second weight of the apparatus;
the obtainingmodule 82 is further configured to obtain, through the TOF device, a plurality of human depth values at each time point in the process of performing the preset fitness action by the user;
the determiningmodule 83 is further configured to determine, for each time point, a depth value range of each body area corresponding to the time point according to the plurality of human body depth values of the time point and a preset threshold.
In this possible design, the determiningmodule 83 determines whether the fitness action of the user at each time point meets the specification according to the plurality of human body depth values at each time point and the depth value range of each body area at each time point, and is specifically configured to:
for each time point, determining whether each human body depth value corresponding to the time point is within the depth value range of the corresponding body area;
if the human body depth value of at least one body area is not in the corresponding depth value range at the time point, determining that the body-building action of the user is not standard at the time point;
and if the human body depth value of each body area is in the corresponding depth value range at the time point, determining that the fitness action of the user is standard at the time point.
In another possible design of the embodiment of the present application, the obtainingmodule 82 is specifically configured to:
acquiring a depth map of the human body at each time point in the process of executing the preset body-building action by the user through TOF equipment, wherein the depth map comprises a depth value of each pixel of the human body;
aiming at each time point, carrying out region division on a human body in the depth map according to a preset rule to obtain sub-depth maps of a plurality of body regions;
and calculating the average value of the depth values of all pixels in the sub-depth maps of the body area aiming at each body area to obtain the human body depth value of the body area.
In yet another possible design of the embodiment of the present application, the pushingmodule 84 is specifically configured to:
when it is determined that the body-building action of the user does not meet the specification at the at least one target time point, displaying body areas where the body-building action of the user does not meet the specification and is not normal at the at least one target time point;
when it is determined that the body-building action of the user is not in accordance with the specification at the at least one target time point, the body-building action of the user at the at least one target time point is reminded by voice to be in accordance with the specification and the irregular body area.
The fitness data processing device provided in the embodiment of the application can be used for executing the technical scheme corresponding to the fitness data processing method in the embodiment, and the implementation principle and the technical effect are similar, and are not described herein again.
It should be noted that the division of the modules of the above apparatus is only a logical division, and the actual implementation may be wholly or partially integrated into one physical entity, or may be physically separated. And these modules can all be implemented in the form of software invoked by a processing element; or may be implemented entirely in hardware; and part of the modules can be realized in the form of calling software by the processing element, and part of the modules can be realized in the form of hardware. In addition, all or part of the modules can be integrated together or can be independently realized. The processing element described herein may be an integrated circuit having signal processing capabilities. In implementation, each step of the above method or each module above may be implemented by an integrated logic circuit of hardware in a processor element or an instruction in the form of software.
Fig. 9 is a schematic structural diagram of a computer device according to an embodiment of the present application. As shown in fig. 9, the computer apparatus may include: a processor 90, a memory 91, and computer program instructions stored on the memory 91 and operable on the processor 90.
The computer device can be a mobile phone, a computer, a tablet and the like.
The processor 90 executes computer-executable instructions stored by the memory 91 to cause the processor 90 to perform the aspects of the embodiments described above. The processor 90 may be a general-purpose processor including a central processing unit CPU, a Network Processor (NP), and the like; but also a digital signal processor DSP, an application specific integrated circuit ASIC, a field programmable gate array FPGA or other programmable logic device, discrete gate or transistor logic, discrete hardware components.
Optionally, the computer device may further include: a transceiver 92.
A memory 91 and a transceiver 92 are coupled to the processor 90 via the system bus and communicate with each other, the memory 91 storing computer program instructions.
The transceiver 92 is used for communication with other devices, and the transceiver 92 constitutes a communication interface.
Optionally, in terms of hardware implementation, the obtainingmodule 82 in the embodiment shown in fig. 8 corresponds to the transceiver 92 in this embodiment.
In one possible implementation, the computer device may further include: the display is used for displaying a display interface of the computer equipment.
The system bus may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The system bus may be divided into an address bus, a data bus, a control bus, and the like. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The computer device provided in the embodiment of the present application may be used to execute the technical solution corresponding to the method for processing fitness data in the above embodiments, and the implementation principle and the technical effect are similar, which are not described herein again.
The embodiment of the application further provides a chip for running the instructions, and the chip is used for executing the technical scheme of the method for processing the fitness data in the embodiment.
The embodiment of the present application further provides a computer-readable storage medium, where computer instructions are stored in the computer-readable storage medium, and when the computer instructions are run on a computer device, the computer device is caused to execute the technical solution of the method for processing fitness data in the foregoing embodiment.
The embodiment of the present application further provides a computer program product, which includes a computer program, and the computer program is used for executing the technical solution of the method for processing fitness data in the foregoing embodiment when being executed by a processor.
The computer-readable storage medium described above may be implemented by any type or combination of volatile or non-volatile memory devices, such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks. Readable storage media can be any available media that can be accessed by a general purpose or special purpose computer device.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.