Point cloud processing method, device, equipment and storage medium
By extracting ground point cloud data and evaluating its tilt degree, determining whether correction processing is needed, the problem of inefficient point cloud data processing in the prior art is solved, and more efficient point cloud data processing is achieved.
Patent Information
- Application Number
- CN202211179412.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-22
- Publication Date
- 2025-05-02
- Estimated Expiration
- 2042-09-22
AI Technical Summary
When processing point cloud data, the prior art requires correction processing for each frame of original point cloud data, resulting in low processing efficiency.
By extracting the first point cloud data belonging to the ground from the original point cloud data, the degree of inclination relative to the horizontal plane is determined, and whether correction processing of the horizontal plane direction is required is evaluated based on the degree of inclination, and the original point cloud data is processed according to the evaluation results.
The correction processing of unnecessary point clouds is reduced and the processing efficiency of point cloud data is improved.
Smart Images

Figure CN115546507B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of data processing technology, and in particular to a point cloud processing method, device, equipment and storage medium. Background Art
[0002] Point cloud is a collection of a large number of points of target surface characteristics. By processing point cloud, corresponding environmental information can be obtained, which can be applied to various fields such as surveying and mapping, transportation, electricity, geology, etc. For example, in the field of autonomous driving, various sensors on board the vehicle will involve the processing of point cloud data. During the driving process of the car, due to sensor installation errors or vehicle bumps, the collected point cloud will drift up and down relative to the actual scene, which seriously affects the subsequent algorithm processing.
[0003] Therefore, how to adapt point cloud data to actual scenes is of great significance. Summary of the invention
[0004] The main technical problem solved by the present application is to provide a point cloud processing method, device, equipment and storage medium, which can reduce some unnecessary point cloud correction processing and improve the processing efficiency of point clouds.
[0005] In order to solve the above-mentioned technical problems, a technical solution adopted in the present application is: to provide a point cloud processing method, the method comprising: obtaining the original point cloud data at the current moment; extracting the first point cloud data belonging to the ground from the original point cloud data; determining the inclination of the first point cloud data relative to the horizontal plane; based on the inclination, obtaining a correction evaluation result, and processing the original point cloud data according to the correction evaluation result, wherein the correction evaluation result is used to characterize whether the original point cloud data needs to be corrected in the horizontal plane direction.
[0006] In order to solve the above-mentioned technical problems, another technical solution adopted in the present application is: to provide a point cloud processing device, which includes: an acquisition module, used to acquire the original point cloud data at the current moment; a data extraction module, used to extract the first point cloud data belonging to the ground from the original point cloud data; a determination module, used to determine the inclination of the first point cloud data relative to the horizontal plane; an evaluation module, used to obtain a correction evaluation result based on the inclination degree, wherein the correction evaluation result is used to characterize whether the original point cloud data is corrected in the horizontal plane direction.
[0007] To solve the above technical problems, another technical solution adopted in the present application is: to provide an electronic device, comprising a memory and a processor coupled to each other, the memory storing program instructions; the processor is used to execute the program instructions stored in the memory to implement the above method.
[0008] In order to solve the above technical problems, another technical solution adopted by the present application is: providing a computer-readable storage medium, the computer-readable storage medium is used to store program instructions, and the program instructions can be executed to implement the above method.
[0009] The beneficial effects of the present application are as follows: the present application first extracts the first point cloud data belonging to the ground from the original point cloud data at the current moment, and then determines the degree of inclination of the first point cloud data relative to the horizontal plane, determines whether it is necessary to perform a correction evaluation result of horizontal plane direction correction processing on the original point cloud data according to the degree of inclination, and processes the original point cloud data according to the determined correction evaluation result. Compared with the existing correction processing of each frame of original point cloud, the present application scheme reduces the correction processing of some unnecessary point clouds and can improve the processing efficiency of point clouds. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a flowchart of an embodiment of a point cloud processing method provided by the present application;
[0011] Figure 2 yes Figure 1 A partial flow chart of an embodiment of step S12 is shown;
[0012] Figure 3 yes Figure 2 The flowchart of step S22 of an embodiment is shown;
[0013] Figure 4 It is a schematic diagram of the framework of an embodiment of a point cloud processing device provided by the present application;
[0014] Figure 5 It is a structural schematic diagram of an embodiment of an electronic device provided by the present application;
[0015] Figure 6 It is a schematic diagram of the structure of the computer-readable storage medium provided in this application. DETAILED DESCRIPTION
[0016] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0017] The term "and / or" in this article is only a description of the association relationship of associated objects, indicating that there may be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the objects associated before and after are in an "or" relationship. In addition, "many" in this article means two or more than two. In addition, the term "at least one" in this article means any combination of at least two of any one or more of a plurality of, for example, including at least one of A, B, and C, can mean including any one or more elements selected from the set consisting of A, B, and C.
[0018] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0019] It should be noted that the point cloud processing method of the present application can be used in any scenario where point clouds need to be processed to obtain environmental information, such as in an autonomous driving scenario. Due to the uneven ground, the vehicle may be bumpy during travel, or errors in the installation of the point cloud acquisition equipment may cause the point cloud data collected by the vehicle during driving to drift up and down relative to the actual scene, which seriously affects the subsequent algorithm processing. The point cloud processing method of the present application can extract the first point cloud data belonging to the ground from the original point cloud data, and then determine whether the original point cloud data needs to be corrected in the horizontal plane direction according to the inclination of the first point cloud data relative to the horizontal plane. The original point cloud data can be processed according to the determined correction evaluation result, so that the point cloud data can be adapted to the actual scene.
[0020] See also Figure 1 , Figure 1 is a flow chart of an embodiment of the point cloud processing method provided by the present application. It should be noted that if there are substantially the same results, this embodiment does not necessarily refer to Figure 1 The process sequence shown is limited. Figure 1 As shown, this embodiment includes:
[0021] S11: Obtain the original point cloud data at the current moment.
[0022] This embodiment is used to extract first point cloud data belonging to the ground from the original point cloud data, and then determine whether a correction evaluation result of horizontal plane direction correction processing of the original point cloud data is required based on the inclination of the first point cloud data relative to the horizontal plane, and process the original point cloud data according to the determined correction evaluation result.
[0023] In this embodiment, the original point cloud data at the current moment is the point cloud data of the current moment and the current scene collected by the point cloud collection device. The point cloud data is a set of data points in a given three-dimensional coordinate system, which is the point cloud data recorded about the current environment (for example, the outer surface of the object and / or the ground, etc.). The point cloud collection device can be, but is not limited to, a laser radar, and can also be a device capable of collecting point clouds, such as a depth camera.
[0024] S12: Extracting first point cloud data belonging to the ground from the original point cloud data.
[0025] In one embodiment, the second point cloud data located in the area of interest can be first selected from the original point cloud data, and then the first point cloud data belonging to the ground can be extracted from the second point cloud data. Preferably, the point cloud data that meets the first preset condition can be selected from the original point cloud data as the second point cloud data located in the area of interest. The first preset condition includes at least one of a distance from the acquisition object less than a preset distance and a height within a preset height range, that is, points within a preset distance range from the acquisition device can be selected from the original point cloud data, and / or points within a preset height range can be selected from the original point cloud data as the second point cloud data of the area of interest. The area of interest is the area in the original point cloud data that covers the ground point cloud, and the second point cloud data located in the area of interest represents the point cloud data covering the ground, that is, the second point cloud data includes the first point cloud data.
[0026] It should be noted that the preset distance range and the preset height range can be set according to actual conditions. For example, most of the acquired original point cloud data are concentrated at a certain distance (for example, 20 meters from the acquisition device), then the distance range in which most of the original point cloud data are concentrated can be determined as the preset distance range; for another example, the installation height of the point cloud acquisition device (for example, H) is the height of the device relative to the actual ground. Taking into account the influence of the drift of the original point cloud data relative to the actual scene caused by the uneven ground or the error in the installation of the point cloud acquisition device, a preset threshold value of the original point cloud drift (for example, Z1) can be set. If the height of the point cloud belonging to the ground (for example, Z) satisfies H-Z1<Z<H+Z1, then H-Z1<Z<H+Z1 can be used as the preset height range to select the point cloud data that meets the first preset condition from the original point cloud data as the second point cloud data of the area of interest, and then extract the first point cloud data belonging to the ground from the second point cloud data. It can be understood that the second point cloud data selected from the original point cloud data using the first preset condition only approximately represents the point cloud data belonging to the ground. Some point clouds in the selected second point cloud data are the first point clouds belonging to the ground, and some point clouds are non-ground point clouds.
[0027] In other embodiments, a random sampling consistency algorithm may also be used to extract the first point cloud data belonging to the ground from the original point cloud data, wherein a number of point cloud data may be randomly selected from the original point cloud data, and a plane may be determined through the number of point cloud data. Then, points within the plane and points outside the plane with respect to the plane are distinguished. In this way, points on the optimal plane containing the largest number of point clouds are determined as the first point cloud.
[0028] S13: Determine the inclination of the first point cloud data relative to the horizontal plane.
[0029] In one embodiment, the degree of inclination includes the angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane. The angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane is the angle between the ground corresponding to the first point cloud data and the horizontal plane, that is, the angle between the ground corresponding to the first point cloud data and the actual ground. The angle can reflect the degree of inclination (drift) of the original point cloud data collected by the point cloud acquisition device relative to the actual ground. In this embodiment, after determining the first point cloud data, a relevant algorithm can be used to fit a plane (plane equation) based on the first point cloud data, and the normal vector of the plane (first point cloud data) is obtained, and then the angle between the normal vector and the normal vector (0,0,1) of the horizontal plane is calculated, wherein the angle represents the degree of inclination of the first point cloud data relative to the horizontal plane, and also represents the degree of inclination of the first point cloud data relative to the actual ground. Of course, in other embodiments, the covariance matrix of the first point cloud data may be obtained first, and the covariance matrix of the first point cloud data may be subjected to singular value decomposition to obtain the normal vector of the first point cloud data, and then the angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane (0,0,1) may be calculated to determine the degree of inclination of the first point cloud data relative to the horizontal plane.
[0030] In another embodiment, the degree of inclination includes the current height difference of the acquisition device of the original point cloud data. The current height difference is the difference between the distance from the installation position of the point cloud acquisition device to the ground corresponding to the first point cloud data and the device installation height. It should be noted that if the original point cloud does not have drift, the distance from the installation position of the point cloud acquisition device to the ground corresponding to the first point cloud data is the device installation height; but if the original point cloud has drift, the distance from the installation position of the point cloud acquisition device to the ground corresponding to the first point cloud data is less than the device installation height. Therefore, in this embodiment, the current height difference of the acquisition device of the original point cloud data can reflect the degree of inclination (drift) of the original point cloud data collected by the point cloud acquisition device relative to the actual ground.
[0031] Optionally, after determining the first point cloud data, the centroid coordinates and normal vector of the first point cloud data are obtained, and the second plane (the second plane represents the ground) is determined using the centroid coordinates and normal vector of the first point cloud data. Then, the distance between the installation position of the acquisition device and the second plane is obtained, and the distance is used as the current ground height of the acquisition device, and the difference between the current ground height and the equipment installation height is obtained, and the difference is used as the current height difference.
[0032] Optionally, after determining the first point cloud data, the above-mentioned plane fitting method can be used to fit a second plane representing the ground using the first point cloud data, and then the distance between the installation position of the acquisition device and the second plane is obtained as the current ground height, and the difference between the current ground height and the equipment installation height is obtained as the current height difference.
[0033] S14: Based on the degree of inclination, a correction evaluation result is obtained, and the original point cloud data is processed according to the correction evaluation result, wherein the correction evaluation result is used to indicate whether the original point cloud data needs to be corrected in the horizontal direction.
[0034] In one embodiment, if the angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane reaches a third preset threshold, it is determined that the original point cloud data needs to be corrected in the horizontal plane direction; otherwise, the original point cloud data is not corrected in the horizontal plane direction. The third preset threshold is used to indicate the degree of inclination of the original point cloud data relative to the actual ground. The specific third preset threshold can be determined according to the degree of adaptation between the original point cloud data and the actual ground, and is not specifically limited here.
[0035] In another embodiment, if the current ground height is less than the equipment installation height, and the absolute value of the current height difference is greater than the fourth preset threshold, it is determined that the original point cloud data needs to be corrected in the horizontal plane direction. Conversely, if the current height difference is less than the fourth preset threshold, the original point cloud data is not corrected in the horizontal plane direction. The fourth preset threshold is used to indicate the degree of inclination of the original point cloud data relative to the actual ground. The specific fourth preset threshold can be determined based on the degree of adaptation between the original point cloud data and the actual ground, and is not specifically limited here.
[0036] It should be noted that if the angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane is less than the third preset threshold, or the current height difference is less than the fourth preset threshold, it means that the inclination of the original point cloud data relative to the actual ground is small (does not affect the subsequent algorithm processing), and there is no need to perform horizontal plane correction processing on the original point cloud data, so as to reduce the correction processing of some unnecessary point clouds and thereby improve the processing efficiency of the point cloud.
[0037] In this embodiment, when it is determined that the correction evaluation result requires correction processing of the original point cloud data in the horizontal plane direction, the rotation matrix between the normal vector of the first point cloud data to the normal vector of the horizontal plane is obtained, and based on the rotation matrix, the original point cloud data is corrected in the horizontal plane direction to obtain the target point cloud data in the horizontal direction.
[0038] Among them, the normal vector of the first point cloud data is the normal vector before rotation, and the normal vector of the horizontal plane (0,0,1) is the normal vector after rotation. The rotation matrix from the normal vector of the first point cloud data to the normal vector of the horizontal plane (0,0,1) is calculated, and the rotation matrix is applied to the original point cloud data. The original point cloud data can be corrected in the horizontal plane direction to obtain the corrected target point cloud data, wherein the corrected target point cloud data is adapted to the actual ground.
[0039] In this embodiment, the first point cloud data belonging to the ground is first extracted from the original point cloud data at the current moment, and then the inclination degree of the first point cloud data relative to the horizontal plane is determined, and the correction evaluation result of whether the original point cloud data needs to be corrected in the horizontal plane direction is determined according to the inclination degree, and the original point cloud data is processed according to the determined correction evaluation result. Compared with the existing correction processing of each frame of original point cloud, this embodiment determines whether the original point cloud data needs to be corrected in the horizontal plane direction based on the inclination degree, which reduces the correction processing of some unnecessary point clouds and can improve the processing efficiency of point clouds.
[0040] Specifically, see Figure 2 , Figure 2 yes Figure 1 It should be noted that if there are substantially the same results, the embodiments of the present application are not limited to the above embodiments. Figure 2 The process sequence shown is limited. Figure 2 As shown, in this embodiment, extracting first point cloud data belonging to the ground from the second point cloud data includes:
[0041] S21: Select at least part of the point cloud data from the second point cloud data as current point cloud data.
[0042] This embodiment is used to extract first point cloud data belonging to the ground from the current point cloud.
[0043] In this embodiment, the case where at least part of the point cloud data is selected from the second point cloud data as the current point cloud data includes: selecting a part of the point cloud data from the second point cloud data as the current point cloud data, or directly using the second point cloud data as the current point cloud data. The specific method can be determined according to the actual selection effect.
[0044] In one embodiment, since the height value of the point cloud belonging to the ground is the smallest among all point clouds, the point cloud with the smallest height value can be selected from the second point cloud data as the current point cloud data. Exemplarily, each second point cloud is sorted according to height, and the point cloud data with the smallest height value is selected as the current point cloud data.
[0045] In another embodiment, point clouds within a certain height range may be selected from the second point cloud data as the current point cloud data, wherein the certain height range in this embodiment may be included in the above-mentioned preset height range.
[0046] S22: Acquire a first plane determined by the centroid coordinates and the normal vector of the current point cloud data, and determine the plane height of the first plane.
[0047] In one embodiment, the covariance matrix of the current point cloud data can be obtained first, and the covariance matrix can be subjected to singular value decomposition to obtain the normal vector of the current point cloud data, and then the first plane and the plane height of the first plane can be determined by the centroid coordinates and the normal vector of the current point cloud data. Among them, the covariance matrix can present the distribution degree of the current point cloud in each coordinate axis. The larger the covariance value, the more uneven the distribution, and the smaller the value, the more uniform the distribution in the corresponding coordinate axis. Performing singular value decomposition on the covariance matrix can extract the characteristics of the current point cloud data in the vertical axis. Since the point cloud belonging to the ground has the smallest value in the height direction and the most uniform distribution, the eigenvector corresponding to the smallest eigenvalue in the vertical axis can be selected as the normal vector of the current point cloud data after singular value decomposition.
[0048] S23: Select the point cloud data that is smaller than the plane height in the current point cloud data as the new current point cloud data, and re-execute the steps of obtaining the first plane determined by the centroid coordinates and normal vector of the current point cloud data and subsequent steps, until the number of executions of obtaining the first plane determined by the centroid coordinates and normal vector of the current point cloud data and subsequent steps reaches a first preset threshold, and the point cloud data that is smaller than the plane height selected from the current point cloud data for the last time is used as the first point cloud data.
[0049] It should be noted that the above-mentioned selection of the second point cloud data from the original point cloud data and the selection of the current point cloud from the second point cloud data are both for obtaining the first point cloud data belonging to the ground, wherein the selected second point cloud data and the current point cloud selected from the second point cloud data are both approximate representations of the ground point cloud data, the current ground point cloud data has a large error and there are many non-ground point clouds, therefore, in this embodiment, after determining the first plane and the plane height of the first plane by the centroid coordinates and the normal vector of the current point cloud data, the point cloud with a height less than the current plane height is again used as the new current point cloud to update the current point cloud, and the point cloud data with a height less than the plane height in the current point cloud data is selected again in steps S22 and S23 as the new current point cloud data, until the number of times the point cloud data with a height less than the plane height in the current point cloud data is selected in steps S22 and S23 as the new current point cloud data reaches the first preset threshold, and the point cloud data with a height less than the plane height selected from the current point cloud data for the last time is used as the first point cloud data. The first point cloud data is the point cloud data determined to belong to the ground.
[0050] At the same time, it should be noted that after the point cloud data is screened for the first preset threshold number of times, the first point cloud data obtained can more accurately represent the ground point cloud. The first preset threshold number of times can be 2 times, 3 times, or 5 times, etc. The specific first preset threshold can be determined according to the accuracy of the first point cloud data obtained in representing the ground point cloud, and is not specifically limited here.
[0051] In another embodiment, after step S22, the first point cloud data belonging to the ground can also be extracted from the second point cloud data according to the size relationship between the plane height of the first plane and the second preset threshold. Specifically, if the plane height is greater than the second preset threshold, the points in the current point cloud data that are less than the plane height are selected as new current point cloud data, and step S22 and subsequent steps are re-executed until the latest determined plane height is less than the second preset threshold, and the point cloud data in the current point cloud data located in the latest determined first plane is used as the first point cloud data. It can be understood that in this embodiment, the latest determined first plane can represent the ground in the original point cloud data.
[0052] See also Figure 3 , Figure 3 yes Figure 2 It should be noted that if there is substantially the same result, the present embodiment of the application does not necessarily use the same method. Figure 3 The process sequence shown is limited. Figure 3 As shown, in this embodiment, obtaining a first plane determined by the centroid coordinates and normal vector of the current point cloud data includes:
[0053] S31: Obtain the centroid coordinates and covariance matrix of the current point cloud data.
[0054] In this embodiment, the centroid coordinates and covariance matrix of the current point cloud data may be acquired based on the current point cloud data.
[0055] In one embodiment, the centroid coordinates of the current point cloud data are first obtained, and then the covariance matrix of the current point cloud is obtained according to the centroid coordinates of the current point cloud and the current point cloud. The centroid coordinates of the current point cloud are the average value of the current point cloud, which is the coordinates of a point.
[0056] S32: Calculate the eigenvalues and corresponding eigenvectors of the covariance matrix in the target axis, where the target axis at least includes the vertical axis.
[0057] In this embodiment, singular value decomposition is used to calculate the eigenvalues and corresponding eigenvectors of the covariance matrix in the target axis, wherein the target axis includes at least the vertical axis, and of course, the target axis may also include the horizontal axis and the longitudinal axis. The singular value decomposition of the covariance matrix can extract the features of the current point cloud data in the target axis.
[0058] S33: Using the eigenvector corresponding to the minimum eigenvalue in the vertical axis as the normal vector of the current point cloud data.
[0059] In this embodiment, since the point cloud belonging to the ground has the smallest value in the height direction and the most evenly distributed, the eigenvector corresponding to the smallest eigenvalue in the vertical axis can be selected as the normal vector of the current point cloud data after singular value decomposition. It should be noted that the normal vector determined by the current point cloud data is also the normal vector of the plane corresponding to the current point cloud.
[0060] S34: Determine a first plane based on the centroid coordinates and normal vector of the current point cloud data.
[0061] In this embodiment, after the centroid coordinates and normal vector of the current point cloud data are determined, the first plane can be determined according to the centroid coordinates and the normal vector (the principle that a plane can be determined according to a point and a line).
[0062] See also Figure 4 , Figure 4 It is a schematic diagram of the framework of an embodiment of the point cloud processing device provided by the present application. In this embodiment, the point cloud processing device 40 includes an acquisition module 41, a data extraction module 42, a determination module 43, an evaluation module 44 and a processing module 45. The acquisition module 41 is used to acquire the original point cloud data at the current moment, and the data extraction module 42 is used to extract the first point cloud data belonging to the ground from the original point cloud data; the determination module 43 is used to determine the inclination of the first point cloud data relative to the horizontal plane, and the evaluation module 44 is used to obtain the correction evaluation result based on the inclination; the processing module 45 is used to process the original point cloud data according to the correction evaluation result, wherein the correction evaluation result is used to indicate whether the original point cloud data needs to be corrected in the horizontal plane direction.
[0063] In some embodiments, the data extraction module 42 extracts first point cloud data belonging to the ground from the original point cloud data, including: selecting second point cloud data located in the area of interest from the original point cloud data; and extracting first point cloud data belonging to the ground from the second point cloud data.
[0064] In some embodiments, the data extraction module 42 selects second point cloud data located in the area of interest from the original point cloud data, including: selecting point cloud data that meets a first preset condition from the original point cloud data as the second point cloud data located in the area of interest, the first preset condition including at least one of a distance from the collection object being less than a preset distance and a height being within a preset height range.
[0065] In some embodiments, the data extraction module 42 extracts first point cloud data belonging to the ground from the second point cloud data, including: selecting at least part of the point cloud data from the second point cloud data as the current point cloud data; obtaining a first plane determined by the centroid coordinates and normal vector of the current point cloud data, and determining the plane height of the first plane; selecting point cloud data in the current point cloud data that is smaller than the plane height as the new current point cloud data, and re-executing the steps of obtaining the first plane determined by the centroid coordinates and normal vector of the current point cloud data and subsequent steps until the number of executions of obtaining the first plane determined by the centroid coordinates and normal vector of the current point cloud data and subsequent steps reaches a first preset threshold, and the point cloud data less than the plane height selected from the current point cloud data for the last time is used as the first point cloud data; or, in response to the height being greater than the second preset threshold, selecting a point in the current point cloud data that is smaller than the height as the new current point cloud data, and re-executing the steps of obtaining the first plane determined by the centroid coordinates and normal vector of the current point cloud data and subsequent steps until the latest determined plane height is less than the second preset threshold, and the point cloud data in the current point cloud data located in the latest determined first plane is used as the first point cloud data.
[0066] In some embodiments, the acquisition module 41 acquires the first plane determined by the centroid coordinates and normal vector of the current point cloud data, including: acquiring the centroid coordinates and covariance matrix of the current point cloud data; calculating the eigenvalues and corresponding eigenvectors of the covariance matrix in the target axis, the target axis at least including the vertical axis; using the eigenvector corresponding to the minimum eigenvalue of the vertical axis as the normal vector of the current point cloud data; determining the first plane based on the centroid coordinates and normal vector of the current point cloud data.
[0067] In some embodiments, the degree of inclination determined by the determination module 43 includes the angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane, and determining the degree of inclination of the first point cloud data relative to the ground includes: obtaining the normal vector of the first point cloud data; determining the angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane; and / or, the degree of inclination includes the current height difference of the acquisition device of the original point cloud data, and determining the degree of inclination of the first point cloud data relative to the horizontal plane includes: obtaining the center of mass coordinates and normal vector of the first point cloud data; determining a second plane representing the ground using the center of mass coordinates and normal vector of the first point cloud data; obtaining the distance between the installation position of the acquisition device and the second plane as the current ground height of the acquisition device, and obtaining the difference between the current ground height and the device installation height as the current height difference.
[0068] In some embodiments, the evaluation module 44 obtains a correction evaluation result based on the degree of inclination, including: in response to the angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane reaching a third preset threshold, determining that the original point cloud data needs to be corrected in the horizontal plane direction; or, in response to the current ground height being less than the equipment installation height and the absolute value of the current height difference being greater than a fourth preset threshold, determining that the original point cloud data needs to be corrected in the horizontal plane direction.
[0069] In some embodiments, the processing module 45 processes the original point cloud data according to the correction evaluation result, including: in response to the correction evaluation result that the original point cloud data needs to be corrected in the horizontal plane direction, obtaining the rotation matrix between the normal vector of the first point cloud data and the normal vector of the horizontal plane; based on the rotation matrix, performing correction processing on the original point cloud data in the horizontal plane direction to obtain the target point cloud data in the horizontal direction.
[0070] See also Figure 5 , Figure 5 1 is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. In this embodiment, the electronic device 50 includes a processor 51 and a memory 52.
[0071] The processor 51 may also be referred to as a CPU (Central Processing Unit). The processor 51 may be an integrated circuit chip having signal processing capabilities. The processor 51 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. A general-purpose processor may be a microprocessor or the processor 51 may also be any conventional processor 51, etc.
[0072] The memory 52 in the electronic device 50 is used to store program instructions required for the processor 51 to run.
[0073] The processor 51 is used to execute program instructions to implement the method provided by any of the above embodiments and any non-conflicting combinations.
[0074] See also Figure 6 , Figure 6It is a schematic diagram of the structure of the computer-readable storage medium provided by the present application. The computer-readable storage medium 60 of the embodiment of the present application stores a program instruction 61, and when the program instruction 61 is executed, the method provided by any of the above-mentioned embodiments and any non-conflicting combination is implemented. Among them, the program instruction 61 can form a program file and be stored in the above-mentioned computer-readable storage medium 60 in the form of a software product, so that a computer device (which can be a personal computer, a server, or a network device, etc.) executes all or part of the steps of the methods of each implementation method of the present application. The aforementioned computer-readable storage medium 60 includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM, Read-Only Memory), a random access memory (RAM, Random Access Memory), a disk or an optical disk, or a terminal device such as a computer, a server, a mobile phone, and a tablet.
[0075] The above scheme first extracts the first point cloud data belonging to the ground from the original point cloud data at the current moment, and then determines the inclination degree of the first point cloud data relative to the horizontal plane, determines whether the original point cloud data needs to be corrected in the horizontal plane direction according to the inclination degree, and processes the original point cloud data according to the determined correction evaluation result. Compared with the existing correction processing of each frame of original point cloud, the present application scheme determines whether the original point cloud data needs to be corrected in the horizontal plane direction based on the inclination degree, which reduces the correction processing of some unnecessary point clouds and can improve the processing efficiency of point clouds.
[0076] In some embodiments, the functions or modules included in the device provided by the embodiments of the present disclosure can be used to execute the method described in the above method embodiments. The specific implementation can refer to the description of the above method embodiments, and for the sake of brevity, it will not be repeated here.
[0077] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.
[0078] In the several embodiments provided in the present application, it should be understood that the disclosed methods and devices can be implemented in other ways. For example, the device implementation described above is only schematic. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, and the indirect coupling or communication connection of devices or units can be electrical, mechanical or other forms.
[0079] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0080] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0081] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) or a processor (processor) to perform all or part of the steps of each implementation method of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program code.
[0082] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A point cloud processing method, characterized in that: The method comprises: Get the original point cloud data at the current moment; Selecting second point cloud data located in an area of interest from the original point cloud data; Extracting first point cloud data belonging to the ground from the second point cloud data; Determining the inclination of the first point cloud data relative to a horizontal plane; Based on the degree of inclination, a correction evaluation result is obtained, and the original point cloud data is processed according to the correction evaluation result, wherein the correction evaluation result is used to indicate whether the original point cloud data needs to be corrected in the horizontal direction; The step of extracting first point cloud data belonging to the ground from the second point cloud data comprises: Selecting at least part of the point cloud data from the second point cloud data as current point cloud data; Acquire a first plane determined by the centroid coordinates and the normal vector of the current point cloud data, and determine the plane height of the first plane; Selecting point cloud data smaller than the plane height in the current point cloud data as new current point cloud data, and re-executing the step of obtaining the first plane determined by the centroid coordinates and the normal vector of the current point cloud data and subsequent steps until the number of executions of the step of obtaining the first plane determined by the centroid coordinates and the normal vector of the current point cloud data and subsequent steps reaches a first preset threshold, and taking the point cloud data smaller than the plane height selected from the current point cloud data for the last time as the first point cloud data; or, In response to the plane height being greater than a second preset threshold, points in the current point cloud data that are less than the plane height are selected as new current point cloud data, and the steps of obtaining the first plane determined by the centroid coordinates and normal vector of the current point cloud data and subsequent steps are re-executed until the newly determined plane height is less than the second preset threshold, and the point cloud data in the current point cloud data that is located in the newly determined first plane is used as the first point cloud data.
2. The method according to claim 1, characterized in that: The step of selecting second point cloud data located in the region of interest from the original point cloud data comprises: Point cloud data that meets a first preset condition is selected from the original point cloud data as the second point cloud data located in the area of interest, wherein the first preset condition includes at least one of a distance from a collection object being less than a preset distance and a height being within a preset height range.
3. The method according to claim 1, characterized in that The obtaining of a first plane determined by the centroid coordinates and the normal vector of the current point cloud data comprises: Obtaining the centroid coordinates and covariance matrix of the current point cloud data; Calculating the eigenvalues and corresponding eigenvectors of the covariance matrix in a target axis, wherein the target axis includes at least a vertical axis; Taking the eigenvector corresponding to the minimum eigenvalue in the vertical axis as the normal vector of the current point cloud data; The first plane is determined based on the centroid coordinates and the normal vector of the current point cloud data.
4. The method according to claim 1, characterized in that The inclination degree includes an angle between a normal vector of the first point cloud data and a normal vector of the horizontal plane, and determining the inclination degree of the first point cloud data relative to the ground includes: Obtaining a normal vector of the first point cloud data; Determine an angle between a normal vector of the first point cloud data and a normal vector of the horizontal plane; And / or, the degree of inclination includes a current height difference of a device for collecting the original point cloud data, and determining the degree of inclination of the first point cloud data relative to a horizontal plane includes: Obtaining the centroid coordinates and normal vector of the first point cloud data; Determine a second plane representing the ground using the centroid coordinates and the normal vector of the first point cloud data; The distance between the installation position of the acquisition device and the second plane is obtained as the current ground height of the acquisition device, and the difference between the current ground height and the device installation height is obtained as the current height difference.
5. The method according to claim 4, characterized in that The step of obtaining a correction evaluation result based on the tilt degree includes: In response to the angle between the normal vector of the first point cloud data and the normal vector of the horizontal plane reaching a third preset threshold, determining that correction processing of the horizontal plane direction needs to be performed on the original point cloud data; Alternatively, in response to the current ground height being less than the equipment installation height and the absolute value of the current height difference being greater than a fourth preset threshold, it is determined that the original point cloud data needs to be corrected in the horizontal plane direction.
6. The method according to claim 1, characterized in that The processing of the original point cloud data according to the correction evaluation result includes: In response to the correction evaluation result that the original point cloud data needs to be corrected in the horizontal plane direction, obtaining a rotation matrix between the normal vector of the first point cloud data and the normal vector of the horizontal plane; Based on the rotation matrix, the original point cloud data is corrected in the horizontal direction to obtain target point cloud data in the horizontal direction.
7. A point cloud processing device, characterized in that: The device comprises: The acquisition module is used to obtain the original point cloud data at the current moment; A data extraction module, used to select second point cloud data located in an area of interest from the original point cloud data; and extract first point cloud data belonging to the ground from the second point cloud data; A determination module, used to determine the inclination of the first point cloud data relative to a horizontal plane; An evaluation module, used for obtaining a correction evaluation result based on the tilt degree, and processing the original point cloud data according to the correction evaluation result, wherein the correction evaluation result is used to indicate whether the original point cloud data needs to be corrected in the horizontal plane direction; The step of extracting first point cloud data belonging to the ground from the second point cloud data comprises: Selecting at least part of the point cloud data from the second point cloud data as current point cloud data; Acquire a first plane determined by the centroid coordinates and the normal vector of the current point cloud data, and determine the plane height of the first plane; Selecting point cloud data smaller than the plane height in the current point cloud data as new current point cloud data, and re-executing the step of obtaining the first plane determined by the centroid coordinates and the normal vector of the current point cloud data and subsequent steps until the number of executions of the step of obtaining the first plane determined by the centroid coordinates and the normal vector of the current point cloud data and subsequent steps reaches a first preset threshold, and taking the point cloud data smaller than the plane height selected from the current point cloud data for the last time as the first point cloud data; or, In response to the plane height being greater than a second preset threshold, points in the current point cloud data that are less than the plane height are selected as new current point cloud data, and the steps of obtaining the first plane determined by the centroid coordinates and normal vector of the current point cloud data and subsequent steps are re-executed until the newly determined plane height is less than the second preset threshold, and the point cloud data in the current point cloud data that is located in the newly determined first plane is used as the first point cloud data.
8. An electronic device, characterized in that: comprising a memory and a processor coupled to each other, The memory stores program instructions; The processor is used to execute the program instructions stored in the memory to implement the method according to any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium is used to store program instructions, and the program instructions can be executed to implement the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
Pavement characteristic parameter automatic extraction method and system
CN111239757A
Laser odometer error correction method and system, storage medium and computing equipment
CN113935904A