This application claims priority to Chinese Patent Application No. 202110578726.3, filed with the China National Intellectual Property Administration on May 26, 2021 and entitled “METHOD AND APPARATUS FOR 2D REGULARIZED PLANAR PROJECTION OF POINT CLOUD”, which is incorporated herein by reference in its entirety.
The present invention pertains to the field of point cloud data processing technologies, and in particular, to a method and an apparatus for 2D regularized planar projection of a point cloud.
With the development of computer technologies, 3D point cloud data has been widely applied to virtual reality, augmented reality, autonomous driving, environment modeling, and the like. However, due to impact such as a measurement error of a device, a surrounding environment, and the like, obtained large-scale original point cloud data is often confronted with many problems, such as uneven distribution and sparsity, which cause a difficulty in subsequent processing of point cloud data.
Based on this, a method for 2D regularized planar projection of a large-scale point cloud is proposed in the prior art, which provides, for application of a point cloud, a representation form used for performing data processing easily. A general process of the method is as follows: first, initializing a planar structure of 2D projection of the point cloud; and second, determining a mapping relationship between the point cloud and the planar structure of 2D projection, to obtain a planar structure of 2D regularized projection corresponding to the point cloud. A key step is: determining the mapping relationship between the point cloud and the planar structure of 2D projection, which directly affects projection accuracy.
At present, in an existing method, the planar structure of 2D projection is mainly locally searched for a point in the point cloud, to find an optimal matching pixel, thereby determining the mapping relationship between the point cloud and the planar structure of 2D projection.
However, in this method, 2D local search needs to be performed on every point in the point cloud in the planar structure of 2D projection. For large-scale point cloud data, this undoubtedly leads to relatively high complexity of an algorithm. Therefore, excessively much time is spent on the 2D regularized planar projection of the point cloud, thereby affecting algorithm performance.
To resolve the foregoing problems in the prior art, the present invention provides a method and an apparatus for 2D regularized planar projection of a point cloud. The technical problems are resolved in the present invention in the following technical solutions.
A method for 2D regularized planar projection of a point cloud is provided. The method includes:
In an embodiment of the present invention, a formula for calculating the horizontal azimuth information is as follows:
In an embodiment of the present invention, the determining a mapping relationship between the original point cloud data and the planar structure of 2D projection based on the horizontal azimuth information includes:
In an embodiment of the present invention, the determining a column index of the original point cloud data in the planar structure of 2D projection based on the horizontal azimuth information includes:
In an embodiment of the present invention, the relational expression between the horizontal azimuth information and the original collection azimuth information of the point cloud is as follows:
In an embodiment of the present invention, the relational expression between the horizontal azimuth information and the original collection azimuth information of the point cloud is as follows:
In an embodiment of the present invention, a formula for calculating a column index of the original point cloud data in the planar structure of 2D projection is as follows:
Another embodiment of the present invention provides an apparatus for 2D regularized planar projection of a point cloud, including:
Beneficial effects of the present invention are as follows.
The present invention is further described below in detail with reference to the accompanying drawings and embodiments.
The present invention is further described in detail with reference to the following specific embodiments, but implementations of the present invention are not limited to thereto.
Specifically, the original point cloud data usually includes a group of 3D spatial points. Each spatial point records its geometric position information, as well as additional attribute information such as a color, reflectivity, and a normal. The geometric position information of a point cloud is generally expressed based on a Cartesian coordinate system, namely, is expressed by x, y, and z coordinates of a point. The original point cloud data may be obtained through scanning by a laser radar or a public data set provided by various platforms.
In this embodiment, it is assumed that geometric position information of the obtained original point cloud data is expressed based on the Cartesian coordinate system. It should be noted that a method for expressing the geometric position information of the original point cloud data is not limited to a Cartesian coordinate.
Specifically, in this embodiment, when the planar structure of 2D projection of a point cloud is initialized, initialization is implemented by using a regularization parameter. The regularization parameter includes a calibration parameter of the laser radar or a parameter obtained through optimal estimation or data fitting.
The calibration parameter of the laser radar is carefully measured by a manufacturer and provided to a consumer as one piece of necessary data, such as a collection range of the laser radar, a sampling angle resolution φspeed or a quantity of sampling points of each laser (laser scanner) of the laser radar, a distance correction factor of each laser, offset information Vo and Ho of the laser in a vertical direction and a horizontal direction, and offset information θ0 and α of the laser in a pitch angle and a horizontal azimuth angle.
A planar structure of 2D regularized projection of the point cloud is a data structure including pixels of M rows and N columns, and a point in the original point cloud data corresponds to a pixel in the data structure after projection. Resolution of a plane of 2D regularized projection may be obtained by the regularization parameter. For example, assuming that the resolution of a plane of 2D regularized projection is M×N, M may be initialized by using a quantity of lasers in the regularization parameters, and N may be initialized by using the sampling angle resolution φspeed of the laser or a quantity of sampling points per laser point NumPerLaser. A specific formula is shown below. Finally, initialization of the planar structure of 2D projection may be completed, and a planar structure containing M×N pixels may be obtained.
For example, in this embodiment, the following formula may be used to calculate the horizontal azimuth information of the point cloud:
In addition, it should be noted that calculation of a horizontal azimuth angle may be adaptively changed based on a representation form of the original point cloud data, which is not specifically limited in this embodiment.
In this embodiment, the determining a mapping relationship between the original point cloud data and the planar structure of 2D projection may be performed in two steps.
First, a row index of the original point cloud data in the planar structure of 2D projection is determined.
Specifically, a row index i of each point in the original point cloud data in the planar structure of 2D projection may be determined in an existing method. A solution formula is as follows:
Because this formula is an optimization problem, laserNum absolute errors |z−Vok−r×tan θok| need to be calculated based on the foregoing formula in practical engineering, where k=1, . . . , laserNum. A serial number k−1 that minimizes the absolute error is the row index i of a corresponding pixel of the current point in the planar structure of 2D projection.
Then, a column index of the original point cloud data in the planar structure of 2D projection is determined based on the horizontal azimuth information, which specifically includes the following.
In this embodiment, the relationship between the horizontal azimuth information and original collection azimuth information may be determined from a perspective of algebra based on a collection principle of the laser radar.
Specifically, the laser radar includes a plurality of laser combinations arranged and distributed along both sides of a central axis. Each laser has a fixed pitch angle and may be considered as a relatively independent collection system. These lasers rotate 360° around the central axis of the laser radar jointly, perform sampling at intervals at a fixed rotation angle during rotation, and return original collection information of a sampling point, namely, original collection distance information r0 of the sampling point, an index number i(θ0) of a laser to which the sampling point belongs, and original collection azimuth information φ0, and the information is expressed based on a local cylindrical coordinate system whose corresponding laser is an original point. However, to facilitate subsequent processing of the point cloud, original collection data of the point cloud needs to be converted into the Cartesian coordinate system with a bottom of the laser radar used as a same origin, and a point cloud of the laser radar in a same Cartesian coordinate system, namely, a point cloud finally collected by a device, is formed. The conversion is calibration of the laser radar. As shown in
A formula for calibrating the laser radar is as follows. Through this formula, original collection information (r0,i(θ0),φ0) of a point is converted into Cartesian coordinates (x, y, z) In the original collection information of the point, r0 is original collection distance information of the point, i(θ0) is an index number of a laser to which the point belongs, and φ0 is original collection azimuth information of the point:
β=φ0−α;
x=(r0+Dcorr)·cos θ0·sin β−Ho·cos β;
y=(r0+Dcorr)·cos θ0·cos β−Ho·sin β;
z=(r0+Dcorr)·sin θ0+Vo;
Next, it is assumed that (r0+Dcorr)·cos θ0≈√{square root over (x2+y2)}=r projected on an x-y plane, r represents depth information of a current point (x, y, z). In this case,
x=r·sin β−Ho·cos β;
y=r·cos β+Ho·sin β;
Horizontal azimuth information φ of the point calculated by x and y is as follows:
Finally, β=φ0−α is substituted to the foregoing equation, to obtain a relational expression between the horizontal azimuth information φ and original collection azimuth information φ0 of a point cloud:
In another embodiment of the present invention, the relationship between the horizontal azimuth information and the original collection azimuth information may also be determined from the perspective of geometry.
Specifically, the laser radar is calibrated during collection of the point cloud, and original collection information of the laser expressed in a local cylindrical coordinate system is converted into a Cartesian coordinate system with a bottom of the laser radar used as a same original point, and a point cloud of the laser radar in a same Cartesian coordinate system, namely, a point cloud finally collected by the device, is formed, as shown in
It can be obtained, through deduction, from
Specifically, when a relationship between the horizontal azimuth information and the original collection azimuth information is obtained in an algebraic method, a formula for calculating the original collection azimuth information of the point cloud is as follows:
When the relationship between the horizontal azimuth information and the original collection azimuth information is obtained in a geometric method, the formula for calculating the original collection azimuth information of the point cloud is as follows:
Finally, through this embodiment, a corresponding pixel (i, j) of the current point in the planar structure of 2D projection is obtained, and therefore a mapping relationship between the point cloud and the planar structure of 2D projection is determined. After the foregoing operations are completed for all points in the point cloud, namely, 2D regularized planar projection of the point cloud is completed, as shown in
In this embodiment, a mapping relationship between an original point cloud data and the planar structure of 2D projection is determined through horizontal azimuth information of the point cloud, and a large-scale point cloud may be projected to a 2D regularized plane structure without 2D local search. Therefore, complexity of an algorithm can be reduced, time spent on 2D regularized planar projection of the point cloud can be decreased, and algorithm performance can be improved.
Furthermore, in this embodiment, a column index of the cloud point projected to a 2D planar structure is determined by a relationship between horizontal azimuth information and original collection azimuth information of the point cloud. Accordingly, the point cloud is regularly corrected in a vertical direction and horizontal direction, and representation of strong correlation of the point cloud on the planar structure of 2D projection is obtained. Therefore, sparsity existing in a 3D representation structure can be prevented, and spatial correlation of the point cloud is better reflected, thereby providing, for application of the point cloud, a representation form used for performing data processing easily.
Based on the foregoing Embodiment 1, this embodiment provides an apparatus for the 2D regularized planar projection of the point cloud.
The apparatus provided in this embodiment can implement the method for 2D regularized planar projection of a point cloud provided in the foregoing Embodiment 1. Details are not described herein again.
The foregoing are further detailed descriptions of the present invention with reference to specific preferred implementations, and it cannot be considered that the implementations of the present invention are only limited to these descriptions. A person of ordinary skill in the art to which the present invention belongs may make simple deductions or replacements without departing from the concept of the present invention, all of which shall be considered as falling within the protection scope of the present invention
Number | Date | Country | Kind |
---|---|---|---|
202110578726.3 | May 2021 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2022/093676 | 5/18/2022 | WO |