Image-based motion feature processing method, device, terminal and storage medium
Patent Information
- Application Number
- CN201910575623.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-06-28
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-06-28
Smart Images

Figure CN110298309B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to an image-based motion feature processing method, device, terminal and storage medium. Background Art
[0002] With the popularization of smart terminals (such as smartphones, tablets, etc.), various applications (applications, APPs) applied to smart terminals have emerged. On the one hand, applications installed on smart terminals can bring great convenience to people's life, study and work, such as map applications, shopping applications, etc.; on the other hand, applications installed on smart terminals can also bring people rich multimedia functions, such as music social applications, video social applications, etc. At present, in order to improve entertainment and help users better master the singing of songs, music social applications usually provide karaoke functions. However, for video social applications, PK functions are not yet available. Summary of the invention
[0003] The embodiments of the present invention provide an image-based action feature processing method, device, terminal and storage medium, which can automatically determine the similarity of actions performed by objects in different videos, so as to realize a PK function regarding actions based on the action similarity.
[0004] On the one hand, an embodiment of the present invention provides an image-based action feature processing method, the method comprising:
[0005] Obtain reference video and target video;
[0006] Acquire a set of to-be-analyzed skeleton points of an object to be analyzed in a first target image in the target video, and determine the to-be-analyzed action posture information of the object to be analyzed in the first target image according to the set of to-be-analyzed skeleton points;
[0007] Acquire a second target image in the reference video that matches the first target image, and acquire a reference skeleton point set of a reference object in the second target image, and determine reference action posture information of the reference object in the second target image according to the reference skeleton point set;
[0008] The similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video is determined according to the action posture information to be analyzed and the reference action posture information.
[0009] On the other hand, an embodiment of the present invention provides an image-based motion feature processing device, the device comprising:
[0010] An acquisition module, used for acquiring a reference video and a target video;
[0011] A first processing module is used to obtain a set of to-be-analyzed skeleton points of an object to be analyzed in a first target image in the target video, and determine the to-be-analyzed action posture information of the object to be analyzed in the first target image according to the set of to-be-analyzed skeleton points;
[0012] The first processing module is further used to obtain a second target image matching the first target image in the reference video, and obtain a reference skeleton point set of the reference object in the second target image, and determine reference action posture information of the reference object in the second target image according to the reference skeleton point set;
[0013] The second processing module is used to determine the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video according to the action posture information to be analyzed and the reference action posture information.
[0014] On the other hand, an embodiment of the present invention provides a terminal, including: a processor and a memory, the memory storing executable program code, and the processor being used to call the executable program code to execute the above-mentioned image-based motion feature processing method.
[0015] Accordingly, an embodiment of the present invention provides a storage medium, in which instructions are stored, and when the storage medium is run on a computer, the computer executes the above-mentioned image-based motion feature processing method.
[0016] The embodiment of the present invention determines the action posture information to be analyzed based on the set of skeleton points to be analyzed of the object to be analyzed in the target video, determines the reference action posture information based on the set of reference skeleton points of the reference object in the reference video, and determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video based on the action posture information to be analyzed and the reference action posture information, thereby automatically determining the similarity of actions performed by objects in different videos, so as to realize the PK function regarding actions based on action similarity. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1is a flow chart of an image-based motion feature processing method provided by an embodiment of the present invention;
[0019] Figure 2 This is a schematic diagram of an operation selection interface provided by an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of an action image provided by an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of another action image provided by an embodiment of the present invention;
[0022] Figure 5 is a schematic diagram of a comparison result display interface provided by an embodiment of the present invention;
[0023] Figure 6 is a schematic diagram of another action image provided by an embodiment of the present invention;
[0024] Figure 7 is a schematic diagram of another action image provided by an embodiment of the present invention;
[0025] Figure 8 is a flow chart of another method for processing motion features based on an image provided by an embodiment of the present invention;
[0026] Fig. 9 is a structural schematic diagram of an image-based motion feature processing device provided by an embodiment of the present invention;
[0027] Fig.10 It is a schematic diagram of the structure of a terminal provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0029] In an embodiment of the present invention, the terminal may be a smart phone (such as an Android phone, etc.), a tablet computer, a mobile Internet device (Mobile Internet Devices, MID), a computer, etc. The terminal is configured with a display device and a video shooting device, etc. The terminal first determines a reference video according to a user's selection operation for a video in a video database; and obtains a target video, which is a video obtained by shooting a process of performing an action on the object to be analyzed according to the action of the reference object in the reference video. The target video may be shot using a video shooting device configured by the terminal, or may be shot in advance using a video shooting device on other devices. Further, the terminal obtains a set of skeletal points to be analyzed of the object to be analyzed in the first target image in the target video, and determines the action posture information to be analyzed of the object to be analyzed in the first target image according to the set of skeletal points to be analyzed. Among them, the set of skeletal points to be analyzed includes a plurality of key skeletal points constituting the skeleton of the object to be analyzed; the action posture information to be analyzed is used to indicate the angle formed between a plurality of skeletal points in the set of skeletal points to be analyzed, and / or is used to indicate the orientation information of each skeletal point in the set of skeletal points to be analyzed. A second target image matching the first target image in the reference video is obtained, and a reference skeleton point set of the reference object in the second target image is obtained, and reference action posture information of the reference object in the second target image is determined according to the reference skeleton point set. The reference skeleton point set includes a plurality of key skeleton points constituting the skeleton of the reference object; the reference action posture information is used to indicate the angle formed between the plurality of skeleton points in the reference skeleton point set, and / or to indicate the orientation information of each skeleton point in the reference skeleton point set. Further, the terminal determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video according to the action posture information to be analyzed and the reference action posture information. By adopting the above method, the similarity of the actions performed by the objects in different videos can be automatically determined, so as to realize the PK function about the actions based on the action similarity, which is described in detail below.
[0030] See also Figure 1 , Figure 1 A flowchart of an image-based action feature processing method provided by an embodiment of the present invention. The image-based action feature processing method described in the embodiment of the present invention includes:
[0031] S101. The terminal obtains a reference video and a target video.
[0032] In an embodiment of the present invention, the reference video is a video in a video database, and the reference object in the reference video performs one or more actions, and the action performed by the reference object in the reference video is used as a reference action in a subsequent comparison process. The target video is a video obtained by shooting the process of performing an action according to the action of the reference object in the reference video, and the action performed by the object to be analyzed in the target video is used as the action to be analyzed for comparison with the reference action in the subsequent comparison process. The reference object in the reference video can be one or more, and the object to be analyzed in the target video can also be one or more. Among them, the action performed by the reference object in the reference video and the action performed by the object to be analyzed in the target video can be a dance action. In another embodiment, the action performed by the reference object in the reference video and the action performed by the object to be analyzed in the target video can be an action to perform a certain sport, such as martial arts action, gymnastics action, diving action, football action, basketball action, etc. It should be noted that the action performed by the reference object in the reference video and the action performed by the object to be analyzed in the target video can also be a series of standard or non-standard actions of other types.
[0033] In one embodiment, after the terminal determines a reference video from the videos in the video database according to the user's selection operation, it plays the reference video on its video playback interface. During the process of playing the reference video, if the terminal detects a trigger operation on its video playback interface, it outputs an operation selection interface; the operation selection interface includes a learning option and a challenge option, and the trigger operation can be a single click, multiple clicks, or a long press operation.
[0034] Furthermore, if the terminal detects a selection instruction input for the challenge option in the operation selection interface, the configured video shooting device is started, and the shooting application interface associated with the video shooting device is jumped to; then the video shooting device is controlled to shoot the process of the object to be analyzed performing an action according to the action of the reference object in the reference video, and the target video is obtained. Among them, in the process of controlling the video shooting device to shoot the target video, the terminal plays the reference video and the video shot by the video shooting device in the shooting application interface. By playing the reference video in the shooting application interface, the object to be analyzed can be informed in time of the action it needs to perform currently or next, thereby reducing the mistakes in the action of the object to be analyzed. By playing the video shot by the video shooting device in the shooting application interface, the object to be analyzed can be informed in time whether the action it performs is in place. It should be noted that the shooting device can be preset in the terminal itself or external to the terminal.
[0035] In another embodiment, if the terminal detects a selection instruction input for the challenge option in the operation selection interface, it jumps to the video selection interface so that the user can select and upload a pre-recorded target video. In another embodiment, if the terminal detects a selection instruction input for the learning option in the operation selection interface, it slows down the reference video at a preset multiple in the video playback interface so that the object to be analyzed can better learn the actions performed by the reference object in the reference video.
[0036] S102: The terminal obtains a set of skeleton points to be analyzed of an object to be analyzed in a first target image in the target video, and determines action posture information to be analyzed of the object to be analyzed in the first target image according to the set of skeleton points to be analyzed.
[0037] In an embodiment of the present invention, the first target image may be any image in the target video, and the first target image may also be any image in a target image set determined by the terminal from the target video, and the target image set is composed of at least one image selected by the terminal for at least one action performed by the object to be analyzed in the target video. The first target image may also refer to any image in the target video that meets a preset condition. Meeting the preset condition may mean that the action performed by the object to be analyzed in the first target image is the action when the object to be analyzed completes a certain action, rather than the action during the process of the object to be analyzed performing a certain action. Whether the first target image meets the preset condition can be judged based on the actions performed by the object to be analyzed in multiple images adjacent to the first target image.
[0038] After the terminal determines each first target image in the target video, it obtains a set of skeletal points to be analyzed of the object to be analyzed in each first target image, wherein the set of skeletal points to be analyzed includes a plurality of key skeletal points constituting the skeleton of the object to be analyzed; then, the action posture information to be analyzed of the object to be analyzed in each first target image is determined based on the set of skeletal points to be analyzed, and specifically, the action posture information to be analyzed of the object to be analyzed in the first target image can be determined based on the position information of each skeletal point in the set of skeletal points to be analyzed in the first target image. The action posture information to be analyzed is used to indicate the angle formed between multiple skeletal points in the set of skeletal points to be analyzed, and / or to indicate the orientation information of each skeletal point in the set of skeletal points to be analyzed; the orientation information can be used to indicate the position information of the skeletal point in the image and the direction information relative to other skeletal points of the object to be analyzed.
[0039] S103, the terminal obtains a second target image in the reference video that matches the first target image, and obtains a reference skeleton point set of the reference object in the second target image, and determines reference motion posture information of the reference object in the second target image according to the reference skeleton point set.
[0040] In an embodiment of the present invention, the second target image matches the first target image, which may mean that the action performed by the reference object in the second target image matches the action performed by the object to be analyzed in the first target image, and the action matching may mean that the actions are relatively similar. The second target image may be any one of the multiple images in which the action performed by the reference object in the reference video and the action performed by the object to be analyzed in the first target image have a high similarity. The second target image may also be an image that satisfies a preset condition among the multiple images in which the action performed by the reference object in the reference video and the action performed by the object to be analyzed in the first target image have a high similarity. Satisfying the preset condition may mean that the action performed by the reference object in the second target image is the action performed when the reference object completes the action performed by the object to be analyzed in the first target image, rather than the action performed by the object to be analyzed in the process of performing the action performed by the object to be analyzed in the first target image. In another embodiment, the terminal calibrates the reference video and the target video so that the action performed by the reference object in the calibrated reference video and the action performed by the object to be analyzed in the calibrated target video have good synchronization in the corresponding images at the same playback time point. At this time, the second target image matches the first target image, which means that the playback time point corresponding to the second target image in the calibrated reference video is consistent with the playback time point corresponding to the first target image in the calibrated target video. The terminal may calibrate the reference video and the target video automatically, or may calibrate the reference video and the target video according to a user's operation instruction.
[0041] After the terminal obtains each second target image that matches the first target image from the reference video, it obtains the reference bone point set of the reference object in each second target image, and the reference bone point set includes multiple key bone points that constitute the skeleton of the reference object; then, the reference action posture information of the reference object in each second target image is determined based on the reference bone point set, and specifically, the action posture information to be analyzed of the reference object in the second target image can be determined based on the position information of each bone point in the reference bone point set in the second target image. Among them, the reference action posture information is used to indicate the angle formed between multiple bone points in the reference bone point set, and / or to indicate the orientation information of each bone point in the reference bone point set; the orientation information can be used to indicate the position information of the bone point in the image and the direction information relative to other bone points of the reference object.
[0042] S104: The terminal determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video according to the action posture information to be analyzed and the reference action posture information.
[0043] In an embodiment of the present invention, the terminal compares the action posture information to be analyzed of the object to be analyzed in each first target image with the reference action posture information of the reference object in the corresponding second target image, and obtains the target similarity between the action posture indicated by the action posture information to be analyzed of each first target image and the action posture indicated by the reference action posture information of the corresponding second target image. Further, the terminal determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video based on the multiple target similarities obtained by comparison. In one embodiment, the terminal may use the average value of the multiple target similarities obtained by comparison as the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video.
[0044] In one embodiment, after the terminal determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video, the terminal calculates the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video according to the similarity. Specifically, the terminal determines the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video according to the mapping relationship between the similarity and the score. Among them, in the mapping relationship, one similarity may correspond to one score, for example, the score corresponding to 90% of the similarity is 90 points; in the mapping relationship, each similarity interval may correspond to one score, for example, the score corresponding to the similarity interval (85%, 90%] is 90 points. Further, the terminal displays the above score in the first display area of its comparison result display interface, so that the terminal user can intuitively understand the action PK result and the gap with the reference object. By using the image-based action feature processing method in the embodiment of the present invention, not only can the similarity of the actions performed by the objects in different videos be automatically determined, but also the PK function of the action can be realized based on the action similarity.
[0045] In another embodiment, the terminal obtains the degree of completion of the action performed by the object to be analyzed in the target video relative to the action performed by the reference object in the reference video. The degree of completion may refer to the ratio of the number of actions completed by the object to be analyzed in the target video to the total number of actions performed by the reference object in the reference video. Further, the terminal calculates the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video based on the above similarity and the above degree of completion. It may be that a first score is first determined based on the similarity, and then the first score is multiplied by the degree of completion to obtain the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video. Further, the terminal displays the above score in the first display area of its comparison result display interface, so that the terminal user can intuitively understand the action PK result.
[0046] In one embodiment, the comparison result display interface includes a second display area and a third display area in addition to the first display area. The terminal displays the score in the first display area of the comparison result display interface, plays the reference video in the second display area of the comparison result display interface, and plays the target video in the third display area of the comparison result display interface. Alternatively, the terminal displays the score in the first display area of the comparison result display interface, displays a thumbnail of the reference video in the second display area of the comparison result display interface, and displays a thumbnail of the target video in the third display area of the comparison result display interface. The thumbnail can be an image in the video or a dynamic image of the video.
[0047] In another embodiment, the terminal obtains a first image set in a target video and a second image set in a reference video, wherein the similarity between the action performed by the object to be analyzed in the image in the first image set and the action performed by the reference object in the corresponding image in the second image set is less than a similarity threshold. The similarity threshold is, for example, 50%. Then, the images in the second image set are displayed in a second display area in the comparison result display interface, and the images in the first image set that match the images displayed in the second display area are displayed in a third display area in the comparison result display interface, so as to prompt the user and the object to be analyzed which actions need to be improved.
[0048] To better understand the image-based motion feature processing method provided by the embodiment of the present invention, the following is an example with reference to the accompanying drawings. The terminal first determines the reference video according to the user's selection operation on the video in the video database. Then, during the process of playing the reference video on the video playback interface, if the terminal detects a double-click operation on the video playback interface, it outputs the following Figure 2 The operation selection interface 201 shown in the figure includes a learning option and a challenge option. If the terminal detects a selection instruction input for the learning option, the reference video is played slowly at 0.2 times the normal playback speed in its video playback interface, so that the object to be analyzed can learn the action performed by the reference object in the reference video. If the terminal detects a selection instruction input for the challenge option, the video shooting device configured therein is controlled to shoot the process of the object to be analyzed performing an action according to the action of the reference object in the reference video, and obtain a target video.
[0049] Further, after the terminal obtains the reference video and the target video, it obtains the set of skeleton points to be analyzed of the object to be analyzed of the first target image in the target video. Figure 3 , Figure 3 A schematic diagram of an action image provided by an embodiment of the present invention, assuming Figure 3The image shown is the first target image in the target video. Figure 3 The object to be analyzed in the image shown is subjected to bone point detection, and it can be detected that the bone point set to be analyzed of the object to be analyzed includes 14 bone points 301 to 314, and the 14 bone points 301 to 314 constitute the skeleton of the object to be analyzed, and each bone point corresponds to a joint of the object to be analyzed, for example, bone point 303 is the bone point corresponding to the right shoulder joint, 306 is the bone point corresponding to the left shoulder joint, 307 is the bone point corresponding to the left elbow joint, 308 is the bone point corresponding to the left wrist joint, 309 is the bone point corresponding to the left hip joint, 313 is the bone point corresponding to the right knee joint, and 314 is the bone point corresponding to the ankle joint. It should be noted that due to Figure 3 In the image shown, the skeleton point 303 is covered, and the position of the skeleton point 306 in the image can be estimated. Further, according to the position of each of the 14 skeleton points in the image, the angle formed between the 14 skeleton points is determined. Figure 3 The connection relationship between the skeleton points shown, the angles formed between the skeleton points include the angle formed by skeleton points 301, 302 and 303, the angle formed by skeleton points 302, 306, 307, the angle formed by skeleton points 303, 304 and 305, the angle formed by skeleton points 302, 309 and 310, the angle formed by skeleton points 312, 313 and 314, etc.
[0050] Further, the terminal obtains a second target image matching the first target image in the reference video, and obtains a reference skeleton point set of the reference object in the second target image; please refer to Figure 4 , Figure 4 A schematic diagram of another action image provided by an embodiment of the present invention, assuming Figure 4 The images shown are from the reference video and will be Figure 4 and Figure 3 By comparison, we can find Figure 4 The action performed by the reference object in the image is the same as Figure 3 If the actions performed by the objects to be analyzed in the images are very similar, then Figure 4 The images shown are used as reference in the video Figure 3 The first target image is matched to the second target image. Figure 4When the reference object in the image is subjected to bone point detection, it can be detected that the set of bone points to be analyzed of the reference object includes 14 bone points 401 to 414, which constitute the skeleton of the reference object. Each bone point corresponds to a joint of the reference object, for example, 405 is the bone point corresponding to the right wrist joint, 409 is the bone point corresponding to the left hip joint, and 413 is the bone point corresponding to the right knee joint. Furthermore, according to the positions of each of the 14 bone points in the image, the angles formed between the 14 bone points are determined. Among them, Figure 4 The connection relationship between the bone points shown is Figure 3 The connection relationships between the bone points shown are consistent. For example, the bone points corresponding to the left elbow joint are connected to the bone points corresponding to the left shoulder joint and the bone points corresponding to the left wrist joint, and the bone points corresponding to the right knee joint are connected to the bone points corresponding to the right hip joint and the bone points corresponding to the right ankle joint. Figure 4 The connection relationship between the skeleton points shown, the angles formed between the skeleton points include the angles formed by the skeleton points 412, 413 and 414, etc. Figure 4 The angle C formed by the mid-skeletal points 412, 413 and 414 is Figure 3 The angle A formed by the mid-skeletal points 312, 313 and 314 corresponds to, Figure 4 The angle D formed by the mid-skeletal points 402, 412 and 413 is Figure 3 The angle B formed by the mid-skeletal points 302, 312 and 313 corresponds; Figure 3 and Figure 4 The corresponding relationship between other angles in the figure is similar and will not be elaborated here.
[0051] Furthermore, the terminal will Figure 3 The angle formed between the mid-bone points, and Figure 4 Compare the corresponding angles formed between the mid-bone points to get Figure 3 The angles formed between the mid-bone points are Figure 4 The deviation ratio between the corresponding angles formed between the mid-bone points. For example, according to the formula |∠A-∠C| / ∠C, we get Figure 3 The angle formed by the mid-bone points 312, 313 and 314 is Figure 4 The deviation ratio between the angles formed by the middle skeleton points 412, 413 and 414. Figure 3 The angles formed between the mid-bone points are Figure 4 The deviation ratio between the corresponding angles formed between the mid-bone points is obtained Figure 3 The action posture of the object to be analyzed in the image shown is Figure 4 The target similarity between the action poses of the reference objects in the shown images. For example, calculate Figure 3The angles formed between the mid-bone points are Figure 4 The mean of the deviation ratios between the corresponding angles formed between the skeleton points is used to determine the target similarity between the action postures in the image. Assuming that the mean is 10%, it can be determined Figure 3 The action posture of the object to be analyzed in the image shown is Figure 4 The target similarity between the action postures of the reference objects in the image shown is 90%. Further, after the terminal uses the above method to determine the target similarity between the action posture of the object to be analyzed in each first target image in the target image and the action posture of the reference object in the corresponding second target image in the reference video, the average value of the obtained multiple target similarities is used as the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video.
[0052] In one embodiment, after the terminal determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video, it can further determine the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video based on the similarity. For example, assuming that the similarity is 90%, it can be determined that the score is 90 points. Further, the terminal can display the above score in the first display area of its comparison result display interface, play the reference video or display a thumbnail of the reference video in the second display area of its comparison result display interface, and play the target video or display a thumbnail of the target video in the third display area of its comparison result display interface.
[0053] In another embodiment, the terminal obtains a first image set in the target video and a second image set in the reference video, wherein the similarity between the action performed by the object to be analyzed in the image in the first image set and the action performed by the reference object in the corresponding image in the second image set is less than a similarity threshold. Figure 3 and Figure 4 It can be seen that Figure 3 The angle B formed by the mid-bone points 302, 312 and 313 and Figure 4 There is a significant deviation between the angles D formed by the mid-skeletal points 402, 412 and 413. Figure 3 The angle A formed by the mid-skeletal points 312, 313 and 314 and Figure 4 There is also a significant deviation between the angles C formed by the mid-skeletal points 412, 413 and 414. Figure 3 The actions performed by the object to be analyzed in the image are Figure 4 If the similarity between the actions performed by the reference object in the image is less than the similarity threshold, Figure 3 The image shown is taken as an image in the first image set. Figure 4 The images shown are used as images in the second image set. Further, after determining the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video, the terminal displays the comparison result in its comparison result display interface.
[0054] Please also see Figure 5 , Figure 5 Schematic diagram of a comparison result display interface provided by an embodiment of the present invention. Figure 5 As shown, the comparison result display interface 500 includes a first display area 501, a second display area 502 and a third display area 503. The terminal can display the above score in the first display area 501, and can display the images in the second image set in the second display area 502. The images displayed in the second display area 502 are Figure 4 The image shown in the figure is taken as an example; an image in the first image set that matches the image displayed in the second display area can be displayed in the third display area 503, when the image displayed in the second display area 502 is Figure 4 When the image shown is displayed, it is displayed in the third display area 503 Figure 3 When the first set and the second set include multiple images respectively, the multiple images in the first set and the second set can be scrolled and displayed in the second display area 502 and the third display area 503 respectively. In the above manner, the user and the object to be analyzed can be prompted which actions need to be improved, and a relatively standard action of the reference object in the reference video can be given.
[0055] In another embodiment, please refer to Figure 6 and Figure 7 , Figure 6 and Figure 7 Schematic diagram of two action images provided by the embodiment of the present invention. Figure 6 The image shown is the first target image in the target video. Figure 7 The images shown are from the reference video. Figure 6 The first target image is matched with the second target image. As shown in the figure, Figure 6 The image shown includes three objects to be analyzed, 601, 602 and 603; Figure 7 The image shown includes three reference objects 701, 702 and 703. Figure 6 The image shown is tested for C (Center) position, and then the C position test result is used to determine Figure 6 The position of each object to be analyzed in the image shown is relative to the position C where the object to be analyzed is located. Figure 6From the position shown, it can be determined that the object to be analyzed 601 is located at the C position, the object to be analyzed 602 is located at the left rear side of the C position, and the object to be analyzed 603 is located at the right rear side of the C position. Figure 7 From the standing positions shown, it can be determined that reference object 701 is located at the C position, reference object 702 is located at the left rear side of the C position, and reference object 703 is located at the right rear side of the C position.
[0056] Furthermore, the terminals will Figure 6 The images shown and Figure 7 The action postures of the objects in the same position in the images are compared to obtain multiple reference similarities. Figure 6 The action posture of the object 601 to be analyzed in the image is Figure 7 The action posture of the reference object 701 in the image is compared to obtain a first reference similarity; Figure 6 The action posture of the object 602 to be analyzed in the image is Figure 7 The action posture of the reference object 702 in the image is compared to obtain a second reference similarity; Figure 6 The action posture of the object 603 to be analyzed in the image is Figure 7 The motion posture of the reference object 703 in the image is compared to obtain a third reference similarity. The method of calculating the similarity between the motion posture of each object to be analyzed in the image and the motion posture of the corresponding reference object can be referred to the above description, which will not be repeated here.
[0057] Furthermore, the terminal calculates the multiple reference similarities obtained by comparison. Figure 6 The action posture of the object to be analyzed in the image is Figure 7 The target similarity between the action postures of the reference objects in the image shown. For example, the average of the first reference similarity, the second reference similarity and the third reference similarity is taken as Figure 6 The action posture of the object to be analyzed in the image is Figure 7 The target similarity between the action postures of the reference objects in the image shown. It should be noted that the corresponding similarities can also be weighted according to the position of the object and then the average can be calculated. For example, if the first reference similarity is the similarity between the action postures of the C-position object in the image, the first similarity can be multiplied by the weight 1.1 and then the average can be calculated. Furthermore, after the terminal uses the above method to respectively determine the target similarity between the action posture of the object to be analyzed in each first target image in the target video and the action posture of the reference object in the corresponding second target image in the reference video, the average value of the multiple target similarities obtained is used as the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video.
[0058] In another embodiment, please refer to Figure 8 , Figure 8 A flowchart of another method for processing motion features based on an image provided by an embodiment of the present invention is shown below. Figure 8 As shown, the method includes the following steps: the terminal first obtains a reference video and a target video, and then performs real-time multi-person posture estimation based on a convolutional neural network (CNN) for multiple first image frames in the target video to obtain the skeleton of each object to be analyzed in each first image frame; and performs real-time multi-person posture estimation based on a convolutional neural network (CNN) for multiple second image frames in the reference video to obtain the skeleton of each reference object in each second image frame. The main method of multi-person posture estimation is: obtaining the position information of all bone points in the image, then obtaining the connection relationship between all bone points in the image, and using the minimum spanning tree method to obtain the skeleton of each object in the image.
[0059] Further, the terminal performs center position detection and center position tracking based on the position of the skeleton point of the object to be analyzed in the target video, so as to determine the positional relationship between each object to be analyzed in each frame of the first image based on the center position detection and center position tracking results; performs center position detection and center position tracking based on the position information of the skeleton point of the reference object in the reference video, so as to determine the positional relationship between each reference object in each frame of the second image based on the center position detection and center position tracking results. Among them, the main method of center position detection and tracking is: input the posture information of each object in the image frame, the posture information may include position information and scale information, calculate the position of the object closest to the center as the initial C position; and input the position information and scale information of the object in the previous frame of the image frame, as well as the position model and scale model; obtain the estimated target position and scale, and the updated position model and scale model. Among them, the position evaluation may refer to: referring to the position of the object in the previous frame, extracting a sample in the current frame according to the preset multiple (for example, 2 times) of the scale of the object in the previous frame; and then calculating the new position of the object based on the extracted sample. Scale evaluation may refer to: extracting a preset number (e.g., 33) of samples of different scales with the current new position of the object as the center, and then calculating the accurate scale of the object based on the extracted samples. The scale may refer to the scale of the action performed by the object. Model updating refers to: updating the position model and the scale model based on the above extracted samples.
[0060] Furthermore, the terminal performs angle feature extraction for each object to be analyzed in each frame of the first image, and performs angle feature extraction for each reference object in each frame of the second image. The angle feature can be used to indicate the angle information formed between multiple skeletal points of the object. Furthermore, the terminal performs image frame calculation to determine the first target image from the target video, and determines the second target image matching the first target image from the reference video. The method for determining the first target image and the second target image can refer to the previous description and will not be repeated here. Among them, the terminal can also complete the completion calculation while performing image frame calculation. The terminal compares the action performed by the object to be analyzed in each frame of the first image in the target video with the action performed by the reference object in each frame of the second image in the reference video, and obtains the completion of the action performed by the object to be analyzed in the target video relative to the action performed by the reference object in the reference video. Further, the terminal performs similarity calculation, the terminal compares the angle features of the object to be analyzed corresponding to the first target image with the angle features of the reference object corresponding to the second target image, obtains the similarity between the action performed by the object to be analyzed in the first target image and the action performed by the reference object in the second target image, and then determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video based on the similarity between the action performed by the object to be analyzed in each frame of the first target image in the target video and the action performed by the reference object in the corresponding second target image. Finally, the terminal calculates the score result, based on the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video obtained by the similarity calculation, and the completion of the action performed by the object to be analyzed in the target video relative to the action performed by the reference object in the reference video obtained by the completion calculation, to determine the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video. The specific calculation method can be referred to the previous description, which will not be repeated here.
[0061] The embodiment of the present invention determines the action posture information to be analyzed based on the set of skeleton points to be analyzed of the object to be analyzed in the target video, determines the reference action posture information based on the set of reference skeleton points of the reference object in the reference video, and determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video based on the action posture information to be analyzed and the reference action posture information, thereby automatically determining the similarity of actions performed by objects in different videos, so as to realize the PK function regarding actions based on action similarity.
[0062] See also Fig. 9 , Fig. 9A schematic diagram of the structure of an image-based motion feature processing device provided in an embodiment of the present invention. The image-based motion feature processing device described in the embodiment of the present invention corresponds to the terminal described above, and the device includes:
[0063] An acquisition module 901 is used to acquire a reference video and a target video;
[0064] A first processing module 902 is used to obtain a set of skeleton points to be analyzed of an object to be analyzed in a first target image in the target video, and determine the action posture information to be analyzed of the object to be analyzed in the first target image according to the set of skeleton points to be analyzed;
[0065] The first processing module 902 is further configured to obtain a second target image in the reference video that matches the first target image, and obtain a reference skeleton point set of a reference object in the second target image, and determine reference action posture information of the reference object in the second target image according to the reference skeleton point set;
[0066] The second processing module 903 is used to determine the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video according to the action posture information to be analyzed and the reference action posture information.
[0067] In one embodiment, the action posture information to be analyzed is used to indicate the angle formed between multiple bone points in the bone point set to be analyzed, and / or the orientation of each bone point in the bone point set to be analyzed, and the reference action posture information is used to indicate the angle formed between multiple bone points in the reference bone point set, and / or the orientation of each bone point in the reference bone point set.
[0068] In one embodiment, the second processing module 903 is further configured to calculate a score between an action performed by the object to be analyzed in the target video and an action performed by the reference object in the reference video according to the similarity;
[0069] The device further includes a display module 904, configured to display the score in a first display area of the comparison result display interface.
[0070] In one embodiment, the acquisition module 901 is further used to acquire the degree of completion of the action performed by the object to be analyzed in the target video relative to the action performed by the reference object in the reference video;
[0071] The second processing module 903 is further used to calculate the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video according to the similarity and the completion degree;
[0072] The display module 904 is further configured to display the score in the first display area of the comparison result display interface.
[0073] In one embodiment, the comparison result display interface further includes a second display area and a third display area, and the display module 904 is further used to:
[0074] The reference video is played in the second display area, and the target video is played in the third display area; or, a thumbnail of the reference video is displayed in the second display area, and a thumbnail of the target video is displayed in the third display area.
[0075] In one embodiment, the comparison result display interface further includes a second display area and a third display area, and the acquisition module 901 is further used to acquire a first image set in the target video and a second image set in the reference video, wherein the similarity between the action performed by the object to be analyzed in the image in the first image set and the action performed by the reference object in the corresponding image in the second image set is less than a similarity threshold;
[0076] The display module 904 is further configured to display images in the second image set in the second display area, and to display images in the first image set that match the images displayed in the second display area in the third display area.
[0077] In one embodiment, the second processing module 903 is further configured to trigger the display module 904 to output an operation selection interface if a trigger operation for the video playback interface is detected during the process of playing the reference video on the video playback interface;
[0078] The second processing module 903 is further used to trigger the display module 904 to slow down the reference video at a preset multiple in the video playback interface if a selection instruction input for the learning option in the operation selection interface is detected.
[0079] In one embodiment, the second processing module 903 is further configured to:
[0080] If a selection instruction input for the challenge option in the operation selection interface is detected, the video shooting device is started and jumps to the shooting application interface associated with the video shooting device; the video shooting device is controlled to shoot the process of performing actions on the object to be analyzed according to the actions of the reference object in the reference video to obtain a target video; wherein, during the process of shooting the target video, the reference video and the video shot by the video shooting device are played in the shooting application interface.
[0081] It can be understood that the functions of each functional unit of the image-based motion feature processing device of the embodiment of the present invention can be specifically implemented according to the method in the above-mentioned method embodiment, and its specific implementation process can refer to the relevant description of the above-mentioned method embodiment, which will not be repeated here.
[0082] The embodiment of the present invention determines the action posture information to be analyzed based on the set of skeleton points to be analyzed of the object to be analyzed in the target video, determines the reference action posture information based on the set of reference skeleton points of the reference object in the reference video, and determines the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video based on the action posture information to be analyzed and the reference action posture information, thereby automatically determining the similarity of actions performed by objects in different videos, so as to realize the PK function regarding actions based on action similarity.
[0083] See also Fig.10 , Fig.10 A schematic diagram of the structure of a terminal provided in an embodiment of the present invention. The terminal described in the embodiment of the present invention includes: a processor 1001, a user interface 1002, a communication interface 1003 and a memory 1004. The processor 1001, the user interface 1002, the communication interface 1003 and the memory 1004 can be connected via a bus or other means, and the embodiment of the present invention takes the connection via a bus as an example.
[0084] Among them, the processor 1001 (or CPU (Central Processing Unit)) is the computing core and control core of the terminal, which can parse various instructions in the terminal and process various data of the terminal. For example, the CPU can be used to parse the power on and off instructions sent by the user to the terminal and control the terminal to perform power on and off operations; for another example, the CPU can transmit various interactive data between the internal structures of the terminal, etc. The user interface 1002 is a medium for realizing interaction and information exchange between the user and the terminal. Its specific embodiment can include a display screen (Display) for output, a touch screen for input or output, a camera for input, and a keyboard (Keyboard) for input, etc. It should be noted that the keyboard here can be a physical keyboard, a touch screen virtual keyboard, or a keyboard that combines a physical and a touch screen virtual keyboard. The communication interface 1003 can optionally include a standard wired interface, a wireless interface (such as Wi-Fi, a mobile communication interface, etc.), which is controlled by the processor 1001 for sending and receiving data. The memory 1004 (Memory) is a memory device in the terminal for storing programs and data. It is understandable that the memory 1004 here may include the built-in memory of the terminal, and of course may also include the extended memory supported by the terminal. The memory 1004 provides a storage space, which stores the operating system of the terminal, including but not limited to: Android system, iOS system, Windows Phone system, etc., and the present invention is not limited to this.
[0085] In the embodiment of the present invention, the processor 1001 performs the following operations by running the executable program code in the memory 1004:
[0086] Acquire a reference video and a target video; acquire a set of to-be-analyzed skeleton points of an object to be analyzed in a first target image in the target video, and determine the to-be-analyzed action posture information of the object to be analyzed in the first target image based on the set of to-be-analyzed skeleton points; acquire a second target image matching the first target image in the reference video, and acquire a set of reference skeleton points of a reference object in the second target image, and determine the reference action posture information of the reference object in the second target image based on the set of reference skeleton points; determine the similarity between an action performed by the object to be analyzed in the target video and an action performed by the reference object in the reference video based on the action posture information to be analyzed and the reference action posture information.
[0087] In one embodiment, the action posture information to be analyzed is used to indicate the angle formed between multiple bone points in the bone point set to be analyzed, and / or the orientation of each bone point in the bone point set to be analyzed, and the reference action posture information is used to indicate the angle formed between multiple bone points in the reference bone point set, and / or the orientation of each bone point in the reference bone point set.
[0088] In one embodiment, the processor 1001 is further used to: calculate a score between an action performed by the object to be analyzed in the target video and an action performed by the reference object in the reference video based on the similarity; and display the score in a first display area in a comparison result display interface through the user interface 1002.
[0089] In one embodiment, the processor 1001 is also used to: obtain the degree of completion of the action performed by the object to be analyzed in the target video relative to the action performed by the reference object in the reference video; calculate the score between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video based on the similarity and the degree of completion; and display the score in the first display area in the comparison result display interface through the user interface 1002.
[0090] In one embodiment, the comparison result display interface further includes a second display area and a third display area, and the processor 1001 is further configured to:
[0091] The reference video is played in the second display area through the user interface 1002, and the target video is played in the third display area; or, a thumbnail of the reference video is displayed in the second display area through the user interface 1002, and a thumbnail of the target video is displayed in the third display area.
[0092] In one embodiment, the comparison result display interface also includes a second display area and a third display area, and the processor 1001 is also used to: obtain a first image set in the target video and a second image set in the reference video, wherein the similarity between the action performed by the object to be analyzed in the image in the first image set and the action performed by the reference object in the corresponding image in the second image set is less than a similarity threshold; display the images in the second image set in the second display area through the user interface 1002, and display the images in the first image set that match the images displayed in the second display area in the third display area.
[0093] In one embodiment, before the processor 1001 obtains the reference video and the target video, the processor 1001 is also used to: during the process of playing the reference video on the video playback interface, if a trigger operation for the video playback interface is detected, an operation selection interface is output through the user interface 1002; if a selection instruction input for the learning option in the operation selection interface is detected, the reference video is slowed down in the video playback interface according to a preset multiple through the user interface 1002.
[0094] In one embodiment, the processor 1001 is also used to: if a selection instruction input for the challenge option in the operation selection interface is detected, start the video shooting device and jump to the shooting application interface associated with the video shooting device; control the video shooting device to shoot the process of performing an action on the object to be analyzed according to the action of the reference object in the reference video, and obtain a target video; wherein, in the process of shooting the target video, the reference video and the video shot by the video shooting device are played in the shooting application interface through the user interface 1002.
[0095] In a specific implementation, the processor 1001, user interface 1002, communication interface 1003 and memory 1004 described in the embodiment of the present invention can execute the implementation method of the terminal described in an image-based action feature processing method provided in an embodiment of the present invention, and can also execute the implementation method described in an image-based action feature processing device provided in an embodiment of the present invention, which will not be repeated here.
[0096] The embodiment of the present invention further provides a computer-readable storage medium, in which instructions are stored. When the computer-readable storage medium is run on a computer, the computer executes the image-based motion feature processing method as described in the embodiment of the present invention.
[0097] The embodiment of the present invention further provides a computer program product comprising instructions, which, when executed on a computer, enables the computer to execute the image-based motion feature processing method as described in the embodiment of the present invention.
[0098] It should be noted that, for the above-mentioned various method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should know that the present invention is not limited by the described order of actions, because according to the present invention, some steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also know that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0099] A person skilled in the art may understand that all or part of the steps in the various methods of the above embodiments may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the storage medium may include: a flash drive, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0100] The above disclosure is only part of the embodiments of the present invention, which certainly cannot be used to limit the scope of the present invention. Therefore, equivalent changes made according to the claims of the present invention are still within the scope of the present invention.
Claims
1. A method for processing motion features based on an image, characterized in that: The method comprises: Obtain reference video and target video; A set of skeletal points to be analyzed of an object to be analyzed in a first target image in the target video is obtained, and according to the position information of each skeletal point in the set of skeletal points to be analyzed in the first target image, the action posture information to be analyzed of the object to be analyzed in the first target image is determined; the set of skeletal points to be analyzed includes a plurality of key skeletal points constituting the skeleton of the object to be analyzed; the action performed by the object to be analyzed in the first target image is the action performed when the object to be analyzed completes the target action; the action posture information to be analyzed is used to indicate one or more of the following information: a plurality of first angles formed between a plurality of skeletal points in the set of skeletal points to be analyzed, a first orientation of each skeletal point in the set of skeletal points to be analyzed; one or more of the plurality of first angles and the first orientation of each skeletal point are used to indicate the postures of a plurality of key body parts of the object to be analyzed; Acquire a second target image in the reference video that matches the first target image, and acquire a reference bone point set of a reference object in the second target image, and determine reference motion posture information of the reference object in the second target image according to position information of each bone point in the reference bone point set in the second target image; the reference bone point set includes a plurality of key bone points constituting a skeleton of the reference object; the reference motion posture information is used to indicate one or more of the following information: a plurality of second angles formed between a plurality of bone points in the reference bone point set, a second orientation of each bone point in the reference bone point set; one or more of the plurality of second angles and the second orientation of each bone point is used to indicate the posture of a plurality of key body parts of the reference object; The similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video is determined according to the action posture information to be analyzed and the reference action posture information.
2. The method according to claim 1, characterized in that The method further comprises: Calculating a score between an action performed by the object to be analyzed in the target video and an action performed by the reference object in the reference video according to the similarity; The score is displayed in a first display area in the comparison result display interface.
3. The method according to claim 1, characterized in that The method further comprises: Obtaining the degree of completion of the action performed by the object to be analyzed in the target video relative to the action performed by the reference object in the reference video; Calculating a score between an action performed by the object to be analyzed in the target video and an action performed by the reference object in the reference video according to the similarity and the completion degree; The score is displayed in a first display area in the comparison result display interface.
4. The method according to claim 2 or 3, characterized in that The comparison result display interface further includes a second display area and a third display area, and the method further includes: Playing the reference video in the second display area, and playing the target video in the third display area; Alternatively, a thumbnail of the reference video is displayed in the second display area, and a thumbnail of the target video is displayed in the third display area.
5. The method according to claim 2 or 3, characterized in that: The comparison result display interface further includes a second display area and a third display area, and the method further includes: Acquire a first image set in the target video and a second image set in the reference video, wherein a similarity between an action performed by an object to be analyzed in an image in the first image set and an action performed by a reference object in a corresponding image in the second image set is less than a similarity threshold; The images in the second image set are displayed in the second display area, and the images in the first image set that match the images displayed in the second display area are displayed in the third display area.
6. The method according to any one of claims 1 to 3, characterized in that Before obtaining the reference video and the target video, the method further includes: During the process of playing the reference video on the video playback interface, if a trigger operation on the video playback interface is detected, an operation selection interface is output; If a selection instruction input for the learning option in the operation selection interface is detected, the reference video is played slowly in the video playback interface according to a preset multiple.
7. The method according to claim 6, characterized in that The method further comprises: If a selection instruction input for the challenge option in the operation selection interface is detected, a video shooting device is started and the video shooting application interface associated with the video shooting device is jumped to; Controlling the video shooting device to shoot a process in which the object to be analyzed performs an action according to an action of the reference object in the reference video, to obtain a target video; Wherein, during the process of shooting the target video, the reference video and the video shot by the video shooting device are played in the shooting application interface.
8. An image-based motion feature processing device, characterized in that: The device comprises: An acquisition module, used for acquiring a reference video and a target video; A first processing module is used to obtain a set of skeletal points to be analyzed of an object to be analyzed in a first target image in the target video, and determine the action posture information to be analyzed of the object to be analyzed in the first target image according to the position information of each skeletal point in the set of skeletal points to be analyzed in the first target image; the set of skeletal points to be analyzed includes a plurality of key skeletal points constituting the skeleton of the object to be analyzed; the action performed by the object to be analyzed in the first target image is the action performed when the object to be analyzed completes the target action; the action posture information to be analyzed is used to indicate one or more of the following information: a plurality of first angles formed between a plurality of skeletal points in the set of skeletal points to be analyzed, a first orientation of each skeletal point in the set of skeletal points to be analyzed; one or more of the plurality of first angles and the first orientation of each skeletal point are used to indicate the postures of a plurality of key body parts of the object to be analyzed; The first processing module is further used to obtain a second target image matching the first target image in the reference video, and obtain a reference bone point set of a reference object in the second target image, and determine reference action posture information of the reference object in the second target image according to position information of each bone point in the reference bone point set in the second target image; the reference bone point set includes a plurality of key bone points constituting a skeleton of the reference object; the reference action posture information is used to indicate one or more of the following information: a plurality of second angles formed between a plurality of bone points in the reference bone point set, a second orientation of each bone point in the reference bone point set; one or more of the plurality of second angles and the second orientation of each bone point are used to indicate the postures of a plurality of key body parts of the reference object; The second processing module is used to determine the similarity between the action performed by the object to be analyzed in the target video and the action performed by the reference object in the reference video according to the action posture information to be analyzed and the reference action posture information.
9. A terminal, characterized in that: include: A processor and a memory, wherein the memory stores an executable program code, and the processor is used to call the executable program code to execute the image-based motion feature processing method as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores instructions, which, when executed on a computer, enable the computer to execute the image-based motion feature processing method according to any one of claims 1 to 7.
11. A computer program product comprising instructions, characterized in that When the method is executed on a computer, the computer is enabled to execute the image-based motion feature processing method as claimed in any one of claims 1 to 7.
Citation Information
Patent Citations
Skeleton point rectification method and computing equipment
CN107481280A
Similarity calculating method, device thereof and computer-readable storage medium
CN108615055A
Method, device, storage medium and electronic device for correcting motion
CN109432753A
Motion prompting method and device, storage medium and electronic device
CN109815776A
Action teaching method and device based on virtual human
CN109859324A
