A human leg identification and tracking method and device, and storage medium
Scanned point cloud data is obtained through single-line lidar and cluster screening. The human leg spline is determined based on the characteristic values of the point cloud spline, which solves the problems of low pedestrian tracking efficiency and high cost in the existing technology, and achieves efficient and low-cost human leg recognition and tracking.
Patent Information
- Application Number
- CN202111152206.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-29
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2041-09-29
AI Technical Summary
The prior art has problems such as sensitive ambient light changes, high computing power, expensive cost and low detection efficiency in pedestrian tracking.
Single-line lidar is used to obtain scanning point cloud data, and an effective set of point cloud splines is obtained through clustering and screening processing, and whether it is a human leg spline is determined based on the characteristic values of the splines, so as to identify and track human leg splines.
The environment-dependent target identification and tracking is realized, the information processing process is simplified, the computing speed and detection efficiency are improved, and the cost is reduced.
Smart Images

Figure CN113936035B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of object recognition and tracking, and in particular to a method for human leg recognition and tracking, a device thereof, and a storage medium. Background Art
[0002] In recent years, with the rapid development of intelligent manufacturing and intelligent services, a large number of intelligent robots have come out and been put into use. Robots equipped with laser radar for scanning and detection are countless. In practical applications, intelligent robots are often used to realize pedestrian tracking functions.
[0003] The key to realizing pedestrian tracking function lies in the accurate identification of the tracking target and the subsequent correct tracking. At present, most of the detection and identification of tracking targets use image recognition technology for visual positioning or multi-line laser radar for contour analysis and positioning. However, in actual application, visual applications are very sensitive to the intensity of ambient light. If image processing involves deep learning, it requires high computer computing power and slow calculation speed. Multi-line laser radar itself is expensive, and the point cloud data for scanning and analysis is huge, the detection efficiency is low, and the information processing process is complicated. Summary of the invention
[0004] The present invention aims to solve at least one of the technical problems existing in the prior art. To this end, the present invention proposes a human leg recognition and tracking method and its device, and a storage medium, which can simply realize the recognition and tracking of target points without relying on the environment, and the information processing process is simple, thereby speeding up the calculation speed, improving the detection efficiency, and lowering the cost.
[0005] A method for identifying and tracking human legs according to an embodiment of the first aspect of the present invention includes:
[0006] Step S1, obtaining data information of a scanning point cloud, wherein the data information of the scanning point cloud is obtained by scanning an environment to be identified by a single-line laser radar;
[0007] Step S2, performing clustering and screening processing on the scanned point cloud to obtain a valid point cloud spline set; wherein the valid point cloud spline set includes multiple valid point cloud splines;
[0008] Step S3, obtaining the characteristic value of the effective point cloud spline;
[0009] Step S4, determining whether the valid point cloud spline is a human leg spline according to the characteristic value of the valid point cloud spline;
[0010] If the valid point cloud spline is a human leg spline, execute step S5;
[0011] Step S5, determining whether the current state is in tracking mode;
[0012] If in tracking mode, execute step S7;
[0013] Step S7, determining the current tracking effective area;
[0014] Step S8, detecting the human leg spline in the current tracking effective area;
[0015] Step S9: acquiring the coordinates of the tracking target point according to the human leg spline in the current tracking effective area to perform human leg recognition and tracking.
[0016] The human leg recognition and tracking method according to the embodiment of the present invention has at least the following beneficial effects: a single-line laser radar scans the environment to be recognized and obtains data information of the scanned point cloud. The scanned point cloud is clustered and screened to obtain a set of valid point cloud splines. For each valid point cloud spline in the set of valid point cloud splines, its span, length, and fitting radius are measured, which are used as the basis for determining the human leg spline to be recognized, thereby achieving accurate recognition of the tracking target. If it is determined to be a human leg spline, it can be determined whether the human leg spline is being tracked, thereby executing the tracking initialization or tracking implementation process. To achieve tracking of the target, first determine the effective tracking area, detect the human leg spline in the effective tracking area, and then obtain the coordinates of the tracking target point by tracking the human leg spline in the effective area, and then accurately track the target identified as the human leg spline. The present invention does not rely on environmental factors, and the implementation process is relatively simple, which reduces the implementation cost and is convenient for application and promotion.
[0017] According to some embodiments of the present invention, the human leg recognition and tracking method further includes:
[0018] If the valid point cloud spline is not a human leg spline, return to step S1;
[0019] If not in tracking mode, execute step S6;
[0020] Step S6, start tracking initialization and return to step S1;
[0021] According to some embodiments of the present invention, in step S2, performing clustering screening on the scanned point cloud to obtain a valid point cloud spline set includes:
[0022] Step S21, obtaining a first distance between two adjacent scanning points in the scanning point cloud;
[0023] Step S22: determining whether the two adjacent scanning points belong to the same point cloud spline according to the first distance;
[0024] Step S23, determining a valid point cloud spline set according to the number of point clouds included in the point cloud spline;
[0025] Wherein, the valid point cloud spline set includes multiple valid point cloud splines.
[0026] According to some embodiments of the present invention, the characteristic values of the effective point cloud spline include: span, length, and fitting radius, wherein the span is the distance between the first and last points of the effective point cloud spline; the length is the sum of the distances between adjacent points of the effective point cloud spline; the fitting radius is the fitting radius of the effective point cloud spline obtained by the least squares method; in step S4, determining whether the effective point cloud spline is a human leg spline according to the characteristic values of the effective point cloud spline includes:
[0027] Step S41, determining whether the span satisfies a first condition; the first condition is that the span is within a set span range;
[0028] When the span satisfies the first condition, executing step S42;
[0029] When the span does not meet the first condition, executing step S45;
[0030] Step S42, determining whether the length satisfies a second condition; the second condition is that the length is within a set range;
[0031] When the length meets the second condition, executing step S43;
[0032] When the length does not satisfy the second condition, executing step S45;
[0033] Step S43, determining whether the fitting radius satisfies a third condition; the third condition is that it is within a set fitting radius range;
[0034] When the fitting radius satisfies the third condition, executing step S44;
[0035] When the fitting radius does not meet the third condition, executing step S45;
[0036] Step S44, determining that the valid point cloud spline is a human leg spline;
[0037] Step S45: determine that the valid point cloud spline is not a human leg spline, and delete the valid point cloud spline.
[0038] According to some embodiments of the present invention, in step S6, the starting tracking initialization includes:
[0039] Step S61, determining an initial tracking effective area;
[0040] Step S62, detecting the human leg spline in the initial tracking effective area;
[0041] Step S63, determining whether the number of human leg splines in the initial tracking effective area is 2;
[0042] If the number of human leg splines in the initial tracking effective area is 2, execute step S64; otherwise, return to step S61;
[0043] Step S64: start the tracking mode and determine the initial point of the tracking target.
[0044] According to some embodiments of the present invention, in step S7, determining the current tracking effective area includes:
[0045] Step S71, obtaining the tracking target point of the previous frame;
[0046] Step S72: A circular area with a radius of r and the target point tracked in the previous frame as the center is used as the current valid tracking area.
[0047] According to some embodiments of the present invention, in step S9, acquiring the coordinates of the tracking target point according to the human leg spline in the tracking effective area includes:
[0048] Step S91, determining the number of human leg splines;
[0049] When the number of human leg splines is 1, execute step S92;
[0050] When the number of human leg splines is 2, execute step S93;
[0051] When the number of human leg splines is greater than 2, executing step S94;
[0052] Step S92, obtaining the coordinates of the tracking target point according to the center coordinates of the one human leg spline;
[0053] Step S93, obtaining the coordinates of the tracking target point according to the center coordinates of the two human leg splines;
[0054] Step S94, obtaining the coordinates of the tracking target point in this frame according to the coordinates of the tracking target point in the previous frame and the center coordinates of the human leg spline.
[0055] According to some embodiments of the present invention, in step S9, acquiring the coordinates of the tracking target point according to the human leg spline in the tracking effective area further includes:
[0056] When the number of human leg splines is 0, execute step S95;
[0057] Step S95, obtaining the coordinates of the tracking target point according to the coordinates of the tracking target point in the previous frame and starting timing, and the recorded duration is the first duration;
[0058] Step S96: Control the end or continuation of the tracking mode according to the first duration.
[0059] An electronic device according to a second aspect of an embodiment of the present invention includes:
[0060] Memory, used to store programs;
[0061] A processor is used to execute the program stored in the memory. When the processor executes the program stored in the memory, the processor is used to execute the method as described in any one of the first aspects.
[0062] A computer-readable storage medium according to an embodiment of the third aspect of the present invention is characterized in that the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the human leg recognition and tracking method as described in any one of the first aspects. BRIEF DESCRIPTION OF THE DRAWINGS
[0063] The accompanying drawings are used to provide a further understanding of the technical solution of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the technical solution of the present invention and do not constitute a limitation on the technical solution of the present invention.
[0064] Figure 1 is a flow chart of a method for identifying and tracking human legs provided by an embodiment of the present invention;
[0065] Figure 2 is a schematic diagram of point cloud spline features of a method for identifying and tracking human legs provided by another embodiment of the present invention;
[0066] Figure 3 The present invention Figure 1 Specific flow chart of step S2;
[0067] Figure 4 The present invention Figure 3 Specific flow chart of step S22;
[0068] Figure 5 The present invention Figure 3 Specific flow chart of step S23;
[0069] Figure 6 The present invention Figure 1 The specific flow chart of step S4 in FIG.
[0070] Figure 7 is a schematic diagram of tracking initialization of a human leg recognition and tracking method provided by another embodiment of the present invention;
[0071] Figure 8 is a schematic diagram of an effective tracking area of a human leg recognition and tracking method provided by another embodiment of the present invention;
[0072] Fig. 9 The present invention Figure 1 Specific flow chart of step S6;
[0073] Fig.10 The present invention Figure 1 Specific flow chart of step S9;
[0074] Fig.11 The present invention Fig.10 Specific flow chart of step S96; DETAILED DESCRIPTION
[0075] Embodiments of the present invention are described in detail below, examples of which are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention, and cannot be understood as limiting the present invention.
[0076] In the description of the present invention, "several" means one or more, "more" means more than two, "greater than", "less than", "exceed" etc. are understood to exclude the number itself, and "above", "below", "within" etc. are understood to include the number itself. If there is a description of "first" or "second", it is only used for the purpose of distinguishing the technical features, and cannot be understood as indicating or implying the relative importance or implicitly indicating the number of the indicated technical features or implicitly indicating the order of the indicated technical features.
[0077] Figure 1 A method for identifying and tracking human legs provided by an embodiment of the present invention is shown, which is implemented based on starting and running a single-line laser radar, and the method includes:
[0078] Step S1, obtaining data information of a scan point cloud, where the data information of the scan point cloud is obtained by scanning an environment to be identified by a single-line laser radar;
[0079] Step S2, performing clustering and screening processing on the scanned point cloud to obtain a valid point cloud spline set; wherein the valid point cloud spline set includes multiple valid point cloud splines;
[0080] Step S3, obtaining the characteristic value of the effective point cloud spline;
[0081] Step S4, determining whether the valid point cloud spline is a human leg spline according to the characteristic value of the valid point cloud spline;
[0082] If the valid point cloud spline is a human leg spline, execute step S5;
[0083] If the valid point cloud spline is not a human leg spline, return to step S1;
[0084] Step S5, determining whether the current state is in tracking mode; the tracking mode is tracking the human leg spline;
[0085] If it is not in tracking mode, execute step S6 in sequence;
[0086] If in tracking mode, execute step S7 in sequence;
[0087] Step S6, start tracking initialization and return to step S1;
[0088] Step S7, determining the current tracking effective area;
[0089] Step S8, detecting the human leg spline in the current tracking effective area;
[0090] Step S9: acquiring the coordinates of the tracking target point according to the human leg spline in the current tracking effective area to perform recognition and tracking of the human leg.
[0091] After identifying the human leg spline, the target needs to be tracked. Tracking requires an initialization process first, and then subsequent continuous tracking.
[0092] like Figure 2 As shown, L1, L2...Ln are the distances between adjacent points in the effective point cloud spline. The characteristic values of the effective point cloud spline in step S3 include: span, represented by K, span K is the distance between the first and last points of the effective point cloud spline; length, represented by L, length L is the sum of the distances between adjacent points of the effective point cloud spline, i.e., L1+L2+...+Ln; fitting radius, represented by R, fitting radius R is the fitting radius of the effective point cloud spline obtained by the least squares method.
[0093] like Figure 3 As shown, specifically, in the above step S2, the scanned point cloud is subjected to clustering and screening processing to obtain a valid point cloud spline set, including:
[0094] Step S21, obtaining a first distance between two adjacent scanning points in the scanning point cloud;
[0095] Step S22, determining whether two adjacent scanning points belong to the same point cloud spline according to the first distance;
[0096] Step S23: determining a valid point cloud spline set according to the number of point clouds included in the point cloud spline.
[0097] In this embodiment, the scanning points that meet the conditions are classified into the same point cloud spline according to the distance between each pair of adjacent scanning points in the scanning point cloud. After obtaining multiple point cloud splines in the scanning point cloud, the effective point cloud splines are screened according to the number of point clouds included in the point cloud spline to obtain a set of effective point cloud splines.
[0098] Specifically, Figure 4As shown, in the above step S22, determining whether two adjacent scanning points belong to the same point cloud spline according to the first distance includes:
[0099] Step S221, determine whether the first distance is less than a first threshold; if so, execute step S222; otherwise, execute step S223;
[0100] Step S222, determining that two adjacent scanning points belong to the same point cloud spline;
[0101] Step S223, determining that two adjacent scanning points do not belong to the same point cloud spline;
[0102] It is understandable that the first threshold value can be adjusted according to actual conditions. In one embodiment, the first threshold value is 5 centimeters.
[0103] Specifically, Figure 5 As shown, in the above step S23, a valid point cloud spline set is obtained according to the number of point clouds included in the point cloud spline, including:
[0104] Step S231, determining whether the number of point clouds included in the point cloud spline is less than a second threshold; if so, executing step S232; otherwise, executing step S233;
[0105] Step S232: Determine that the point cloud spline is not a valid point cloud spline, and delete the point cloud spline;
[0106] Step S233: determine that the point cloud spline is a valid point cloud spline, and retain it in the valid point cloud spline set;
[0107] It is understandable that the second threshold value can be adjusted according to actual conditions. In one embodiment, the second threshold value is 6.
[0108] Specifically, Figure 6 As shown, in the above step S4, determining whether the valid point cloud spline is a human leg spline according to the eigenvalue of the valid point cloud spline includes:
[0109] Step S41, determining whether the span satisfies a first condition; the first condition is that it is within a set span range;
[0110] When the span meets the first condition, execute step S42;
[0111] When the span does not meet the first condition, execute step S45;
[0112] Step S42, determining whether the length satisfies a second condition; the second condition is that the length is within a set range;
[0113] When the length meets the second condition, execute step S43;
[0114] When the length does not meet the second condition, execute step S45;
[0115] Step S43, determining whether the fitting radius satisfies a third condition; the third condition is that it is within a set fitting radius range;
[0116] When the fitting radius satisfies the third condition, executing step S44;
[0117] When the fitting radius does not meet the third condition, executing step S45;
[0118] Step S44, determining that the effective point cloud spline is a human leg spline;
[0119] Step S45: Determine that the valid point cloud spline is not a human leg spline, and delete the valid point cloud spline.
[0120] It should be noted that, as a condition for determining whether it is a human leg spline, the conditions satisfied by the span K, the length L and the fitting radius R can be adjusted according to actual conditions.
[0121] In one embodiment, the first condition is greater than 5 cm and less than 20 cm, the second condition is greater than 5 cm and less than 40 cm, and the third condition is greater than 4 cm and less than 11 cm.
[0122] like Fig. 9 As shown, specifically, in the above step S6, starting tracking initialization includes:
[0123] Step S61, determining an initial tracking effective area;
[0124] Step S62, detecting the human leg spline in the initial tracking effective area;
[0125] Step S63, determining whether the number of human leg splines in the initial tracking effective area is 2;
[0126] When the number of human leg splines in the initial tracking effective area is 2, execute step S64; otherwise, return to step S61.
[0127] Step S64: start the tracking mode and determine the initial point of the tracking target.
[0128] In one embodiment, if Figure 7 As shown, the initial tracking effective area in step S61 is a rectangular area ABCD in the single-line laser radar XY coordinate system, with the X direction being (0.5m, 2m) and the Y direction being (-0.5m, 0.5m), where AB / / Y axis, the coordinates of point A are (0.5m, -0.5m), AB = 1.0m, and AD = 1.5m. If two human leg splines are detected in the rectangular area ABCD, step S64 is performed.
[0129] In step S64, the tracking mode is turned on. The center coordinates of the two human leg splines in the area are (LX1, LY1) and (LX2, LY2), respectively. Then the coordinates of the initial point of the tracking target (X0, Y0) satisfy X0=0.5LX1+0.5LX2, Y0=0.5LY1+0.5LY2.
[0130] It is understandable that the computational relationship between the center coordinates of the human leg spline and the coordinates of the initial point of the tracking target can be adjusted according to actual conditions.
[0131] In one embodiment, if Figure 8 As shown, Figure 8 In, S n is the effective tracking area of the current frame, r is the area radius, T n is the current tracking target point, T n-1 Tracks the target point for the previous frame.
[0132] In a preferred embodiment, in step S7, determining the effective tracking area includes:
[0133] Step S71, obtaining the tracking target point of the previous frame; wherein the tracking target point of the first frame is the tracking target initial point;
[0134] Step S72: A circular area with a radius of r and a target point tracked in the previous frame as the center is used as the current effective tracking area.
[0135] It should be noted that the current tracking target point T n Tracking target point T in the previous frame n-1 The circular area with the center as the circle and the radius as r. After the tracking is initialized and enters the tracking mode, the effective tracking area of this frame is the circular area with the tracking target point of the previous frame as the center and the radius as r.
[0136] For example: after the tracking target initial point T0 is determined in the initial tracking effective area S0, the next frame tracking effective area S1 is: a circular area with T0 as the center and a radius of r. After the current frame tracking target point T1 is determined in S1, the next frame tracking effective area S2 is: a circular area with T1 as the center and a radius of r.
[0137] It can be understood that the tracking effective area of the current frame is a circular area with a radius of r, centered at the tracking target point of the previous frame, and the radius r can be adjusted according to actual conditions. In one embodiment, the radius r is 0.3 meters.
[0138] like Fig.10 As shown, specifically, in the above step S9, the coordinates of the tracking target point are obtained according to the human leg spline in the tracking effective area, including:
[0139] Step S91, determining the number of human leg splines;
[0140] If the number of human leg splines is 1, execute step S92;
[0141] If the number of human leg splines is 2, execute step S93;
[0142] If the number of human leg splines is greater than 2, execute step S94;
[0143] If the number of human leg splines is 0, execute step S95;
[0144] Step S92, obtaining the coordinates of the tracking target point according to the center coordinates of the human leg spline;
[0145] Step S93, obtaining the coordinates of the tracking target point according to the center coordinates of the human leg spline;
[0146] Step S94, obtaining the coordinates of the tracking target point in this frame according to the coordinates of the tracking target point in the previous frame and the center coordinates of the human leg spline;
[0147] Step S95, obtaining the coordinates of the tracking target point according to the coordinates of the tracking target point in the previous frame and starting timing, and the recorded duration is the first duration;
[0148] Step S96: Control the end or continuation of the tracking mode according to the first duration.
[0149] In one embodiment, the coordinates of the tracking target point in step S92 are the center coordinates of a detected human leg spline, and the center coordinates of the human leg spline in the region are (LX'5, LY'5), then the coordinates of the tracking target point are (LX'5, LY'5); in step S93, the center coordinates of the two human leg splines in the region are (LX'1, LY'1) and (LX'2, LY'2), respectively, then the coordinates (X, Y) of the initial tracking target point satisfy X = 0.5LX'1 + 0.5LX'2, Y = 0.5LY'1 + 0.5LY' 2; In step S94, two human leg splines with the smallest distance from the coordinates of the tracking target point in the previous frame are selected, and then the coordinates of the tracking target point are determined according to the case where the number of human leg splines is 2, that is, two human leg splines with the smallest distance from the coordinates of the tracking target point in the previous frame are first selected, and the center coordinates of these two human leg splines are (LX'3, LY'3) and (LX'4, LY'4) respectively. Then, the coordinates (X', Y') of the initial tracking target point satisfy X=0.5LX'3+0.5LX'4, Y=0.5LY'3+0.5LY'4;
[0150] In one embodiment, when the number of human leg splines in the effective tracking area is 0, no human leg is detected in the effective tracking area, the tracking target point of the current frame is the tracking target point of the previous frame, and timing starts, the time length is recorded as the first time length, and then the tracking mode is controlled according to the first time length. Fig.11 As shown, step S96, controlling the tracking mode according to the first duration, includes: step S961, determining whether the first duration is greater than the first duration threshold; if the first duration is greater than the first duration threshold, executing step S962; otherwise, executing step S963; step S962, ending the tracking mode; step S963, continuing the tracking mode. When the tracking effective area does not detect human legs for a period of time, it is considered that the tracking target has left the tracking range or the tracking target is lost, and the tracking of the target is ended, and the tracking mode ends. Optionally, the first duration threshold is 5 seconds.
[0151] An embodiment of the present invention further provides an electronic device, comprising: a memory for storing a program;
[0152] The processor is used to execute the program stored in the memory. When the processor executes the program stored in the memory, the processor is used to execute the above-mentioned human leg recognition and tracking method:
[0153] In one embodiment, the electronic device also includes a single-line laser radar, which can be mounted on a motion platform such as an AGV for promotion and application.
[0154] An embodiment of the present invention further provides a storage medium storing computer executable instructions, wherein the computer executable instructions are used to execute the above-mentioned human leg recognition and tracking method.
[0155] The above described embodiments are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the present embodiment.
[0156] It will be appreciated by those skilled in the art that all or some of the steps and systems in the disclosed method above may be implemented as software, firmware, hardware and appropriate combinations thereof. Some physical components or all physical components may be implemented as software executed by a processor, such as a central processing unit, a digital signal processor or a microprocessor, or may be implemented as hardware, or may be implemented as an integrated circuit, such as an application specific integrated circuit. Such software may be distributed on a computer-readable medium, which may include a computer storage medium (or a non-transitory medium) and a communication medium (or a temporary medium). As known to those skilled in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disks (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, disk storage or other magnetic storage devices, or any other medium that may be used to store desired information and may be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically include computer readable instructions, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transport mechanism, and may include any information delivery media.
[0157] Embodiments of the present invention are described herein, including preferred embodiments known to the inventor for performing the present invention. After reading the above description, the variations of these described embodiments will become apparent to those skilled in the art. The inventor wishes that the technician adopt such variations as appropriate, and the inventor intends to practice the embodiments of the present invention in a manner different from that specifically described herein. Therefore, as permitted by applicable law, the scope of the present invention includes all modifications and equivalents of the subject matter recited in the claims appended hereto. In addition, the scope of the present invention encompasses any combination of the above-mentioned elements in all possible variations thereof, unless otherwise indicated herein or otherwise clearly contradicted by context.
Claims
1. A method for identifying and tracking human legs, characterized in that: include: Step S1, obtaining data information of a scanning point cloud, wherein the data information of the scanning point cloud is obtained by scanning an environment to be identified by a single-line laser radar; Step S2, performing clustering and screening processing on the scanned point cloud to obtain a valid point cloud spline set; wherein the valid point cloud spline set includes multiple valid point cloud splines; Step S3, obtaining the characteristic value of the effective point cloud spline; Step S4, determining whether the valid point cloud spline is a human leg spline according to the characteristic value of the valid point cloud spline; If the valid point cloud spline is a human leg spline, execute step S5; Step S5, determining whether the current state is in tracking mode; If in tracking mode, execute step S7; Step S7, determining the current tracking effective area; Step S8, detecting the human leg spline in the current tracking effective area; Step S9, obtaining the coordinates of the tracking target point according to the human leg spline in the current tracking effective area to perform human leg recognition and tracking; In step S2, clustering and screening the scanned point cloud to obtain a valid point cloud spline set includes: Step S21, obtaining a first distance between two adjacent scanning points in the scanning point cloud; Step S22: determining whether the two adjacent scanning points belong to the same point cloud spline according to the first distance; Step S23, determining a valid point cloud spline set according to the number of point clouds included in the point cloud spline; Wherein, the effective point cloud spline set includes a plurality of effective point cloud splines; The characteristic values of the effective point cloud spline include: span, length, and fitting radius, wherein the span is the distance between the first and last points of the effective point cloud spline; the length is the sum of the distances between adjacent points of the effective point cloud spline; the fitting radius is the fitting radius of the effective point cloud spline obtained by the least squares method; in step S4, determining whether the effective point cloud spline is a human leg spline according to the characteristic values of the effective point cloud spline includes: Step S41, determining whether the span satisfies a first condition; the first condition is that the span is within a set span range; When the span satisfies the first condition, executing step S42; When the span does not meet the first condition, executing step S45; Step S42, determining whether the length satisfies a second condition; the second condition is that the length is within a set range; When the length meets the second condition, executing step S43; When the length does not satisfy the second condition, executing step S45; Step S43, determining whether the fitting radius satisfies a third condition; the third condition is that it is within a set fitting radius range; When the fitting radius satisfies the third condition, executing step S44; When the fitting radius does not meet the third condition, executing step S45; Step S44, determining that the valid point cloud spline is a human leg spline; Step S45: determine that the valid point cloud spline is not a human leg spline, and delete the valid point cloud spline.
2. The human leg recognition and tracking method according to claim 1, characterized in that: The human leg recognition and tracking method further comprises: If the valid point cloud spline is not a human leg spline, return to step S1; If not in tracking mode, execute step S6; Step S6, start tracking initialization and return to step S1.
3. The human leg recognition and tracking method according to claim 2, characterized in that: In step S6, the starting tracking initialization includes: Step S61, determining an initial tracking effective area; Step S62, detecting the human leg spline in the initial tracking effective area; Step S63, determining whether the number of human leg splines in the initial tracking effective area is 2; If the number of human leg splines in the initial tracking effective area is 2, execute step S64; otherwise, return to step S61; Step S64: start the tracking mode and determine the initial point of the tracking target.
4. The human leg recognition and tracking method according to claim 1, characterized in that: In step S7, determining the current tracking effective area includes: Step S71, obtaining the tracking target point of the previous frame; Step S72: A circular area with a radius of r and the target point tracked in the previous frame as the center is used as the current valid tracking area.
5. The human leg recognition and tracking method according to claim 1, characterized in that: In step S9, obtaining the coordinates of the tracking target point according to the human leg spline in the tracking effective area includes: Step S91, determining the number of human leg splines; When the number of human leg splines is 1, execute step S92; When the number of human leg splines is 2, execute step S93; When the number of human leg splines is greater than 2, executing step S94; Step S92, obtaining the coordinates of the tracking target point according to the center coordinates of the one human leg spline; Step S93, obtaining the coordinates of the tracking target point according to the center coordinates of the two human leg splines; Step S94, obtaining the coordinates of the tracking target point in this frame according to the coordinates of the tracking target point in the previous frame and the center coordinates of the human leg spline.
6. The human leg recognition and tracking method according to claim 5, characterized in that: In step S9, obtaining the coordinates of the tracking target point according to the human leg spline in the tracking effective area also includes: When the number of human leg splines is 0, execute step S95; Step S95, obtaining the coordinates of the tracking target point according to the coordinates of the tracking target point in the previous frame and starting timing, and the recorded duration is the first duration; Step S96: Control the end or continuation of the tracking mode according to the first duration.
7. An electronic device, characterized in that: include: Memory, used to store programs; A processor, used to execute the program stored in the memory. When the processor executes the program stored in the memory, the processor is used to execute the human leg recognition and tracking method as described in any one of claims 1 to 6.
8. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable a computer to execute the human leg recognition and tracking method as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Pedestrian detection and tracking method based on laser radar
CN111444767A
Robot self-following method and device based on single-line laser radar, and robot
CN112379673A