基于2D激光雷达和RGB-D相机的人体状态识别方法和装置
By combining 2D LiDAR and RGB-D cameras, and utilizing Kalman filtering algorithms and grid maps, the problem of 2D LiDAR's inability to recognize human posture and orientation was solved, achieving more accurate human state recognition and tracking detection, and improving the accuracy of robot navigation.
Patent Information
- Application Number
- CN202111271453.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-29
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2041-10-29
AI Technical Summary
In existing technologies, 2D LiDAR cannot accurately identify the posture and orientation of a human body, which may cause the robot to send objects behind the person during navigation tasks.
By combining 2D LiDAR and RGB-D camera, and using grid maps and Kalman filtering algorithms, human leg data and joint information are determined. The 3D information from the RGB-D camera is used to supplement the shortcomings of 2D LiDAR, thus realizing human body state recognition.
It improves the accuracy and scope of human body detection, tracks the detection target in real time, reduces false detections and missed detections, and enhances the accuracy of robot navigation.
Smart Images

Figure CN116068575B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of robotics technology, and in particular relates to a method and device for human state recognition based on 2D LiDAR and RGB-D camera. Background Technology
[0002] Pedestrian detection and tracking is an important application area in the research of target detection and tracking. It is a core technology in computer vision fields such as robotics. For example, indoor mobile robots can autonomously detect pedestrians and track their states, taking into account their interactions with them, in order to obtain the pedestrians' poses and speeds.
[0003] Currently, robot detection uses 2D LiDAR to detect and track pedestrians. The 2D LiDAR sensors on mobile robots are often mounted underneath the robot; therefore, most LiDAR-based human detection algorithms rely solely on detecting leg features to identify humans in the environment.
[0004] However, laser detection of a person's legs cannot determine the user's posture when stationary or their orientation when in motion, even though posture is crucial for a robot's navigation tasks. For example, suppose a stationary person is facing away from the robot, and the robot's task is to deliver an item to this person. If the robot cannot identify the person's posture or orientation, it might deliver the object behind the person. Summary of the Invention
[0005] Based on the above analysis, the present invention aims to propose a human state recognition method and device based on 2D LiDAR and RGB-D camera to solve the problem that robots cannot recognize human posture and orientation.
[0006] The objective of this invention is mainly achieved through the following technical solutions:
[0007] On one hand, the present invention provides a method for human state recognition based on 2D LiDAR and RGB-D camera, characterized in that it includes:
[0008] Based on grid maps and 2D LiDAR, the data of the first human leg was determined;
[0009] Based on an RGB-D camera, data on the second human leg and information on human joints were determined.
[0010] Based on the first and second leg data, the leg position and speed information are determined using Kalman filtering.
[0011] Based on the aforementioned human joint information, determine the posture angle of the human leg;
[0012] The state information of the human body is determined based on the position information of the human leg, the speed information of the human leg, and the posture angle of the human leg.
[0013] Furthermore, laser data of the human leg is collected using the 2D lidar;
[0014] Based on a preset laser data gradient and a preset human leg diameter, at least one cluster point set is determined from the human leg laser data, and the cluster point set includes at least one laser point;
[0015] Based on the grid map, determine the location information of the obstacles;
[0016] For each cluster point set, based on the obstacle location information, the distance between each laser point and the obstacle is determined, and the proportion of laser points whose distance is less than a first preset value in the corresponding cluster point set is calculated;
[0017] Delete the cluster set whose proportion is greater than the second preset value to obtain the first human leg data.
[0018] Furthermore, based on the images captured by the RGB-D camera, the skeleton points of the observed target and the pixel coordinates of the skeleton points are determined;
[0019] The three-dimensional coordinates of the skeleton points are determined based on the pixel coordinates of the skeleton points, the depth image, and the back projection model of the RGB-D camera.
[0020] Based on the three-dimensional coordinates of the skeletal points, determine the position information of the human leg skeletal points and the information of the human joints;
[0021] Based on the position information of the human leg skeleton points, second human leg data is generated.
[0022] Furthermore, the first or second leg data received at the first moment is taken as the state variable, and the second or first leg data received at the next moment is taken as the observation.
[0023] Based on the state variables, Kalman filtering is performed to predict the state variables at the next time step.
[0024] By comparing the detection target corresponding to the state quantity at the next time step with the detection target corresponding to the observation, when the two match, the state quantity at the next time step is optimized and updated based on the current observation.
[0025] Subsequently, the received first or second human leg data is alternately used as the observation to continuously optimize the corresponding state quantity for the next time step.
[0026] Furthermore, the tracking of the target corresponding to the state quantity at the next moment is terminated;
[0027] Furthermore, the observed quantity is set as the state quantity of the corresponding detection target.
[0028] Furthermore, the human joint information includes: shoulder joint position information and hip joint position information;
[0029] The step of determining the leg posture angle based on the human joint information includes:
[0030] Based on the shoulder joint position information, determine the shoulder joint posture angle;
[0031] Based on the hip joint position information, determine the hip joint posture angle;
[0032] The human leg posture angle is determined based on the shoulder joint posture angle and the hip joint posture angle.
[0033] Further, determining the leg posture angle based on the shoulder joint posture angle and the hip joint posture angle includes:
[0034]
[0035] Where, θ shoulder θ is used to characterize the joint attitude angle. hip θ′ is used to characterize the hip joint posture angle. leg Used to characterize the posture angle of the human leg, (x) Rshoulder y Rshoulder (x) represents the position information of the right shoulder joint. Lshouler y Lshouler (x) represents the position information of the left shoulder joint. Rhip y Rhip (x) represents the position information of the right side of the hip joint. Lhip y Lhip ) represents the left side position information of the hip joint.
[0036] On the other hand, the present invention also provides a human body state recognition device based on 2D LiDAR and RGB-D camera, including: a first data processing module, a second data processing module, a Kalman filter and a third data processing module;
[0037] The first data processing module is used to determine the data of the first human leg based on the grid map and 2D LiDAR;
[0038] The second data processing module is used to determine the second human leg data and human joint information based on the RGB-D camera; and to determine the human leg posture angle based on the human joint information.
[0039] The Kalman filter is used to determine the position information and speed information of the human leg based on the first human leg data and the second human leg data;
[0040] The third data processing module is used to determine the state information of the human body based on the position information of the human leg, the speed information of the human leg, and the posture angle of the human leg.
[0041] Further, the first data processing module is used to collect human leg laser data using the 2D LiDAR; determine at least one cluster point set from the human leg laser data based on a preset laser data gradient and a preset human leg diameter, the cluster point set including at least one laser point; determine obstacle location information based on the grid map; for each cluster point set, determine the distance between each laser point and the obstacle based on the obstacle location information, and calculate the proportion of laser points with distances less than a first preset value in the corresponding cluster point set; delete cluster point sets with proportions greater than a second preset value to obtain the first human leg data.
[0042] Furthermore, the third data processing module is used to take the first or second leg data received for the first time as a state quantity, and the second or first leg data received at the next time moment as an observation quantity; perform Kalman filtering state prediction based on the state quantity to obtain the state quantity at the next time moment; compare the detection target corresponding to the state quantity at the next time moment with the detection target corresponding to the observation quantity, and when the two match, optimize and update the state quantity at the next time moment based on the current observation quantity; then, alternately use the received first or second leg data as the observation quantity to continuously optimize the corresponding state quantity at the next time moment.
[0043] Compared with the prior art, the present invention can achieve at least one of the following technical effects:
[0044] 1. The pedestrian detection and tracking method proposed in this invention integrates 2D LiDAR and RGB-D camera. Based on the Kalman filter algorithm, it uses the first leg data obtained by 2D LiDAR and the second leg data obtained by RGB-D camera to verify each other. This enables the use of RGB-D to solve the problem of missed detection or false detection by 2D LiDAR to a certain extent. At the same time, the 2D LiDAR sensor is used to supplement the visual blind spot of RGB-D camera, thereby improving accuracy and expanding the detection range.
[0045] 2. By comparing the detection target corresponding to the state quantity and the detection target corresponding to the observation quantity at the next moment, it is determined in real time whether the detection target has left the monitoring area and whether a new detection target has appeared in the monitoring area, thereby improving the efficiency of tracking multiple targets and the accuracy of tracking and detection.
[0046] 3. Based on obstacles in the grid map, erroneous data in the laser data obtained by 2D LiDAR is removed to improve the accuracy of the first human leg data, thereby further improving the accuracy of tracking and detection.
[0047] Other features and advantages of the invention will be set forth in the description which follows, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings. Attached Figure Description
[0048] The accompanying drawings are for illustrative purposes only and are not intended to limit the invention. Throughout the drawings, the same reference numerals denote the same parts.
[0049] Figure 1 A flowchart illustrating a human state recognition method based on 2D LiDAR and RGB-D camera, provided for an embodiment of the present invention;
[0050] Figure 2 The image of skeleton points obtained based on OpenPose skeleton recognition provided in this embodiment of the invention;
[0051] Figure 3 The detection results of OpenPose provided in the embodiments of the present invention;
[0052] Figure 4 This is a flowchart illustrating target tracking and detection based on Kalman filtering, provided as an embodiment of the present invention. Detailed Implementation
[0053] The preferred embodiments of the present invention will now be described in detail with reference to the accompanying drawings, which constitute a part of the present invention and are used together with the embodiments of the present invention to illustrate the principles of the present invention, but are not intended to limit the scope of the present invention.
[0054] Existing 2D LiDAR technology cannot determine a user's posture when stationary or their orientation when in motion, which affects the user experience. RGB-D cameras acquire 3D information using triangulation principles. Based on the camera's baseline distance, focal length, geometric relationships, and coordinate transformations, the 3D information of a spherical target can be obtained. Based on the 3D information of the human body, the user's orientation can be determined.
[0055] However, RGB-D cameras have a small field of view and a large blind zone, which means that robots cannot detect pedestrians outside the field of view or too close in time. Therefore, relying solely on RGB-D cameras cannot meet the technical requirements for tracking and detecting pedestrians in specific areas (such as inside a house).
[0056] Based on the characteristics of 2D LiDAR and RGB-D cameras in the field of detection and tracking, this invention provides a tracking method based on 2D LiDAR and RGB-D cameras. This method fuses the detection data from 2D LiDAR and RGB-D cameras using Kalman filtering, and specifically includes the following steps:
[0057] Step 1: Determine the first human leg data based on the grid map and 2D LiDAR. The first human leg data refers to the leg position information based on 2D LiDAR.
[0058] In this embodiment of the invention, the process of determining the first human leg data based on a grid map and 2D LiDAR is as follows:
[0059] Step 11: Collect laser data of the human leg using 2D LiDAR.
[0060] Step 12: Based on the preset laser data gradient and the preset human leg diameter, determine at least one cluster set from the human leg laser data.
[0061] In this embodiment of the invention, the clustering point set includes at least one laser point.
[0062] Step 13: Determine the location information of obstacles based on the grid map;
[0063] Step 14: For each cluster point set, determine the distance between each laser point and the obstacle based on the obstacle location information, and calculate the proportion of laser points with a distance less than the first preset value in the corresponding cluster point set;
[0064] Step 15: Delete clusters with a proportion greater than the second preset value to obtain the first human leg data.
[0065] Specifically, because 2D LiDAR data contains invalid points and the required range for detecting human leg features varies depending on the scene, the laser data is first preprocessed. Assume a frame of laser data is... Where N beam r′ is the number of laser beams. i For the scanning angle θ i The distance value in the direction, the effective angle for detection is Θ valid =[θ min ,θ max The effective distance is R. valid =[r min ,r max Based on the above constraints, the laser data is preprocessed, and the preprocessed laser data is as follows:
[0066] The preprocessing process is as follows:
[0067] The i-th data is calculated as follows:
[0068]
[0069] Since the distance between adjacent laser points on the human leg features does not change significantly, the gradient between adjacent points is less than the gradient threshold g. legRegarding laser data The gradient g of each laser point is obtained using the median difference method. i The calculation method is as follows:
[0070]
[0071] Then, following the laser scanning sequence, in g i >g leg The points are used as boundary points to form at least one set of cluster points. Where C′ is the set of cluster points, c′1, c′2, ..., c′ beam This is the set of cluster points.
[0072] To improve the accuracy of human leg positioning, this invention provides the following constraints and optimizes the acquired laser data based on these constraints:
[0073] First, the human leg feature detection algorithm assumes a circular shape for the human leg. To fit this shape, at least three laser data points are required. Therefore, this is used as a constraint to remove sets that do not meet this requirement. Second, the diameter of the human leg is usually smaller than a preset threshold. However, in real-world scenarios, the data points from laser-scanned objects such as walls and tables lie on a straight line, leading to the detection of human leg diameters larger than the preset threshold. Therefore, based on the diameter constraint of the human leg feature, sets that do not meet this constraint are further removed. The distance between the first and last points in each cluster is calculated. If this distance is greater than the threshold for the human leg diameter, the cluster is removed. The final set obtained is... Where C is the set of cluster points, c1, c2, ..., c3. beam This is the set of cluster points.
[0074] For each cluster point set c i The least squares method is used to fit the circle. Specifically, the polar coordinates are first converted to Cartesian coordinates, and the conversion formula is as follows:
[0075]
[0076] Then, for the laser points in the set, constraint equations are established in a parametric form to obtain the circle parameter (x) corresponding to each cluster point set. ci ,y ci ,r ci The constraint equations are as follows:
[0077]
[0078] Among them, (x c ,y c ( ) is the center of the circle, r c Let m be the radius, and m represent the point set c. iThe number of laser points in the equation. The equation is solved using a pseudo-inverse, and its solution is... Where V is the right singular matrix, U is the left singular matrix, and ∑ + It is a singular value matrix.
[0079] During tracking and detection, if the human leg is close to an obstacle, some of the laser points collected by the 2D LiDAR will originate from the obstacle. Furthermore, since this invention uses a circle to represent the human leg, this can lead to significant errors in the circle's center position, resulting in an incorrect leg location. To address these issues, the grid map created during robot navigation removes some false positive detection results. The specific process is as follows:
[0080] First, the grid map is converted into a distance transformation map. Then, the distance from each laser point in each cluster to the obstacle is calculated. If 85% of the points in a cluster are close to the obstacle, the cluster is removed to eliminate the obstacle's influence on the leg position. Finally, considering that the center position of the circle fitted may have too large an error, to improve the accuracy of the human leg position, the centroid corresponding to the cluster is used as the coordinate of the detected human leg, generating the first human leg data. Among them l i =(x leg,i ,y leg,i ).
[0081] Step 2: Determine the second leg data and human joint information based on the RGB-D camera. The second leg data refers to the leg position information based on the RGB-D camera.
[0082] In this embodiment of the invention, the process of determining the second human leg data and human joint information is as follows:
[0083] Step 21: Based on the images captured by the RGB-D camera, determine the skeleton points of the observed target and their pixel coordinates.
[0084] Step 22: Determine the three-dimensional coordinates of the skeleton points based on the pixel coordinates of the skeleton points and the back projection model of the RGB-D camera.
[0085] Step 23: Determine the position information of the human leg skeleton points and the human joint information based on the three-dimensional coordinates of the skeleton points.
[0086] Step 24: Generate the second human leg data based on the position information of the human leg skeleton points.
[0087] Specifically, the RGB-D camera uses the open-source skeleton detection algorithm OpenPose to identify key points in a person. OpenPose is a human skeleton detector based on RGB images that can detect 25 skeleton points, such as... Figure 2 As shown in Table 1.
[0088] Table 1 Definition of Skeleton Points
[0089]
[0090] based on Figure 2 The pixel coordinates of the skeleton points are determined, and then combined with the OpenPose skeleton point pixel coordinates, depth image, and camera back-projection model to obtain the 3D coordinates of the skeleton points in the camera coordinate system. This is achieved by using the homogeneous pixel coordinates u of a skeleton point. key =[u,v,1] T This allows us to obtain the corresponding spatial point P. key c ,
[0091] P key c =z c K -1 u key
[0092] Among them, z c is the observation value from the RGB-D camera, and K is the calibration matrix of the RGB-D camera.
[0093] The pose of the human legs is calculated by combining the shoulder and hip joints detected by OpenPose. The local coordinate system for the human is defined as follows: the front of the person is the x-axis, the top is the z-axis, and the y-axis is defined using the right-hand rule. The pose of the person is the angle between the x-axis and the positive x-axis of the map coordinate system. The visually detected leg features are (x′... leg ,y′ leg ,θ l ′ eg ), where (x′ leg ,y′ leg The pose angle θ′ of the human leg joint can be calculated by using the average values of the directions of the shoulder and hip joints, obtained through the back projection model of the camera and the human leg skeleton points. leg .like Figure 3 As shown in the figure, this embodiment of the invention provides a schematic diagram of human leg feature detection based on an RGB-D camera and OpenPose.
[0094] Step 3: Based on the data of the first and second human legs, determine the position and speed information of the human legs using Kalman filtering.
[0095] In this embodiment of the invention, the Kalman filtering process is as follows: Figure 4 As shown, it includes the following steps:
[0096] Step 31: Using the first or second leg data received initially as the state variable, and the second or first leg data received at the next time step as the observation variable.
[0097] In this embodiment of the invention, the first and second leg data are not received simultaneously, but alternately. Therefore, the Kalman filter is initialized using either the first or second leg data received initially. It should be noted that... Figure 4 Initialization in this context refers to the initialization of the observed target, not the initialization of the entire detection process. For example, if only target A was detected in the previous moment, and target B appears in the next moment, the detection of target B is initialized using the first or second leg data of target B received for the first time.
[0098] Step 32: Based on the state variables, perform Kalman filtering to predict the state variables at the next time step.
[0099] Step 33: Compare the detection target corresponding to the state quantity at the next time step with the detection target corresponding to the observation. When the two match, optimize and update the state quantity at the next time step based on the current observation.
[0100] In this embodiment of the invention, in order to achieve the detection of multiple targets, the matching degree between the detection target corresponding to the state variable at the next time step and the detection target corresponding to the observation is detected by global data association. The detection result is specifically of three types: For ease of explanation, the detection target corresponding to the state variable at the next time step is set as M, and the detection target corresponding to the observation is set as N.
[0101] In the first case, M and N are in a one-to-one correspondence, and step 34 is executed.
[0102] The second scenario is that there is no corresponding M for N, indicating that the target has left the detection area. In this case, the tracking of the target corresponding to the state variable at the next time step ends, i.e., the Dolman filtering deletion strategy is executed.
[0103] The third scenario is that there is no corresponding N for M, which indicates that a new detection target has appeared in the detection area. The observation is then set as the state variable of the corresponding detection target to achieve the Dolman filter initialization of the detection target.
[0104] It should be noted that, in this embodiment of the invention, both the first and second leg data are position information. Therefore, when optimizing and updating the state quantity at the next moment, the human body speed information is determined based on the position information and time of the observed data, and the human body speed information is added to the state quantity.
[0105] Step 34: After that, the received first leg data or second leg data are alternately used as the observation to continuously optimize the corresponding state variables for the next time step.
[0106] Specifically, the state variables of a Kalman filter at time k are defined as follows: Where, x k and yk The position of a human leg in a map coordinate system. and The velocity of a human leg in the map coordinate system.
[0107] Using a uniform velocity model as the motion model for Kalman filtering, we have:
[0108] x k =F k x k-1 +w k
[0109] Among them, F k Let w be the state transition matrix. k For state transition, the Gaussian white noise, Q k For w k The covariance matrix is calculated as follows:
[0110]
[0111] Where, Δt k =t k -t k-1 .
[0112]
[0113]
[0114] Where, σ x 2 σ y 2 , and x at time k k y k , and The covariance.
[0115] The system's observation model is as follows:
[0116] z k =H k x k +v k
[0117] Among them, H k Let v be the observation matrix. k For the observed Gaussian white noise, R k For v k Covariance matrix:
[0118]
[0119]
[0120]
[0121] In the observations, the position of the human leg is represented by (x, y), δ x 2 and δ y 2 Let x and y be the covariances of the observed quantities, respectively.
[0122] Kalman filtering tracking based on the above motion and observation models includes:
[0123] Assume that at time k-1 there is N tracker The set of state variables is The state variables representing the i detected targets at time k-1, and N at time k mes The set formed by the observations is z i,k If the observations representing the i detected targets at time k are given, then the state prediction result P of the i-th state variable is given. i,k|k-1 for:
[0124]
[0125] P i,k|k-1 =F i,k P i,k-1|k-1 F i,k T +Q i,k
[0126] The correspondence between state variables and observations is confirmed using global nearest neighbor data association, thus completing the Kalman filter update. First, the cost matrix is constructed. Matrix element c ij The method for determining it is as follows:
[0127]
[0128] Where G is the threshold value and s is the cost scaling factor. d Its function is to prioritize matching motion observations and state variables. The representation cost is calculated as follows:
[0129]
[0130] The motion state of an observation is determined by the occupancy status of the grid cell where the observation location is located at times k and k-1. Specifically, if the observation is an occupied grid cell at time k and a feasible grid cell at time k-1, then the observation is considered motionful. The motion state of a state variable is determined by the velocity magnitude at time k; if this magnitude is greater than a specified threshold, the state variable is considered motionful. Cost The calculation method is as follows:
[0131]
[0132] Among them, the residual vector and residual matrix S ij,k The calculation method is as follows:
[0133]
[0134] S ij,k =H i,k P i,k|k-1 H i,k T +R i,k
[0135] Next, based on the determined cost matrix, the Munkres algorithm is used to solve for the optimal match. Then, a threshold value is determined for each match result. The final matching results include three categories: matched observations and pursuits (p,q), unmatched observations p′, and unmatched pursuits q′, as follows:
[0136] 1) For the matched observation p and the tracking q, perform the Kalman filter update process:
[0137]
[0138] S pq,k =H p,k P p,k|k-1 H p,k T +R q,k
[0139] K pq,k =P pq,k|k-1 H p,k T S pq,k -1
[0140]
[0141] P p,k|k =(IK pq,k H p,k )P p,k|k-1
[0142] 2) For an unmatched observation p′, initialize a new filter with the following initial state:
[0143] x = [x leg ,y leg ,0,0] T
[0144]
[0145] 3) For unmatched state variable q′, if the position covariance of the state variable is too large or it has not been observed again for a long time, then the state variable is deleted.
[0146] Step 4: Determine the posture angle of the human legs based on the human joint information.
[0147] In this embodiment of the invention, the human joint information includes: shoulder joint position information and hip joint position information. Therefore, determining the human leg posture angle includes:
[0148] Step 41: Determine the shoulder joint posture angle based on the shoulder joint position information.
[0149] Step 42: Determine the hip joint posture angle based on the hip joint position information.
[0150] Step 43: Determine the leg posture angle based on the shoulder joint posture angle and hip joint posture angle.
[0151] The specific process is as follows:
[0152]
[0153] Where, θ shoulder θ is used to characterize the joint attitude angle. hip θ is used to characterize the hip joint posture angle. l ′ eg Used to characterize the human leg posture angle, (x) Rshoulder y Rshoulder (x) represents the position information of the right shoulder joint. Lshouler y Lshouler (x) represents the position information of the left shoulder joint. Rhip y Rhip (x) represents the position information of the right side of the hip joint. Lhip y Lhip () indicates the position information of the left side of the hip joint.
[0154] In an embodiment of the present invention, θ′ leg This applies to the leg posture angles of a person when they are at rest. During the detection process, a Kalman filter is used to determine whether the person is in motion. If so, the updated state variables are used. and Calculate the leg posture angle; otherwise, use θ′. leg Let θ be the human leg posture angle. Then the total human leg posture angle θ is... leg The calculation process is as follows:
[0155]
[0156] Among them, V thresThe speed threshold for determining whether a human body is in motion. and The components of the human leg in the x and y directions, therefore and The square root of the sum of the squares of the numbers represents the actual speed of the human leg. That is, when the actual speed is less than V... thres At that time, the human body is determined to be in a static state, and the actual speed is greater than or equal to V. thres At that time, it was determined that the human body was in a moving state.
[0157] Step 5: Determine the person's state information based on the person's leg position information, leg speed information, and leg posture angle.
[0158] In this embodiment of the invention, steps 1-4 utilize a 2D LiDAR and an RGB-D camera, combined with Kalman filtering and a global data association algorithm, to obtain the state information of a person used in the social space cost model.
[0159] This invention also provides a human body state recognition device based on 2D LiDAR and RGB-D camera, including: a first data processing module, a second data processing module, a Kalman filter and a third data processing module;
[0160] The first data processing module is used to determine the first human leg data based on the grid map and 2D LiDAR;
[0161] The second data processing module is used to determine the second human leg data and human joint information based on the RGB-D camera; and to determine the human leg posture angle based on the human joint information.
[0162] The Kalman filter is used to determine the position and speed of the human leg based on the first and second leg data.
[0163] The third data processing module is used to determine the state information of the human body based on the position information, speed information, and posture angle of the human legs.
[0164] In this embodiment of the invention, the first data processing module is used to collect human leg laser data using a 2D LiDAR; based on a preset laser data gradient and a preset human leg diameter, it determines at least one cluster point set from the human leg laser data, the cluster point set including at least one laser point; based on a grid map, it determines obstacle location information; for each cluster point set, based on the obstacle location information, it determines the distance between each laser point and the obstacle, and calculates the proportion of laser points with a distance less than a first preset value in the corresponding cluster point set; it deletes cluster point sets with a proportion greater than a second preset value to obtain the first human leg data.
[0165] In this embodiment of the invention, the third data processing module is used to take the first or second leg data received for the first time as the state quantity, and the second or first leg data received at the next time moment as the observation quantity; perform Kalman filtering state prediction based on the state quantity to obtain the state quantity at the next time moment; compare the detection target corresponding to the state quantity at the next time moment with the detection target corresponding to the observation quantity, and when the two match, optimize and update the state quantity at the next time moment based on the current observation quantity; thereafter, alternately use the first or second leg data received as the observation quantity to continuously optimize the corresponding state quantity at the next time moment.
[0166] The above description is only a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for human state recognition based on 2D LiDAR and RGB-D camera, characterized in that, include: Based on grid maps and 2D LiDAR, the data of the first human leg was determined; Based on an RGB-D camera, data on the second human leg and information on human joints were determined. The human joint information includes: shoulder joint position information and hip joint position information; Alternately receive data from the first person's leg and data from the second person's leg; Based on the first leg data and the second leg data, leg position information and leg velocity information are determined using Kalman filtering, including: The first or second leg data received at the first moment is taken as the state variable, and the second or first leg data received at the next moment is taken as the observation. Based on the state variables, Kalman filtering is performed to predict the state variables at the next time step. By comparing the detection target corresponding to the state quantity at the next time step with the detection target corresponding to the observation, when the two match, the state quantity at the next time step is optimized and updated based on the observation. Subsequently, the received first or second human leg data is alternately used as the observation to continuously optimize the corresponding state quantity for the next time step. The correspondence between state variables and observations is confirmed by using global nearest neighbor data association, thus completing the Kalman filter update; firstly, the cost matrix is constructed. Matrix elements The method for determining it is as follows: in, Let k be the number of detected targets corresponding to the state variables at time k-1. Let k be the number of observations at time k. Threshold value, cost proportionality coefficient Its function is to prioritize matching motion observations and state variables. The representation cost is calculated as follows: The observed motion state is determined by the occupancy status of the grid cell where the observed position is located at times k and k-1; secondly, based on the determined cost matrix, the Munkres algorithm is used to solve for the optimal match; subsequently, a threshold value is determined for each match result; the final matching result includes the matched observations and tracking. Unmatched observations Unmatched tracking Three categories, as follows: For the matched observation p and the tracking q, perform the Kalman filter update process: , , , , , For unmatched observations Initialize a new filter with the following initial state: , , For unmatched state variables If the position covariance of a state variable is too large or it has not been observed again for a long time, then the state variable is deleted. Based on the aforementioned human joint information, the leg posture angle is determined, including: Based on the shoulder joint position information, determine the shoulder joint posture angle; Based on the hip joint position information, determine the hip joint posture angle; Determining the human leg posture angle based on the shoulder joint posture angle and the hip joint posture angle includes: in, Used to characterize the joint attitude angle. Used to characterize the hip joint posture angle. Used to characterize the posture angle of the human leg, ( , ) represents the position information of the right shoulder joint. , ) represents the position information of the left shoulder joint. , ) represents the position information of the right side of the hip joint. , The left side position information of the hip joint is shown in the image. Overall human leg posture angle The calculation process is as follows: Among them, V thres The speed threshold for determining whether a human body is in motion. and These represent the components of the human leg in the x and y directions, respectively. Based on the leg position information, the leg speed information, and the total leg posture angle, the human body's state information is determined.
2. The method according to claim 1, characterized in that, The determination of the first human leg data based on grid maps and 2D LiDAR includes: Laser data of the human leg is collected using the 2D lidar; Based on a preset laser data gradient and a preset human leg diameter, at least one cluster point set is determined from the human leg laser data, and the cluster point set includes at least one laser point; Based on the grid map, determine the location information of the obstacles; For each cluster point set, based on the obstacle location information, the distance between each laser point and the obstacle is determined, and the proportion of laser points whose distance is less than a first preset value in the corresponding cluster point set is calculated; Delete the cluster set whose proportion is greater than the second preset value to obtain the first human leg data.
3. The method according to claim 1, characterized in that, The determination of the second human leg data and human joint information based on the RGB-D camera includes: Based on the images captured by the RGB-D camera, determine the skeleton points of the observed target and the pixel coordinates of the skeleton points; The three-dimensional coordinates of the skeleton points are determined based on the pixel coordinates of the skeleton points, the depth image, and the back projection model of the RGB-D camera. Based on the three-dimensional coordinates of the skeletal points, determine the position information of the human leg skeletal points and the information of the human joints; Based on the position information of the human leg skeleton points, second human leg data is generated.
4. The method according to claim 1, characterized in that, Compare the detection target corresponding to the state quantity at the next time step with the detection target corresponding to the observation quantity. If the two do not match, End the tracking of the target corresponding to the state quantity at the next moment; And / or, The observation is set as the state variable of the corresponding detection target.
5. A human body state recognition device based on 2D LiDAR and RGB-D camera, characterized in that, include: The system comprises a first data processing module, a second data processing module, a Kalman filter, and a third data processing module. The first data processing module is used to determine the data of the first human leg based on the grid map and 2D LiDAR; The second data processing module is used to determine the second human leg data and human joint information based on the RGB-D camera; The human joint information includes: shoulder joint position information and hip joint position information; determining the leg posture angle based on the human joint information includes: determining the shoulder joint posture angle based on the shoulder joint position information; determining the hip joint posture angle based on the hip joint position information; determining the leg posture angle based on the shoulder joint posture angle and the hip joint posture angle includes: in, Used to characterize the joint attitude angle. Used to characterize the hip joint posture angle. Used to characterize the posture angle of the human leg, ( , ) represents the position information of the right shoulder joint. , ) represents the position information of the left shoulder joint. , ) represents the position information of the right side of the hip joint. , The left side position information of the hip joint is shown in the image. Overall human leg posture angle The calculation process is as follows: Among them, V thres The speed threshold for determining whether a human body is in motion. and These are the components of the human leg in the x and y directions, respectively; the first data processing module and the second data processing module alternately receive the first human leg data and the second human leg data; The Kalman filter is used to determine the position and velocity information of the human legs based on the first leg data and the second leg data, including: The first or second leg data received at the first moment is taken as the state variable, and the second or first leg data received at the next moment is taken as the observation. Based on the state variables, Kalman filtering is performed to predict the state variables at the next time step. By comparing the detection target corresponding to the state quantity at the next time step with the detection target corresponding to the observation, when the two match, the state quantity at the next time step is optimized and updated based on the observation. Subsequently, the received first or second human leg data is alternately used as the observation to continuously optimize the corresponding state quantity for the next time step. The correspondence between state variables and observations is confirmed by using global nearest neighbor data association, thus completing the Kalman filter update; firstly, the cost matrix is constructed. Matrix elements The method for determining it is as follows: in, Let k be the number of detected targets corresponding to the state variables at time k-1. Let k be the number of observations at time k. Threshold value, cost proportionality coefficient Its function is to prioritize matching motion observations and state variables. The representation cost is calculated as follows: The observed motion state is determined by the occupancy status of the grid cell where the observed position is located at times k and k-1; secondly, based on the determined cost matrix, the Munkres algorithm is used to solve for the optimal match; subsequently, a threshold value is determined for each match result; the final matching result includes the matched observations and tracking. Unmatched observations Unmatched tracking Three categories, as follows: For the matched observation p and the tracking q, perform the Kalman filter update process: , , , , , For unmatched observations Initialize a new filter with the following initial state: , , For unmatched state variables If the position covariance of a state variable is too large or it has not been observed again for a long time, then the state variable is deleted. The third data processing module is used to determine the state information of the human body based on the human leg position information, the human leg speed information, and the total human leg posture angle.
6. The apparatus according to claim 5, characterized in that, The first data processing module is used to collect human leg laser data using the 2D LiDAR; determine at least one cluster point set from the human leg laser data based on a preset laser data gradient and a preset human leg diameter, the cluster point set including at least one laser point; determine obstacle location information based on the grid map; for each cluster point set, determine the distance between each laser point and the obstacle based on the obstacle location information, and calculate the proportion of laser points with distances less than a first preset value in the corresponding cluster point set; delete cluster point sets with proportions greater than a second preset value to obtain the first human leg data.
7. The apparatus according to claim 6, characterized in that, The third data processing module is used to take the first or second leg data received at the first time as the state quantity, and the second or first leg data received at the next time as the observation quantity; perform Kalman filtering state prediction based on the state quantity to obtain the state quantity at the next time; compare the detection target corresponding to the state quantity at the next time with the detection target corresponding to the observation quantity, and when the two match, optimize and update the state quantity at the next time based on the observation quantity; thereafter, alternately use the first or second leg data received as the observation quantity to continuously optimize the corresponding state quantity at the next time.
Citation Information
Patent Citations
End-to-end human body posture recognition method based on combination of RGB and point cloud
CN110555412A
