Action force detection method and device, terminal equipment and readable storage medium

The punching force is calculated based on the video frame time difference and overlapping area parameters, which solves the problem of being unable to detect punching force in somatosensory boxing games and improves the game's realism and player experience.

CN118674765APending Publication Date: 2024-09-20TCL TECHNOLOGY GROUP CORPORATION
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202310265802.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-17
Publication Date
2024-09-20

AI Technical Summary

Technical Problem

Existing somatosensory boxing games cannot effectively detect the strength of the player's punch. They can only determine whether the target is hit, but cannot evaluate the actual power of the punch.

Method used

By obtaining the time difference of the video frame and the overlapping area of ​​the target body part and the force effect object, the force of the action is calculated and the force of the player's punch is detected.

Benefits of technology

It solves the problem of not being able to calculate punch strength in somatosensory games, improves the realism and player experience of boxing games, and can accurately evaluate the power of punches based on the time difference and overlap area.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674765A
    Figure CN118674765A
Patent Text Reader

Abstract

The invention provides an action strength detection method and device, terminal equipment and a readable storage medium. The method comprises the following steps: acquiring a time difference between a first video frame and a second video frame; the first video frame represents a video frame in which a target body part of the target object is close to the force action object; the second video frame represents a video frame that the target object withdraws the target body part from the force action object; determining an overlapping area of the target body part and the force action object in the first video frame; and obtaining the force of the action according to the time difference and the overlapping area. According to the action strength detection method provided by the invention, the punching strength of the target object is calculated by determining the time difference between the time of the first video frame and the second video frame of the target object and determining two parameters of the area of the fist of the target object and the overlapping area of the boxing action object, so that the problem that the punching strength of the target object cannot be detected in a motion sensing game is solved. And the punching force cannot be calculated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a method, device, terminal device and readable storage medium for detecting motion force. Background Art

[0002] With the development of the gaming field and related hardware fields, various intelligent somatosensory games have been designed and developed. Somatosensory boxing games are one of the somatosensory interactive fighting games. In somatosensory boxing games, the strength of each punch of the player determines the outcome of the game.

[0003] The specific process of this type of somatosensory boxing game is as follows: 1) The player or user stands in front of the screen of the game device and prepares. The game device turns on the camera to sense whether there is a player in the camera's shooting area, and renders the boxing target of the battle on the screen; 2) The player punches the boxing target in the air, hits the opponent, and the opponent's health is reduced; 3) Within the specified time limit, the opponent's health is reduced to 0 to win.

[0004] However, in reality, boxing not only needs to hit the opponent, but the greater the force of the punch, the easier it is for the target to fall. In other words, the greater the punch force, the fewer punches can hit. If only the number of hits is judged, it is obviously contrary to the actual situation. However, the current relevant technology can only detect whether the punch hits the target, and cannot detect the player's punch strength remotely. Summary of the invention

[0005] The present application provides a method for detecting the intensity of an action, which solves the problem of being unable to detect the intensity of a player's action through time information of a video frame and action information in the video frame.

[0006] In a first aspect, the present application provides a method for detecting motion force, the method comprising:

[0007] Obtaining a time difference between a first video frame and a second video frame; the first video frame represents a video frame in which a target body part of a target object approaches a force acting object; the second video frame represents a video frame in which a target body part of a target object begins to withdraw from the force acting object;

[0008] Determine an overlapping area between the target body part in the first video frame and the force acting object;

[0009] The strength of the action is obtained according to the time difference and the overlapping area.

[0010] In a second aspect, the present application further provides a motion force detection device, the device comprising:

[0011] An acquisition module is used to acquire a time difference between a first video frame and a second video frame; the first video frame represents a video frame in which a target body part of a target object approaches a force acting object; the second video frame represents a video frame in which a target object begins to withdraw the target body part from the force acting object;

[0012] A determination module, used to determine an overlapping area between the target body part in the first video frame and the force acting object;

[0013] The detection module is used to obtain the strength of the action according to the time difference and the overlapping area.

[0014] In a third aspect, the present application also provides a terminal device, comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps in any one of the motion force detection methods.

[0015] In a fourth aspect, the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program is executed by a processor to implement the steps in any one of the motion force detection methods.

[0016] The action force detection method provided in the present application calculates the punching force of the target object by determining the time difference between the first video frame of the target object and the second video frame, and determining the two parameters of the area of ​​the target object's fist and the overlapping area of ​​the punching object, thereby solving the problem of being unable to calculate the punching force in somatosensory games. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0018] Figure 1 is a scene schematic diagram of the action force detection system provided in an embodiment of the present application;

[0019] Figure 2 This is a flow chart of an embodiment of the method for detecting the action strength in the embodiment of the present application;

[0020] Figure 3 It is a schematic diagram of a functional module of the motion force detection device in an embodiment of the present application;

[0021] Figure 4 It is a schematic diagram of the structure of the terminal device in the embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0023] In the description of the present application, it should be understood that the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the feature. In the description of the present application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0024] In this application, the word "exemplary" is used to mean "used as an example, illustration or description". Any embodiment described as "exemplary" in this application is not necessarily to be construed as being more preferred or advantageous than other embodiments. At the same time, it is to be understood that in the specific implementation of this application, when user information, user data and other related data are involved, when the above embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data shall comply with relevant laws, regulations and standards of relevant countries and regions.

[0025] In order to enable any person skilled in the art to implement and use the present application, the following description is provided. In the following description, details are listed for the purpose of explanation. It should be understood that those of ordinary skill in the art will recognize that the present application can be implemented without using these specific details. In other examples, known structures and processes will not be elaborated in detail to avoid unnecessary details that make the description of the present application obscure. Therefore, the present application is not intended to be limited to the embodiments shown, but is consistent with the widest range of principles and features disclosed in the present application.

[0026] The present application provides a method, device, equipment and storage medium for detecting motion force, which are described in detail below.

[0027] See also Figure 1 , Figure 1 Schematic diagram of a scene of a motion force detection system provided in an embodiment of the present application. The motion force detection system may include a terminal device 100 and an image sensing device 200. The image sensing device 200 may transmit data to the terminal device 100. Figure 1The terminal device 100 can obtain the video file through the image sensing device 200 to execute the action force detection method in this application.

[0028] In the embodiment of the present application, the terminal device 100 includes but is not limited to a desktop computer, a portable computer, a network server, a PDA (Personal Digital Assistant), a tablet computer, a television, a wireless terminal device, an embedded device, etc.

[0029] In the embodiments of the present application, communication between the terminal device 100 and the image sensing device 200 can be achieved through any communication method, including but not limited to mobile communications based on the 3rd Generation Partnership Project (3GPP), Long Term Evolution (LTE), and Worldwide Interoperability for Microwave Access (WiMAX), or computer network communications based on the TCP / IP Protocol Suite (TCP / IP), User Datagram Protocol (UDP), etc.

[0030] It should be noted that Figure 1 The scenario diagram of the motion force detection system shown is merely an example. The motion force detection system and scenario described in the embodiment of the present application are intended to more clearly illustrate the technical solution of the embodiment of the present application, and do not constitute a limitation on the technical solution provided in the embodiment of the present application. A person of ordinary skill in the art can appreciate that with the evolution of the motion force detection system and the emergence of new business scenarios, the technical solution provided in the embodiment of the present application is equally applicable to similar technical problems.

[0031] like Figure 2 As shown, Figure 2 This is a flow chart of an embodiment of the method for detecting the strength of an action in an embodiment of the present application. The method for detecting the strength of an action may include the following steps 201 to 203:

[0032] 201. Obtain a time difference between a first video frame and a second video frame; the first video frame represents a video frame in which a target body part of a target object approaches a force acting object; the second video frame represents a video frame in which the target object begins to retract the target body part from the force acting object.

[0033] The first video frame and the second video frame in the embodiment of the present application can be obtained by an image sensor, and the image sensor can be mounted on a terminal device supporting somatosensory games, or can be connected to the terminal device in communication, for example, by connecting the terminal device via a data cable, or by connecting the terminal device via wifi, etc.

[0034] When the terminal device starts running the somatosensory game, the image sensor also starts working. At this time, the terminal device can prompt the user on the screen to stand in the image acquisition area of ​​the image sensor, and the terminal device can display the image captured by the image sensor on the screen. The user can adjust whether he is in the image acquisition area according to the portrait capture image displayed on the screen.

[0035] After the terminal device determines that the user is in the image acquisition area, the somatosensory game can be started. The determination of whether the user is in the image acquisition area can be implemented by any existing technology, which will not be described in detail here.

[0036] After the terminal device starts running the somatosensory game, the terminal device can display the object that the user needs to hit according to the somatosensory game, which can be a virtual character or a virtual object. Afterwards, the terminal device can prompt the user to punch according to the start of the running somatosensory game, for example, by counting down 3, 2, 1, and starting to prompt the user to punch. After the terminal device completes the user's punch prompt on the screen, the image sensor can start collecting video image frames of the user's punching action. The advantage of starting to collect the user's first video frame after prompting the user to punch is to avoid collecting the boxing action performed by the user before the prompt to punch, which can effectively prevent the user from violating the game, and also avoid the image sensor from collecting too many and useless video image frames. At the same time, in an embodiment of the present application, the target body part can be the user's fist or hand. If words related to fists or hands appear in the full text, they can be understood as target body parts.

[0037] After the image sensor starts working, the user may already be in a fist-punching posture, or in a state where the standing posture is adjusted to the fist-punching posture. Therefore, after the video image frame captured by the image sensor, it is necessary to first perform frame-by-frame detection of the video in order to determine that the user is in a fist-punching posture, and take the video frame with the most forward video frame order among the many video frames including the fist-punching action as the first video frame. At the same time, since the punching action requires the arm to be straightened, after the first video frame is determined, the degree of straightness of the user's arm can be detected. If the degree of straightness of the user's arm is always in an increasing state, it indicates that the user's arm is in a state of getting straighter and straighter, that is, the fist is swinging towards the object of the fist action. If the degree of straightness of the user begins to decrease, that is, when the user's fist begins to be retracted from the object of the fist action, it can be determined that the user is in a state of retracting the fist. At this time, the video frame in which the degree of straightness begins to decrease is the second video frame. Since the video is accompanied by the acquisition time when it is acquired, each video frame corresponds to an acquisition time, so the time difference between the first video frame and the second video frame can be determined, which can be obtained by subtracting the acquisition time of the two video frames. The degree of straightening can be determined by the distance between the hand and the shoulder of the person in the image. The farther the distance between the hand and the shoulder, the greater the degree of straightening, and the closer the distance between the hand and the shoulder, the smaller the degree of straightening. Therefore, if you want to determine which of the many video frames including the fist-bumping action is the video frame for acquiring the time, you can also judge based on the degree of straightening, that is, after acquiring multiple fist-bumping video frames, determine which video frame in the fist-bumping video frames has the smallest degree of straightening, which is the first video frame to determine the time to acquire.

[0038] In addition, it should be noted that determining whether a person in a captured video image is in a punching posture can be performed through a corresponding action detection model. This is done by inputting a large number of images of a person starting to punch, setting corresponding punching action labels, and sending them to the action detection model for detection, so that the action detection model can recognize the person's punching action.

[0039] 202. Determine an overlapping area between the target body part in the first video frame and the object on which the force acts.

[0040] According to the above steps, the first video frame includes a series of punching actions, and the degree of straightening can also be used to determine the stage of the character in the punching action. Usually, the punching force will be the greatest only when the arm is straight. At this time, the video frame for calculating the fist area can also be obtained from multiple first video frames based on the degree of straightening. At this time, the video frame with the greatest degree of straightening or the later video frame order in the first video frame can be used as the first video frame for calculating the fist area.

[0041] In an embodiment of the present application, the image sensor may include two, one mounted on the terminal device or placed in front of the user, for collecting images of the user's frontal punching. The other is placed on the side of the player, for collecting images of the user's side punching. Therefore, the image sensor on the side is used for user action recognition, and the image sensor on the front is used to determine the front image of the user's fist. The two image sensors perform synchronous image acquisition, that is, the acquired video image frames correspond to each other. After the terminal device determines the punching image frame used to calculate the fist area based on the video image acquired by the side image sensor, it can correspond to the corresponding fist image frame in the video image acquired by the front image sensor according to the corresponding relationship. Then, the fist image frame is projected onto the boxing object displayed on the screen, and the overlapping area can be obtained.

[0042] 203. Get the intensity of the action based on the time difference and overlapping area.

[0043] Because, according to the boxing experimental data of the present application, the shorter the time to complete the boxing action, and the higher the overlap between the fist and the object of force, the greater the force on the object of force. Therefore, a force association table can be established based on the time difference and the overlapping area. According to the time difference and the overlapping area, the corresponding force can be queried in the force association table. For example: the force association table includes at least three elements, the time difference and the overlapping area. Assume that the current time difference is A and the overlapping area is B. At this time, it is only necessary to query the boxing force corresponding to the time difference of A and the overlapping area of ​​B in the force association table.

[0044] The action force detection method provided in the present application calculates the punching force of the target object by determining the time difference between the first video frame of the target object and the second video frame, and determining the two parameters of the area of ​​the target object's fist and the overlapping area of ​​the punching object, thereby solving the problem of being unable to calculate the punching force in somatosensory games.

[0045] In order to better implement the embodiment of the present application, in one embodiment of the present application, before obtaining the time difference between the first video frame and the second video frame, the method further includes:

[0046] Acquire the current video frame; detect the target body part of the target object in the current video frame to obtain a target part detection result; if the target part detection result indicates that the target part curvature of the target body part matches a preset curvature interval, perform motion detection on the target object in the current video frame to obtain a motion detection result of the target object in the current video frame; if the motion detection result of the target object indicates that the target body part of the target object approaches the force acting object, determine that the current video frame is the first video frame; if the motion detection result of the target object indicates that the target body part of the target object is withdrawn from the force acting object, determine that the current video frame is the second video frame.

[0047] According to the above embodiments and background technology, the present application is mainly applied to boxing games in somatosensory games. If the user makes a boxing action, but the hand is not a fist, for example, it is a palm, the user's swinging action cannot simulate the feeling of boxing. Therefore, in order to improve the realism of the boxing game, it is also necessary to detect whether the user's hand is a fist in the embodiment of the present application.

[0048] It should be noted that the current video frame is each video image frame in the video captured by the image sensor. In the embodiment of the present application, it is necessary to detect whether the hand in each video image frame is a fist, and the video frame currently undergoing fist detection is the current video frame. If the hand in the current video frame is not a fist, the current video frame is excluded and not used for strength detection. For example: If there are 10 image frames in the video, if the user's hand is not a fist in the hand detection of the first frame, the first frame is excluded. After the other video frames pass the hand detection and are all fists, subsequent action recognition, boxing strength detection, etc. can be performed according to the above embodiment.

[0049] In the embodiment of the present application, whether the user's hand is a fist can be detected by using a fist detection model to identify the user's hand. The hand detection model can perform image segmentation on the current video frame to obtain the user's hand image.

[0050] In the embodiment of the present application, when segmenting the hand, a square frame can be drawn around the hand so that the square frame includes the hand, and the hand image is segmented using the square frame. The side length of the square frame can be determined to determine the coordinates of the wrist in the video frame and the coordinates of the elbow in the image frame, and the side length is taken as half of the wrist and elbow, and the hand is framed by a square frame of this size. Specifically, the side length of the square frame can be calculated using the following formula ①:

[0051] L hand =||p 0 -p 1 || 2 ......①

[0052] Among them, p 0 is the coordinate of the wrist; p 1 is the coordinate of the elbow. The fist detection model in the embodiment of the present application can perform key point detection on the entire image frame to obtain the user's wrist key points and elbow key points, and coordinate the elbow key points and wrist key points to obtain the coordinates of the wrist and the elbow. In addition, after the fist detection model completes the image segmentation, it can detect whether the hand in the segmented hand image is a fist. For example: the acquired image video frame can be an image captured by an image sensor from the side of the person. At this time, the bending curvature of the user's hand fingers is analyzed through the side image. When the bending curvature exceeds the set curvature range, the user's hand can be determined to be a fist.

[0053] When it is determined that the user's hand in the current video frame is a fist, the video frame is used as a video image frame for subsequent action detection and strength detection. Among them, in the embodiment of the present application, since the video frame has passed the judgment of whether the hand is a fist, it is determined that the user's hands in the video frame are all fists. At this time, the distance between the user's fist and shoulder can be detected in real time. For example: the video frames that meet the fist detection are sorted according to the original video frame order in the video, and the distance between the character's fist and shoulder is compared in the order of the video frames from small to large. When the distance between the fist and the shoulder is increasing, the action detection result indicates that the user is in a punching state; when the distance between the fist and the shoulder is decreasing, the action detection result indicates that the user is in a fisting state. The video image frame in which the distance between the fist and the shoulder is the maximum value can be considered to be the user's best punching state, that is, it can be recognized as a video frame in which the user's fist hits the fist target.

[0054] In order to better implement the embodiments of the present application, in one embodiment of the present application, performing motion detection on a target object in a current video frame to obtain a motion detection result of the target object in the current video frame includes:

[0055] Perform key point detection on the target object to determine the hand key points, shoulder key points and elbow key points of the target object; determine the first distance from the hand key points to the straight line where the elbow key points and the shoulder key points are located; and obtain the motion detection result of the target object in the current video frame based on the first distance.

[0056] In the above embodiment, it is disclosed that the punching image frame when the user starts to punch is used as the initial image frame for recording time. However, according to actual conditions, during the punching process, the entire process when the user's arm starts to straighten from a bent state can be divided into two stages. The first stage: the forearm in the hand gradually becomes perpendicular to the upper arm until it is in a vertical state. The second stage: after the forearm is perpendicular to the upper arm, the arm continues to straighten, changing from a perpendicular state between the forearm and the upper arm to a horizontal state between the forearm and the upper arm. This horizontal state is usually the moment when the human body completes the boxing action. After detection, it is usually in the second stage that the force applied by the human body to the fist changes the most. Therefore, the video frame in which the forearm and the upper arm are in a perpendicular state can be selected from the user's first video frame as the initial video frame to start recording time.

[0057] At this time, the way to obtain the video frame from the first video frame can be obtained by detecting whether the forearm and the upper arm are perpendicular. Therefore, it is still possible to detect the key points of the human body to determine whether the forearm and the upper arm are perpendicular. Among them, since the video frame has been determined whether the hand is a fist, the hand key points can also be regarded as fist key points. In addition, the elbow key points and the shoulder key points can be detected by the key point detection method provided in the above embodiment. Therefore, a separate key point detection model can also be set up to detect various key points of the human body.

[0058] The key point detection model can be a movenet network model. The manually annotated wrist image including the wrist key point, the elbow image including the elbow key point, and the shoulder image including the shoulder key point are respectively sent to the movenet model for training, so that the movenet model can recognize the elbow key point, the shoulder key point and the hand key point. It should be noted that in the embodiment of the present application, the hand image including the hand key point is not sent to the movenet model for training. The reason is that the structure of the hand is more complex than other body parts and the calculation amount is larger. Therefore, the method for determining the hand key point can still be obtained by calculation. Specifically, it can be calculated based on the elbow key point and the wrist key point, as shown in the following formula ②:

[0059] p hand =1.5p 0 -0.5p 1 ......②

[0060] Among them, p 0 is the coordinate of the wrist key point; p 1is the coordinate of the key point of the elbow. Since the first distance is the distance from the fist to the straight line between the elbow and the shoulder. The straight line between the elbow and the shoulder is the upper arm. Therefore, when the forearm is perpendicular to the upper arm, the first distance is the maximum. Therefore, in each first video frame, when the first distance is the maximum, it can be regarded as the target first video frame in which the forearm and the upper arm are perpendicular. After obtaining the target first video frame, determine the acquisition time of the target first video frame, and use the acquisition time as the initial time in the time difference. Similarly, when the first distance is the minimum, that is, 0, the user's arm is completely straight, the fist-punching action is completed, and the fist is ready to be retracted. At this time, the second video frame with the minimum first distance, that is, 0, can be used as the target second video frame. At the same time, determine the acquisition time of the target second video frame, and use the acquisition time as the end time for the time difference. Finally, the difference between the end time and the initial time is calculated to get the time difference.

[0061] It should be noted that in any embodiment of the present application, after the user starts to close the fist, no calculation is required for the subsequent video image frames, because closing the fist does not belong to the punching action and no force detection is required. At this time, the terminal device can continue to detect according to the video image collected by the image sensor until the user starts the next punching action, and thus calculate the punching force in a cycle.

[0062] In order to better implement the embodiment of the present application, in one embodiment of the present application, obtaining the action detection result of the target object in the current video frame according to the first distance includes:

[0063] Key point detection is performed on the target object to determine the head key point and the neck key point of the target object, and the second distance between the head key point and the neck key point is obtained; if the first distance is greater than the product of the second distance and the preset bending coefficient, and the first distance is the largest compared to the first distances of other video frames, the action of the target object is determined to be an effective extension action; the other video frames include historical video frames before the current video frame and the next video frame adjacent to the current video frame; if the first distance is less than the product of the second distance and the preset straightening coefficient, and the first distance is the smallest compared to the first distances of other video frames, the action of the target object is determined to be an effective retraction action.

[0064] In the above embodiment, a scheme for determining the target first video frame by comparing the size of the first distance is disclosed. However, the first video frames need to be compared to determine the target first video frame with the largest first distance. According to the actual situation, in a punching action of the human body, the user converts the contracted arm into a straight state. When the user starts to punch, the angle between the forearm and the upper arm is an acute angle. As time goes by, the angle between the forearm and the upper arm gradually changes from an acute angle to a right angle, an obtuse angle, and a straight angle in a straight state. In the acute angle stage, the right angle stage, and part of the obtuse angle stage in the obtuse angle stage, the bending degree of the user's arm is relatively large and is in a bent state. Until the obtuse angle is greater than a certain degree and begins to become a flat angle, the user's arm is in a straight state. Therefore, the punching action can also be divided into two states, a bent state and a straight state, according to the bending degree of the arm.

[0065] But usually, the terminal device is equipped with only one image sensor or a communication-connected image sensor, and the image sensor is also placed on the screen. When the user is performing a boxing action, he hits toward the screen. Therefore, the image sensor can only capture the front image of the user. Compared with the side image of the user, the front image is difficult to show the overall movement of the user's arm. Therefore, other methods are needed to make judgments. In addition, according to experimental data, the length of the human forearm is approximately equal to the distance from the human throat to the top of the head. In the front image, the human head has a small range of motion, and it is easy to collect the distance from the throat to the head. Therefore, the distance from the throat to the head can be regarded as the distance of the forearm, that is, the second distance. Therefore, it is also necessary to detect the key points of the head and the key points of the neck.

[0066] Similar to the above embodiment, the detection of the key points of the head and the key points of the neck can still be performed by the MoveNet network. It is only necessary to input the top image of the head including the key points of the head and the throat image including the key points of the neck during the training phase, so that the MoveNet network can identify the throat and the top of the head, thereby obtaining the first distance.

[0067] According to the above content, the acute angle stage, the right angle stage, and part of the obtuse angle stage in the obtuse angle stage are in a bent state. The front image cannot effectively detect the degree of bending of the user's hand, so the degree of bending of the hand can be detected with the help of the first distance and the second distance. According to the process of the user straightening his arm from a bent state, the acute angle stage, the right angle stage, and part of the obtuse angle stage in the obtuse angle stage can be obtained that the second distance is a stage that first changes from small to large and then from large to small. Therefore, a bending coefficient can be set, and when the first distance is greater than the product of the bending coefficient and the second distance, these video frames are all the first video frames in the state of arm bending. At this time, the video frame with the largest first distance in the first video frame in the state of arm bending can be used as the target first video frame.

[0068] Similarly, you can also set a straightening coefficient. When the first distance is less than the product of the straightening coefficient and the second distance, you can determine that the user's arm is in the process of going from an obtuse angle to a straight angle, and then get the first video frame with the arm straightened. At this time, the second distance will only get smaller and smaller until it reaches the minimum, and then the user starts to close his fist. Therefore, the first video frame with the smallest second distance can be used as the target second video frame, that is, the action of the user starting to close his fist. Specifically, you can refer to the following formulas ③ and ④ to determine whether the user's arm is in a bent state or a straight state:

[0069] d>βd head ......③

[0070] d<αd head ......④

[0071] Where, d is the first distance; d head is the second distance; β is the bending coefficient; α is the stretching coefficient.

[0072] In order to better implement the embodiments of the present application, in one embodiment of the present application, determining the overlapping area between the target body part and the force acting object in the first video frame includes:

[0073] The target body part of the target object in the first video frame is detected to obtain a target part detection result; if the target part detection result characterizes that the target body part of the target object is a target shape, a target part mask image is generated for the target body part of the target object; the target part mask image is projected onto the force acting object to obtain an overlapping area between the target body part in the first video frame and the force acting object.

[0074] When calculating the strength, hand detection can also be performed first. Similar to the above embodiment, in order to improve the realism of the boxing game, if the user does not swing his arms with fists, the system will not determine that the user is boxing, and there is no need to calculate the strength of the user's punch. Therefore, it is still necessary to determine whether the video frame in which the user calculates the area of ​​the user's fist is a fist. It should be noted that if the embodiment based on the previous determination of the target first video frame and the target fist-collecting video continues, there is no need to detect whether the hand is a fist, because the hand detection has been completed before, and the remaining video frames are all video frames including fists. If it is not based on the target first video frame or the target second video frame, it is necessary to determine here whether the user's hand is a fist. In this embodiment, the method of determining whether the hand is a fist is the same as that in the above embodiment, and the specific details will not be repeated here.

[0075] In addition, according to the above embodiment, since the first video frame is a video frame of a fist swinging towards an object of force, or a video frame of a boxing action that has passed action detection, the system can calculate an area for each fist in each first video frame, and then select the area of ​​the fist with the largest area as a calculation parameter for subsequent force detection.

[0076] The area can be calculated by generating a fist mask image corresponding to each first video frame according to the fist of the user. Then, each fist mask image is projected and overlapped with the image of the punching object displayed on the screen, thereby obtaining the overlapping area of ​​the fist and the force object in the mask image, thereby obtaining the overlapping area.

[0077] In order to better implement the embodiments of the present application, in one embodiment of the present application, a target body part of a target object is detected to obtain a target part detection result, including:

[0078] The target body part of the target object is feature-recognized to obtain the target part region of the target object; the area of ​​the target part region is determined, and the target part detection result of the target object is obtained according to the area of ​​the target part region.

[0079] In the above embodiment, a method is provided for collecting the curvature of the fingers of the user's hand through an image sensor placed on the side to determine whether the user's hand is a fist. However, similar to the above embodiment, usually, there is only one image sensor in the somatosensory game, that is, the front image sensor on the screen. The front image sensor is a front image of the hand and cannot collect the curvature of the fingers. According to actual conditions, the tighter the fist is, the smaller the hand. Therefore, it is possible to determine whether the user's hand is a fist by calculating the area of ​​the hand. Specifically, an area threshold can be set. When the hand area is less than the threshold, it is a fist; or, when the hand area is greater than or equal to the threshold, it is not a fist. Among them, the area of ​​the image area can be determined by referring to any existing technology for calculation, and the specifics are not limited here.

[0080] In order to better implement the embodiment of the present application, in one embodiment of the present application, determining the area of ​​the target part region, and obtaining the target part detection result of the target object according to the area of ​​the target part region, includes:

[0081] Determine the minimum circumscribed rectangle of the target body part; determine the curvature of the target part of the target object according to the area of ​​the target part area, the length of the minimum circumscribed rectangle and the width of the minimum circumscribed rectangle; obtain the target part detection result according to the curvature of the target part and a preset curvature range.

[0082] According to the above embodiments, a solution is disclosed that can detect whether a hand is a fist based only on the hand area. The embodiment of the present application also provides a more sophisticated calculation method based on the hand area, that is, a minimum circumscribed rectangle is circumscribed around the user's hand. By calculating the area ratio of the hand to the minimum circumscribed rectangle, the curvature of the hand is determined, and then it is determined whether the user's hand is a fist.

[0083] Specifically, the area of ​​the hand can be calculated first, and then a minimum circumscribed rectangular frame can be added to the user's hand. Then, the area of ​​the minimum circumscribed rectangular frame can be calculated. Among them, the minimum circumscribed rectangular frame of the object in the video image frame can refer to any existing technology, and the details are not repeated here. At the same time, the area ratio can be calculated by the following formula ⑤:

[0084]

[0085] Among them, area hand is the hand area, B width is the width of the minimum enclosing rectangle, B height is the height of the minimum enclosing rectangle.

[0086] In addition, the arc interval can be obtained by the following formula ⑥:

[0087] Round threshold =Round mean ±Round std ...⑥

[0088] Among them, Round mean is the mean roundness of the fist data set obtained based on experimental data, std is the variance of the mean roundness. If the ratio of the hand area to the area of ​​the smallest circumscribed square is within the arc interval, it can be determined that the hand is a fist; if the ratio of the hand area to the area of ​​the smallest circumscribed square is not within the arc interval, it can be determined that the hand is not a fist.

[0089] In order to better implement the embodiment of the present application, in one embodiment of the present application, the intensity of the action is obtained according to the time difference and the overlapping area, including:

[0090] Determine the ratio of the area of ​​the target body part of the target object to the overlapping area; determine the sum of the areas of the polygons enclosed by the hand key points, elbow key points and shoulder key points in the first video frame and the second video frame to obtain the sum of the areas; determine the second distance from the neck key point to the head key point of the target object; and obtain the intensity of the action based on the sum of the areas, the area ratio, the time difference and the second distance.

[0091] In the embodiment of the present application, in order to reduce the amount of calculation, it is not necessary to calculate the area of ​​the polygon formed by the hand key points, elbow key points and shoulder key points in each first video frame. The reason is that, according to the above embodiment, when the human body punches, the user's strength is more referenced during the straightening process after the forearm and the upper arm are at right angles to each other. Therefore, the first video frame in which the forearm is perpendicular to the upper arm can be used as a video frame to start calculating the area of ​​the polygon formed by the hand key points, elbow key points and shoulder key points, that is, the video frame when the first distance is the largest. It should be noted that when the forearm and the upper arm are at right angles to each other, the area of ​​the polygon formed by the hand key points, elbow key points and shoulder key points is in a state of gradually decreasing. At this time, it is also necessary to add a negative sign to the area in the reduced state, and only the area in the video frame in which the forearm is perpendicular to the upper arm is positive. Therefore, the area and obtained are essentially performing a subtraction operation. Furthermore, when the first distance is the smallest, that is, when the arm is in the longest straight state, stop calculating the area of ​​the polygon formed by the hand key points, the elbow key points, and the shoulder key points. Since the first distance is the smallest, it is a sign that the user starts to close the fist, and the subsequent video image frames are no longer considered as punching actions, so they do not need to be considered.

[0092] At the same time, according to the above embodiment, the second distance is essentially equal to the length of the forearm. Therefore, the formula for calculating the force can be obtained by referring to the following formula ⑦:

[0093]

[0094] Among them, h rate is the ratio of the fist area to the overlapping area; d head is the second distance; d max is the maximum first distance; d min is the minimum first distance; S is the area of ​​the polygon formed by the key points of the hand, elbow and shoulder; t end is the time of the second video frame, t start is the time of the first video frame.

[0095] In order to better implement the embodiment of the present application, in one embodiment of the present application, the intensity of the action is obtained according to the area sum, area ratio, time difference, and second distance, including:

[0096] Determine whether the area ratio exceeds the preset hit determination threshold; if the area ratio exceeds the hit determination threshold, obtain the strength of the action based on the area sum, area ratio, time difference and second distance; if the area ratio does not exceed the hit determination threshold, determine that the strength of the action is zero.

[0097] According to the above embodiment, if the user fails to hit the target of the punch, it is not an effective punch even if the force is great. Therefore, there is no need to calculate the punch force. In other words, the smaller the area ratio of the fist area to the overlapping area, the smaller the force. When the area ratio of the fist area to the overlapping area is 0, the force can be obtained as 0 according to the above formula ⑦. In actual situations, in order to enable the user to hit the target as much as possible, a hit determination threshold needs to be set. Only when the area ratio of the fist area to the overlapping area is greater than the hit determination threshold, the area ratio of the fist area to the overlapping area will be recognized as an effective area ratio, otherwise it is regarded as the area ratio of the fist area to the overlapping area is 0, thereby obtaining a force measurement result of 0.

[0098] In order to better implement the motion force detection method in the embodiment of the present application, in addition to the motion force detection method, the embodiment of the present application also provides a motion force detection device, such as Figure 3 As shown, the device 300 includes:

[0099] The acquisition module 301 is used to acquire the time difference between the first video frame and the second video frame; the first video frame represents a video frame in which the target body part of the target object approaches the force acting object; the second video frame represents a video frame in which the target object begins to withdraw the target body part from the force acting object;

[0100] A determination module 302, for determining an overlapping area between a target body part and a force acting object in a first video frame;

[0101] The detection module 303 is used to obtain the strength of the action according to the time difference and the overlapping area.

[0102] The motion force detection device provided in the present application determines the time of the first video frame of the target object and the time difference between the second video frame through the acquisition module 301, and determines the two parameters of the area of ​​the target object's fist and the overlapping area of ​​the punching object through the re-determination module 302, and finally calculates the punching force of the target object through the detection module 303, thereby solving the problem of being unable to calculate the punching force in somatosensory games.

[0103] In some embodiments of the present application, the acquisition module 301 is specifically used to:

[0104] Get the current video frame;

[0105] Detecting a target body part of a target object in a current video frame to obtain a target part detection result;

[0106] If the target part detection result represents that the target part curvature of the target body part matches the preset curvature interval, then action detection is performed on the target object in the current video frame to obtain the action detection result of the target object in the current video frame;

[0107] If the motion detection result of the target object indicates that the target body part of the target object is approaching the force acting object, determining the current video frame as the first video frame;

[0108] If the motion detection result of the target object indicates that the target body part of the target object is retracted from the force acting object, the current video frame is determined to be the second video frame.

[0109] In some embodiments of the present application, the motion force detection device may further include a motion detection module 304, and the motion detection module 304 is specifically used to:

[0110] Perform key point detection on the target object to determine the hand key points, shoulder key points and elbow key points of the target object;

[0111] Determine the first distance from the hand key point to the straight line where the elbow key point and the shoulder key point are located;

[0112] According to the first distance, a motion detection result of the target object in the current video frame is obtained.

[0113] In some embodiments of the present application, the action detection module 304 is further used to:

[0114] Perform key point detection on the target object, determine the head key point and the neck key point of the target object, and obtain a second distance between the head key point and the neck key point;

[0115] If the first distance is greater than the product of the second distance and the preset bending coefficient, and the first distance is the largest compared to the first distances of other video frames, it is determined that the action of the target object is a valid reaching action; the other video frames include historical video frames before the current video frame and a next video frame adjacent to the current video frame;

[0116] If the first distance is less than the product of the second distance and the preset straightening coefficient, and the first distance is the smallest compared to the first distances of other video frames, the action of the target object is determined to be a valid retraction action.

[0117] In some embodiments of the present application, the determination module 302 is specifically used to:

[0118] Detecting a target body part of a target object in a first video frame to obtain a target part detection result;

[0119] If the target part detection result indicates that the target body part of the target object is a target shape, generating a target part mask image for the target body part of the target object;

[0120] The target body part mask image is projected onto the force acting object to obtain the overlapping area between the target body part and the force acting object in the first video frame.

[0121] In some embodiments of the present application, the motion force detection device may further include a hand detection module 305, and the hand detection module 305 is specifically used for:

[0122] Performing feature recognition on a target body part of the target object to obtain a target part region of the target object;

[0123] The area of ​​the target part region is determined, and the target part detection result of the target object is obtained according to the area of ​​the target part region.

[0124] In some embodiments of the present application, the hand detection module 305 is further used to:

[0125] Determine the minimum bounding rectangle of the target body part;

[0126] Determine the curvature of the target part of the target object according to the area of ​​the target part, the length of the minimum circumscribed rectangle, and the width of the minimum circumscribed rectangle;

[0127] The target part detection result is obtained according to the curvature of the target part and the preset curvature range.

[0128] In some embodiments of the present application, the detection module 303 is specifically used to:

[0129] determining an area ratio of an area of ​​a target body part of the target subject to an area of ​​overlap;

[0130] Determine the sum of the areas of the polygons enclosed by the hand key points, the elbow key points, and the shoulder key points in the first video frame and the second video frame to obtain a sum of the areas;

[0131] Determine a second distance from a neck key point to a head key point of the target object;

[0132] The intensity of the action is obtained based on the area sum, area ratio, time difference and the second distance.

[0133] In some embodiments of the present application, the detection module 303 is further used to:

[0134] determining whether the area ratio exceeds a preset hit determination threshold;

[0135] If the area ratio exceeds the hit determination threshold, the strength of the action is obtained based on the area sum, area ratio, time difference and second distance;

[0136] If the area ratio does not exceed the hit determination threshold, the force of the action is determined to be zero.

[0137] The present application also provides a terminal device, which includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps of any one of the motion force detection methods in the present application. The terminal device integrates any one of the motion force detection methods provided in the present application. Figure 4 As shown, it shows a schematic diagram of the structure of the terminal device involved in the embodiment of the present application, specifically:

[0138] The terminal device may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will appreciate that Figure 4 The terminal device structure shown in the figure does not constitute a limitation on the terminal device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:

[0139] The processor 401 is the control center of the terminal device, and uses various interfaces and lines to connect various parts of the entire terminal device. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 executes various functions of the terminal device and processes data, thereby monitoring the terminal device as a whole. Optionally, the processor 401 may include one or more processing cores; the processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc. Preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, the user interface and the application program, etc., and the modem processor mainly processes wireless communication. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.

[0140] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the terminal device, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.

[0141] The terminal device also includes a power supply 403 for supplying power to each component. Preferably, the power supply 403 can be logically connected to the processor 401 through a power management system, so as to manage charging, discharging, power consumption management and other functions through the power management system. The power supply 403 can also include any components such as one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, and power status indicators.

[0142] The terminal device may further include an input unit 404, which may be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.

[0143] Although not shown, the terminal device may further include a display unit, etc., which will not be described in detail herein. Specifically in this embodiment, the processor 401 in the terminal device will load the executable files corresponding to the processes of one or more application programs into the memory 402 according to the following instructions, and the processor 401 will run the application programs stored in the memory 402, thereby realizing various functions, such as:

[0144] Obtaining a time difference between a first video frame and a second video frame; the first video frame represents a video frame in which a target body part of a target object approaches a force acting object; the second video frame represents a video frame in which a target body part of a target object begins to withdraw from the force acting object;

[0145] Determine an overlapping area between the target body part and the force acting object in the first video frame;

[0146] The intensity of the action is obtained based on the time difference and the overlapping area.

[0147] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.

[0148] To this end, the embodiment of the present application provides a computer-readable storage medium, which may include: a read-only memory (ROM), a random access memory (RAM), a disk or an optical disk, etc. A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in any one of the motion force detection methods provided in the embodiment of the present application. For example, the computer program is loaded by the processor to execute the following steps:

[0149] Obtaining a time difference between a first video frame and a second video frame; the first video frame represents a video frame in which a target body part of a target object approaches a force acting object; the second video frame represents a video frame in which a target body part of a target object begins to withdraw from the force acting object;

[0150] Determine an overlapping area between the target body part and the force acting object in the first video frame;

[0151] The intensity of the action is obtained based on the time difference and the overlapping area.

[0152] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, please refer to the detailed description of other embodiments above, and will not be repeated here.

[0153] In specific implementation, the above units or structures can be implemented as independent entities, or can be arbitrarily combined to be implemented as the same or several entities. The specific implementation of the above units or structures can refer to the previous method embodiments, which will not be repeated here.

[0154] The specific implementation of the above operations can be found in the previous embodiments, which will not be described in detail here.

[0155] The above is a detailed introduction to a method and device for detecting motion force provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea. At the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

Claims

1. A method for detecting motion force, characterized in that: The method comprises: Obtaining a time difference between a first video frame and a second video frame; the first video frame represents a video frame in which a target body part of a target object approaches a force acting object; the second video frame represents a video frame in which a target body part of a target object begins to withdraw from the force acting object; Determine an overlapping area between the target body part in the first video frame and the force acting object; The strength of the action is obtained according to the time difference and the overlapping area.

2. The motion force detection method according to claim 1, characterized in that: Before obtaining the time difference between the first video frame and the second video frame, the method further includes: Get the current video frame; Detecting a target body part of the target object in the current video frame to obtain a target part detection result; If the target part detection result indicates that the target part curvature of the target body part matches a preset curvature interval, then performing motion detection on the target object in the current video frame to obtain a motion detection result of the target object in the current video frame; or If the motion detection result of the target object indicates that the target body part of the target object is approaching the force acting object, determining that the current video frame is the first video frame; or If the motion detection result of the target object indicates that the target body part of the target object is retracted from the force acting object, the current video frame is determined to be the second video frame.

3. The motion force detection method according to claim 2, characterized in that: The performing motion detection on the target object in the current video frame to obtain the motion detection result of the target object in the current video frame includes: Performing key point detection on the target object to determine the hand key points, shoulder key points and elbow key points of the target object; Determine a first distance from the hand key point to a straight line where the elbow key point and the shoulder key point are located; A motion detection result of the target object in the current video frame is obtained according to the first distance.

4. The motion force detection method according to claim 3, characterized in that: The obtaining, according to the first distance, a motion detection result of the target object in the current video frame includes: Performing key point detection on the target object, determining a head key point and a neck key point of the target object, and obtaining a second distance between the head key point and the neck key point; If the first distance is greater than the product of the second distance and a preset bending coefficient, and the first distance is the largest compared to first distances of other video frames, it is determined that the action of the target object is a valid reaching action; the other video frames include historical video frames before the current video frame and a next video frame adjacent to the current video frame; or If the first distance is smaller than the product of the second distance and a preset straightening coefficient, and the first distance is the smallest compared to the first distances of the other video frames, the action of the target object is determined to be a valid retraction action.

5. The motion force detection method according to claim 1, characterized in that: The determining of the overlapping area between the target body part in the first video frame and the force acting object comprises: Detecting a target body part of the target object in the first video frame to obtain a target part detection result; If the target part detection result indicates that the target body part of the target object is a target shape, generating a target part mask image for the target body part of the target object; The target body part mask image is projected onto the force acting object to obtain an overlapping area between the target body part and the force acting object in the first video frame.

6. The motion force detection method according to any one of claims 2 or 5, characterized in that: Detecting a target body part of the target object to obtain a target part detection result includes: Performing feature recognition on a target body part of the target object to obtain a target part region of the target object; The area of ​​the target part region is determined, and the target part detection result of the target object is obtained according to the area of ​​the target part region.

7. The motion force detection method according to claim 6, characterized in that: The determining the area of ​​the target part region and obtaining the target part detection result of the target object according to the area of ​​the target part region includes: Determining a minimum bounding rectangle of the target body part; Determining the curvature of the target part of the target object according to the area of ​​the target part region, the length of the minimum circumscribed rectangle, and the width of the minimum circumscribed rectangle; The target part detection result is obtained according to the curvature of the target part and a preset curvature interval.

8. The motion force detection method according to claim 1, characterized in that: The obtaining the intensity of the action according to the time difference and the overlapping area includes: determining an area ratio of an area of ​​a target body part of the target object to an area of ​​the overlapping area; Determine the sum of the areas of polygons enclosed by the hand key points, elbow key points, and shoulder key points in the first video frame and the second video frame to obtain a sum of areas; Determine a second distance from a neck key point to a head key point of the target object; The strength of the action is obtained according to the area sum, the area ratio, the time difference and the second distance.

9. The motion force detection method according to claim 8, characterized in that: The obtaining the intensity of the action according to the area sum, the area ratio, the time difference and the second distance comprises: determining whether the area ratio exceeds a preset hit determination threshold; If the area ratio exceeds the hit determination threshold, the strength of the action is obtained according to the area sum, the area ratio, the time difference and the second distance; or If the area ratio does not exceed the hit determination threshold, the strength of the action is determined to be zero, and the strength of the action represents the punching strength of the boxing action of the target object.

10. An action force detection device, characterized in that: The device comprises: An acquisition module is used to acquire a time difference between a first video frame and a second video frame; the first video frame represents a video frame in which a target body part of a target object approaches a force acting object; the second video frame represents a video frame in which a target object begins to withdraw the target body part from the force acting object; A determination module, used to determine an overlapping area between the target body part in the first video frame and the force acting object; The detection module is used to obtain the strength of the action according to the time difference and the overlapping area.

11. A terminal device, characterized in that: The terminal device includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor executes the computer program to implement the steps in the motion force detection method described in any one of claims 1 to 9.

12. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and the computer program is executed by a processor to implement the steps in the motion force detection method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • Video generating method and device, equipment and storage medium

    CN109621425A

  • Intersection collision prevention and warning apparatus and method

    CN109658700A

  • Boxing action recognition method and device and electronic equipment

    CN110222576A

  • Action counting method and device, electronic equipment and storage medium

    CN113469113A

  • Collision early warning method and collision early warning device

    CN113538917A