Obstruction blocking rate calculation method and device, storage medium and equipment
By encoding and projecting point cloud data, and utilizing the emission characteristics of LiDAR to calculate the occlusion rate of obstacles, the problems of unstable results and impaired detection performance in existing technologies are solved, enabling efficient and reliable calculation of occlusion rate in autonomous driving.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-15
- Publication Date
- 2026-04-07
AI Technical Summary
Existing methods for calculating obstacle occlusion rates rely on detection neural networks, which result in unstable results and may affect detection performance, failing to meet the real-time and reliability requirements of autonomous driving.
By acquiring the pitch and yaw angles of point cloud data, projecting them onto a two-dimensional grid, and encoding them using the emission characteristics of the lidar, the occlusion rate of obstacles is calculated. This includes acquiring three-dimensional detection box information, grid representative points, and encoding sequences, and finally calculating the occlusion ratio of obstacles using the occlusion rate formula.
It achieves simple and efficient obstacle occlusion rate calculation, with calculation speed meeting the real-time requirements of autonomous driving, and the results are stable and reliable.
Smart Images

Figure CN116109593B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing, and in particular to a method and device for calculating an occlusion rate of an obstacle, a storage medium and an apparatus. BACKGROUND
[0002] Laser radar is an important sensor for an autonomous vehicle. The mainstream autonomous driving technology is to use a deep neural network to detect obstacles around the vehicle from the point cloud of the laser radar, and then use a fusion tracking module to estimate the trajectory and speed of the obstacles, so that the autonomous vehicle can avoid the obstacles.
[0003] For an unoccluded object, the existing point cloud detection technology can well detect the obstacle; for an occluded obstacle, the point cloud of the laser radar only hits part of the obstacle, and at this time the detection result of the obstacle will have a large noise. Figure 1 A point cloud instance of an autonomous driving scene is shown, Figure 1 A row of cars is parked on the right side in the figure, and the point cloud detection of the vehicles close to the radar (such as vehicle A) is relatively complete, and the detection box is relatively accurate, but for the vehicles occluded by other vehicles (such as vehicle B), the point cloud detection is not complete, and the accuracy of the detection box decreases. The fusion tracking module needs to calculate the occlusion rate of each obstacle according to the point cloud to determine the measurement noise of each obstacle, and then use Kalman filtering or other filtering algorithms to estimate the historical trajectory of the obstacle. Therefore, calculating the occlusion rate of the obstacle is an important problem to be solved in the autonomous driving scene.
[0004] In related technologies, the occlusion ratio can be taken as a fitting target of a detection neural network. Specifically, the occlusion ratios of various obstacles are labeled in the training data of the detection neural network in advance, and the occlusion ratio is added to the loss function of the neural network when training the detection neural network, so that the detection neural network can directly output the position, category, size and occlusion ratio of each obstacle.
[0005] The fitting effect is greatly affected by the structure of the detection neural network and the labeled data, resulting in unstable and uncontrollable results. In addition, the additional loss function can affect the expression performance of the detection neural network, resulting in a negative impact on the detection performance of the detection neural network. SUMMARY
[0006] The present application provides a method and device for calculating an occlusion rate of an obstacle, a storage medium and an apparatus, which are used to solve the problem that the detection effect is uncontrollable when detecting the occlusion rate of an obstacle by a detection neural network, and the detection performance of the detection neural network is negatively affected. The technical solution is as follows:
[0007] On the one hand, a method for calculating an occlusion rate of an obstacle is provided, and the method comprises:
[0008] acquire a frame of point cloud data to be processed, the point cloud data comprising a pitch angle and a yaw angle of the point cloud, the pitch angle representing a vertical laser emission angle when the laser radar measures the point cloud data, and the yaw angle representing a horizontal laser emission angle when the laser radar measures the point cloud data;
[0009] project each point cloud into a two-dimensional grid according to the pitch angle and the yaw angle to obtain grid representative points, wherein the same row of grids corresponds to the same pitch angle interval, and the same column of grids corresponds to the same yaw angle interval;
[0010] acquire three-dimensional bounding box information of an occluded obstacle according to the point cloud data;
[0011] encode the point cloud data according to the three-dimensional bounding box information and the grid representative points to obtain a point cloud encoding sequence;
[0012] calculate an occlusion rate of the obstacle according to the point cloud encoding sequence.
[0013] In a possible implementation, the projecting each point cloud into a two-dimensional grid according to the pitch angle and the yaw angle to obtain grid representative points comprises:
[0014] acquire a two-dimensional grid created in advance, the pitch angle interval of each grid being determined according to a pitch angle value range and the number of rows of the two-dimensional grid, and the yaw angle interval of each grid being determined according to a yaw angle value range and the number of columns of the two-dimensional grid;
[0015] project each point cloud into a corresponding grid according to the pitch angle and the yaw angle;
[0016] select, from the point cloud projected into the grid, a point cloud closest to the laser radar as a grid representative point.
[0017] In a possible implementation, the encoding the point cloud data according to the three-dimensional bounding box information and the grid representative points to obtain a point cloud encoding sequence comprises:
[0018] calculating a pitch angle interval and a yaw angle interval of the obstacle according to the three-dimensional bounding box information;
[0019] calculating a grid region corresponding to the pitch angle interval and the yaw angle interval of the obstacle;
[0020] encoding the point cloud data according to the grid region to obtain a point cloud encoding sequence.
[0021] In a possible implementation, the encoding the point cloud data according to the grid region to obtain a point cloud encoding sequence comprises:
[0022] An encoding rule is obtained, the encoding rule including a plurality of characters and an encoding condition corresponding to each character;
[0023] A character of each column of grids in the grid area is determined according to an encoding condition met by a grid representative point of each column of grids in the grid area;
[0024] All the characters are combined to form a point cloud encoding sequence.
[0025] In a possible implementation, the encoding rule includes a first character, a second character and a third character;
[0026] The encoding condition corresponding to the first character is that there is a grid representative point in a column of grids falling within the three-dimensional detection frame of the obstacle;
[0027] The encoding condition corresponding to the second character is that there is no grid representative point in a column of grids;
[0028] The encoding condition corresponding to the third character is that all grid representative points in a column of grids do not fall within the three-dimensional detection frame of the obstacle.
[0029] In a possible implementation, the calculating the occlusion rate of the obstacle according to the point cloud encoding sequence includes:
[0030] The number m of columns of point clouds hitting the obstacle is calculated according to the point cloud encoding sequence;
[0031] The number n of columns of grids in the grid area is obtained;
[0032] The occlusion rate of the obstacle is calculated according to the formula: occlusion rate = 1-m / n.
[0033] In a possible implementation, the calculating the number m of columns of point clouds hitting the obstacle according to the point cloud encoding sequence includes:
[0034] At least one subsequence is extracted from the point cloud encoding sequence, the first and last characters of the subsequence are the first character, and the characters in the middle are not the third character;
[0035] The total length of the at least one subsequence is calculated, and the total length is determined as the number m of columns of point clouds hitting the obstacle.
[0036] In one aspect, a device for calculating an occlusion rate of an obstacle is provided, and the device includes:
[0037] An acquisition module is configured to acquire a frame of point cloud data to be processed, the point cloud data comprising a pitch angle and a yaw angle of the point cloud, the pitch angle representing a vertical laser emission angle when a laser radar measures the point cloud data, and the yaw angle representing a horizontal laser emission angle when the laser radar measures the point cloud data.
[0038] A projection module is configured to project each point cloud into a two-dimensional grid according to the pitch angle and the yaw angle, to obtain grid representative points, wherein the same row of grids corresponds to the same pitch angle interval, and the same column of grids corresponds to the same yaw angle interval.
[0039] The acquisition module is further configured to acquire three-dimensional bounding box information of an occluded obstacle according to the point cloud data.
[0040] An encoding module is configured to encode the point cloud data according to the three-dimensional bounding box information and the grid representative points, to obtain a point cloud encoding sequence.
[0041] A calculation module is configured to calculate an occlusion rate of the obstacle according to the point cloud encoding sequence.
[0042] In one aspect, a computer-readable storage medium is provided, the storage medium storing at least one instruction, the at least one instruction being loaded and executed by a processor to implement the obstacle occlusion rate calculation method described above.
[0043] In one aspect, a computer device is provided, the computer device comprising a processor and a memory, the memory storing at least one instruction, the instruction being loaded and executed by the processor to implement the obstacle occlusion rate calculation method described above.
[0044] The technical solutions provided in the present application have at least the following beneficial effects:
[0045] By utilizing the emission characteristics of the laser radar to encode the point cloud data, and then counting the proportion of the point cloud hitting the obstacle, the occlusion rate of the object can finally be calculated, so that the occlusion rate of the obstacle can be calculated simply and efficiently, the calculation speed can meet the real-time requirements of autonomous driving, and the calculation result is stable and reliable. BRIEF DESCRIPTION OF DRAWINGS
[0046] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.
[0047] Figure 1is a point cloud instance schematic diagram of an automatic driving scene according to a part of an exemplary embodiment;
[0048] Figure 2 is a method flowchart of an obstacle occlusion rate calculation method provided by an embodiment of the present application;
[0049] Figure 3 is a schematic diagram of a pitch angle and a yaw angle provided by an embodiment of the present application;
[0050] Figure 4 is a structural block diagram of an obstacle occlusion rate calculation device provided by still another embodiment of the present application. DETAILED DESCRIPTION
[0051] To make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the drawings.
[0052] Reference is made to Figure 2 which shows a method flowchart of an obstacle occlusion rate calculation method provided by an embodiment of the present application, the obstacle occlusion rate calculation method can be applied in a computer device. The obstacle occlusion rate calculation method can include:
[0053] In step 201, a frame of point cloud data to be processed is acquired, the point cloud data includes a pitch angle and a yaw angle of the point cloud, the pitch angle represents a vertical laser emission angle when a laser radar measures the point cloud data, and the yaw angle represents a horizontal laser emission angle when the laser radar measures the point cloud data.
[0054] In the process of scanning, the mechanical rotating laser radar emits laser beams towards fixed angle directions, so that the points obtained by scanning are not random and disordered, but arranged in a certain angle in the horizontal direction and the vertical direction. Specifically, the laser radar emits different laser beams in the vertical direction, the laser beams are projected on different rows, representing the pitch angles of the laser beams; the laser radar rotates 360 degrees uniformly in the horizontal direction and emits different laser beams, the laser beams are projected on different columns, representing the yaw angles of the laser beams. After the laser radar completes a scan, a frame of point cloud data is obtained, which includes the pitch angle and the yaw angle of the point cloud.
[0055] For a point p in the point cloud, the pitch angle of p is defined as θ p , representing the included angle (angle pop') of p to the xoy plane, and the yaw angle of p is defined as , representing the included angle (angle xop') of the projection of p on the xoy plane to the x axis, as Figure 3The pitch angle is in the range of (-90°, 90°), and the yaw angle is in the range of [-180°, 180°).
[0056] In step 202, each point cloud is projected into a two-dimensional grid according to the pitch angle and the yaw angle to obtain grid representative points, wherein the same row of grids corresponds to the same pitch angle interval, and the same column of grids corresponds to the same yaw angle interval.
[0057] The two-dimensional grid is an MxN grid, where the values of M and N can be set according to business requirements. In an example, M is 20 and N is 1000, so the dimension of the two-dimensional grid is 20x1000.
[0058] After determining the dimension of the two-dimensional grid, the computer device can obtain the pitch angle value range and the yaw angle value range according to the laser radar; the pitch angle value range is equally divided based on the number of rows of the two-dimensional grid to obtain the pitch angle interval of each grid; and the yaw angle value range is equally divided based on the number of columns of the two-dimensional grid to obtain the yaw angle interval of each grid. For example, the pitch angle value range is (-90°, 90°), and M is 20, then the pitch angle interval of each grid is (-90°, -81°), (-81°, -72°)…(0°, 9°), (9°, 18°)…(72°, 81°), (81°, 90°) respectively.
[0059] Specifically, projecting each point cloud into a two-dimensional grid according to the pitch angle and the yaw angle to obtain grid representative points includes:
[0060] (1) Obtain a two-dimensional grid created in advance, the pitch angle interval of each grid is determined according to the pitch angle value range and the number of rows of the two-dimensional grid, and the yaw angle interval of each grid is determined according to the yaw angle value range and the number of columns of the two-dimensional grid.
[0061] The two-dimensional grid mentioned here is the two-dimensional grid created above.
[0062] (2) Project each point cloud into the corresponding grid according to the pitch angle and the yaw angle.
[0063] Since the same row of grids corresponds to the same pitch angle interval, and the same column of grids corresponds to the same yaw angle interval, for each point cloud, the computer device can determine the row i according to the pitch angle interval to which the pitch angle angle belongs, determine the column j according to the yaw angle interval to which the yaw angle angle belongs, and then project it into the grid [i, j] according to the determined i row and j column.
[0064] (3) Select the point cloud closest to the laser radar from the point cloud projected into the grid as the grid representative point.
[0065] For one grid in the two-dimensional grid, when there is no point cloud projected to itself, the computer device determines that it has no grid representative point; when there is one point cloud projected to itself, the computer device determines the point cloud as the grid representative point; when there are at least two point clouds projected to itself, the computer device obtains distance information in each point cloud data, the data information representing the distance between the point cloud and the laser radar, selects one point cloud closest to the laser radar according to the distance information, and determines the point cloud as the grid representative point.
[0066] In step 203, three-dimensional bounding box information of the occluded obstacle is obtained according to the point cloud data.
[0067] The computer device can detect the point cloud data by using the detection neural network to obtain the three-dimensional bounding box information of the occluded obstacle.
[0068] In step 204, the point cloud data is encoded according to the three-dimensional bounding box information and the grid representative point to obtain a point cloud encoding sequence.
[0069] Specifically, the point cloud data is encoded according to the three-dimensional bounding box information and the grid representative point to obtain a point cloud encoding sequence, which can include:
[0070] (1) calculating the pitch angle interval and the yaw angle interval of the obstacle according to the three-dimensional bounding box information.
[0071] The computer device can obtain point cloud data at eight corner points of the three-dimensional bounding box, obtain the minimum pitch angle and the maximum pitch angle from the point cloud data to form the pitch angle interval (θ0, θ1), and obtain the minimum yaw angle and the maximum yaw angle from the point cloud data to form the yaw angle interval
[0072] (2) calculating the grid region corresponding to the pitch angle interval and the yaw angle interval of the obstacle.
[0073] The computer device can find the grid (i0, i1) corresponding to the pitch angle interval and the grid (j0, j1) corresponding to the yaw angle interval, and combine these grids to form the grid region (i0, i1) x (j0, j1).
[0074] (3) encoding the point cloud data according to the grid region to obtain a point cloud encoding sequence.
[0075] Wherein, the point cloud data is encoded according to the grid region to obtain a point cloud encoding sequence, which can include:
[0076] (a) obtaining an encoding rule, the encoding rule including a plurality of characters and an encoding condition corresponding to each character.
[0077] In one example, the encoding rule includes a first character A, a second character B, and a third character C.
[0078] The encoding condition corresponding to the first character A is that there is a grid representative point in the grid column that falls within the three-dimensional bounding box of the obstacle. That is, there is at least one grid representative point in the grid column, and the at least one grid representative point falls within the three-dimensional bounding box of the obstacle.
[0079] The encoding condition corresponding to the second character B is that there is no grid representative point in the grid column.
[0080] The encoding condition corresponding to the third character C is that none of the grid representative points in the grid column falls within the three-dimensional bounding box of the obstacle. That is, there is at least one grid representative point in the grid column, and each grid representative point does not fall within the three-dimensional bounding box of the obstacle.
[0081] It should be noted that in the above point cloud encoding sequence, the second character B exists because sometimes the laser radar hits some highly reflective objects (such as glass, mirror, metal), and there is no point cloud in this direction. At this time, the occlusion rate of the obstacle needs to be determined in combination with the surrounding point cloud data.
[0082] (b) determining the character of each column of grids according to the encoding condition satisfied by the grid representative points of each column of grids in the grid region.
[0083] (c) forming a point cloud encoding sequence by combining all the characters.
[0084] For example, the point cloud encoding sequence is “CCABBAAACCCAA”; for another example, the point cloud encoding sequence is “AABBABCACCABB”.
[0085] Step 205, calculating the occlusion rate of the obstacle according to the point cloud encoding sequence.
[0086] Specifically, calculating the occlusion rate of the obstacle according to the point cloud encoding sequence can include:
[0087] (1) calculating the number m of columns of point clouds hitting the obstacle according to the point cloud encoding sequence.
[0088] Wherein, in the step of calculating the number m of columns of point clouds hitting the obstacle according to the point cloud encoding sequence, the computer device extracts at least one subsequence from the point cloud encoding sequence, the first and last characters of each subsequence are the first character, and the characters in the middle are not the third character; calculating the total length of the at least one subsequence, and determining the total length as the number m of columns of point clouds hitting the obstacle.
[0089] The computer device can obtain a selection rule of the subsequence, and extract at least one subsequence from the point cloud coding sequence according to the selection rule. The selection rule can be: (1) the subsequence only includes the first character A and the second character B, and does not include the third character C; (2) the first character A is included at the beginning and the end of the subsequence.
[0090] Taking the point cloud coding sequence "CCABBAAACCCAA" as an example, the computer device extracts two subsequences "ABBAAA" and "AA".
[0091] Taking the point cloud coding sequence "AABBABCACCABB" as an example, the computer device extracts three subsequences "AABBA", "A" and "A".
[0092] After obtaining the at least one subsequence, the computer device calculates the length of each subsequence, and adds all the lengths to obtain a total length, and determines the total length as the column number m of the point cloud hitting the obstacle.
[0093] Taking the point cloud coding sequence "CCABBAAACCCAA" as an example, the lengths of the two subsequences "ABBAAA" and "AA" are 6 and 2 respectively, and the column number m = 6 + 2 = 8.
[0094] Taking the point cloud coding sequence "AABBABCACCABB" as an example, the lengths of the three subsequences "AABBA", "A" and "A" are 7, 1 and 1 respectively, and the column number m = 7 + 1 + 1 = 9.
[0095] (2) Obtain the column number n of the grid in the grid area.
[0096] The column number n of the grid in the grid area is j1-j0+1.
[0097] Taking the point cloud coding sequence "CCABBAAACCCAA" as an example, the column number n is 13; taking the point cloud coding sequence "AABBABCACCABB" as an example, the column number n is 13.
[0098] (3) Calculate the occlusion rate of the obstacle according to the formula: occlusion rate = 1-m / n.
[0099] Taking the point cloud coding sequence "CCABBAAACCCAA" as an example, the column number m is 8, and the column number n is 13, so the occlusion rate = 1-8 / 13 = 38.46%.
[0100] Taking the point cloud coding sequence "AABBABCACCABB" as an example, the column number m is 9, and the column number n is 13, so the occlusion rate = 1-9 / 13 = 30.77%.
[0101] In summary, the method for calculating the occlusion rate of an obstacle provided by the embodiments of the present application encodes the point cloud data by using the emission characteristics of the laser radar, then counts the proportion of the point cloud hitting the obstacle, and finally calculates the occlusion rate of the object. In this way, the occlusion rate of the obstacle can be calculated simply and efficiently, the calculation speed can meet the real-time requirements of autonomous driving, and the calculation result is stable and reliable.
[0102] Reference is made to Figure 4 which shows a structural block diagram of an obstacle occlusion rate calculation device provided by an embodiment of the present application. The obstacle occlusion rate calculation device can be applied to a computer device. The obstacle occlusion rate calculation device can include:
[0103] The acquisition module 410 is configured to acquire a frame of point cloud data to be processed. The point cloud data includes an elevation angle and a yaw angle of the point cloud. The elevation angle represents a vertical laser emission angle when the laser radar measures the point cloud data, and the yaw angle represents a horizontal laser emission angle when the laser radar measures the point cloud data.
[0104] The projection module 420 is configured to project each point cloud into a two-dimensional grid according to the elevation angle and the yaw angle, to obtain grid representative points. The same row of grids corresponds to the same elevation angle interval, and the same column of grids corresponds to the same yaw angle interval.
[0105] The acquisition module 410 is further configured to acquire three-dimensional bounding box information of an occluded obstacle according to the point cloud data.
[0106] The encoding module 430 is configured to encode the point cloud data according to the three-dimensional bounding box information and the grid representative points, to obtain a point cloud encoding sequence.
[0107] The calculation module 440 is configured to calculate the occlusion rate of the obstacle according to the point cloud encoding sequence.
[0108] In an optional embodiment, the projection module 420 is further configured to:
[0109] acquire a two-dimensional grid created in advance. The elevation angle interval of each grid is determined according to the elevation angle value range and the number of rows of the two-dimensional grid, and the yaw angle interval of each grid is determined according to the yaw angle value range and the number of columns of the two-dimensional grid.
[0110] project each point cloud into the corresponding grid according to the elevation angle and the yaw angle.
[0111] select the point cloud closest to the laser radar from the point cloud projected into the grid as the grid representative point.
[0112] In an optional embodiment, the encoding module 430 is further configured to:
[0113] According to the three-dimensional detection box information, a pitch angle interval and a yaw angle interval of the obstacle are calculated;
[0114] A grid region corresponding to the pitch angle interval and the yaw angle interval of the obstacle is calculated.
[0115] According to the grid region, the point cloud data is encoded to obtain a point cloud encoding sequence.
[0116] In an optional embodiment, the encoding module 430 is further configured to:
[0117] Obtain an encoding rule, the encoding rule including a plurality of characters and an encoding condition corresponding to each character;
[0118] Determine a character of each column of grids according to an encoding condition satisfied by a grid representative point of each column of grids in the grid region;
[0119] Combine all the characters to obtain the point cloud encoding sequence.
[0120] In an optional embodiment, the encoding rule includes a first character, a second character, and a third character.
[0121] The encoding condition corresponding to the first character is that there is a grid representative point falling within the three-dimensional detection box of the obstacle in a column of grids.
[0122] The encoding condition corresponding to the second character is that there is no grid representative point in a column of grids.
[0123] The encoding condition corresponding to the third character is that all grid representative points in a column of grids do not fall within the three-dimensional detection box of the obstacle.
[0124] In an optional embodiment, the calculation module 440 is further configured to:
[0125] According to the point cloud encoding sequence, the number m of columns of point clouds hitting the obstacle is calculated.
[0126] Obtain the number n of columns of grids in the grid region;
[0127] According to the formula: occlusion rate = 1-m / n, the occlusion rate of the obstacle is calculated.
[0128] In an optional embodiment, the calculation module 440 is further configured to:
[0129] From the point cloud encoding sequence, at least one subsequence is extracted, the first and last characters of the subsequence are the first character, and the characters in the middle are not the third character.
[0130] The total length of the at least one subsequence is calculated, and the total length is determined as the number m of columns of point clouds hitting the obstacle.
[0131] In summary, the obstacle occlusion rate calculation device provided by the embodiment of the present application can calculate the occlusion rate of the object by encoding the point cloud data by using the emission characteristics of the laser radar, then counting the proportion of the point cloud hitting the obstacle, and finally calculating the occlusion rate of the object. In this way, the occlusion rate of the obstacle can be calculated simply and efficiently, the calculation speed can meet the real-time requirements of autonomous driving, and the calculation result is stable and reliable.
[0132] An embodiment of the present application provides a computer readable storage medium, the storage medium stores at least one instruction, the at least one instruction is loaded and executed by a processor to implement the obstacle occlusion rate calculation method.
[0133] An embodiment of the present application provides a computer device, the computer device comprises a processor and a memory, the memory stores at least one instruction, the instruction is loaded and executed by the processor to implement the obstacle occlusion rate calculation method.
[0134] It should be noted that: the obstacle occlusion rate calculation device provided by the above embodiment is used to calculate the occlusion rate of the obstacle, and only the division of the above functional modules is used as an example for illustration. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the obstacle occlusion rate calculation device is divided into different functional modules to complete all or part of the functions described above. In addition, the obstacle occlusion rate calculation device and the obstacle occlusion rate calculation method provided by the above embodiment belong to the same concept, and the specific implementation process is described in the method embodiment, which will not be repeated here.
[0135] Those skilled in the art can understand that all or part of the steps of the above-mentioned embodiments can be completed by hardware, or by a program instructing related hardware to complete, and the program can be stored in a computer readable storage medium. The storage medium mentioned above can be a read-only memory, a magnetic disk or an optical disk.
[0136] The above description does not limit the embodiments of the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principles of the embodiments of the present application shall be included in the protection scope of the embodiments of the present application.
Claims
1. A method for calculating the occlusion rate of an obstacle, characterized in that, The method includes: Acquire a frame of point cloud data to be processed. The point cloud data includes the pitch angle and yaw angle of the point cloud. The pitch angle represents the vertical laser emission angle when the lidar measures the point cloud data, and the yaw angle represents the horizontal laser emission angle when the lidar measures the point cloud data. Each point cloud is projected onto a two-dimensional grid according to the pitch angle and yaw angle to obtain grid representative points. The same row of grids corresponds to the same pitch angle interval, and the same column of grids corresponds to the same yaw angle interval. The 3D detection bounding box information of the occluded obstacle is obtained based on the point cloud data; The point cloud data is encoded based on the 3D detection box information and the grid representative points to obtain a point cloud encoding sequence; The occlusion rate of the obstacle is calculated based on the point cloud encoding sequence; The step of encoding the point cloud data based on the 3D detection box information and the grid representative points to obtain a point cloud encoding sequence includes: calculating the pitch angle interval and yaw angle interval of the obstacle based on the 3D detection box information; calculating the grid area corresponding to the pitch angle interval and yaw angle interval of the obstacle; and encoding the point cloud data based on the grid area to obtain a point cloud encoding sequence. The step of encoding the point cloud data according to the grid region to obtain a point cloud encoding sequence includes: obtaining encoding rules, the encoding rules including multiple characters and encoding conditions corresponding to each character; determining the characters of each column of grids according to the encoding conditions satisfied by the grid representative points of each column of grids in the grid region; and assembling all characters into a point cloud encoding sequence; the encoding rules include a first character, a second character, and a third character; the encoding condition corresponding to the first character is: there is a grid representative point in a column of grids that falls within the 3D detection frame of the obstacle; the encoding condition corresponding to the second character is: there is no grid representative point in a column of grids; and the encoding condition corresponding to the third character is: none of the grid representative points in a column of grids fall within the 3D detection frame of the obstacle. The step of calculating the occlusion rate of the obstacle based on the point cloud encoding sequence includes: calculating the number m of the number of columns of the point cloud hitting the obstacle based on the point cloud encoding sequence; obtaining the number n of the number of columns of the grid in the grid region; and calculating the occlusion rate of the obstacle according to the formula occlusion rate = 1 - m / n.
2. The method for calculating the occlusion rate of obstacles according to claim 1, characterized in that, The process of projecting each point cloud onto a two-dimensional grid according to the pitch and yaw angles to obtain grid representative points includes: Obtain a pre-created two-dimensional grid. The pitch angle range of each grid is determined based on the pitch angle value range and the number of rows of the two-dimensional grid. The yaw angle range of each grid is determined based on the yaw angle value range and the number of columns of the two-dimensional grid. Project each point cloud onto the corresponding grid according to the pitch angle and yaw angle; Select the point cloud closest to the lidar from the point cloud projected onto the grid as the grid representative point.
3. The method for calculating the occlusion rate of obstacles according to claim 1, characterized in that, The step of calculating the number m of the point cloud columns hitting the obstacle based on the point cloud encoding sequence includes: At least one subsequence is extracted from the point cloud encoding sequence, wherein the first and last characters of the subsequence are both the first character, and the characters in the middle do not include the third character; Calculate the total length of the at least one subsequence, and determine the total length as the number m of the number of columns of the point cloud that hit the obstacle.
4. A device for calculating the occlusion rate of an obstacle, characterized in that, The device includes: The acquisition module is used to acquire a frame of point cloud data to be processed. The point cloud data includes the pitch angle and yaw angle of the point cloud. The pitch angle represents the vertical laser emission angle when the lidar measures the point cloud data, and the yaw angle represents the horizontal laser emission angle when the lidar measures the point cloud data. The projection module is used to project each point cloud onto a two-dimensional grid according to the pitch angle and yaw angle to obtain grid representative points. The same row of grids corresponds to the same pitch angle interval, and the same column of grids corresponds to the same yaw angle interval. The acquisition module is also used to acquire the three-dimensional detection box information of the occluded obstacle based on the point cloud data; The encoding module is used to encode the point cloud data according to the three-dimensional detection box information and the grid representative points to obtain a point cloud encoding sequence; The calculation module is used to calculate the occlusion rate of the obstacle based on the point cloud encoding sequence; The encoding module is further configured to: calculate the pitch angle range and yaw angle range of the obstacle based on the three-dimensional detection box information; calculate the grid area corresponding to the pitch angle range and yaw angle range of the obstacle; and encode the point cloud data based on the grid area to obtain a point cloud encoding sequence. The encoding module is further configured to: acquire encoding rules, the encoding rules including multiple characters and encoding conditions corresponding to each character; determine the characters of each column of grids according to the encoding conditions satisfied by the grid representative points of each column of grids in the grid region; and assemble all characters into a point cloud encoding sequence; the encoding rules include a first character, a second character, and a third character; the encoding condition corresponding to the first character is: there is a grid representative point in a column of grids that falls into the 3D detection frame of the obstacle; the encoding condition corresponding to the second character is: there is no grid representative point in a column of grids; and the encoding condition corresponding to the third character is: none of the grid representative points in a column of grids fall into the 3D detection frame of the obstacle. The calculation module is further configured to: calculate the number m of the number of columns of the point cloud hitting the obstacle based on the point cloud encoding sequence; obtain the number n of the number of columns of the grid in the grid region; and calculate the occlusion rate of the obstacle according to the formula occlusion rate = 1 - m / n.
5. A computer-readable storage medium, characterized in that, The storage medium stores at least one instruction, which is loaded and executed by a processor to implement the obstacle occlusion rate calculation method as described in any one of claims 1 to 3.
6. A computer device, characterized in that, The computer device includes a processor and a memory, the memory storing at least one instruction, which is loaded and executed by the processor to implement the obstacle occlusion rate calculation method as described in any one of claims 1 to 3.
Citation Information
Patent Citations
Control method and device of unmanned equipment
CN114590250A
Grid-based point cloud clustering method and device and storage medium
CN115586545A