Attitude reference data acquisition method and apparatus, electronic device, and medium
By acquiring multi-frame image pose data of an object, generating a probability density function using a kernel density estimation algorithm, and combining it with a variance threshold, the problem of inaccurate acquisition of object pose reference data is solved, achieving both accuracy and real-time performance in pose analysis.
Patent Information
- Application Number
- PCT/CN2023/125148
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-07-26
- Filing Date
- 2023-10-18
- Publication Date
- 2025-01-30
AI Technical Summary
Existing technologies struggle to effectively acquire attitude reference data for objects, leading to inaccurate motion state analysis.
By acquiring multi-frame image pose data of an object, a probability density function is generated using a kernel density estimation algorithm, and combined with variance threshold judgment, the object's pose reference data is obtained.
It enables the acquisition of accurate reference data on object posture, improves the accuracy and robustness of motion state analysis, and is suitable for real-time monitoring and analysis.
Smart Images

Figure CN2023125148_30012025_PF_FP_ABST
Abstract
Description
Method, device, electronic device and medium for acquiring attitude reference data
[0001] This application claims priority to the Chinese patent application filed with the State Intellectual Property Office of China on July 26, 2023, with application number 202310921954.5 and application name “Method, device, electronic device and medium for acquiring posture reference data”, the entire contents of which are incorporated by reference into this application. Technical Field
[0002] The present application relates to the technical field of electronic equipment, and in particular to a method, device, electronic equipment and medium for acquiring attitude reference data. Background Art
[0003] The posture of an object (such as a human) can reflect the object's motion state. In order to analyze and process the object's motion state, it is necessary to obtain the object's posture reference data.
[0004] Summary of the Invention
[0005] The embodiments of the present application provide a method, device, electronic device, and medium for acquiring attitude reference data, which can acquire attitude reference data of an object.
[0006] In a first aspect, an embodiment of the present application provides a method for acquiring posture reference data, comprising: acquiring posture data of an object corresponding to the first image based on a first image; acquiring posture data of the object corresponding to the second image based on a second image; obtaining a first probability density function based on the posture data corresponding to the first image and the posture data corresponding to the second image; acquiring first posture reference data of the object based on the first probability density function, the first posture reference data being posture data of the object when the object is in a first reference motion state.
[0007] Optionally, the step of obtaining a first probability density function based on the posture data corresponding to the first image and the posture data corresponding to the second image includes: obtaining a first kernel density function based on the posture data corresponding to the first image; obtaining a second kernel density function based on the posture data corresponding to the second image; and obtaining a first probability density function based on the first kernel density function and the second kernel density function.
[0008] Optionally, the posture reference data acquisition method also includes: when it is determined that the number of posture data in the first posture data set does not reach a preset quantity threshold, the posture data corresponding to the first image is added to the first posture data set to obtain a second posture data set; after obtaining the second posture data set, the step of obtaining a first kernel density function is executed; after obtaining the first kernel density function, whether the number of posture data in the second posture data set reaches the quantity threshold is determined; when it is determined that the number of posture data in the second posture data set does not reach the quantity threshold, the posture data corresponding to the second image is added to the second posture data set to obtain a third posture data set; after obtaining the third posture data set, the step of obtaining a second kernel density function is executed; after obtaining the second kernel density function, whether the number of posture data in the third posture data set reaches the quantity threshold is determined; when it is determined that the number of posture data in the third posture data set reaches the quantity threshold, the step of obtaining a first probability density function is executed.
[0009] Optionally, the posture data includes a first posture angle; the posture reference data acquisition method also includes: obtaining the variance of the first posture angle based on the first posture angle in the posture data corresponding to the first image and the first posture angle in the posture data corresponding to the second image; when the obtained variance meets the preset requirements, determining that the first posture reference data is available, or when the obtained variance meets the preset requirements, executing the step of obtaining the first probability density function; wherein the preset requirements include that the variance of the obtained first posture angle is not greater than a preset variance threshold of the first posture angle.
[0010] Optionally, the posture reference data acquisition method further includes: analyzing the motion state of the object according to the first posture reference data.
[0011] Optionally, the first image and the second image are both images captured by an image acquisition device; the step of analyzing the motion state of the object based on the first posture reference data includes: obtaining a target image captured in real time by the image acquisition device; obtaining posture data of the object corresponding to the target image based on the target image; obtaining an analysis result based on the first posture reference data and the posture data corresponding to the target image, and the analysis result is used to reflect whether the object is in a motion state corresponding to the first posture reference data.
[0012] Optionally, the first image and the second image are both images captured by the image acquisition device within a first time period; the posture reference data acquisition method further includes: acquiring posture data of the object corresponding to the third image based on the third image captured by the image acquisition device within the second time period; acquiring posture data of the object corresponding to the fourth image based on the fourth image captured by the image acquisition device within the second time period; obtaining a second probability density function based on the posture data corresponding to the third image and the posture data corresponding to the fourth image; acquiring second posture reference data of the object based on the second probability density function, the second posture reference data being the posture data of the object when it is in a second reference motion state; analyzing the motion state of the object within the second time period based on the first posture reference data; analyzing the motion state of the object within the third time period based on the second posture reference data; wherein the first time period, the second time period and the third time period are any three time periods that exist adjacent to each other in chronological order.
[0013] In a second aspect, an embodiment of the present application provides a posture reference data acquisition device, comprising: a first acquisition module, for acquiring the posture data of the object corresponding to the first image based on the first image; acquiring the posture data of the object corresponding to the second image based on the second image; a second acquisition module, for obtaining a first probability density function based on the posture data corresponding to the first image and the posture data corresponding to the second image; and a third acquisition module, for acquiring the first posture reference data of the object based on the first probability density function, the first posture reference data being the posture data of the object when it is in a first reference motion state.
[0014] In a third aspect, an embodiment of the present application provides an electronic chip, comprising: a processor for executing computer program instructions stored in a memory, wherein when the computer program instructions are executed by the processor, the electronic chip is triggered to execute any method as in the first aspect.
[0015] In a fourth aspect, an embodiment of the present application provides an electronic device, which includes a memory for storing computer program instructions, a processor for executing computer program instructions, and a communication device, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute a method as described in any one of the first aspects.
[0016] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer executes any method as in the first aspect.
[0017] In a sixth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is run on a computer, it enables the computer to execute any method as described in the first aspect.
[0018] The embodiment of the present application can obtain the posture reference data of the object. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments. 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 any creative work.
[0020] FIG1 is a flow chart of a method for acquiring attitude reference data according to an embodiment of the present application;
[0021] FIG2 is a schematic diagram of fitting a probability distribution using a histogram according to an embodiment of the present application;
[0022] FIG3 is a schematic diagram of fitting a probability distribution using a kernel density function according to an embodiment of the present application;
[0023] FIG4a is a schematic diagram of a successful calibration example corresponding to a pitch angle provided by an embodiment of the present application;
[0024] FIG4 b is a schematic diagram of a successful calibration example corresponding to a yaw angle provided by an embodiment of the present application;
[0025] FIG5a is a schematic diagram of a calibration failure example corresponding to a pitch angle provided by an embodiment of the present application;
[0026] FIG5 b is a schematic diagram of a calibration failure example corresponding to a yaw angle provided by an embodiment of the present application;
[0027] FIG6a is a schematic diagram of a reference vector estimation result corresponding to a pitch angle provided by an embodiment of the present application;
[0028] FIG6 b is a schematic diagram of a reference vector estimation result corresponding to a yaw angle provided by an embodiment of the present application;
[0029] FIG6 c is a schematic diagram of a reference vector estimation result corresponding to a roll angle provided by an embodiment of the present application;
[0030] FIG7 is a flow chart of another method for acquiring attitude reference data provided by one embodiment of the present application;
[0031] FIG8 is a block diagram of a posture reference data acquisition device provided by one embodiment of the present application;
[0032] FIG9 is a schematic structural diagram of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0033] In order to better understand the technical solution of the present application, the embodiments of the present application are described in detail below with reference to the accompanying drawings.
[0034] It should be clear that the embodiments described are only part of the embodiments of this application, not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0035] The terms used in the embodiments of the present application are for the purpose of describing specific embodiments only and are not intended to limit the present application. The singular forms "a", "an", "the" and "the" used in the embodiments of the present application and the appended claims are also intended to include plural forms unless the context clearly indicates otherwise.
[0036] It should be understood that the term "at least one" used in this article refers to one or more, and "plurality" refers to two or more. The term "and / or" used in this article is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. Among them, A and B can be singular or plural. In addition, the character " / " in this article generally indicates that the previous and next associated objects are in an "or" relationship. "At least one of the following" and similar expressions refer to any combination of these items, including any combination of single or plural items. For example, at least one of a, b and c can be represented by: a, b, c, ab, ac, bc, or abc, where a, b, c can be single or multiple.
[0037] It should be understood that although the terms "first," "second," etc. may be used to describe the set thresholds in the embodiments of the present application, these set thresholds should not be limited to these terms. These terms are merely used to distinguish the set thresholds from each other. For example, without departing from the scope of the embodiments of the present application, the first set threshold may also be referred to as the second set threshold, and similarly, the second set threshold may also be referred to as the first set threshold.
[0038] The terms used in the implementation section of this application are only used to explain the specific embodiments of this application and are not intended to limit this application.
[0039] As shown in FIG1 , an embodiment of the present application provides a method for acquiring attitude reference data. The method may include the following steps 101 to 111 .
[0040] In one embodiment, before step 101, an initialization parameter setting operation may be performed first. The initialization parameter setting operation may include constructing a queue, setting a quantity threshold, initializing a variance threshold, and configuring parameters of a probability density function.
[0041] In one embodiment, when constructing a queue, a pitch angle queue (e.g., queue input_pitch), a yaw angle queue (e.g., queue input_yaw), and a roll angle queue (e.g., queue input_roll) can be constructed separately. Taking the pitch angle as an example, the pitch angle queue can be a list of pitch angles corresponding to multiple frames of continuously acquired images.
[0042] When a queue contains a preset threshold number of posture angles, the queue can be used as input to the head posture reference vector estimation algorithm. Combined with the kernel density estimation algorithm, a probability density function can be calculated. The probability density function can reflect the probability density distribution of the posture angles. Using the kernel density estimation algorithm, the kernel density function of the posture angles can be obtained, and then the probability density function can be obtained based on the kernel density functions of each posture angle in the queue.
[0043] In one embodiment, the number threshold may be 1500 (e.g., size=1500), so that it is necessary to obtain images periodically captured by the camera within a corresponding time period (e.g., 5 minutes). For example, 1500 frames of images may be sequentially extracted from the video captured by the camera.
[0044] In one embodiment, by initializing the variance threshold, the variance threshold corresponding to various attitude angle data sequences can be set. Taking the pitch angle as an example, the pitch angle data sequence can be each pitch angle in the pitch angle queue.
[0045] For example, a variance threshold of the pitch angle data sequence (e.g., denoted as T_var_pitch), a variance threshold of the yaw angle data sequence (e.g., denoted as T_var_yaw), and a variance threshold of the roll angle data sequence (e.g., denoted as T_var_roll) may be set.
[0046] The set variance threshold can be used to determine whether the obtained attitude reference data is appropriate. If appropriate, it can be considered that the attitude reference data is calibrated successfully (or the calibration is passed).
[0047] In one embodiment, if the reference pitch angle, reference yaw angle, and reference roll angle in the attitude reference data are all calibrated successfully, the attitude reference data can be considered to be calibrated successfully. The attitude reference data can be used as a judgment reference to analyze and judge the motion behavior.
[0048] In one embodiment, the parameters of the probability density function may be configured as follows: probability density distribution y_array(181, 1), scale x_array(181, 1). The Chinese interpretation of array may be array.
[0049] In one embodiment, "181, 1" may represent data with 181 rows and 1 column, where "181" is the dimension.
[0050] In one embodiment, the initialization parameter setting operation can be performed by configuring the contents of the following Table 1. Subsequently, the attitude reference vector is estimated based on the parameter values set in Table 1.
[0051] Table 1
[0052] Step 101: Acquire an image captured in real time by a camera for capturing an image of the driver's head.
[0053] In one embodiment, a camera can be used to capture video data of a person's head. The image acquired in step 101 can be a frame extracted from a video (a video includes multiple consecutive frames of images), which is a 2D (two-dimensional) image. Any posture angle of the user's head can be obtained from the image of the user's head in the image.
[0054] In 3D space, the rotation of an object can be represented by three Euler angles: pitch (around the X-axis), yaw (around the Y-axis), and roll (around the Z-axis). These three Euler angles are also called the angles for raising, shaking, and turning the head.
[0055] Step 102: Obtain the posture data of the driver's head based on the acquired image. The posture data includes three posture angles: pitch angle, yaw angle, and roll angle.
[0056] In one embodiment, a head pose estimation algorithm can be used to perform head pose estimation based on images captured by a camera to estimate head pose vector values including three pose angles: pitch, yaw, and roll, for example, recorded as headpose (pitch, yaw, roll).
[0057] Specifically, the posture angle of the head can be obtained through 2D images.
[0058] It is feasible to obtain the driver's head posture angle based on a frame of image in the video through a deep learning model.
[0059] Step 103: Add the pitch angle in the attitude data to a pitch angle queue, add the yaw angle in the attitude data to a yaw angle queue, and add the roll angle in the attitude data to a roll angle queue.
[0060] In one embodiment, the head posture vector value headpose (pitch, yaw, roll) can be added to the queue input_pitch, the queue input_yaw, and the queue input_roll respectively.
[0061] Step 104: Obtain a kernel density function corresponding to the pitch angle according to the pitch angle in the attitude data, obtain a kernel density function corresponding to the yaw angle according to the yaw angle in the attitude data, and obtain a kernel density function corresponding to the roll angle according to the roll angle in the attitude data.
[0062] Kernel Density Estimation (KDE) is a nonparametric test method used in probability theory to estimate unknown density functions. Kernel density estimation techniques can be used to obtain the kernel density function of a sample point.
[0063] In one embodiment, the kernel density function, also called kernel function, may be a Gaussian function.
[0064] By generating the corresponding kernel density function for the attitude angle newly added to the queue, the probability density distribution of the attitude angle can be updated in real time.
[0065] In one embodiment, the kernel density function can be obtained by the following formula (1).
[0066] Among them, K(.) is the kernel density function, and a Gaussian kernel can be selected. x is any sample point in the sample set (x1, x2, ..., xn), for example, it can be a posture angle, and each x is independent and identically distributed.
[0067] Step 105 , determining whether the number of attitude angles in the queue reaches a threshold value, if so, executing step 106 , otherwise executing step 101 .
[0068] In one embodiment, since the number of attitude angles in different queues is generally consistent, it is possible to determine whether the number of attitude angles in any queue has reached a threshold. For example, it is possible to determine whether the number of attitude angles in the input_pitch queue, the input_yaw queue, or the input_roll queue has reached 1500.
[0069] In another embodiment, it may also be determined whether the number of attitude angles in each queue reaches a quantity threshold.
[0070] Step 106: Obtain the probability density function of the corresponding pitch angle based on the kernel density function of the pitch angle in the pitch angle queue; obtain the probability density function of the corresponding yaw angle based on the kernel density function of the yaw angle in the yaw angle queue; and obtain the probability density function of the corresponding roll angle based on the kernel density function of the roll angle in the roll angle queue.
[0071] In one embodiment, taking the pitch angle as an example, the kernel density functions of the various pitch angles may be superimposed to obtain the probability density function of the corresponding pitch angle.
[0072] Assuming that a sample set has N sample points (for example, there are N pitch angles in a pitch angle queue), after fitting the kernel density function to the N sample points, the corresponding N kernel density functions can be superimposed to obtain the probability density function of the entire sample set.
[0073] In one embodiment, assuming that the sample set (x1, x2, ..., xn) is sampled from an unknown probability distribution f, and each x is independent and identically distributed, the probability density function can be obtained by the following formula (2).
[0074] Among them, f is the probability density function, K(.) is the kernel density function, and a Gaussian kernel can be selected.
[0075] Wherein, h is the bandwidth (band_width), that is, the standard deviation of the Gaussian kernel (the standard deviation of the Gaussian kernel is not the standard deviation of the sample data). In one embodiment, to simplify the calculation, h=1.0 can be taken.
[0076] In order to reflect the probability density distribution of the attitude angle, in one implementation, the probability distribution can be fitted by a histogram. In another implementation, the probability distribution can be fitted by a kernel density function as shown in the embodiment described in FIG. 1 .
[0077] Assume that a sample set is X = {x1 = -2.1, x2 = -1.3, x3 = -0.4, x4 = 1.9, x5 = 5.1, x6 = 6.2}, and the sample set has 6 sample points. When the above two implementation methods are used to fit the probability distribution, the schematic diagrams of the fitted probability distribution can be shown in Figures 2 and 3 respectively. Figure 2 is a schematic diagram of a probability distribution fitted by a histogram provided by an embodiment of the present application, and Figure 3 is a schematic diagram of a probability distribution fitted by a kernel density function provided by an embodiment of the present application. The horizontal axis in Figures 2 and 3 is x, and the vertical axis can be the density function
[0078] (Density function).
[0079] Please refer to Figure 3, which shows six kernel density functions corresponding to six sample points (as shown by the dotted curve in Figure 3), and a probability density function obtained by superimposing the six kernel density functions (as shown by the solid curve in Figure 3).
[0080] In conjunction with the contents shown in Figures 2 and 3, compared to the implementation method of fitting the probability distribution using a histogram, the embodiment shown in Figure 1 combines the kernel density function and the probability density function to represent the probability density distribution of the attitude angle, which can have the following advantages:
[0081] 1) As shown in Figure 3, using a kernel density function to fit a probability distribution yields a continuous and accurate probability distribution. However, as shown in Figure 2, using a histogram to fit a probability distribution results in a discontinuous distribution due to the shape of the histogram, which depends largely on the number of bins selected. Furthermore, the histogram may contain bins that appear zero times, making the distribution discontinuous.
[0082] 2) Although the head pose angle estimated by the head pose estimation algorithm for each frame may not be absolutely accurate, by converting each estimated value (such as the head pose angle) into a Gaussian function representation, the estimated probability density function can be made more robust and accurate.
[0083] Step 107: Take the pitch angle corresponding to the maximum value in the probability density function of the pitch angle as the reference pitch angle, take the yaw angle corresponding to the maximum value in the probability density function of the yaw angle as the reference yaw angle, and take the roll angle corresponding to the maximum value in the probability density function of the roll angle as the reference roll angle.
[0084] The probability density function can reflect the probability density distribution of the attitude angle, so the attitude angle with the maximum probability can be taken as the reference value of the attitude angle.
[0085] Step 108 : Calculate the variance of the pitch angle in the pitch angle queue, the variance of the yaw angle in the yaw angle queue, and the variance of the roll angle in the roll angle queue.
[0086] In one embodiment, taking the pitch angle as an example, the variance of 1500 pitch angles in the pitch angle queue may be calculated.
[0087] In the embodiment shown in FIG1 , a reference value is first generated, and then the validity of the generated reference value is calibrated based on the variance. In other embodiments, the validity of the generated reference value can also be calibrated based on the variance (i.e., the validity of the reference value is predicted). If the calibration is successful, the reference value is generated; if the calibration is successful, no reference value generation is required.
[0088] Step 109: Save the calculated variance and clear the attitude angles in each queue.
[0089] By saving the variance and clearing the queue, if subsequent calibration fails, it can be considered that the attitude reference data is not obtained based on the existing image. Then the attitude angle of the new image can be added to the queue, and the attitude reference data can be obtained again based on the attitude angle in the queue.
[0090] If subsequent calibration is successful, when new attitude reference data needs to be obtained, the attitude angle of the new image can be added to the queue so that new attitude reference data can be obtained based on the attitude angle in the queue.
[0091] Clear the sample space by clearing the pose angles in the queue.
[0092] Step 110 , determining whether the calculated variances are all not greater than the corresponding variance threshold, if so, executing step 111 , otherwise executing step 101 .
[0093] It is feasible to determine whether the pitch angle variance is not greater than a preset pitch angle variance threshold, whether the yaw angle variance is not greater than a preset yaw angle variance threshold, and whether the roll angle variance is not greater than a preset roll angle variance threshold.
[0094] If step 110 determines yes, the calibration is considered successful, and the reference value obtained in step 107 can be used as the posture reference data. If step 110 determines no, the calibration is considered unsuccessful, and the reference value obtained in step 107 is not suitable for use as a standard for the normal position of the human head. Step 101 is then re-executed to attempt to obtain posture reference data based on a new image. In one embodiment, this cycle can be repeated until posture reference data is obtained.
[0095] Step 111 : Acquire attitude reference data, where the attitude reference data includes a reference pitch angle, a reference yaw angle, and a reference roll angle.
[0096] The attitude reference data includes the reference pitch angle, the reference yaw angle, and the reference roll angle. The vector composed of these three attitude angles in 3D space can be regarded as a reference vector.
[0097] The embodiment shown in FIG1 can estimate a reference vector for a user's head and obtain a head pose reference vector. The head pose reference vector, derived from images captured by a camera over a period of time (e.g., 5 minutes), can reflect the most normal position of the user's head during that period.
[0098] In one embodiment, multiple frames of images in the video can be collected separately, and the user head posture angle corresponding to each frame of the image can be obtained separately through a deep learning model. The continuous user head posture angles obtained over a period of time are used as the input of the head posture reference vector estimation algorithm, and combined with the kernel density estimation algorithm, the estimated head posture reference vector can be output.
[0099] The head pose reference vector serves as a standard for the normal head position. This standard can be used to determine the head's motion and, consequently, to identify human behavior. For example, in an application scenario in assisted driving, the head pose reference vector can be combined with the driver's distraction assessment.
[0100] In this way, after obtaining the posture reference data, the movement state of the driver's head can be analyzed and processed based on the posture reference data, such as analyzing whether there is a large deviation of the driver's head compared to the posture reference data, so as to determine whether the driver is distracted during driving.
[0101] In one embodiment, taking the pitch angle as an example, the initialization parameter setting operation performed before step 101 may include the following:
[0102] Initialize queue input_pitch = [], size = 1500
[0103] Initialize calibration threshold T_var_pitch = 70
[0104] Set the scale x_array (-90 to 90), size = (181, 1)
[0105] Set the probability distribution y_array, size = (181, 1)
[0106] Corresponding to the above steps 102 to 104, taking the pitch angle (pitch) as an example, after obtaining the pitch according to the current frame image (for example, recorded as the current frame pitch), the current frame pitch can be added to the queue input_pitch, and the kernel density function of the current frame pitch is calculated to realize the contribution of the current frame pitch on the entire scale (x_array), thereby completing the update of the probability density distribution of the pitch angle. The relevant implementation code program of this implementation process may include the following: input_pitch.append(pitch)#Enter the queue for index, kick in enumerate(x_array): y_array[index]+=gauss(kick-pitch) / bandwidth
[0107] Corresponding to steps 105 to 106 above, after the current frame pitch is added to the queue input_pitch, it can be determined whether the number of pitch angles in the queue reaches 1500. If the number of pitch angles in the queue input_pitch reaches 1500, the probability density function of the corresponding pitch angle can be calculated based on the kernel density function of the pitch angle in the queue input_pitch, and then the head posture reference vector can be calculated based on the probability density function of the corresponding pitch angle.
[0108] Corresponding to step 107 above, the angle corresponding to the maximum value of the probability density function can be used as the reference value. This value is stable and has a unique solution. For example, the x_array corresponding to the maximum value of pitch's y_array can be used as the pitch angle reference angle (pitch_base), also known as the reference pitch angle. Similarly, the yaw angle reference angle (yaw_base), also known as the reference yaw angle, and the roll angle reference angle (roll_base), also known as the reference roll angle, can be obtained.
[0109] Corresponding to step 108 , in order to calibrate the validity of the obtained reference value, the variance of each pitch angle in the queue input_pitch , the variance of each yaw angle in the queue input_yaw , and the variance of each roll angle in the queue input_roll may be calculated.
[0110] Corresponding to the above steps 110 to 111, after the variance is solved, the solved variance can be compared with the corresponding variance threshold. Among them, by comparing the variance of each pitch angle in the queue input_pitch with the set pitch angle variance threshold T_var_pitch, it is determined whether the pitch angle calibration is successful; by comparing the variance of each yaw angle in the queue input_yaw with the set yaw angle variance threshold T_var_yaw, it is determined whether the yaw angle calibration is successful; by comparing the variance of each roll angle in the queue input_roll with the set roll angle variance threshold T_var_roll, it is determined whether the roll angle calibration is successful. If all calibrations are successful, the estimated head posture reference vector (pitch_base, yaw_base, roll_base) can be obtained. The estimated head posture reference vector can be used to determine the movement state of the human head, and then identify the human behavior.
[0111] In a test example, T_var_pitch = 70, T_var_yaw = 400, and T_var_roll = 150 were set. By statistically analyzing the calibration results of the test samples, an overall calibration success rate of 86% was obtained. This high overall calibration success rate indicates that the posture reference data acquisition method provided in the embodiments of the present application can generally obtain accurate posture reference data and is easy to obtain.
[0112] FIG4 a shows a successful calibration example corresponding to the pitch angle, FIG4 b shows a successful calibration example corresponding to the yaw angle, FIG5 a shows a failed calibration example corresponding to the pitch angle, and FIG5 b shows a failed calibration example corresponding to the yaw angle.
[0113] In FIG4 a , the horizontal axis is the pitch angle, and the vertical axis is the frequency. The variance calculated based on the pitch angle in the queue is Var=27.22. The baseline value of the pitch angle is base=3.49. Var=27.22<70, so the calibration of base=3.49 is successful.
[0114] In Figure 4b, the horizontal axis is the yaw angle (yaw), and the vertical axis is the frequency (frequency). The variance calculated based on the yaw angle in the queue is Var = 78.57. The baseline value of the yaw angle is base = 11.79. Var = 78.57 < 400, so the calibration of base = 11.79 is successful.
[0115] In Figure 5a, the horizontal axis is the pitch angle, and the vertical axis is the frequency. The variance calculated based on the pitch angle in the queue is Var = 111.77. The baseline value of the pitch angle is base = -0.35. Var = 111.77 > 70, so the calibration of base = -0.35 fails.
[0116] In Figure 5b, the horizontal axis is the yaw angle (yaw), and the vertical axis is the frequency (frequency). The variance calculated based on the yaw angle in the queue is Var = 576.58. The baseline value of the yaw angle is base = 18.14. Var = 576.58 > 400, so the calibration of base = 18.14 fails.
[0117] Please refer to the data distribution diagrams shown in Figures 4a, 4b, 5a, and 5b to see the calibration situation, which shows that the variance can be used to better filter out samples that do not meet the preset calibration requirements.
[0118] FIG6 a shows a reference vector estimation result corresponding to a pitch angle, FIG6 b shows a reference vector estimation result corresponding to a yaw angle, and FIG6 c shows a reference vector estimation result corresponding to a roll angle.
[0119] In FIG6 a , the variance calculated based on the pitch angle in the queue is Var=28.36, the reference value of the pitch angle is base=15.00, and Var=28.36<70, so the calibration of base=15.00 is successful.
[0120] In FIG6 b , the variance calculated based on the yaw angle in the queue is Var=181.97, the reference value of the yaw angle is base=4.00, and Var=181.97<400, so the calibration of base=4.00 is successful.
[0121] In FIG6 c , the variance calculated based on the roll angle in the queue is Var=129.02, the baseline value of the roll angle is base=15.27, and Var=129.02<150, so the calibration of base=15.27 is successful.
[0122] Since the three reference values are calibrated successfully, the estimated attitude reference vector can be (pitch_base=15.00, yaw_base=4.00, roll_base=15.27).
[0123] Based on the embodiment shown in FIG1 , a method for estimating a user's head posture reference vector using a video-based kernel density estimation algorithm can be provided. The embodiment shown in FIG1 can have at least the following beneficial effects:
[0124] (1) Compared with the method of using a histogram to calculate the attitude reference vector by fitting the probability distribution, the embodiment shown in FIG1 calculates the attitude reference vector by using a kernel density estimation algorithm to fit the probability distribution, which can make the attitude estimation more precise and accurate, and have stronger robustness.
[0125] (2) The embodiment shown in FIG1 is simple, easy to implement and deploy. The entire process maintains and updates a probability density distribution variable in real time. Compared with other methods of estimating reference vectors that use all values to estimate at once, the instantaneous load on the CPU (central processing unit) is small, so that the embodiment shown in FIG1 can be deployed on an end device for operation.
[0126] (3) The embodiment shown in FIG1 utilizes sample variance to set the calibration threshold. Combined with the calibration threshold, it is possible to better filter out samples that do not meet the requirements, thereby achieving the desired calibration purpose.
[0127] As shown in FIG7 , an embodiment of the present application provides a method for acquiring attitude reference data, which may include steps 701 to 704:
[0128] Step 701: Acquire posture data of an object corresponding to the first image based on the first image.
[0129] Step 702: Acquire posture data of the object corresponding to the second image based on the second image.
[0130] In one embodiment, the first image and the second image may be images captured in real time by an image capture device, for example, any frame image in a real-time video recording.
[0131] In another embodiment, the first image and the second image may also be non-real-time images captured by an image capture device, for example, any frame image in an existing recorded video.
[0132] It is feasible that the first image is first acquired and step 701 is performed, and then the second image is acquired and step 702 is performed. In another embodiment, the second image may be first acquired and step 702 is performed, and then the first image is acquired and step 701 is performed. This application does not limit this.
[0133] For any frame of image captured by the image acquisition device, the image may contain an image of the object or may not contain an image of the object (for example, when the object temporarily leaves the image acquisition area). In order to analyze the motion posture of the object, most images captured by the image acquisition device usually contain an image of the object.
[0134] The object can be the user's head, such as the driver's head, the test taker's head, etc., or it can be the user's whole body, the robot's whole body, a drone, etc.
[0135] In one embodiment, the attitude data may include at least one attitude angle of a pitch angle, a yaw angle, and a roll angle. For example, in one embodiment, the attitude data includes the pitch angle. In another embodiment, the attitude data includes the yaw angle and the roll angle. In yet another embodiment, the attitude data includes the pitch angle, the yaw angle, and the roll angle.
[0136] In one embodiment, a deep learning model or other posture recognition algorithm can be used to obtain corresponding posture data of an object based on an image. For example, for an image captured by a camera used to capture the driver's head, a deep learning model can be used to obtain the pitch angle, yaw angle, and roll angle of the driver's head based on the image of the driver's head in the image.
[0137] Step 703 : Obtain a first probability density function according to the posture data corresponding to the first image and the posture data corresponding to the second image.
[0138] The first image and the second image may be any two images among a plurality of images used to obtain the first probability density function.
[0139] In one embodiment, the number of images used to obtain the first probability density function may be multiple, for example, 1500. According to the posture data corresponding to these images, the probability density function of the posture data may be obtained.
[0140] In one embodiment, taking the attitude data including the pitch angle as an example, the probability density function corresponding to the pitch angle can be obtained based on the pitch angle in the attitude data. Similarly, the probability density function corresponding to the yaw angle and the probability density function corresponding to the roll angle can also be obtained.
[0141] Step 704 : acquiring first posture reference data of the object according to the first probability density function, where the first posture reference data is posture data of the object when the object is in a first reference motion state.
[0142] The reference motion state of an object may include, for example, the body posture or head posture of a driver during normal driving, the normal sitting posture or head posture of a test taker during an examination, and the like.
[0143] Considering that the probability of an object maintaining a reference motion state for a period of time is usually high, the posture data with a higher probability can be taken as the posture reference data of the object.
[0144] In one embodiment, the posture data corresponding to the maximum value of the probability density function may be taken as the posture reference data of the object.
[0145] In another embodiment, the optimal posture data among all the posture data used to obtain the first probability density function can be taken as the posture reference data of the object, and the value of the optimal posture data in the first probability density function is not less than the value of any other posture data in the first probability density function.
[0146] In one embodiment, the camera can capture 1500 frames of images of the driver's head within 5 minutes, and the posture data corresponding to the 1500 frames of images can be obtained based on the captured 1500 frames of images. A probability density function can be obtained based on the obtained posture data, and then the posture reference data of the driver's head can be obtained based on the probability density function. The obtained posture reference data can reflect the driver's common driving posture within the 5 minutes, and the common driving posture can be defaulted to the driver's head posture when driving the vehicle normally.
[0147] In one embodiment of the present application, the step of obtaining a first probability density function based on the posture data corresponding to the first image and the posture data corresponding to the second image may include: obtaining a first kernel density function based on the posture data corresponding to the first image; obtaining a second kernel density function based on the posture data corresponding to the second image; and obtaining a first probability density function based on the first kernel density function and the second kernel density function.
[0148] It is feasible to use the posture data of an image as a sample point of the sample set, fit the posture data of each image to obtain the corresponding kernel density function, which is a probability density function, and then superimpose all the obtained kernel density functions to obtain the probability density function of the entire sample set.
[0149] In one embodiment, the kernel density function or kernel function may be a Gaussian function.
[0150] The number of posture data required to calculate the first probability density function is usually large, for example, 1,500 posture data are required. In one embodiment, after the posture data of any image is acquired, the acquired posture data can be added to the posture data set, and a corresponding kernel density function can be generated based on the posture data of the image to achieve real-time maintenance and update of the probability density distribution of the posture data variable. Based on this, when the number of posture data reaches a preset threshold, the various kernel density functions that have been acquired can be directly superimposed to quickly obtain the probability density function. This implementation method reduces the instantaneous load of the CPU, so that the posture reference data acquisition method can be deployed on the terminal device for calculation.
[0151] In one embodiment, the posture reference data acquisition method may further include: when it is determined that the number of posture data in the first posture data set does not reach a preset quantity threshold, the posture data corresponding to the first image is added to the first posture data set to obtain a second posture data set; after obtaining the second posture data set, the step of obtaining a first kernel density function is executed; after obtaining the first kernel density function, whether the number of posture data in the second posture data set reaches the quantity threshold is determined; when it is determined that the number of posture data in the second posture data set does not reach the quantity threshold, the posture data corresponding to the second image is added to the second posture data set to obtain a third posture data set; after obtaining the third posture data set, the step of obtaining a second kernel density function is executed; after obtaining the second kernel density function, whether the number of posture data in the third posture data set reaches the quantity threshold is determined; when it is determined that the number of posture data in the third posture data set reaches the quantity threshold, the step of obtaining a first probability density function is executed.
[0152] In one embodiment, the gesture data collection can be implemented in a queue. When a gesture data is obtained, the obtained gesture data can be added to the queue, and it is determined whether the number of gesture data in the queue reaches a threshold. If the threshold is not reached, the gesture data of the new image needs to be added. Otherwise, the gesture data of the new image does not need to be added.
[0153] In one embodiment, the pitch angle in the attitude data can be added to a queue corresponding to the pitch angle, the yaw angle in the attitude data can be added to a queue corresponding to the yaw angle, and the roll angle in the attitude data can be added to a queue corresponding to the roll angle.
[0154] Based on the embodiment shown in Figure 7, assuming that the number of posture data in the queue has not reached 1500, the newly acquired posture data of the first image is added to the queue, and a corresponding kernel density function is generated based on the posture data of the first image. Since the posture data of the first image has been newly added, it is again determined whether the number of posture data in the queue has reached 1500. Assuming that it has not yet reached 1500, the newly acquired posture data of the second image is added to the queue, and a corresponding kernel density function is generated based on the posture data of the second image. Since the posture data of the second image has been newly added, it is again determined whether the number of posture data in the queue has reached 1500. Assuming that it has reached 1500, the generated kernel density functions corresponding to the various posture data in the queue can be superimposed to obtain a probability density function.
[0155] Different from the implementation method of real-time maintenance and updating of the probability density distribution of the posture data variable, in another embodiment, after determining that the number of posture data in the posture data set reaches a quantity threshold, a corresponding kernel density function can be generated based on each posture data in the posture data set, and then the generated kernel density functions can be superimposed to obtain a probability density function.
[0156] In one embodiment, to obtain accurate attitude reference data, the attitude reference data may be first obtained, and then calibrated (or verified) the obtained attitude reference data in combination with the variance. If the calibration is successful, the attitude reference data may be used to analyze the object's motion state. If the calibration is for recognition, the attitude reference data may not be used to analyze the object's motion state.
[0157] The variance of each posture data in the posture data set can be calculated and compared with a preset variance threshold, and the posture reference data can be calibrated according to the comparison result.
[0158] In another embodiment, to obtain accurate posture reference data, the variance can be combined to predict whether the obtained posture reference data is accurate. The variance can be combined to determine whether the posture reference data needs to be generated, so that the generated posture reference data is accurate data; otherwise, no generation is required.
[0159] In one embodiment of the present application, the posture data includes a first posture angle; the posture reference data acquisition method also includes: obtaining the variance of the first posture angle based on the first posture angle in the posture data corresponding to the first image and the first posture angle in the posture data corresponding to the second image; when the obtained variance meets the preset requirements, determining that the first posture reference data is available, or when the obtained variance meets the preset requirements, executing the step of obtaining the first probability density function; wherein the preset requirements include that the variance of the obtained first posture angle is not greater than a preset variance threshold of the first posture angle.
[0160] The first attitude angle may be any one of a pitch angle, a yaw angle, and a roll angle.
[0161] In one embodiment of the present application, the posture data includes a second posture angle; the posture reference data acquisition method also includes: obtaining the variance of the second posture angle based on the second posture angle in the posture data corresponding to the first image and the second posture angle in the posture data corresponding to the second image; wherein, the preset requirement also includes that the second variance is not greater than a preset variance threshold of the second posture angle.
[0162] The posture data may include more than one posture angle. When the posture data includes more than one posture angle, the variance of each posture angle may be limited to no greater than a corresponding variance threshold before accurate posture reference data can be obtained based on the posture data in the posture data set. If the variance of any posture angle exceeds the corresponding variance threshold, it can be considered that accurate posture reference data cannot be obtained based on the posture data in the posture data set.
[0163] In one embodiment of the present application, the posture reference data acquisition method may further include: analyzing the motion state of the object according to the first posture reference data.
[0164] In one embodiment of the present application, the first image and the second image are both images captured by an image acquisition device; the step of analyzing the motion state of the object based on the first posture reference data may include: obtaining a target image captured in real time by the image acquisition device; obtaining posture data of the object corresponding to the target image based on the target image; obtaining an analysis result based on the first posture reference data and the posture data corresponding to the target image, and the analysis result is used to reflect whether the object is in a motion state corresponding to the first posture reference data.
[0165] After the posture reference data is acquired, the posture reference data can be used in the analysis and processing of the object's motion state over a subsequent period of time.
[0166] After acquiring the attitude reference data, an image can be captured in real time. After capturing a real-time image, the attitude data of the real-time image is obtained and compared with the attitude reference data. For example, the yaw angle in the attitude data of the real-time image is compared with the yaw angle in the attitude reference data to determine the difference between the two yaw angles. If the difference is large, it can be considered that the user's current motion state is significantly different from the motion state of the reference. If the difference is small, it can be considered that the user's current motion state is not much different from the motion state of the reference.
[0167] After completing the analysis and processing of the currently captured real-time image, the next captured real-time image can be analyzed and processed, and the cycle continues. Thus, in one embodiment, after completing the step of obtaining the analysis results, the step of obtaining the target image captured in real time by the image acquisition device can be performed again. In this way, real-time monitoring of the user's motion status can be achieved.
[0168] In one embodiment, the operation of acquiring the posture reference data may be performed only once, and the acquired posture reference data may be applied to subsequent object motion state analysis processing.
[0169] In another embodiment, the operation of acquiring posture reference data may be performed periodically or multiple times as needed, and the acquired posture reference data may be applied to the object motion state analysis process in a subsequent corresponding time period (during which no new posture reference data is acquired).
[0170] In one embodiment of the present application, the first image and the second image are both images captured by the image acquisition device within a first time period; the posture reference data acquisition method may also include: acquiring posture data of the object corresponding to the third image based on the third image captured by the image acquisition device within the second time period; acquiring posture data of the object corresponding to the fourth image based on the fourth image captured by the image acquisition device within the second time period; obtaining a second probability density function based on the posture data corresponding to the third image and the posture data corresponding to the fourth image, the second posture reference data being the posture data of the object when it is in a second reference motion state; acquiring the second posture reference data of the object based on the second probability density function; analyzing the motion state of the object within the second time period based on the first posture reference data; analyzing the motion state of the object within the third time period based on the second posture reference data; wherein the first time period, the second time period and the third time period are any three time periods that exist adjacent to each other in chronological order.
[0171] For example, the operation of acquiring posture reference data may be performed every 5 minutes. The posture reference data obtained based on images collected during the 0th to 5th minute period is used in the object motion state analysis process during the 6th to 10th minute period. Furthermore, the posture reference data obtained based on images collected during the 6th to 10th minute period is used in the object motion state analysis process during the 11th to 15th minute period. And so on.
[0172] Since the posture reference data obtained each time is taken from the motion state of the object in the corresponding time period, it may not necessarily accurately reflect the reference motion state of the object. By periodically obtaining the corresponding posture reference data based on real-time posture data multiple times and applying the obtained posture reference data to the analysis and processing of the object's motion state in the subsequent continuous time period, it helps to achieve accurate analysis and processing of the object's motion state.
[0173] As shown in FIG8 , an embodiment of the present application provides a posture reference data acquisition device 80 , including: a first acquisition module 801 , a second acquisition module 802 , and a third acquisition module 803 .
[0174] The first acquisition module 801 is configured to acquire, based on the first image, posture data of the object corresponding to the first image; and, based on the second image, to acquire posture data of the object corresponding to the second image. The second acquisition module 802 is configured to obtain a first probability density function based on the posture data corresponding to the first image and the posture data corresponding to the second image. The third acquisition module 803 is configured to acquire first posture reference data of the object based on the first probability density function. The first posture reference data is posture data of the object when it is in a first reference motion state.
[0175] One embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer-readable storage medium is run on a computer, the computer is enabled to execute the method described in any embodiment of the present application.
[0176] One embodiment of the present application provides a computer program product, which includes a computer program. When the computer program runs on a computer, the computer executes the method described in any embodiment of the present application.
[0177] Figure 9 is a schematic diagram of a computer device provided in an embodiment of the present application. As shown in Figure 9, the computer device 20 of this embodiment includes: a processor 21 and a memory 22. The memory 22 is used to store a computer program 23 that can be executed on the processor 21. When the computer program 23 is executed by the processor 21, it implements the steps of the method embodiment of the present application. To avoid repetition, they are not described here one by one. Alternatively, when the computer program 23 is executed by the processor 21, it implements the functions of each model / unit in the device embodiment of the present application. To avoid repetition, they are not described here one by one.
[0178] The computer device 20 includes, but is not limited to, a processor 21 and a memory 22. Those skilled in the art will appreciate that FIG9 is merely an example of the computer device 20 and does not limit the computer device 20 . The computer device 20 may include more or fewer components than shown, or may combine certain components or different components. For example, the computer device may also include input and output devices, network access devices, buses, and the like.
[0179] The processor 21 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, etc.
[0180] The memory 22 can be an internal storage unit of the computer device 20, such as a hard disk or memory of the computer device 20. The memory 22 can also be an external storage device of the computer device 20, such as a plug-in hard disk, a Smart Media (SM) card, a Secure Digital (SD) card, a Flash Card, etc. equipped on the computer device 20. Furthermore, the memory 22 can include both an internal storage unit of the computer device 20 and an external storage device. The memory 22 is used to store the computer program 23 and other programs and data required by the computer device. The memory 22 can also be used to temporarily store data that has been output or is about to be output.
[0181] In the several embodiments provided in this application, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices or units, which may be electrical, mechanical or other forms.
[0182] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0183] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or in the form of hardware plus software functional units.
[0184] The integrated unit implemented in the form of a software functional unit can be stored in a computer-readable storage medium. The above-mentioned software functional unit is stored in a storage medium and includes a number of instructions for causing a computer device (which can be a personal computer, server, or network device, etc.) or a processor to perform some steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, and other media that can store program code.
[0185] In the embodiments of the present application, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of additional identical elements in the process, method, commodity, or apparatus comprising the element.
[0186] The present application may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communications network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.
[0187] The various embodiments in this application are described in a progressive manner. Similar parts between the various embodiments can be referred to in conjunction with each other. Each embodiment focuses on the differences from other embodiments. In particular, the device embodiments are generally similar to the method embodiments, so the description is relatively simple. For relevant parts, refer to the partial description of the method embodiments.
[0188] Those skilled in the art will appreciate that the various units and algorithm steps described in the embodiments of the present application can be implemented using a combination of electronic hardware, computer software, and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0189] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the systems, devices and units described above can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0190] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principles of the present application shall be included in the scope of protection of the present application.
Claims
1. A method for acquiring attitude reference data, characterized in that: include: According to the first image, acquiring posture data of the object corresponding to the first image; According to the second image, acquiring posture data of the object corresponding to the second image; Obtaining a first probability density function according to the posture data corresponding to the first image and the posture data corresponding to the second image; According to the first probability density function, first posture reference data of the object is acquired, where the first posture reference data is posture data when the object is in a first reference motion state.
2. The method according to claim 1, characterized in that The step of obtaining a first probability density function according to the posture data corresponding to the first image and the posture data corresponding to the second image comprises: Obtaining a first kernel density function according to the posture data corresponding to the first image; Obtaining a second kernel density function according to the posture data corresponding to the second image; A first probability density function is obtained according to the first kernel density function and the second kernel density function.
3. The method according to claim 2, characterized in that The method further includes: if it is determined that the amount of posture data in the first posture data set does not reach a preset amount threshold, adding the posture data corresponding to the first image to the first posture data set to obtain a second posture data set; After obtaining the second posture data set, performing the step of obtaining the first kernel density function; After obtaining the first kernel density function, determining whether the amount of posture data in the second posture data set reaches the amount threshold; When it is determined that the amount of posture data in the second posture data set does not reach the amount threshold, adding the posture data corresponding to the second image to the second posture data set to obtain a third posture data set; After obtaining the third posture data set, performing the step of obtaining the second kernel density function; After obtaining the second kernel density function, determining whether the amount of posture data in the third posture data set reaches the amount threshold; When it is determined that the number of posture data in the third posture data set reaches the number threshold, the step of obtaining the first probability density function is performed.
4. The method according to claim 1, characterized in that: The posture data includes a first posture angle; The method further includes: obtaining a variance of the first attitude angle according to the first attitude angle in the attitude data corresponding to the first image and the first attitude angle in the attitude data corresponding to the second image; When the obtained variance meets the preset requirement, determining that the first posture reference data is available, or when the obtained variance meets the preset requirement, executing the step of obtaining the first probability density function; The preset requirement includes that the variance of the obtained first attitude angle is not greater than a preset variance threshold of the first attitude angle.
5. The method according to claim 1, characterized in that The method further includes: analyzing the motion state of the object according to the first posture reference data.
6. The method according to claim 5, characterized in that The first image and the second image are both images captured by an image capture device; The analyzing the motion state of the object according to the first posture reference data includes: Acquire the target image acquired by the image acquisition device in real time; According to the target image, acquiring posture data of the object corresponding to the target image; An analysis result is obtained according to the first posture reference data and the posture data corresponding to the target image, and the analysis result is used to reflect whether the object is in a motion state corresponding to the first posture reference data.
7. The method according to claim 1, characterized in that The first image and the second image are both images captured by an image capture device within a first time period; The method further comprises: acquiring posture data of the object corresponding to the third image according to the third image acquired by the image acquisition device within the second time period; Acquire, according to a fourth image acquired by the image acquisition device within the second time period, posture data of the object corresponding to the fourth image; Obtaining a second probability density function according to the posture data corresponding to the third image and the posture data corresponding to the fourth image; According to the second probability density function, obtaining second posture reference data of the object, where the second posture reference data is posture data when the object is in a second reference motion state; analyzing the motion state of the object in the second time period according to the first posture reference data; analyzing the motion state of the object in a third time period according to the second posture reference data; The first time period, the second time period and the third time period are any three time periods that are adjacent to each other in chronological order.
8. A posture reference data acquisition device, characterized in that: include: A first acquisition module, configured to acquire, based on a first image, posture data of an object corresponding to the first image; According to the second image, acquiring posture data of the object corresponding to the second image; A second acquisition module, configured to obtain a first probability density function according to the posture data corresponding to the first image and the posture data corresponding to the second image; The third acquisition module is used to acquire first posture reference data of the object according to the first probability density function, where the first posture reference data is posture data of the object when it is in a first reference motion state.
9. An electronic device, characterized in that: The electronic device comprises a memory for storing computer program instructions, a processor for executing the computer program instructions, and a communication device, wherein when the computer program instructions are executed by the processor, the electronic device is triggered to execute the method as described in any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed on a computer, enables the computer to execute the method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Head posture estimation method and device, electronic equipment and storage medium
CN111160237A
Method and system for dynamically calibrating a reference posture of head of driver, computer equipment and recording medium
CN113331827A
Driver attitude regression method based on general probability distribution
CN113887558A
Attitude reference angle generation method and device
CN115393429A
Computer readable storage medium having information processing program stored thereon and information processing apparatus
US20100248834A1