Bone point positioning method and device

By analyzing the matching between the movement patterns of bone points in multi-frame images and the movement patterns of the human body, and adjusting the positions of bone points, the problem of poor bone point detection accuracy in the existing technology is solved, and more accurate human posture recognition is achieved.

CN118570293APending Publication Date: 2024-08-30HISENSE GRP HLDG CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202310182712.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-02-28
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

Existing bone point detection technology has poor accuracy in real-time scenes, resulting in inaccurate human posture recognition. Especially when the human body moves slightly or posture changes are not obvious, the smoothed bone points may remain motionless and cannot be accurately recognized. Human posture.

Method used

By acquiring continuous multi-frame images, the position of the bone point is detected, and based on its movement pattern, it is judged whether it matches the movement pattern of the human body. If it matches, the bone point position of the last frame is used as the new position; if it does not match, the bone point position of the last frame is used as the new position. The position of the first frame determines the new position to improve the accuracy of bone point positioning.

Benefits of technology

The accuracy of skeletal point positioning is improved, so that the skeletal points can move with the movement of the human body and remain stationary with the human body, thus improving the accuracy of human posture recognition, reducing the amount of calculation, and being suitable for a variety of application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118570293A
    Figure CN118570293A
Patent Text Reader

Abstract

The embodiment of the invention provides a skeleton point positioning method and equipment, and the method comprises the steps: obtaining a plurality of continuous frames of images, and detecting a first position of a skeleton point in each frame of image; determining a movement rule of the skeleton points according to the first positions of the skeleton points in the multi-frame image; judging whether the movement rule is matched with the human body movement rule in the multi-frame image or not; if yes, determining a second position of the skeleton point according to the first position of the skeleton point in the last frame of the multi-frame image; and if not, determining a second position of the skeleton point according to the first position of the skeleton point in the multi-frame image. And when the skeleton point movement rule is not matched with the human body movement rule, determining a second position of the skeleton point according to the first positions of the skeleton points of multiple frames, and when the skeleton point movement rule is matched with the human body movement rule, determining the first position of the skeleton point in the last frame as the second position of the skeleton point, the accuracy of skeleton point positioning and the accuracy of human body posture recognition can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of data processing, and in particular to a skeleton point positioning method and device. Background Art

[0002] Human skeleton key point detection is one of the basic algorithms of computer vision, and plays a fundamental role in the research of other related fields of computer vision, such as behavior recognition, person tracking, gait recognition and other related fields. Specific applications are mainly concentrated in intelligent video surveillance, patient monitoring systems, human-computer interaction, virtual reality, human animation, smart home, smart security, athlete auxiliary training, etc.

[0003] Human skeleton key point detection algorithms (such as AlphaPose, SimplePose, etc.) can detect the positions of human skeleton points from red, green, and blue (RGB) images or video frames, such as the two-dimensional plane positions of shoulders, wrists, hips, and tops of the head in images or video frames. In application scenarios, it is hoped that when the human body moves, the detected skeleton points can move with the movement of the human body, and when the human body is still, the detected skeleton points remain stationary.

[0004] At present, in the process of real-time skeleton point detection, all real-time skeleton points output by the skeleton point model are smoothed. Real-time scenes are complex and diverse. In some scenes, the human body may move slightly and the posture change is not obvious. If all real-time skeleton points are smoothed, the smoothed skeleton points may remain motionless, resulting in the inability to accurately recognize human posture. Summary of the invention

[0005] The embodiments of the present application provide a skeleton point positioning method and device to solve the problem in the prior art that poor skeleton point recognition accuracy leads to poor human posture recognition accuracy.

[0006] In a first aspect, an embodiment of the present application provides a skeleton point positioning method, the method comprising:

[0007] Acquire multiple consecutive frames of images, and detect the first position of the skeleton point in each frame of image;

[0008] Determine the movement law of the skeleton point according to the first position of the skeleton point in the multiple frames of images; and determine whether the movement law matches the movement law of the human body in the multiple frames of images;

[0009] If they match, determining the first position of the skeleton point in the last frame of the multiple frames of images as the second position of the skeleton point;

[0010] If there is no match, the second position of the skeleton point is determined according to the first position of the skeleton point in the multiple frames of images.

[0011] In a second aspect, an embodiment of the present application provides an electronic device, which includes at least a processor and a memory, and the processor is used to implement the steps of the skeleton point positioning method as described in any one of the above items when executing a computer program stored in the memory.

[0012] In a third aspect, an embodiment of the present application provides a skeleton point positioning device, the device comprising:

[0013] An acquisition module, used for acquiring a plurality of consecutive frames of images and detecting the first position of a skeleton point in each frame of image;

[0014] A first determination module, used for determining a movement rule of the skeleton point according to a first position of the skeleton point in the multiple frames of images;

[0015] A judgment module, used for judging whether the movement law matches the movement law of the human body in the multiple frames of images;

[0016] The second determination module is used to determine the first position of the skeleton point in the last frame of the multi-frame image as the second position of the skeleton point when the judgment result of the judgment module is a match; and to determine the second position of the skeleton point according to the first position of the skeleton point in the multi-frame image when the judgment result of the judgment module is a mismatch.

[0017] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the skeleton point positioning method as described in any one of the above items.

[0018] In an embodiment of the present application, a continuous multi-frame image is acquired, and the first position of a skeleton point is detected in each frame image; the movement law of the skeleton point is determined according to the first position of the skeleton point in the multi-frame image; it is determined whether the movement law matches the movement law of the human body in the multi-frame image; if it matches, the second position of the skeleton point is determined according to the first position of the skeleton point in the last frame in the multi-frame image; if it does not match, the second position of the skeleton point is determined according to the first position of the skeleton point in the multi-frame image. In this method, when the movement law of the skeleton point does not match the movement law of the human body, the second position of the skeleton point is determined according to the first position of the skeleton point in the multi-frame image, and when the movement law of the skeleton point matches the movement law of the human body, the first position of the skeleton point in the last frame is determined as the second position of the skeleton point, which can improve the accuracy of the skeleton point positioning, and realize that the skeleton point moves with the movement of the human body and remains still with the stillness of the human body, thereby improving the accuracy of human posture recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0020] Figure 1 A schematic diagram of a skeleton point positioning process provided for some embodiments of the present application;

[0021] Figure 2 A schematic diagram of the number of intersection points of a time vector provided for some embodiments of the present application;

[0022] Figure 3 A schematic diagram of the number of intersection points of a time vector provided for some embodiments of the present application;

[0023] Figure 4 A schematic diagram of a time series angle of a time vector provided for some embodiments of the present application;

[0024] Figure 5 A schematic diagram of a time series angle of a time vector provided for some embodiments of the present application;

[0025] Figure 6 A schematic diagram of the coordinate position of a smoothed skeleton point provided in some embodiments of the present application;

[0026] Figure 7 A schematic diagram of a skeleton point positioning process provided for some embodiments of the present application;

[0027] Figure 8 A schematic structural diagram of a bone point positioning device provided for some embodiments of the present application;

[0028] Fig. 9 A schematic diagram of the structure of an electronic device provided for some embodiments of the present application. DETAILED DESCRIPTION

[0029] In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0030] In order to improve the accuracy of skeleton point positioning and improve the accuracy of human posture recognition, the embodiments of the present application provide a skeleton point positioning method and device.

[0031] In an embodiment of the present application, an electronic device acquires a continuous plurality of frames of images, and detects a first position of a skeleton point in each frame of the image; determines a movement pattern of the skeleton point based on the first position of the skeleton point in the plurality of frames of the image; determines whether the movement pattern matches a movement pattern of a human body in the plurality of frames of the image; if so, determines a second position of the skeleton point based on the first position of the skeleton point in the last frame of the plurality of frames of the image; if not, determines a second position of the skeleton point based on the first position of the skeleton point in the plurality of frames of the image.

[0032] Figure 1 A schematic diagram of a skeleton point positioning process provided for some embodiments of the present application, the process comprising:

[0033] S101: Acquire multiple consecutive image frames, and detect the first position of a skeleton point in each image frame.

[0034] The skeleton point positioning method provided in the embodiment of the present application is applied to an electronic device, which may be an image acquisition device, a user device, or a server, etc. The user device includes but is not limited to a mobile phone, a computer, a wearable device, or a household device (such as a dressing mirror).

[0035] The continuous multi-frame images acquired by the electronic device may be continuous multi-frame images directly acquired by the image acquisition device, or may be continuous multi-frame images obtained by processing the images acquired by the image acquisition device. There is no limit on the number of multi-frame images, for example, the multi-frame images are n-frame images, and n is an integer greater than or equal to 2. In one implementation, the time span covered by the n frames may be several hundred milliseconds. If the frame rate is 60 frames, the value of n may be 10, 20, 30, or 40, etc.

[0036] The electronic device stores a human skeleton point detection algorithm, and the electronic device can use the human skeleton point detection algorithm to detect the first position of the skeleton point in each frame of the image. Taking n frames of images as an example, for the same skeleton point P, the electronic device can detect n first positions. For example, the positions of the skeleton point P in the consecutive n frames of images can be recorded as P1, P2, ..., P n .

[0037] S102: Determine a movement rule of the skeleton point according to the first position of the skeleton point in the multi-frame image.

[0038] Since multiple frames of images are continuous in time, there is a certain regularity in the position change of the skeleton point in continuous time. By analyzing the movement law of the skeleton point, it can be determined whether the skeleton point moves with the movement of the human body or remains stationary when the human body remains stationary.

[0039] In one example, multiple time vectors may be constructed according to multiple first positions of the skeleton points, and then the movement law of the skeleton points may be obtained according to the relationship between the multiple time vectors.

[0040] In another example, according to the first position of the skeleton point in multiple frames of images, it can be determined whether the skeleton point moves or is stationary, and when determining the movement of the skeleton point, the movement trajectory corresponding to the multiple first positions is determined. In this example, the movement rule of the skeleton point can include movement or stationary, and can also include a movement trajectory.

[0041] S103: Determine whether the movement pattern matches the movement pattern of the human body in the multi-frame images. If it matches, execute S104; if it does not match, execute S105.

[0042] Since the multiple frames of images are continuous in time, the movement pattern of the human body, such as movement or stillness, and the optional movement trajectory can be analyzed based on the continuous multiple frames of images.

[0043] By matching the movement pattern of the skeleton points with the movement pattern of the human body, it can be determined whether the movement pattern of the skeleton points matches the movement pattern of the human body. If they match, it can be considered that the skeleton points move with the movement of the human body, or remain still when the human body remains still. If they do not match, it can be considered that the skeleton points do not move with the movement of the human body (e.g., the human body moves but the skeleton points remain still), or do not remain still when the human body remains still (e.g., the human body remains still but the skeleton points shake).

[0044] Therefore, corresponding steps can be executed according to the matching of the movement rules of the skeleton points and the movement rules of the human body.

[0045] S104: Determine the first position of the skeleton point in the last frame of the multi-frame image as the second position of the skeleton point.

[0046] If the movement pattern of the skeleton point matches the movement pattern of the human body, it means that the skeleton point moves with the human body, or remains still when the human body remains still. In other words, the detection result of the skeleton point is relatively accurate. Therefore, no additional processing is required, but the first position of the skeleton point in the last frame image is directly determined as the second position of the skeleton point.

[0047] The second position of the skeleton point can be used to indicate the current position of the skeleton point. In this step, the second position of the skeleton point is the position of the skeleton point in the last frame of image.

[0048] S105: Determine the second position of the skeleton point according to the first position of the skeleton point in the multiple frames of images.

[0049] If the movement pattern of the skeleton point does not match the movement pattern of the human body, it means that the skeleton point does not move with the movement of the human body, or does not remain still when the human body remains still. In other words, the detection result of the skeleton point is biased. Therefore, the second position of the skeleton point can be determined through additional processing.

[0050] The second position of the skeleton point can be used to indicate the current position of the skeleton point. In this step, the second position of the skeleton point is obtained according to the first position of the skeleton point in multiple frames, rather than being determined only according to the position in the last frame, thereby improving the accuracy of skeleton point positioning.

[0051] In an embodiment of the present application, when the movement law of the skeleton point does not match the movement law of the human body, the second position of the skeleton point is determined based on the first position of the skeleton point in multiple frames of images. When the movement law of the skeleton point matches the movement law of the human body, the first position of the skeleton point in the last frame is determined as the second position of the skeleton point. This can improve the accuracy of skeleton point positioning and enable the skeleton point to move with the movement of the human body and remain still when the human body remains still, thereby improving the accuracy of human posture recognition.

[0052] For possible scenario one, the human body may have slight movements and the posture changes are not obvious. If relevant technology is used to smooth all the detected bone points, it may cause the human body to move but the bone points to remain stationary. In the embodiment of the present application, the positions of the bone points that conform to the laws of human movement are not processed. Therefore, the bone points can move with the human body, thereby improving the accuracy of human posture recognition.

[0053] For possible scenario 2, the human body maintains the same posture differently, but due to defects in the human skeleton point detection algorithm itself, the color of human clothing is close to the background color, or the resolution of the human image, it is possible that the skeleton point position detected between frames has undergone random micro-movement, that is, the skeleton point has undergone non-artificial jitter. This jitter will cause some adverse effects, such as affecting the beauty of drawing a stick figure or a skeleton image, and for example, in some scenes where judgment and processing need to be performed based on the movement of the skeleton point, it will affect the accuracy of the judgment. In the embodiment of the present application, a post-processing method is adopted, that is, the skeleton point position that does not conform to the law of human movement is processed, that is, first identify a certain skeleton point within a certain period of time that has undergone non-artificial micro-jitter, and then process it to achieve the purpose of de-jittering. Therefore, it can be achieved that the skeleton point is still when the human body is still, and the accuracy of human posture recognition is improved. In addition, compared with the pre-processing method and the mid-processing method, the post-processing method performs jitter judgment and processing on the output skeleton point, which is applicable to all skeleton point algorithms, is relatively simple to implement, easy to apply, and saves time and effort. The pre-processing method refers to improving the resolution of the input image or enhancing the contrast between the foreground and background. This method is not effective in some scenarios, such as when processing street videos, the contrast between pedestrians and backgrounds in the video cannot be controlled. The mid-processing method refers to improving the performance of the deep learning algorithm. This method requires corresponding optimization and modification for each algorithm, but it is slightly more difficult to modify the deep learning algorithm.

[0054] On the basis of the above-mentioned embodiments, by constructing a time vector to determine the movement law of the skeleton point, the amount of calculation can be reduced and the positioning and recognition effects can be improved on the basis of ensuring the accuracy of skeleton point positioning and human posture recognition. For example, in the embodiment of the present application, the movement law of the skeleton point is determined according to the first position of the skeleton point in multiple frames of images, including:

[0055] Constructing multiple time vectors according to the first positions of the skeleton points in each of two adjacent frames of images;

[0056] According to multiple time vectors, the movement rules of the skeleton points are determined.

[0057] The electronic device can construct a time vector based on the first position of the skeleton point in two adjacent frames. In one implementation, in two adjacent frames (i.e., two adjacent frames), the electronic device uses the first position of the skeleton point in the previous frame as the starting point and the first position of the skeleton point in the next frame as the end point to construct a two-dimensional vector, called a time vector. Thus, the electronic device can construct multiple time vectors based on each two adjacent frames in the multiple frames.

[0058] Taking n consecutive frames of images as an example, the first frame is the first frame, and the last frame is the nth frame. In the case of real-time detection of skeleton points, the nth frame can be the image frame corresponding to the current moment. Assume that the positions of the skeleton points P in the n consecutive frames are recorded as P1, P2, ..., P n , the electronic device constructs n-1 two-dimensional vectors with the position of the skeleton point P in the previous frame as the starting point and the position of the skeleton point P in the next frame as the end point in every two adjacent frames, recorded as If n=5, the electronic device can construct 4 time vectors and

[0059] In this embodiment, the movement law of the skeleton point can be represented by one or more data such as the number of intersections of multiple time vectors, angle variance, or distance, and these data can measure the degree of confusion of the position of the skeleton point over a period of time. For example, the higher the degree of confusion, the lower the degree of matching between the movement law of the skeleton point and the movement law of the human body, and the lower the degree of confusion, the higher the degree of matching between the movement law of the skeleton point and the movement law of the human body. In some scenarios, the higher the degree of confusion, the higher the possibility of non-human jitter of the skeleton point, and the lower the degree of confusion, the lower the possibility of non-human jitter of the skeleton point, that is, in this scenario, these data can be used as a basis for whether non-human jitter occurs in the skeleton point.

[0060] If the movement law of the skeleton point is represented by the number of intersections of multiple time vectors, then on the basis of the above embodiments, in the embodiment of the present application, the movement law of the skeleton point is determined according to multiple time vectors, including:

[0061] According to the multiple time vectors, the number of intersection points where the multiple time vectors intersect is determined.

[0062] When determining the number of intersections where multiple time vectors intersect, the electronic device can count the number of intersections between each time vector and all other time vectors respectively, then take all the counted intersections as the total number of intersections, and finally determine the number of intersections where multiple time vectors intersect based on the total number of intersections.

[0063] The electronic device calculates the number of intersections t of n-1 time vectors a The steps include:

[0064] Step 1: Count the time vector The number of intersections with all other n-2 time vectors is denoted as u 12 ;

[0065] Step 2: Count the time vector The number of intersections with all other n-2 time vectors is denoted as u 23 ;

[0066] …

[0067] Step n-1: Statistical time vector The number of intersections with all other n-2 time vectors is denoted as u (n-1)n ;

[0068] Step n: Calculate the total number of all the intersection points above, that is, u = u 12 +u 23 +……+u (n-1)n .

[0069] Step n+1: Calculate the number of intersection points of the time vector as t a =u / 2=(u 12 +u 23 +……+u (n-1)n ) / 2.

[0070] For example, take n = 5, and the electronic device constructs 4 time vectors and Figure 2 and Figure 3 is a schematic diagram of the number of intersection points of the time vector. Figure 2 in, u 12 =2,u 23 =1,u 34 =1,u 45 =2, u = 2 + 1 + 1 + 2 = 6, t a =3, that is, the number of intersections of these four time vectors is 3; Figure 3 In, t a =0, the number of intersections of these five time vectors is 0.

[0071] The electronic device may also store a threshold value of the number of intersections corresponding to multiple frames of images. For example, the threshold value of the number of intersections may be related to the number of multiple frames of images, that is, the electronic device stores a corresponding relationship between the number of multiple frames of images n and the threshold value of the number of intersections t1. For another example, the threshold value of the number of intersections is a fixed value. Based on the above embodiments, in the embodiments of the present application, determining whether the movement pattern matches the movement pattern of the human body in the multiple frames of images includes:

[0072] Determine whether the number of intersections reaches a threshold of the number of intersections corresponding to the multi-frame image;

[0073] If so, determine that the movement pattern does not match the movement pattern of the human body;

[0074] If not, it is determined that the movement pattern matches the movement pattern of the human body.

[0075] If the number of intersections reaches the intersection number threshold corresponding to multiple frames of images, it can indicate that the degree of confusion of the skeleton points is too high, and the electronic device can determine that the movement pattern of the skeleton points does not match the movement pattern of the human body. In some scenarios, the electronic device can determine that the skeleton points are shaking unintentionally.

[0076] If the number of intersections does not reach the intersection number threshold corresponding to the multi-frame image, it can indicate that the disorder of the skeleton points is too low, and the electronic device can determine that the movement pattern of the skeleton points matches the movement pattern of the human body. In some scenarios, the electronic device can determine that the skeleton points are artificially shaken.

[0077] In this embodiment, the intersection number threshold is used to represent the movement pattern of the human body. Comparing the number of intersections of multiple time vectors with the intersection number threshold can reduce the amount of calculation in the matching process and improve the efficiency of skeleton point positioning and human posture recognition.

[0078] If the movement law of the skeleton point is represented by the angle variance of multiple time vectors, then on the basis of the above embodiments, in the embodiment of the present application, the movement law of the skeleton point is determined according to multiple time vectors, including:

[0079] According to the multiple time vectors, the variance of the angle at which the multiple time vectors intersect is determined.

[0080] When determining the variance of the angles at which multiple time vectors intersect, the electronic device may calculate the angles between two adjacent time vectors respectively, and then determine the variance of the angles at which multiple time vectors intersect based on all the angles.

[0081] The electronic device calculates the time series angle variance t of n-1 time vectors b The steps include:

[0082] Step 1: Calculate the time vector and The angle between the two is denoted as α1;

[0083] Step 2: Calculate the time vector and The angle between the two is denoted as α2;

[0084] …

[0085] Step n-2: Calculate the time vector and The angle between n-2 ;

[0086] Step n-1: Calculate all the n-2 angles mentioned above (i.e. α1, α2, ..., α n-2 )’s variance s.

[0087] Step n: Determine the time series angle variance t of n-1 time vectorsb t b =s.

[0088] For example, take n = 5, and the electronic device constructs 4 time vectors and Figure 4 and Figure 5 is a schematic diagram of the time series angle of the time vector, Figure 4 and Figure 4 In the above equation, there are three angles between the four time vectors, namely α1, α2 and α3. The variance of these three angles is t b The value of .

[0089] The electronic device may also store angle variance thresholds corresponding to multiple frames of images. For example, the angle variance threshold may be related to the number of multiple frames of images, that is, the electronic device stores a corresponding relationship between the number of multiple frames of images n and the angle variance threshold t2. For another example, the angle variance threshold is a fixed value. Based on the above embodiments, in the embodiments of the present application, determining whether the movement pattern matches the movement pattern of the human body in the multiple frames of images includes:

[0090] Determine whether the angle variance reaches the angle variance threshold corresponding to the multiple frames of images;

[0091] If so, determine that the movement pattern does not match the movement pattern of the human body;

[0092] If not, it is determined that the movement pattern matches the movement pattern of the human body.

[0093] If the angle variance reaches the angle variance threshold corresponding to multiple frames of images, it can indicate that the degree of confusion of the skeleton points is too high, and the electronic device can determine that the movement pattern of the skeleton points does not match the movement pattern of the human body. In some scenarios, the electronic device can determine that the skeleton points are shaking in an unintended manner.

[0094] If the angle variance does not reach the angle variance threshold corresponding to the multiple frames, it can indicate that the disorder of the skeleton point is too low, and the electronic device can determine that the movement pattern of the skeleton point matches the movement pattern of the human body. In some scenarios, the electronic device can determine that the skeleton point is artificially shaken.

[0095] In this embodiment, the angle variance threshold is used to represent the movement pattern of the human body. Comparing the angle variances of multiple time vectors with the angle variance threshold can reduce the amount of calculation in the matching process and improve the efficiency of skeleton point positioning and human posture recognition.

[0096] In order to further improve the accuracy of skeleton point positioning, based on the above embodiments, in the embodiment of the present application, according to the first position of the skeleton point in multiple frames of images, the second position of the skeleton point is determined, including:

[0097] A first position of the skeleton point in the multiple-frame image is smoothed to determine a second position of the skeleton point.

[0098] When smoothing is performed on the multiple first positions corresponding to the skeleton point, for example but not limited to averaging and / or filtering, the electronic device may determine the result of the smoothing as the second position of the skeleton point.

[0099] In one implementation, smoothing the first position of the skeleton point in the multiple frames of images to determine the second position of the skeleton point includes:

[0100] Determining the horizontal coordinate of the second position of the skeleton point according to the horizontal coordinate corresponding to the first position of the skeleton point in the multiple frames of images; and

[0101] The ordinate of the second position of the skeleton point is determined according to the ordinate corresponding to the first position of the skeleton point in the multiple frames of images.

[0102] For any bone point P in n-frame two-dimensional bone points, its position in n-frame images is P1(x1,y1), P2(x2,y2), ..., P n (x n ,y n ), when determining the second position of the skeleton point P, it can be based on x1, x2, ... x n Determine the horizontal coordinate of the second position, and according to y1, y2, ... y n The ordinate of the second position is determined.

[0103] If a plurality of first positions of the skeleton point are smoothed by averaging, based on the above embodiments, in the embodiment of the present application, the abscissa of the second position of the skeleton point is determined according to the abscissa corresponding to the first position of the skeleton point in the multiple frames of images; and the ordinate of the second position of the skeleton point is determined according to the ordinate corresponding to the first position of the skeleton point in the multiple frames of images, including:

[0104] Calculate the average value of the horizontal coordinates corresponding to the first position of the skeleton point in multiple frames of images;

[0105] Determining the abscissa of the second position of the skeleton point according to the average value of the abscissas; and

[0106] Calculate the average value of the vertical coordinates corresponding to the first position of the skeleton point in multiple frames of images;

[0107] The ordinate of the second position of the skeleton point is determined according to the average value of the ordinates.

[0108] For example, the electronic device may directly determine the average value of the horizontal coordinates as the horizontal coordinate of the second position, and may directly determine the average value of the vertical coordinates as the vertical coordinate of the second position.

[0109] As another example, the electronic device can process the average value of the horizontal coordinate again (such as secondary filtering), and then determine the horizontal coordinate of the second position based on the result of the reprocessing, and can process the average value of the vertical coordinate again, and then determine the vertical coordinate of the second position based on the result of the reprocessing.

[0110] Taking the above skeleton point P as an example, according to the horizontal coordinate position of the skeleton point P in the n-frame image (such as x1, x2, ... x n ) can determine the horizontal coordinate position x of the smoothed bone point P n(new) , for example, the horizontal coordinate position x of the smoothed bone point P in the current frame (i.e., the nth frame) n(new) =(x1+x2+……+x n ) / n; according to the vertical coordinate position of the skeleton point P in the n-frame image (such as y1, y2, ... y n ) can determine the vertical coordinate position y of the smoothed bone point P n(new) , for example, the horizontal coordinate position y of the smoothed bone point P in the current frame (i.e., the nth frame) n(new) =(y1+y2+……+y n ) / n. That is to say, the smoothed coordinate position of the skeleton point in the current frame is the average position of all coordinate positions of the current frame and the previous n-1 frames. Figure 2 and Figure 4 The positions of the skeleton points P1, P2, P3, P4 and P5 shown in FIG. Figure 6 As shown, P 5(new) is the position of the skeleton point P after smoothing in the 5th frame.

[0111] In the embodiment of the present application, by smoothing multiple first positions of the skeleton point and then determining the second position of the skeleton point, the accuracy of skeleton point positioning can be further improved.

[0112] The following is a specific example to illustrate the skeleton point positioning process in the embodiment of the present application. Figure 7 , including the following steps:

[0113] S701: The electronic device uses a skeleton key point detection algorithm to detect two-dimensional skeleton points in n consecutive image frames.

[0114] S702: The electronic device constructs n-1 time vectors corresponding to n consecutive frames of images.

[0115] S703: The electronic device calculates the number of intersections t of n-1 time vectors a .

[0116] S704: The electronic device calculates the time series angle variance t of n-1 time vectorsb .

[0117] There is no restriction on the order in which the electronic device executes S703 and S704, and an optional electronic device may also execute only one of S703 and S704.

[0118] S705: Electronic equipment according to t a and / or b , determine whether the skeleton point sequence corresponding to the continuous n frames of images is jittered. If yes, execute S706.

[0119] Specifically, the electronic device can determine t a and / or b Whether the corresponding threshold is reached; if yes, it is determined that the skeleton point sequence is jittered; if not, it is determined that the skeleton point sequence is not jittered, and smoothing may not be performed.

[0120] S706: The electronic device performs smoothing processing on the jittered skeleton point sequence to obtain the skeleton point positions after smoothing of the n-th frame image.

[0121] Specifically, the electronic device may calculate an average value of the positions of the jittered skeleton point sequence, and the average position is the smoothed skeleton point position.

[0122] Based on the above embodiments, the present application provides a skeleton point positioning device. Figure 8 A schematic diagram of a skeleton point positioning structure provided for some embodiments of the present application, such as Figure 8 As shown, the device comprises:

[0123] An acquisition module 801 is used to acquire a plurality of consecutive frames of images and detect a first position of a skeleton point in each frame of the image;

[0124] A first determination module 802, configured to determine a movement rule of the skeleton point according to a first position of the skeleton point in the multi-frame image;

[0125] A judging module 803 is used to judge whether the movement pattern matches the movement pattern of the human body in the multi-frame images;

[0126] The second determination module 804 is used to determine the first position of the skeleton point in the last frame of the multi-frame image as the second position of the skeleton point when the judgment result of the judgment module 803 is a match; when the judgment result of the judgment module 803 is a mismatch, determine the second position of the skeleton point according to the first position of the skeleton point in the multi-frame image.

[0127] In a possible implementation, the first determination module 802 is specifically configured to construct a plurality of time vectors according to the first positions of the skeleton points in each of two adjacent frames of images; and determine the movement pattern of the skeleton points according to the plurality of time vectors.

[0128] In a possible implementation manner, the first determining module 802 is specifically configured to determine, according to the multiple time vectors, the number of intersection points where the multiple time vectors intersect.

[0129] In a possible implementation, the judgment module 803 is specifically used to judge whether the number of intersections reaches the intersection number threshold corresponding to the multi-frame image; if so, it is determined that the movement law does not match the movement law of the human body; if not, it is determined that the movement law matches the movement law of the human body.

[0130] In a possible implementation, the first determination module 802 is specifically configured to determine, according to the multiple time vectors, a variance of an angle at which the multiple time vectors intersect.

[0131] In a possible implementation, the judgment module 803 is specifically used to judge whether the angle variance reaches the angle variance threshold corresponding to the multiple frames of images; if so, it is determined that the movement law does not match the movement law of the human body; if not, it is determined that the movement law matches the movement law of the human body.

[0132] In a possible implementation manner, the second determination module 804 is specifically configured to perform smoothing processing on the first position of the skeleton point in the multiple frames of images to determine the second position of the skeleton point.

[0133] In a possible implementation, the second determination module 804 is specifically used to determine the horizontal coordinate of the second position of the skeleton point based on the horizontal coordinate corresponding to the first position of the skeleton point in multiple frame images; and to determine the vertical coordinate of the second position of the skeleton point based on the vertical coordinate corresponding to the first position of the skeleton point in multiple frame images.

[0134] In one possible implementation, the second determination module 804 is specifically used to average the horizontal coordinates corresponding to the first position of the skeleton point in multiple image frames; determine the horizontal coordinates of the second position of the skeleton point based on the average value of the horizontal coordinates; and average the vertical coordinates corresponding to the first position of the skeleton point in multiple image frames; determine the vertical coordinates of the second position of the skeleton point based on the average value of the vertical coordinates.

[0135] Based on the above embodiments, the present application further provides an electronic device, Fig. 9 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown in FIG. Fig. 9As shown, it includes: a processor 901, a communication interface 902, a memory 903 and a communication bus 904, wherein the processor 901, the communication interface 902, and the memory 903 communicate with each other through the communication bus 904;

[0136] The memory 903 stores a computer program. When the program is executed by the processor 901, the processor 901 performs the following steps:

[0137] Acquire multiple consecutive frames of images, and detect the first position of the skeleton point in each frame of image;

[0138] Determine the movement law of the skeleton point according to the first position of the skeleton point in the multi-frame image; and judge whether the movement law matches the movement law of the human body in the multi-frame image;

[0139] If they match, the first position of the skeleton point in the last frame of the multi-frame image is determined as the second position of the skeleton point;

[0140] If they do not match, the second position of the skeleton point is determined according to the first position of the skeleton point in the multiple frames of images.

[0141] In a possible implementation, the processor 901 is specifically configured to construct a plurality of time vectors according to the first positions of the skeleton points in each of two adjacent frames of images; and determine the movement pattern of the skeleton points according to the plurality of time vectors.

[0142] In a possible implementation, the processor 901 is specifically configured to determine, according to the multiple time vectors, the number of intersection points where the multiple time vectors intersect.

[0143] In one possible implementation, processor 901 is specifically used to determine whether the number of intersections reaches a threshold of the number of intersections corresponding to multiple frames of images; if so, determine that the movement pattern does not match the movement pattern of the human body; if not, determine that the movement pattern matches the movement pattern of the human body.

[0144] In a possible implementation, the processor 901 is specifically configured to determine, according to the multiple time vectors, a variance of an angle at which the multiple time vectors intersect.

[0145] In a possible implementation, processor 901 is specifically used to determine whether the angle variance reaches the angle variance threshold corresponding to multiple frames of images; if so, determine that the movement pattern does not match the movement pattern of the human body; if not, determine that the movement pattern matches the movement pattern of the human body.

[0146] In a possible implementation, the processor 901 is specifically configured to perform smoothing processing on a first position of a skeleton point in multiple frames of images to determine a second position of the skeleton point.

[0147] In one possible implementation, the processor 901 is specifically used to determine the horizontal coordinate of the second position of the skeleton point based on the horizontal coordinate corresponding to the first position of the skeleton point in multiple frames of images; and to determine the vertical coordinate of the second position of the skeleton point based on the vertical coordinate corresponding to the first position of the skeleton point in multiple frames of images.

[0148] In one possible implementation, processor 901 is specifically used to average the horizontal coordinates corresponding to the first position of the skeleton point in multiple frames of images; determine the horizontal coordinates of the second position of the skeleton point based on the average value of the horizontal coordinates; and average the vertical coordinates corresponding to the first position of the skeleton point in multiple frames of images; determine the vertical coordinates of the second position of the skeleton point based on the average value of the vertical coordinates.

[0149] The communication bus mentioned in the above electronic device may be a PCI (Peripheral Component Interconnect) bus or an EISA (Extended Industry Standard Architecture) bus, etc. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.

[0150] The communication interface 902 is used for communication between the electronic device and other devices.

[0151] The memory may include RAM (Random Access Memory) or NVM (Non-Volatile Memory), such as at least one disk memory. Optionally, the memory may also be at least one storage device located away from the aforementioned processor.

[0152] The above-mentioned processor can be a general-purpose processor, including a central processing unit, NP (Network Processor), etc.; it can also be a DSP (Digital Signal Processing), an application-specific integrated circuit, a field programmable gate array or other programmable logic device, a discrete gate or transistor logic device, a discrete hardware component, etc.

[0153] Based on the above embodiments, an embodiment of the present application provides a computer-readable storage medium, in which a computer program executable by an electronic device is stored. When the program is run on the electronic device, the electronic device implements the following steps when executing:

[0154] Acquire multiple consecutive frames of images, and detect the first position of the skeleton point in each frame of image;

[0155] Determine the movement law of the skeleton point according to the first position of the skeleton point in the multiple frames of images; and determine whether the movement law matches the movement law of the human body in the multiple frames of images;

[0156] If they match, determining the first position of the skeleton point in the last frame of the multiple frames of images as the second position of the skeleton point;

[0157] If there is no match, the second position of the skeleton point is determined according to the first position of the skeleton point in the multiple frames of images.

[0158] In a possible implementation, determining the movement rule of the skeleton point according to the first position of the skeleton point in the multiple frames of images includes:

[0159] Constructing a plurality of time vectors according to the first positions of the skeleton points in each of two adjacent frames of images;

[0160] The movement rules of the skeleton points are determined according to the multiple time vectors.

[0161] In a possible implementation manner, determining the movement rule of the skeleton point according to the multiple time vectors includes:

[0162] According to the multiple time vectors, the number of intersection points where the multiple time vectors intersect is determined.

[0163] In a possible implementation manner, the determining whether the movement pattern matches a movement pattern of a human body in the multiple frames of images includes:

[0164] Determining whether the number of intersections reaches a threshold of the number of intersections corresponding to the multiple frames of images;

[0165] If yes, determining that the movement pattern does not match the movement pattern of the human body;

[0166] If not, it is determined that the movement pattern matches the movement pattern of the human body.

[0167] In a possible implementation manner, determining the movement rule of the skeleton point according to the multiple time vectors includes:

[0168] According to the multiple time vectors, a variance of an angle at which the multiple time vectors intersect is determined.

[0169] In a possible implementation manner, the determining whether the movement pattern matches a movement pattern of a human body in the multiple frames of images includes:

[0170] Determine whether the angle variance reaches the angle variance threshold corresponding to the multiple frames of images;

[0171] If yes, determining that the movement pattern does not match the movement pattern of the human body;

[0172] If not, it is determined that the movement pattern matches the movement pattern of the human body.

[0173] In a possible implementation, determining the second position of the skeleton point according to the first position of the skeleton point in the multiple frames of images includes:

[0174] A first position of the skeleton point in the multiple frames of images is smoothed to determine a second position of the skeleton point.

[0175] In a possible implementation manner, performing smoothing on the first position of the skeleton point in the multiple frames of images to determine the second position of the skeleton point includes:

[0176] Determining the abscissa of the second position of the skeleton point according to the abscissa corresponding to the first position of the skeleton point in the multiple frames of images; and

[0177] The vertical coordinate of the second position of the skeleton point is determined according to the vertical coordinate corresponding to the first position of the skeleton point in the multiple frames of images.

[0178] In a possible implementation, determining the abscissa of the second position of the skeleton point according to the abscissa corresponding to the first position of the skeleton point in the multiple frames of images; and determining the ordinate of the second position of the skeleton point according to the ordinate corresponding to the first position of the skeleton point in the multiple frames of images, includes:

[0179] averaging the horizontal coordinates corresponding to the first positions of the skeleton points in the multiple frames of images;

[0180] Determining the abscissa of the second position of the skeleton point according to the average value of the abscissa; and

[0181] averaging the vertical coordinates corresponding to the first positions of the skeleton points in the multiple frames of images;

[0182] The ordinate of the second position of the skeleton point is determined according to the average value of the ordinates.

[0183] Since the principle of solving the problem by the above-mentioned computer-readable storage medium is similar to that of the skeleton point positioning method, the implementation of the above-mentioned computer-readable storage medium can refer to the embodiment of the method, and the repeated parts will not be repeated.

[0184] The above-mentioned computer-readable storage medium can be any available medium or data storage device that can be accessed by the processor in the electronic device, including but not limited to magnetic storage such as floppy disks, hard disks, magnetic tapes, MO (magneto-optical disks), etc., optical storage such as CD, DVD, BD, HVD, etc., and semiconductor storage such as ROM, EPROM, EEPROM, NAND FLASH (non-volatile memory), SSD (solid state drive), etc.

[0185] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0186] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0187] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0188] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0189] Obviously, those skilled in the art can make various changes and modifications to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.

Claims

1. A skeleton point positioning method, characterized in that: The method comprises: Acquire multiple consecutive frames of images, and detect the first position of the skeleton point in each frame of image; Determine the movement law of the skeleton point according to the first position of the skeleton point in the multiple frames of images; and determine whether the movement law matches the movement law of the human body in the multiple frames of images; If they match, determining the first position of the skeleton point in the last frame of the multiple frames of images as the second position of the skeleton point; If there is no match, the second position of the skeleton point is determined according to the first position of the skeleton point in the multiple frames of images.

2. The method according to claim 1, characterized in that The step of determining the movement rule of the skeleton point according to the first position of the skeleton point in the multiple frames of images includes: constructing a plurality of time vectors according to the first positions of the skeleton points in each of two adjacent frames of images; The movement rules of the skeleton points are determined according to the multiple time vectors.

3. The method according to claim 2, characterized in that The step of determining the movement rule of the skeleton point according to the multiple time vectors includes: According to the multiple time vectors, the number of intersection points where the multiple time vectors intersect is determined.

4. The method according to claim 3, characterized in that The determining whether the movement pattern matches the movement pattern of a human body in the multiple frames of images includes: Determining whether the number of intersections reaches a threshold of the number of intersections corresponding to the multiple frames of images; If yes, determining that the movement pattern does not match the movement pattern of the human body; If not, it is determined that the movement pattern matches the movement pattern of the human body.

5. The method according to claim 2, characterized in that The step of determining the movement rule of the skeleton point according to the multiple time vectors includes: According to the multiple time vectors, a variance of an angle at which the multiple time vectors intersect is determined.

6. The method according to claim 5, characterized in that The determining whether the movement pattern matches the movement pattern of a human body in the multiple frames of images includes: Determining whether the angle variance reaches an angle variance threshold corresponding to the multiple frames of images; If yes, determining that the movement pattern does not match the movement pattern of the human body; If not, it is determined that the movement pattern matches the movement pattern of the human body.

7. The method according to any one of claims 1 to 6, characterized in that: The step of determining the second position of the skeleton point according to the first position of the skeleton point in the multiple frames of images comprises: A first position of the skeleton point in the multiple frames of images is smoothed to determine a second position of the skeleton point.

8. The method according to claim 7, characterized in that The smoothing process is performed on the first position of the skeleton point in the multiple frames of images to determine the second position of the skeleton point, comprising: Determining the abscissa of the second position of the skeleton point according to the abscissa corresponding to the first position of the skeleton point in the multiple frames of images; and The vertical coordinate of the second position of the skeleton point is determined according to the vertical coordinate corresponding to the first position of the skeleton point in the multiple frames of images.

9. The method according to claim 8, characterized in that Determining the abscissa of the second position of the skeleton point according to the abscissa corresponding to the first position of the skeleton point in the multiple frames of images; And determining the ordinate of the second position of the skeleton point according to the ordinate corresponding to the first position of the skeleton point in the multiple frames of images, comprising: averaging the horizontal coordinates corresponding to the first positions of the skeleton points in the multiple frames of images; Determining the abscissa of the second position of the skeleton point according to the average value of the abscissa; and averaging the vertical coordinates corresponding to the first positions of the skeleton points in the multiple frames of images; The ordinate of the second position of the skeleton point is determined according to the average value of the ordinates.

10. An electronic device, characterized in that: The electronic device comprises at least a processor and a memory, and the processor is used to implement the steps of the skeleton point positioning method according to any one of claims 1 to 9 when executing the computer program stored in the memory.

Citation Information

Patent Citations

  • Skeleton dithering detection method based on dynamic weighting and grey prediction

    CN110083239A

  • Skeleton point smoothing method and device and electronic device

    CN110827226A

  • Motion recognition method based on human skeleton articulation points

    CN114463845A

  • Method and device for detecting human skeletons

    US20220207265A1