A moving target detection method and system
By pre-processing, ground point removal, radius retrieval and pre-order background grid feature filtering, the problems of frequent false detection, high cost and low calculation efficiency of dynamic target detection are solved, and the effect of reducing false alarm rate and improving calculation efficiency is achieved.
Patent Information
- Application Number
- CN202510368530.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-27
- Publication Date
- 2025-06-17
- Estimated Expiration
- 2045-03-27
AI Technical Summary
In the prior art, there are problems such as many false detections of dynamic target detection, high cost and low computing efficiency.
Preprocessing by getting the original point cloud of the current frame, removing ground points, background point filtering, clustering, and target tracking using radius search and preorder background raster features to reduce false detection.
It reduces the false alarm rate, improves the computing efficiency, is suitable for dynamic target detection of complex terrains, and ensures long-term automated invasive detection.
Smart Images

Figure CN119887849B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of moving target detection, and in particular, to a moving target detection method and system. Background Art
[0002] Moving target detection is one of the branches of target detection, which pays more attention to moving objects or intruding objects in a scene. Although it does not require identifying all targets in the scene, reducing the detection requirements, the demand for real-time performance is greatly improved. In moving target detection based on three-dimensional laser point clouds, one of the main difficulties lies in the segmentation of fixed backgrounds and moving foregrounds. For example, there are some unstable factors in the background such as ghosts, tree shaking, plant growth, water body movement, occlusion, etc., which cause mis-segmentation. To solve this problem, some methods try to use a pre-scanned background as a reference. Although the occlusion problem is solved, false alarms are likely to occur due to the above-mentioned plant growth and water body movement; in autonomous driving, roadside sensors are established as a background reference, but the requirements for roadside laser devices are high, and the installation scenario is limited to the outdoor, increasing the cost; methods based on artificial intelligence also detect by labeling moving and static targets, and the cost of obtaining samples is high; traditional methods also use Gaussian mixture models to exclude false alarms similar to those caused by tree shaking, but the applicable scenarios are narrow and the calculation is complex.
[0003] Aiming at the problems of many false detections, high cost and low calculation efficiency in moving target detection in the prior art, no effective solution has been proposed yet. Summary of the Invention
[0004] An embodiment of the present invention provides a moving target detection method and system to solve the problems of many false detections, high cost and low calculation efficiency in moving target detection in the prior art.
[0005] To achieve the above object, on the one hand, the present invention provides a moving target detection method, which includes: S1. Obtain the original point cloud of the current frame and perform preprocessing to obtain the preprocessed point cloud of the current frame; S2. Obtain the ground grid set corresponding to the current frame and the maximum height value of each grid, mark all the ground points of the preprocessed point cloud of the current frame according to the maximum height value of each grid, and remove all the ground points of the preprocessed point cloud of the current frame to obtain the non-ground point cloud of the current frame; S3. Obtain the cumulative background point cloud and the cumulative background compensation point cloud corresponding to the current frame, and use radius search to mark the points in the non-ground point cloud of the current frame that are too close to the cumulative background point cloud or the cumulative background compensation point cloud to obtain the background point cloud of the current frame; S4. Obtain the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid, divide the non-ground point cloud of the current frame according to the division method of the previous background grid set to obtain the non-ground point cloud grid set of the current frame; Mark the points in the non-ground point cloud of the current frame that may be the background according to the non-ground point cloud grid set of the current frame, the previous background grid set corresponding to the current frame, and the density, reflectivity distribution, and point position distribution of each grid, and add them to the background point cloud of the current frame to update the background point cloud of the current frame; S5. Remove the background point cloud of the current frame from the non-ground point cloud of the current frame to obtain the target point cloud of the current frame; Cluster the target point cloud of the current frame to obtain each point cluster; Check whether all the background points and all the ground points of the current frame are mislabeled for each point cluster based on radius search and reflectivity standard error. If so, cancel the background or ground annotation and add them to the corresponding point cluster and the target point cloud of the current frame; S6. Perform target tracking based on the target point cloud of the current frame, and determine whether the target point cloud of the current frame is misdetected. If so, add the corresponding target point to the return point set.
[0006] Optionally, the obtaining of the ground grid set corresponding to the current frame and the maximum height value of each grid includes: S21. Cumulating the pre-processed point clouds with empty targets in the current multiple frames to obtain the current given point cloud; S22. Performing rasterization processing on the current given point cloud to obtain multiple grids; calculating the average height value and the maximum height value of each grid; S23. Judging whether each grid is a valid grid; S24. Updating the average height value and the maximum height value of the invalid grid according to the average height value and the maximum height value of all grids; S25. Calculating the height change amount of each grid according to the average height value and the maximum height value of each grid; S26. Cumulating the pre-processed point clouds with empty targets in the next multiple frames to obtain the next given point cloud; repeating S22 - S25 to calculate the maximum height value and the height change amount of each grid corresponding to the next given point cloud; S27. Updating each grid corresponding to the current given point cloud according to the maximum height value and the height change amount of each grid corresponding to the current given point cloud, and the maximum height value and the height change amount of each grid corresponding to the next given point cloud; S28. If the target of the current frame is not empty, the ground grid set corresponding to the current frame is each grid corresponding to the previous given point cloud.
[0007] Optionally, S23 includes: adopting a consistency segmentation algorithm to fit the possible planes within each grid to obtain the fitted plane of each grid; if the ratio of the total number of points on the fitted plane of the current grid to the total number of points within the current grid is less than the preset ratio value, the current grid is invalid; if the standard deviation of the Z values of all points on the fitted plane of the current grid is greater than the preset Z value standard deviation, the current grid is invalid; if the standard deviation of the reflectivity of all points on the fitted plane of the current grid is greater than the preset reflectivity standard deviation, the current grid is invalid.
[0008] Optionally, S24 includes: finding the n-th row with the largest number of valid grids in the first M preset rows of grids, and calculating the average height value and the maximum height value of all grids in the n-th row; respectively replacing the average height value and the maximum height value of all invalid grids in the 0-th row with the average height value and the maximum height value of all grids in the n-th row; for the invalid grids in other rows, the following update method is used to update the invalid grids: replacing the average height value of the invalid grid in the current column of the current row with the average height value of the grid in the current column of the previous row; calculating the standard deviation of the average height values of all grids in the current row, and the average height value and the maximum height value of the valid grids in the current row; if the standard deviation of the average height values of all grids in the current row is less than the preset average height standard deviation, then replacing the average height value and the maximum height value of the invalid grid in the current column of the current row with the average height value and the maximum height value of the valid grids in the current row; if the standard deviation of the average height values of all grids in the current row is greater than or equal to the preset average height standard deviation, then replacing the maximum height value of the invalid grid in the current column of the current row with the value obtained by subtracting the average height value from the maximum height value of the valid grids in the current row and then adding the replaced average height value of the invalid grid in the current column of the current row.
[0009] Optionally, the obtaining of the cumulative background point cloud and the cumulative background compensation point cloud corresponding to the current frame includes: the cumulative background point cloud and the cumulative background compensation point cloud corresponding to all frames are updated in real time by the following method: S31. Cumulatively initializing the background point cloud with an empty target for multiple frames as the initial cumulative background point cloud; cumulatively initializing the background compensation point cloud with an empty target for multiple frames as the cumulative background compensation point cloud, and updating the initial cumulative background point cloud according to the initial cumulative background point cloud and the cumulative background compensation point cloud to obtain the cumulative background point cloud; clearing the initial cumulative background point cloud and the cumulative background compensation point cloud; S32. When the current multiple frames have an empty target and the time since the last update of the cumulative background does not exceed the threshold T3, only update the cumulative background compensation point cloud; S33. When the current multiple frames have a non-empty target, only update the cumulative background compensation point cloud; S34. When the current multiple frames have an empty target or a non-empty target, but the time since the last update of the cumulative background exceeds the threshold T4, use the method of S31 to update the cumulative background point cloud and the cumulative background compensation point cloud; S35. When the current multiple frames have an empty target and the time since the last time the multiple frames had a non-empty target does not exceed the threshold T1, only update the cumulative background compensation point cloud; S36. When the current multiple frames have an empty target and the time since the last time the multiple frames had a non-empty target exceeds the threshold T1, use the method of S31 to update the cumulative background point cloud and the cumulative background compensation point cloud.
[0010] Optionally, the obtaining of the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid includes: S41. If the target of the initial frame is empty, remove the target points from the pre-processed point cloud of the initial frame to obtain the previous background point cloud of the initial frame; perform grid division on the previous background point cloud of the initial frame to obtain the previous background grid set of the initial frame; and reserve the previous background grid set of the initial frame to obtain a reserved previous background grid set; S42. If the target of the current frame is non-empty, obtain the previous background grid set of the current frame according to the method of S41, and use the reserved previous background grid set of the previous frame as the reserved previous background grid set of the current frame; S43. If the target of the current frame is empty and the time since the last time the target was non-empty exceeds the threshold T1, obtain the previous background grid set of the current frame according to the method of S41, and record the reserved previous background grid set of the current frame to update the reserved previous background grid set; S44. If the target of the current frame is empty and the time since the last time the reserved previous background grid set was obtained does not exceed the threshold T2, obtain the previous background grid set of the current frame according to the method of S41, and compare the points in the previous background grid set of the current frame and the reserved previous background grid set. If there are no points or the number of points in the previous background grid set of the current frame is less than the number of points in the reserved previous background grid set, add the points in the reserved previous background grid set to the previous background grid set of the current frame; S45. If the target of the current frame is empty and the time since the last time the reserved previous background grid set was obtained exceeds the threshold T2, obtain the previous background grid set of the current frame according to the method of S41, and use the reserved previous background grid set of the previous frame as the reserved previous background grid set of the current frame; S46. Calculate the density, reflectivity distribution, and point position distribution of each grid in the previous background grid set corresponding to each frame.
[0011] On the other hand, the present invention provides a moving target detection system, which includes: a preprocessing unit for acquiring the original point cloud of the current frame and performing preprocessing to obtain the preprocessed point cloud of the current frame; a ground point removal unit for acquiring the ground grid set corresponding to the current frame and the maximum height value of each grid, marking all the ground points of the preprocessed point cloud of the current frame according to the maximum height value of each grid, removing all the ground points of the preprocessed point cloud of the current frame to obtain the non-ground point cloud of the current frame; a background point cloud acquisition unit for acquiring the cumulative background point cloud and the cumulative background compensation point cloud corresponding to the current frame, using radius search to mark the points in the non-ground point cloud of the current frame that are too close to the cumulative background point cloud or the cumulative background compensation point cloud to obtain the background point cloud of the current frame; a background point cloud update unit for acquiring the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid, dividing the non-ground point cloud of the current frame according to the division method of the previous background grid set to obtain the non-ground point cloud grid set of the current frame; marking the points in the non-ground point cloud of the current frame that may be the background according to the non-ground point cloud grid set of the current frame, the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid, and adding them to the background point cloud of the current frame to update the background point cloud of the current frame; a target point cloud acquisition unit for removing the background point cloud of the current frame from the non-ground point cloud of the current frame to obtain the target point cloud of the current frame; clustering the target point cloud of the current frame to obtain each point cluster; checking whether all the background points and all the ground points of the current frame are mislabeled for each point cluster based on radius search and reflectivity standard error, and if so, canceling the background or ground annotation and adding them to the corresponding point cluster and the target point cloud of the current frame; a target point cloud update unit for performing target tracking on the target point cloud of the current frame and determining whether the target point cloud of the current frame is misdetected, and if so, adding the corresponding target point to the return point set.
[0012] Optionally, the obtaining of the ground grid set corresponding to the current frame and the maximum height value of each grid includes: a current accumulation subunit, configured to accumulate the current pre - processed point cloud with empty targets in multiple frames to obtain the current given point cloud; a rasterization subunit, configured to rasterize the current given point cloud to obtain multiple grids, calculate the average height value and the maximum height value of each grid; a first judgment subunit, configured to judge whether each grid is a valid grid; a first update subunit, configured to update the average height value and the maximum height value of the invalid grid according to the average height value and the maximum height value of all grids; a first calculation subunit, configured to calculate the height change amount of each grid according to the average height value and the maximum height value of each grid; a next accumulation subunit, configured to accumulate the next pre - processed point cloud with empty targets in multiple frames to obtain the next given point cloud; repeat the rasterization subunit, the first judgment subunit, the first update subunit, and the first calculation subunit to calculate the maximum height value and the height change amount of each grid corresponding to the next given point cloud; a second update subunit, configured to update each grid corresponding to the current given point cloud according to the maximum height value and the height change amount of each grid corresponding to the current given point cloud and the maximum height value and the height change amount of each grid corresponding to the next given point cloud; a ground grid set obtaining unit, configured to, if the target of the current frame is not empty, the ground grid set corresponding to the current frame is each grid corresponding to the previous given point cloud.
[0013] Optionally, the obtaining of the accumulated background point cloud and the accumulated background compensation point cloud corresponding to the current frame includes: the accumulated background point cloud and the accumulated background compensation point cloud corresponding to all frames are updated in real time by the following method: an initial accumulation subunit, configured to accumulate the background point cloud with empty targets in the initial multiple frames as the initial accumulated background point cloud, accumulate the background compensation point cloud with empty targets in the initial multiple frames as the accumulated background compensation point cloud, and update the initial accumulated background point cloud according to the initial accumulated background point cloud and the accumulated background compensation point cloud to obtain the accumulated background point cloud, clear the initial accumulated background point cloud and the accumulated background compensation point cloud; a second judgment subunit, configured to, when the current multiple frames have empty targets and the time since the last update of the accumulated background does not exceed the threshold T3, only update the accumulated background compensation point cloud; a third judgment subunit, configured to, when the current multiple frames have non - empty targets, only update the accumulated background compensation point cloud; a fourth judgment subunit, configured to, when the current multiple frames have empty or non - empty targets, but the time since the last update of the accumulated background exceeds the threshold T4, update the accumulated background point cloud and the accumulated background compensation point cloud according to the method of the initial accumulation subunit; a fifth judgment subunit, configured to, when the current multiple frames have empty targets and the time since the last time the multiple frames had non - empty targets does not exceed the threshold T1, only update the accumulated background compensation point cloud; a sixth judgment subunit, configured to, when the current multiple frames have empty targets and the time since the last time the multiple frames had non - empty targets exceeds the threshold T1, update the accumulated background point cloud and the accumulated background compensation point cloud according to the method of the initial accumulation subunit.
[0014] Optionally, the obtaining of the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid includes: an initial grid division sub-unit, which is used to remove the target points from the pre-processed point cloud of the initial frame if the target of the initial frame is empty, so as to obtain the previous background point cloud of the initial frame; perform grid division on the previous background point cloud of the initial frame to obtain the previous background grid set of the initial frame; and reserve the previous background grid set of the initial frame to obtain a reserved previous background grid set; a first obtaining sub-unit, which is used to obtain the previous background grid set of the current frame according to the initial grid division sub-unit method if the target of the current frame is non-empty, and use the reserved previous background grid set of the previous frame as the reserved previous background grid set of the current frame; a second obtaining sub-unit, which is used to obtain the previous background grid set of the current frame according to the initial grid division sub-unit method if the target of the current frame is empty and the time since the last time the target was non-empty exceeds the threshold T1, and record the previous background grid set of the current frame for reservation to update the reserved previous background grid set; a third obtaining sub-unit, which is used to obtain the previous background grid set of the current frame according to the initial grid division sub-unit method if the target of the current frame is empty and the time since the last time the reserved previous background grid set was obtained does not exceed the threshold T2, and compare the points in the previous background grid set of the current frame and the reserved previous background grid set. If there are no points or the number of points in the previous background grid set of the current frame is less than the points in the reserved previous background grid set, add the points in the reserved previous background grid set to the previous background grid set of the current frame; a fourth obtaining sub-unit, which is used to obtain the previous background grid set of the current frame according to the initial grid division sub-unit method if the target of the current frame is empty and the time since the last time the reserved previous background grid set was obtained exceeds the threshold T2, and use the reserved previous background grid set of the previous frame as the reserved previous background grid set of the current frame; a second calculation sub-unit, which is used to calculate the density, reflectivity distribution, and point position distribution of each grid in the previous background grid set corresponding to each frame.
[0015] Advantages of the present invention:
[0016] The present invention provides a moving target detection method and system. Among them, the method separately considers the ground and the rest of the background, provides a simplified algorithm for rapid ground estimation, and has a certain adaptability to relatively complex terrains such as gentle slopes. The moving target segmentation is completed through two differences between the previous background and the multi-frame cumulative background. Among them, the cumulative background quickly filters out most of the background points through radius retrieval, and the remaining complex point situations are more carefully filtered by the previous background through changes in grid features such as density, reducing the false alarm rate; the ground fitting, multi-frame cumulative background, and previous background are updated in real time and dynamically, ensuring the long-term automation of the intrusion detection process and strong environmental adaptability. Description of the Drawings
[0017] Figure 1It is a flowchart of a moving target detection method provided by an embodiment of the present invention;
[0018] Figure 2 It is a schematic structural diagram of a moving target detection system provided by an embodiment of the present invention. Detailed implementation manners
[0019] In order to make the objectives, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0020] Figure 1 It is a flowchart of a moving target detection method provided by an embodiment of the present invention, as Figure 1 shown, the method includes:
[0021] S1. Obtain the original point cloud of the current frame and perform preprocessing to obtain the preprocessed point cloud of the current frame;
[0022] In an optional implementation manner, first perform a pass-through filter on the obtained original point cloud of the current frame according to the security area, cut out the effective security area, and obtain the preprocessed result, denoted as the preprocessed point cloud P0 of the current frame.
[0023] S2. Obtain the ground grid set corresponding to the current frame and the maximum height value of each grid, mark all the ground points of the preprocessed point cloud of the current frame according to the maximum height value of each grid, and remove all the ground points of the preprocessed point cloud of the current frame to obtain the non-ground point cloud of the current frame;
[0024] Since the ground data is greatly affected by factors such as the laser incident angle and material, and water puddle reflections will occur on smooth roads and splashing noise points will occur on non-smooth roads in rainy weather, while the ground itself has obvious characteristics, the ground is separately segmented and processed.
[0025] Obtain the ground grid set corresponding to the current frame and the maximum height value Zmax ij (i represents the division on the x-axis, and j represents the division on the y-axis); the ground grid set is a two-dimensional grid set; if a point P 01 (X0, Y0, Z0) in the preprocessed point cloud of the current frame, and a grid in the ground grid set corresponding to the current frame is from x = 0 to 0.5 and y = 0 to 0.5, then as long as X0 ∈ (0, 0.5) and Y0 ∈ (0, 0.5), this point falls in this grid, and then compare Z0 with the Zmax 11 (maximum height value) of this grid; if Z0 is greater than the Zmax of this grid11 If the +Z offset (the given offset) is retained for the point, otherwise the point is marked as a ground point;
[0026] All ground points are obtained through the above method, and all ground points of the pre-processed point cloud of the current frame are removed to obtain the non-ground point cloud P1 of the current frame.
[0027] In an optional embodiment, the obtaining of the ground grid set corresponding to the current frame and the maximum height value of each grid includes:
[0028] S21. Cumulate the pre-processed point clouds with empty targets in the current multiple frames to obtain the current given point cloud;
[0029] Assume that in the initial 0-5 frames, the targets are all empty, and the pre-processed point clouds of these 5 frames are cumulated to obtain the current given point cloud P C0 .
[0030] S22. Perform rasterization processing on the current given point cloud to obtain multiple grids; calculate the average height value and the maximum height value of each grid;
[0031] The current given point cloud is segmented into multiple grids Grid according to the grid ij , and calculate the average height value of each grid (i.e., the Z mean value of all points in the grid) and the maximum height value (i.e., the Z maximum value of all points in the grid).
[0032] S23. Determine whether each grid is a valid grid;
[0033] In an optional embodiment, the S23 includes:
[0034] Adopt a consistency segmentation algorithm to fit the possible planes within each grid to obtain the fitted plane of each grid;
[0035] If the ratio of the total number of points on the fitted plane of the current grid to the total number of points within the current grid is less than the preset ratio value, the current grid is invalid;
[0036] If the standard deviation of the Z values of all points on the fitted plane of the current grid is greater than the preset Z value standard deviation, the current grid is invalid;
[0037] If the standard deviation of the reflectivity of all points on the fitted plane of the current grid is greater than the preset reflectivity standard deviation, the current grid is invalid.
[0038] Furthermore, calculate the normal vector of the fitted plane of each grid;
[0039] For each row of grids, starting from y = 0, calculate to the left and right respectively:
[0040] 1. The rate of change of the normal vector between adjacent grids (i.e., the rate of change of the normal vector between two adjacent grids), the rate of change of an invalid grid relative to a valid grid is recorded as 0. If the rate of change of an adjacent grid is lower than the preset rate-of-change threshold, it is considered to be on the same plane.
[0041] 2. If the rate of change is higher than the preset rate-of-change threshold, it is considered to be the start of a new plane. Try to grow from this grid. If several valid grids on the same plane cannot be found within a finite interval, this grid is re-recorded as an invalid grid.
[0042] For each column of grids, starting from x = 0, process them in the same way forward.
[0043] Furthermore, use Kmeans clustering with K = 2 to cluster the valid grids into two parts. Calculate the Z mean values of all grids in each part. If the difference between the Z mean values of the two parts is greater than the preset threshold, then all grids in the part with the larger Z mean value are considered to be the ceiling, and the grids in this part are recorded as invalid grids. Otherwise, all grids in the two parts are considered to be valid grids.
[0044] S24. Update the average height value and the maximum height value of the invalid grids according to the average height value and the maximum height value of all grids;
[0045] In an optional implementation manner, the S24 includes:
[0046] Among the first M rows of grids, find the nth row with the largest number of valid grids, and calculate the average height value Zavg n and the maximum height value Zmax n of all grids in the nth row; respectively replace the average height value Zavg 0j and the maximum height value Zmax 0j of all invalid grids in the 0th row with the average height value and the maximum height value of all grids in the nth row;
[0047] For the invalid grids in other rows, update the invalid grids using the following update method:
[0048] Replace the average height value of the invalid grid at the current column in the current row with the average height value of the grid at the current column in the previous row;
[0049] That is, for the invalid grid (i, j), use the Zavg i-1j of the grid (i - 1, j) to fill the invalid grid (i, j).
[0050] Calculate the standard deviation of the average height values of all grids in the current row, as well as the average height value Zavg i and the maximum height value Zmax i of the valid grids in the current row;
[0051] If the standard deviation of the average height of all grids in the current row is less than the preset average height standard deviation, then replace the average height value and the maximum height value of the invalid grid in the current column of the current row with the average height value and the maximum height value of the valid grids in the current row;
[0052] That is, update Zavg of the invalid grid within the row ij =Zavg i , Zmaxij = Zmaxi;
[0053] If the standard deviation of the average height of all grids in the current row is greater than or equal to the preset average height standard deviation, then replace the maximum height value of the invalid grid in the current column of the current row with the average height value of the invalid grid in the current column of the current row after adding the result of subtracting the average height from the maximum height value of the valid grids in the current row.
[0054] That is, update Zmax of the invalid grid within the row ij =Zavg ij (that is, Zavg i-1j ) + (Zmax i - Zavg i ).
[0055] S25. Calculate the height change amount of each grid according to the average height value and the maximum height value of each grid;
[0056] Each grid registers its own maximum height value Zmax ij and the height change amount Zdis ij =Zmax ij - Zavg ij .
[0057] S26. Accumulate the next multi-frame preprocessing point clouds with empty targets to obtain the next given point cloud; repeat S22~S25 to calculate the maximum height value and the height change amount of each grid corresponding to the next given point cloud;
[0058] In an alternative embodiment, the next multi-frame with empty targets is 8 - 13 frames. Using the same method as above, calculate the ground grid set corresponding to the 8 - 13 frames, as well as the maximum height value and the height change amount of each grid.
[0059] S27. Update each grid corresponding to the current given point cloud according to the maximum height value and the height change amount of each grid corresponding to the current given point cloud, as well as the maximum height value and the height change amount of each grid corresponding to the next given point cloud;
[0060] In an alternative embodiment, the ground grid set G ground corresponding to the 0 - 5 frames and the ground grid set G' ground, Whether to update G ground , It is judged according to the following method:
[0061] (1) Calculate the difference between the Zmax of each grid of the two. If the ratio of the difference to the height change Zdis ij is within the preset ratio range, the two grids are considered similar; otherwise, the two grids are different.
[0062] For example: the difference between the maximum height value of the first grid of G ground and the maximum height value of the first grid of G' ground , compared with the ratio of the height change of the first grid of G ground and the height change of the first grid of G' ground , if it is within the preset ratio range, the first grid of G ground and the first grid of G' ground are considered similar.
[0063] (2) For each column of grids, if several different grids are found at a finite interval starting from the nth grid, starting from the nth grid, use the values (maximum height value, average height value, height change) of G' ground to update G ground .
[0064] S28. If the target of the current frame is not empty, the ground grid set corresponding to the current frame is each grid corresponding to the point cloud given last time.
[0065] In an optional implementation, if the targets of the 6th and 7th frames are not empty, the ground grid sets corresponding to the 6th and 7th frames are the ground grid sets corresponding to the point cloud given calculated from the 0th to 5th frames, that is, it is equivalent to that the ground grid set is not updated.
[0066] If the targets of the 8th to 13th frames are empty, the ground grid set is updated. If the obtained current frame is one of the 8th to 13th frames, use the ground grid set corresponding to the point cloud given calculated from the 8th to 13th frames;
[0067] If the targets of the 14th and 15th frames are not empty, the ground grid sets corresponding to the 14th and 15th frames are the ground grid sets corresponding to the point cloud given calculated from the 8th to 13th frames.
[0068] S3. Obtain the cumulative background point cloud and the cumulative background compensation point cloud corresponding to the current frame, and use radius search to mark the points in the non-ground point cloud of the current frame that are too close to the cumulative background point cloud or the cumulative background compensation point cloud to obtain the background point cloud of the current frame;
[0069] In an optional implementation, obtain the cumulative background point cloud P cback and the cumulative background compensation point cloud P cpack , compare Pcback and P1, use radius retrieval to mark the points in P1 that are too close within the distance from P cback points that are too close inside,
[0070] The specific method is as follows:
[0071] If a certain point in P1 is close to a certain point in P cback (i.e., within the radius threshold), then the certain point in P1 is considered a background point; this "radius threshold" is not a fixed value, but varies with the distance (Dis) from a certain point in P1 to the origin of the lidar:
[0072] r back = k × Dis + b
[0073] where r back is the radius threshold, k and b are given values, and Dis is the distance from a certain point in P1 to the origin of the lidar;
[0074] Assume that the distance Dis from a certain point A in P1 to the origin of the lidar is 10m, k = 0.05 (unit: proportionality coefficient), and b = 0.1 (unit: meter), then the radius threshold for point A is calculated as: r back = 0.05 × 10 + 0.1 = 0.6m, that is: if the distance from this point A to a certain point in the cumulative background point cloud P cback is less than 0.6m, then point A may be a background point and is marked as a background point.
[0075] Use the same method to compare P cpack and P1, use radius retrieval to mark the points in P1 that are too close within the distance from P cpack points that are too close inside;
[0076] Mark all background points in the non-ground point cloud of the current frame through the above method to obtain the background point cloud P back .
[0077] In an alternative embodiment, the obtaining of the cumulative background point cloud and the cumulative background compensation point cloud corresponding to the current frame includes:
[0078] The cumulative background point cloud and the cumulative background compensation point cloud corresponding to all frames are updated in real time by the following method:
[0079] S31. Cumulatively initialize the background point cloud with an empty target for multiple frames as the initial cumulative background point cloud; cumulatively initialize the background compensation point cloud with an empty target for multiple frames as the cumulative background compensation point cloud, update the initial cumulative background point cloud according to the initial cumulative background point cloud and the cumulative background compensation point cloud to obtain the cumulative background point cloud; clear the initial cumulative background point cloud and the cumulative background compensation point cloud;
[0080] S32. When the current multi-frame target is empty and the time elapsed since the last update of the cumulative background does not exceed the threshold T3, only update the cumulative background compensated point cloud;
[0081] S33. When the current multi-frame target is non-empty, only update the cumulative background compensated point cloud;
[0082] S34. When the current multi-frame target is empty or non-empty, but the time elapsed since the last update of the cumulative background exceeds the threshold T4, use the S31 method to update the cumulative background point cloud and the cumulative background compensated point cloud;
[0083] S35. When the current multi-frame target is empty and the time elapsed since the last time the multi-frame target was non-empty does not exceed the threshold T1, only update the cumulative background compensated point cloud;
[0084] S36. When the current multi-frame target is empty and the time elapsed since the last time the multi-frame target was non-empty exceeds the threshold T1, use the S31 method to update the cumulative background point cloud and the cumulative background compensated point cloud.
[0085] The following is illustrated by a specific example:
[0086] Frames 0 - 5: Initial target P obj and initial return point P re are empty. The initial background point cloud accumulated over 5 frames is used as the initial cumulative background point cloud P' cback . The initial return point of each frame is added to the initial background compensated point cloud of each frame, and the initial background compensated point cloud accumulated over 5 frames is used as the cumulative background compensated point cloud P cpack ; At the 5th frame, update the initial cumulative background point cloud to obtain the cumulative background point cloud P cback = P' cback ∪ P cpack , clear P cpack and P' cback ;
[0087] Frames 6 - 7: Assume the target P obj is empty, T3 = 2, only update the cumulative background compensated point cloud P cpack , that is, accumulate the background compensated point cloud of frames 6 - 7 to obtain the cumulative background compensated point cloud P cpack , where the cumulative background point cloud is still the cumulative background point cloud P cback calculated from frames 0 - 5;
[0088] Frames 8 - 12: Assume the target P obj is non-empty (e.g., empty in frame 8, empty in frame 9, non-empty in frame 10, empty in frame 11, non-empty in frame 12), only update the cumulative background compensated point cloud P cpack , that is, accumulate the background compensated point cloud of frames 8 - 12 again; the cumulative background point cloud is still the cumulative background point cloud P cback calculated from frames 0 - 5;
[0089] Frames 13 - 14: Assume the target P obj is empty, T1 = 2, and only update the accumulated background compensated point cloud P cpack , that is, accumulate the background compensated point cloud for another 13 - 14 frames; where the accumulated background point cloud is still the accumulated background point cloud P calculated from frames 0 - 5 cback ;
[0090] Frames 15 - 20: Assume the target P obj is empty, update the accumulated background point cloud P cback , that is, accumulate the initial background point cloud for 15 - 20 frames as the initial accumulated background point cloud P' cback . Update the accumulated background compensated point cloud P cpack , that is, accumulate the background compensated point cloud for another 15 - 20 frames; at frame 20, update the initial accumulated background point cloud to obtain the accumulated background point cloud P cback = P' cback ∪P cpack , clear P cpack and P' cback ;
[0091] Frames 20 - 120, assume the target P obj is not empty, only update the accumulated background compensated point cloud P cpack , that is, accumulate the background compensated point cloud for 20 - 120 frames; T4 = 100, where the accumulated background point cloud is still the accumulated background point cloud P calculated from frames 15 - 20 cback ;
[0092] Frames 120 - 125, regardless of whether the target P obj is empty or not, update the accumulated background point cloud P cback , that is, accumulate the initial background point cloud for 120 - 125 frames as the initial accumulated background point cloud P' cback . Update the accumulated background compensated point cloud P cpack , that is, accumulate the background compensated point cloud for another 120 - 125 frames; at frame 125, update the initial accumulated background point cloud to obtain the accumulated background point cloud P cback = P' cback ∪P cpack , clear P cpack and P' cback .
[0093] S4. Obtain the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid. Divide the non-ground point cloud of the current frame according to the grid division method of the previous background grid set to obtain the non-ground point cloud grid set of the current frame; mark the points in the non-ground point cloud of the current frame that may be the background according to the non-ground point cloud grid set of the current frame, the previous background grid set corresponding to the current frame, and the density, reflectivity distribution, and point position distribution of each grid, and add them to the background point cloud of the current frame to update the background point cloud of the current frame.
[0094] Obtain the previous background grid set Grid ij ∈Gpre, as well as the density, reflectivity distribution, and point position distribution of each grid; divide the non-ground point cloud P1 of the current frame according to the same grid division method to obtain Grid' ij ∈Gcurr, and compare Grid ij and Grid' ij (i represents the division on the x-axis, starting from 0, and j represents the division on the y-axis, with 0 as the origin, positive on the left and negative on the right).
[0095] (1) If all the points in Grid' ij belong to P back , that is, are marked as the background, add them to P back , and end;
[0096] (2) If there are no points in Grid ij , end;
[0097] (3) Calculate whether the non-background points in Grid' ij are within the standard errors of the point positions and reflectivities in Grid ij . If so, mark the non-background points in Grid'ij as the background and add them to P back ;
[0098] (4) If the density of the non-background points in Grid' ij is much smaller than that in Grid ij , then mark all the unmarked points in Grid' ij as the background and add them to P back ;
[0099] (5) If the density of the non-background points in Grid' ij is similar to that in Grid ij , then mark the points that may be the background and are unmarked as the background and add them to P back , and end;
[0100] (6) Take the data in the eight grids near Grid ij as Grid IJTo expand the sample and calculate Grid' ij The Wasserstein distance W from the non-background points in IJ to the points in Grid IJ (taking the data of four dimensions x, y, z, ref, and each dimension has a given weight), add the points that may be the background but are not marked as the background to Grid' one by one in ij Calculate the Wasserstein distance W' from Grid' after adding the points to the points in Grid ij to Grid IJ Compare the relative change rate IJ , if the change is large, mark the point as the background and add it to P back .
[0101] Through the above method, add the points that may be the background in the non-ground point cloud of the current frame to the background point cloud P of the current frame back back to update the background point cloud P of the current frame back .
[0102] In an optional embodiment, the obtaining of the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid includes:
[0103] S41. If the target of the initial frame is empty, remove the target points from the pre-processed point cloud of the initial frame to obtain the previous background point cloud of the initial frame; perform grid division on the previous background point cloud of the initial frame to obtain the previous background grid set of the initial frame; and reserve the previous background grid set of the initial frame to obtain the reserved previous background grid set;
[0104] S42. If the target of the current frame is non-empty, obtain the previous background grid set of the current frame according to the method of S41, and use the reserved previous background grid set of the previous frame as the reserved previous background grid set of the current frame;
[0105] S43. If the target of the current frame is empty and the time since the last time the target was non-empty exceeds the threshold T1, obtain the previous background grid set of the current frame according to the method of S41, and record the previous background grid set of the current frame for reservation to update the reserved previous background grid set;
[0106] S44. If the target of the current frame is empty and the time since the last time the reserved previous background grid set was obtained does not exceed the threshold T2, obtain the previous background grid set of the current frame according to the method of S41, and compare the points in the previous background grid set of the current frame and the reserved previous background grid set. If there are no points or the number of points in the previous background grid set of the current frame is less than the number of points in the reserved previous background grid set, add the points in the reserved previous background grid set to the previous background grid set of the current frame;
[0107] S45. If the target in the current frame is empty and the time since the last acquisition of the backup previous background grid set exceeds the threshold T2, then obtain the previous background grid set of the current frame according to the method of S41, and use the backup previous background grid set of the previous frame as the backup previous background grid set of the current frame;
[0108] S46. Calculate the density, reflectivity distribution, and point position distribution of each grid in the previous background grid set corresponding to each frame.
[0109] The following is illustrated by a specific embodiment:
[0110] Assume T1 = 2 and T2 = 9.
[0111] Frame 0: The target is empty, so the previous background grid set is G0 (i.e., the previous background point cloud of Frame 0 is rasterized to obtain the previous background grid set), and the backup previous background grid set is G0;
[0112] Frame 1: The target is not empty, so the previous background grid set is G1 (i.e., the previous background point cloud of Frame 1 is rasterized to obtain the previous background grid set), and the backup previous background grid set is G0;
[0113] Frame 2: The target is not empty, so the previous background grid set is G2 (i.e., the previous background point cloud of Frame 2 is rasterized to obtain the previous background grid set), and the backup previous background grid set is G0;
[0114] Frame 3: The target is empty, so the previous background grid set is G3 (i.e., the previous background point cloud of Frame 3 is rasterized to obtain the previous background grid set) + the backup previous background grid set is G0, and the backup previous background grid set is G0; (not exceeding T2)
[0115] Frame 4: The target is empty, so the previous background grid set is G4 (i.e., the previous background point cloud of Frame 4 is rasterized to obtain the previous background grid set) + the backup previous background grid set is G0, and the backup previous background grid set is G0; (not exceeding T2)
[0116] Frame 5: The target is empty, so the previous background grid set is G5 (i.e., the previous background point cloud of Frame 5 is rasterized to obtain the previous background grid set), and the backup previous background grid set is G5; (exceeding T1)
[0117] Frames 6 - 16: The target is not empty, so the previous background grid set is Gi (i.e., the previous background point cloud of the i-th frame is rasterized to obtain the previous background grid set), and the backup previous background grid set is G5;
[0118] Frame 17: The target is empty. Then the previous background grid set is G17 (i.e., the previous background point cloud of the 17th frame is rasterized to obtain the previous background grid set), and the spare previous background grid set is G5; (exceeding T2)
[0119] Frame 18: The target is empty. Then the previous background grid set is G18 (i.e., the previous background point cloud of the 18th frame is rasterized to obtain the previous background grid set), and the spare previous background grid set is G5; (exceeding T2)
[0120] Frame 19: The target is empty. Then the previous background grid set is G19 (i.e., the previous background point cloud of the 19th frame is rasterized to obtain the previous background grid set), and the spare previous background grid set is G19; (exceeding T1)
[0121] S5. Remove the background point cloud of the current frame from the non-ground point cloud of the current frame to obtain the target point cloud of the current frame; cluster the target point cloud of the current frame to obtain each point cluster; for each point cluster, check whether all background points and all ground points of the current frame are mislabeled based on radius search and reflectivity standard error. If so, cancel the background or ground annotation and add it to the corresponding point cluster and the target point cloud of the current frame.
[0122] In an optional implementation, remove the background point cloud of the current frame from the non-ground point cloud of the current frame to obtain the target point cloud P of the current frame obj ; cluster the target point cloud P of the current frame obj to obtain each point cluster; perform the following operations on each point cluster:
[0123] (1) Obtain points p back (consistent with the calculation method mentioned in S3) within a specified radius r near the points within the cluster i ∈P back and p j ∈P obj . If the reflectivity of p i is within the reflectivity standard error of the p j set, cancel the background annotation of this point and add it to the corresponding cluster point set and P obj .
[0124] Set a search radius r back : r back =k×Dis + b; Dis is the distance from a point within the current cluster to the origin of the lidar; k and b are given parameters. Search for background points p i ∈P back within this radius. If the reflectivity of p i is within the reflectivity standard error of the p j set, cancel the p iThe background annotation adds p i to the current cluster of cluster points and P obj .
[0125] (2)Obtain the points p ground within a specified radius R k (specified value) near the points within the cluster, where p ground ∈P j and p obj ∈P k . If the reflectivity of p j is within the standard error of the reflectivity of the p obj set, cancel the ground annotation of this point and add it to the corresponding cluster point set and P
[0126] S6. Perform target tracking based on the target point cloud of the current frame, and determine whether the target point cloud of the current frame is misdetected. If so, add the corresponding target point to the return point set.
[0127] In an alternative embodiment, according to P obj and the clustering result, detect and track the target motion. If the target has no obvious displacement between several frames, it is considered that the target is a newly added background object and added to the return point set P re ; if the target occasionally appears and disappears between several frames, it is considered that the target is misdetected and added to the return point set P re ; if the target no longer appears after a short time, it is considered that the target is misdetected and added to the return point set P re .
[0128] The method of the present invention separately considers the ground and the rest of the background, provides a simplified algorithm for rapid ground estimation, has a certain adaptability to relatively complex terrains such as gentle slopes, and improves the calculation efficiency; completes the moving target segmentation through two differences between the previous background and the multi-frame cumulative background. Among them, the cumulative background quickly filters out most background points through radius retrieval, and the remaining complex point situations are more carefully filtered by the previous background through changes in grid features such as density, reducing the false alarm rate; since multiple segmentations may additionally clean up target points, attempt to return these points to the detected targets through possible target screening to restore the target shape; update the ground fitting, multi-frame cumulative background, and previous background in real time and dynamically to ensure the long-term automation of the intrusion detection process and strong environmental adaptability.
[0129] Figure 2 is a schematic structural diagram of a moving target detection system provided by an embodiment of the present invention. As Figure 2 shown, the system includes:
[0130] A preprocessing unit 201, configured to obtain the original point cloud of the current frame and perform preprocessing to obtain the preprocessed point cloud of the current frame;
[0131] The ground point removal unit 202 is configured to obtain the ground grid set corresponding to the current frame and the maximum height value of each grid, mark all the ground points of the pre-processed point cloud of the current frame according to the maximum height value of each grid, and remove all the ground points of the pre-processed point cloud of the current frame to obtain the non-ground point cloud of the current frame;
[0132] The background point cloud acquisition unit 203 is configured to obtain the cumulative background point cloud and the cumulative background compensation point cloud corresponding to the current frame, and use radius retrieval to mark the points in the non-ground point cloud of the current frame that are too close to the cumulative background point cloud or the cumulative background compensation point cloud to obtain the background point cloud of the current frame;
[0133] The background point cloud update unit 204 is configured to obtain the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid, divide the non-ground point cloud of the current frame according to the division method of the previous background grid set to obtain the non-ground point cloud grid set of the current frame; mark the points in the non-ground point cloud of the current frame that may be the background according to the non-ground point cloud grid set of the current frame, the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution, and point position distribution of each grid, and add them to the background point cloud of the current frame to update the background point cloud of the current frame;
[0134] The target point cloud acquisition unit 205 is configured to remove the background point cloud of the current frame from the non-ground point cloud of the current frame to obtain the target point cloud of the current frame; cluster the target point cloud of the current frame to obtain each point cluster; check whether all the background points and all the ground points of the current frame are mislabeled for each point cluster based on radius search and reflectivity standard error. If so, cancel the background or ground annotation and add it to the corresponding point cluster and the target point cloud of the current frame;
[0135] The target point cloud update unit 206 is configured to perform target tracking on the target point cloud of the current frame and determine whether the target point cloud of the current frame is misdetected. If so, add the corresponding target point to the return point set.
[0136] In an optional embodiment, the obtaining the ground grid set corresponding to the current frame and the maximum height value of each grid includes:
[0137] The current accumulation subunit 2021 is configured to accumulate the pre-processed point cloud with an empty target in the current multiple frames to obtain the current given point cloud;
[0138] The rasterization subunit 2022 is configured to rasterize the current given point cloud to obtain a plurality of grids; calculate the average height value and the maximum height value of each grid;
[0139] The first judgment subunit 2023 is configured to judge whether each grid is a valid grid;
[0140] The first update subunit 2024 is configured to update the average height value and the maximum height value of the invalid grids according to the average height value and the maximum height value of all grids.
[0141] The first calculation subunit 2025 is configured to calculate the height change amount of each grid according to the average height value and the maximum height value of each grid.
[0142] The next accumulation subunit 2026 is configured to accumulate the pre-processed point cloud with the next multi-frame target being empty to obtain the next given point cloud; repeat the rasterization subunit 2022, the first judgment subunit 2023, the first update subunit 2024, and the first calculation subunit 2025 to calculate the maximum height value and the height change amount of each grid corresponding to the next given point cloud.
[0143] The second update subunit 2027 is configured to update each grid corresponding to the current given point cloud according to the maximum height value and the height change amount of each grid corresponding to the current given point cloud, and the maximum height value and the height change amount of each grid corresponding to the next given point cloud.
[0144] The ground grid set acquisition unit 2028 is configured to, if the target of the current frame is not empty, the ground grid set corresponding to the current frame is each grid corresponding to the previous given point cloud.
[0145] In an optional embodiment, the obtaining of the accumulated background point cloud and the accumulated background compensation point cloud corresponding to the current frame includes:
[0146] The accumulated background point cloud and the accumulated background compensation point cloud corresponding to all frames are updated in real time by the following method:
[0147] The initial accumulation subunit 2031 is configured to accumulate the background point cloud with the initial multi-frame target being empty as the initial accumulated background point cloud; accumulate the background compensation point cloud with the initial multi-frame target being empty as the accumulated background compensation point cloud, update the initial accumulated background point cloud according to the initial accumulated background point cloud and the accumulated background compensation point cloud to obtain the accumulated background point cloud; clear the initial accumulated background point cloud and the accumulated background compensation point cloud.
[0148] The second judgment subunit 2032 is configured to, when the current multi-frame target is empty and the time since the last update of the accumulated background does not exceed the threshold T3, only update the accumulated background compensation point cloud.
[0149] The third judgment subunit 2033 is configured to, when the current multi-frame target is non-empty, only update the accumulated background compensation point cloud.
[0150] The fourth judgment subunit 2034 is configured to update the cumulative background point cloud and the cumulative background compensation point cloud according to the initial cumulative subunit method when the current multi-frame target is empty or non-empty, but the cumulative background time since the last update exceeds the threshold T4;
[0151] The fifth judgment subunit 2035 is configured to update only the cumulative background compensation point cloud when the current multi-frame target is empty and the time since the last non-empty multi-frame target does not exceed the threshold T1;
[0152] The sixth judgment subunit 2036 is configured to update the cumulative background point cloud and the cumulative background compensation point cloud according to the initial cumulative subunit method when the current multi-frame target is empty and the time since the last non-empty multi-frame target exceeds the threshold T1.
[0153] In an optional embodiment, the obtaining of the previous background grid set corresponding to the current frame, and the density, reflectivity distribution, and point position distribution of each grid includes:
[0154] The initial grid division subunit 2041 is configured to, if the target of the initial frame is empty, remove the target points from the pre-processed point cloud of the initial frame to obtain the previous background point cloud of the initial frame; perform grid division on the previous background point cloud of the initial frame to obtain the previous background grid set of the initial frame; and reserve the previous background grid set of the initial frame to obtain a reserved previous background grid set;
[0155] The first obtaining subunit 2042 is configured to, if the target of the current frame is non-empty, obtain the previous background grid set of the current frame according to the initial grid division subunit method, and use the reserved previous background grid set of the previous frame as the reserved previous background grid set of the current frame;
[0156] The second obtaining subunit 2043 is configured to, if the target of the current frame is empty and the time since the last non-empty target exceeds the threshold T1, obtain the previous background grid set of the current frame according to the initial grid division subunit method, and record the reservation of the previous background grid set of the current frame to update the reserved previous background grid set;
[0157] The third obtaining subunit 2044 is configured to, if the target of the current frame is empty and the time since the last obtaining of the reserved previous background grid set does not exceed the threshold T2, obtain the previous background grid set of the current frame according to the initial grid division subunit method, and compare the points in the previous background grid set of the current frame and the reserved previous background grid set. If there are no points or the number of points in the previous background grid set of the current frame is less than the points in the reserved previous background grid set, add the points in the reserved previous background grid set to the previous background grid set of the current frame;
[0158] The fourth acquisition subunit 2045 is configured to, if the target of the current frame is empty and the time since the last acquisition of the backup previous background grid set exceeds the threshold T2, acquire the previous background grid set of the current frame according to the initial grid division subunit method, and use the backup previous background grid set of the previous frame as the backup previous background grid set of the current frame;
[0159] The second calculation subunit 2046 is configured to calculate the density, reflectivity distribution, and point position distribution of each grid in the previous background grid set corresponding to each frame.
[0160] The system of the present invention corresponds to the above method, and the specific implementation manners of the system will not be repeated here.
[0161] Advantages of the present invention:
[0162] The present invention provides a moving target detection method and system. Among them, the method separately considers the ground and the rest of the background, provides a simplified algorithm for rapid ground estimation, and has a certain adaptability to relatively complex terrains such as gentle slopes. The moving target segmentation is completed through two differences between the previous background and the multi-frame cumulative background. Among them, the cumulative background quickly filters out most background points through radius retrieval, and the remaining complex point situations are more carefully filtered by the previous background through changes in grid features such as density, reducing the false alarm rate; the ground fitting, multi-frame cumulative background, and previous background are updated in real time dynamically, ensuring the long-term automation of the intrusion detection process and strong environmental adaptability.
[0163] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions described in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A moving target detection method, characterized in that: include: S1, obtain the original point cloud of the current frame and perform pre-processing to obtain the pre-processed point cloud of the current frame; S2, obtaining the ground grid set corresponding to the current frame and the maximum height value of each grid, marking all ground points of the pre-processed point cloud of the current frame according to the maximum height value of each grid, removing all ground points of the pre-processed point cloud of the current frame, and obtaining the non-ground point cloud of the current frame; S3, obtaining the accumulated background point cloud and the accumulated background compensation point cloud corresponding to the current frame, using the radius to search and mark the points in the non-ground point cloud of the current frame that are too close to the accumulated background point cloud or the accumulated background compensation point cloud, and obtaining the background point cloud of the current frame; S4, obtaining the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution and point position distribution of each grid, and performing grid division on the non-ground point cloud of the current frame according to the division method of the previous background grid set to obtain the non-ground point cloud grid set of the current frame; marking the points that may be background in the non-ground point cloud of the current frame according to the non-ground point cloud grid set of the current frame and the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution and point position distribution of each grid, and adding them to the background point cloud of the current frame to update the background point cloud of the current frame; S5, removing the background point cloud of the current frame from the non-ground point cloud of the current frame to obtain the target point cloud of the current frame; clustering the target point cloud of the current frame to obtain each point cluster; for each point cluster, checking whether all the background points of the current frame and all the ground points of the current frame are mislabeled based on radius search and reflectivity standard error, if so, canceling the background or ground labeling and adding it to the corresponding point cluster and the target point cloud of the current frame; S6, tracking the target based on the target point cloud of the current frame, and determining whether the target point cloud of the current frame is misdetected, and if so, adding the corresponding target point to the returned point set; The obtaining of the ground grid set corresponding to the current frame and the maximum height value of each grid includes: S21, accumulating the pre-processed point cloud with empty target in the current multi-frame to obtain the current given point cloud; S22, rasterizing the current given point cloud to obtain multiple grids; calculating the average height and maximum height value of each grid; S23, judging whether each grid is a valid grid; S24, updating the average height value and the maximum height value of the invalid grids according to the average height value and the maximum height value of all grids; S25, calculating the height variation of each grid according to the height average value and the maximum height value of each grid; S26, accumulating the next multi-frame pre-processed point cloud with empty targets to obtain the next given point cloud; repeating S22 to S25, calculating the maximum height value and height change of each grid corresponding to the next given point cloud; S27, updating each grid corresponding to the current given point cloud according to the maximum height value and height change of each grid corresponding to the current given point cloud, and the maximum height value and height change of each grid corresponding to the next given point cloud; S28. If the target of the current frame is not empty, the ground grid set corresponding to the current frame is each grid corresponding to the last given point cloud.
2. The method according to claim 1, characterized in that The S23 includes: The consistent segmentation algorithm is used to fit the possible planes in each grid to obtain the fitting plane of each grid; If the ratio of the total number of points on the fitting plane of the current grid to the total number of points in the current grid is less than the preset ratio value, the current grid is invalid; If the Z value standard deviation of all points on the fitting plane of the current grid is greater than the preset Z value standard deviation, the current grid is invalid; If the reflectance standard deviation of all points on the fitting plane of the current grid is greater than the preset reflectance standard deviation value, the current grid is invalid.
3. The method according to claim 1, characterized in that The S24 includes: Among the preset first M rows of grids, find the nth row with the largest number of valid grids, calculate the average height and maximum height value of all grids in the nth row; replace the average height and maximum height value of all invalid grids in the 0th row with the average height and maximum height value of all grids in the nth row; For invalid grids in other rows, use the following update method to update the invalid grids: Replace the average height of the invalid grid in the current row and column with the average height of the grid in the previous row and column; Calculate the standard deviation of the height averages of all grids in the current row, as well as the height average and maximum height of the valid grids in the current row; If the standard deviation of the height averages of all grids in the current row is less than the preset height average standard deviation, the height average and maximum height values of the valid grids in the current row will be used to replace the height average and maximum height values of the invalid grids in the current row and column. If the standard deviation of the height averages of all grids in the current row is greater than or equal to the preset height average standard deviation, the maximum height value of the valid grid in the current row is subtracted from the height average and then added to the height average of the replaced invalid grid in the current row and column to replace the maximum height value of the invalid grid in the current row and column.
4. The method according to claim 1, characterized in that The obtaining of the accumulated background point cloud and the accumulated background compensation point cloud corresponding to the current frame comprises: The accumulated background point cloud and accumulated background compensation point cloud corresponding to all frames are updated in real time using the following method: S31, accumulating the background point cloud with empty initial multi-frame targets as the initial accumulated background point cloud; accumulating the background compensation point cloud with empty initial multi-frame targets as the accumulated background compensation point cloud, updating the initial accumulated background point cloud according to the initial accumulated background point cloud and the accumulated background compensation point cloud to obtain the accumulated background point cloud; clearing the initial accumulated background point cloud and the accumulated background compensation point cloud; S32, when the current multi-frame target is empty and the time since the last cumulative background update does not exceed the threshold T3, only the cumulative background compensation point cloud is updated; S33, when the current multi-frame target is not empty, only the accumulated background compensation point cloud is updated; S34, when the current multi-frame target is empty or not empty, but the time since the last cumulative background update exceeds the threshold value T4, the S31 method is used to update the cumulative background point cloud and the cumulative background compensation point cloud; S35, when the current multi-frame target is empty and the time from the last multi-frame target being not empty does not exceed the threshold value T1, only the accumulated background compensation point cloud is updated; S36: When the current multi-frame target is empty and the time from the last time the multi-frame target was not empty exceeds the threshold T1, the S31 method is used to update the accumulated background point cloud and the accumulated background compensation point cloud.
5. The method according to claim 1, characterized in that The obtaining of the preceding background grid set corresponding to the current frame, and the density, reflectivity distribution and point position distribution of each grid comprises: S41, if the target of the initial frame is empty, remove the target point from the pre-processed point cloud of the initial frame to obtain a previous background point cloud of the initial frame; grid-divide the previous background point cloud of the initial frame to obtain a previous background grid set of the initial frame; and reserve the previous background grid set of the initial frame to obtain a reserve previous background grid set; S42, if the target of the current frame is not empty, then obtain the previous background grid set of the current frame according to the method of S41, and use the backup previous background grid set of the previous frame as the backup previous background grid set of the current frame; S43, if the target of the current frame is empty, and the time since the last target was not empty exceeds the threshold value T1, then the previous background grid set of the current frame is obtained according to the method of S41, and the previous background grid set of the current frame is recorded for backup to update the backup previous background grid set; S44, if the target of the current frame is empty, and the time since the last acquisition of the backup preceding background grid set does not exceed the threshold value T2, then the preceding background grid set of the current frame is acquired according to the S41 method, and the points in the preceding background grid set of the current frame and the backup preceding background grid set are compared. If there are no points in the preceding background grid set of the current frame or the number of points is less than the points in the backup preceding background grid set, then the points in the backup preceding background grid set are added to the preceding background grid set of the current frame; S45, if the target of the current frame is empty, and the time since the last acquisition of the backup preceding background grid set exceeds the threshold value T2, the preceding background grid set of the current frame is acquired according to the method of S41, and the backup preceding background grid set of the previous frame is used as the backup preceding background grid set of the current frame; S46, calculating the density, reflectivity distribution and point position distribution of each grid in the preceding background grid set corresponding to each frame.
6. A moving target detection system, characterized in that: include: A pre-processing unit, used for acquiring the original point cloud of the current frame and performing pre-processing to obtain the pre-processed point cloud of the current frame; A ground point removal unit is used to obtain a ground grid set corresponding to the current frame and a maximum height value of each grid, mark all ground points of the pre-processed point cloud of the current frame according to the maximum height value of each grid, remove all ground points of the pre-processed point cloud of the current frame, and obtain a non-ground point cloud of the current frame; A background point cloud acquisition unit is used to acquire the accumulated background point cloud and the accumulated background compensation point cloud corresponding to the current frame, and use the radius to search and mark the points in the non-ground point cloud of the current frame that are too close to the accumulated background point cloud or the accumulated background compensation point cloud to obtain the background point cloud of the current frame; A background point cloud updating unit is used to obtain the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution and point position distribution of each grid, and to grid-divide the non-ground point cloud of the current frame according to the division method of the previous background grid set to obtain the non-ground point cloud grid set of the current frame; and to mark points that may be background in the non-ground point cloud of the current frame according to the non-ground point cloud grid set of the current frame and the previous background grid set corresponding to the current frame, as well as the density, reflectivity distribution and point position distribution of each grid, and add them to the background point cloud of the current frame to update the background point cloud of the current frame; The target point cloud acquisition unit is used to remove the background point cloud of the current frame from the non-ground point cloud of the current frame to obtain the target point cloud of the current frame; cluster the target point cloud of the current frame to obtain each point cluster; for each point cluster, based on radius search and reflectivity standard error, check whether all background points of the current frame and all ground points of the current frame are mislabeled. If so, cancel the background or ground annotation and add it to the corresponding point cluster and the target point cloud of the current frame; The target point cloud updating unit is used to track the target point cloud of the current frame and determine whether the target point cloud of the current frame is misdetected. If so, the corresponding target point is added to the returned point set; The obtaining of the ground grid set corresponding to the current frame and the maximum height value of each grid includes: The current accumulation subunit is used to accumulate the pre-processed point cloud with empty current multi-frame targets to obtain the current given point cloud; The rasterization subunit is used to rasterize the current given point cloud to obtain multiple grids; calculate the average height and maximum height value of each grid; A first judging subunit, used to judge whether each grid is a valid grid; A first updating subunit, used for updating the average height value and the maximum height value of the invalid grid according to the average height value and the maximum height value of all grids; A first calculation subunit, used for calculating the height variation of each grid according to the average height value and the maximum height value of each grid; The next accumulation subunit is used to accumulate the pre-processed point cloud with empty targets in the next multi-frames to obtain the next given point cloud; repeat the rasterization subunit, the first judgment subunit, the first update subunit, and the first calculation subunit to calculate the maximum height value and height change of each grid corresponding to the next given point cloud; A second updating subunit is used to update each grid corresponding to the current given point cloud according to the maximum height value and height change amount of each grid corresponding to the current given point cloud, and the maximum height value and height change amount of each grid corresponding to the next given point cloud; The ground grid set acquisition unit is used to, if the target of the current frame is not empty, then the ground grid set corresponding to the current frame is each grid corresponding to the last given point cloud.
7. The system according to claim 6, characterized in that The step of obtaining the accumulated background point cloud and the accumulated background compensation point cloud corresponding to the current frame includes: The accumulated background point cloud and accumulated background compensation point cloud corresponding to all frames are updated in real time using the following method: The initial accumulation subunit is used to accumulate the background point cloud with empty initial multi-frame targets as the initial accumulated background point cloud; accumulate the background compensation point cloud with empty initial multi-frame targets as the accumulated background compensation point cloud, update the initial accumulated background point cloud according to the initial accumulated background point cloud and the accumulated background compensation point cloud to obtain the accumulated background point cloud; clear the initial accumulated background point cloud and the accumulated background compensation point cloud; The second judgment subunit is used to update only the accumulated background compensation point cloud when the current multi-frame target is empty and the time from the last cumulative background update does not exceed the threshold value T3; The third judgment subunit is used to update only the accumulated background compensation point cloud when the current multi-frame target is not empty; The fourth judgment subunit is used to update the accumulated background point cloud and the accumulated background compensation point cloud according to the initial accumulation subunit method when the current multi-frame target is empty or not empty, but the accumulated background time since the last update exceeds the threshold value T4; A fifth judgment subunit is used to update only the accumulated background compensation point cloud when the current multi-frame target is empty and the time from the last multi-frame target being not empty does not exceed the threshold value T1; The sixth judgment subunit is used to update the accumulated background point cloud and the accumulated background compensation point cloud according to the initial accumulation subunit method when the current multi-frame target is empty and the time from the last multi-frame target being not empty exceeds the threshold T1.
8. The system according to claim 6, characterized in that The obtaining of the preceding background grid set corresponding to the current frame, and the density, reflectivity distribution and point position distribution of each grid comprises: The initial grid division subunit is used for removing the target point from the pre-processed point cloud of the initial frame to obtain the previous background point cloud of the initial frame if the target of the initial frame is empty; performing grid division on the previous background point cloud of the initial frame to obtain the previous background grid set of the initial frame; and reserving the previous background grid set of the initial frame to obtain a reserve previous background grid set; The first acquisition subunit is used for acquiring the previous background grid set of the current frame according to the initial grid division subunit method if the target of the current frame is not empty, and using the backup previous background grid set of the previous frame as the backup previous background grid set of the current frame; The second acquisition subunit is used to acquire the previous background grid set of the current frame according to the initial grid division subunit method if the target of the current frame is empty and the time since the last target was not empty exceeds the threshold value T1, and record the previous background grid set of the current frame for backup to update the backup previous background grid set; The third acquisition subunit is used to acquire the previous background grid set of the current frame according to the initial grid division subunit method if the target of the current frame is empty and the time since the last acquisition of the backup previous background grid set does not exceed the threshold value T2, and compare the points in the previous background grid set of the current frame and the backup previous background grid set. If there are no points in the previous background grid set of the current frame or the number of points is less than the points in the backup previous background grid set, the points in the backup previous background grid set are added to the previous background grid set of the current frame; The fourth acquisition subunit is used to acquire the previous background grid set of the current frame according to the initial grid division subunit method if the target of the current frame is empty and the time from the last acquisition of the backup previous background grid set exceeds the threshold value T2, and use the backup previous background grid set of the previous frame as the backup previous background grid set of the current frame; The second calculation subunit is used to calculate the density, reflectivity distribution and point position distribution of each grid in the preceding background grid set corresponding to each frame.
Citation Information
Patent Citations
Moving object real-time detection algorithm based on three-dimensional laser point cloud
CN107845095A
Throssed object detection method and system based on traditional algorithm and deep learning
CN119559452A