METHOD AND APPARATUS FOR 2D REGULARIZED PLANAR PROJECTION OF POINT CLOUD

20240112300 ยท 2024-04-04

    Inventors

    Cpc classification

    International classification

    Abstract

    The present invention discloses a method and an apparatus for 2D regularized planar projection of a point cloud. The method includes: obtaining original point cloud data; initializing a planar structure of 2D projection of the point cloud; calculating horizontal azimuth information of the point cloud based on the original point cloud data; and determining a mapping relationship between the original point cloud data and the planar structure of 2D projection based on the horizontal azimuth information, to obtain a planar structure of 2D regularized projection of the point cloud. In the present invention, a large-scale point cloud may be projected to a 2D regularized planar 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 reduced, and algorithm performance can be improved.

    Claims

    1.-8. (canceled)

    9. A method for 2D regularized planar projection of a point cloud, comprising: obtaining original point cloud data; initializing a planar structure of 2D projection of the point cloud; calculating horizontal azimuth information of the point cloud based on the original point cloud data; and determining a mapping relationship between the original point cloud data and the planar structure of 2D projection based on the horizontal azimuth information, to obtain a planar structure of 2D regularized projection of the point cloud.

    10. The method according to claim 9, wherein obtaining original point cloud data comprising, the original point cloud data includes a group of 3D spatial points; Each spatial point records its geometric position information, and the geometric position information of the spatial point is expressed based on a Cartesian coordinate system.

    11. The method according to claim 9, wherein initializing a planar structure of 2D projection of the point cloud comprising, the 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.

    12. The method according to claim 11, wherein M is initialized by using a quantity of lasers in the regularization parameters laserNum, and N is initialized by using the sampling angle resolution ?.sub.speed of the laser or a quantity of sampling points per laser point NumPerLaser; M = laserNum ; N = 360 ? ? speed or N = point NumPerLaser .

    13. The method according to claim 9, wherein a formula for calculating the horizontal azimuth information is as follows:
    ?=arctan x/y; wherein ? represents horizontal azimuth information of a current point in the original point cloud data, and x and y are Cartesian coordinate components of the current point respectively.

    14. The method according to claim 9, wherein the determining the mapping relationship between the original point cloud data and the planar structure of 2D projection based on the horizontal azimuth information comprises: determining a row index of the original point cloud data in the planar structure of 2D projection; and determining a column index of the original point cloud data in the planar structure of 2D projection based on the horizontal azimuth information.

    15. The method according to claim 14, wherein the determining the column index of the original point cloud data in the planar structure of 2D projection based on the horizontal azimuth information comprises: establishing a relationship between the horizontal azimuth information of the point cloud and original collection azimuth information of the point cloud, and obtaining a corresponding relational expression; calculating the original collection azimuth information of the point cloud based on the relational expression; and calculating the column index of the original point cloud data in the planar structure of 2D projection based on the original collection azimuth information.

    16. The method according to claim 15, wherein the relational expression between the horizontal azimuth information of the point cloud and the original collection azimuth information of the point cloud is as follows: ? = ? 0 - ? - arctan H o r ; wherein ? represents the horizontal azimuth information of a current point in the original point cloud data, ?.sub.0 represents the original collection azimuth information of the current point, ? represents a horizontal correction angle of a laser to which the current point belongs, H.sub.o represents a horizontal offset of the laser to which the current point belongs, and r represents depth information of the current point.

    17. The method according to claim 15, wherein the relational expression between the horizontal azimuth information of the point cloud and the original collection azimuth information of the point cloud is as follows: ? = ? 0 - ? - arccos ( - H o r ) + 90 ? ; wherein ? represents the horizontal azimuth information of a current point in the original point cloud data, ?.sub.0 represents the original collection azimuth information of the current point, ? represents a horizontal correction angle of a laser to which the current point belongs, H.sub.o represents a horizontal offset of the laser to which the current point belongs, and r represents depth information of the current point.

    18. The method according to claim 15, wherein a formula for calculating the column index of the original point cloud data in the planar structure of 2D projection is as follows: j = round ( ? 0 + 180 ? ? speed ) ; wherein j represents a column index of a current point in the original point cloud data in the planar structure of 2D projection, ?.sub.0 represents the original collection azimuth information of the current point, and ?.sub.speed represents a sampling angle resolution of the laser.

    19. The method according to claim 14, wherein the determining the row index of the original point cloud data in the planar structure of 2D projection comprises: the row index i of the current point in the original point cloud data in the planar structure of 2D projection is determined as follows: i = arg min k = 1 ... laserNum .Math. "\[LeftBracketingBar]" z - V o k - r ? tan ? o k .Math. "\[RightBracketingBar]" ; wherein z is a Cartesian coordinate component of the current point, r is depth information of the current point and r=?{square root over (x.sup.2+y.sup.2)}, laserNum represents a quantity of lasers included in the laser radar, V.sub.o.sup.k is offset information of a k.sup.th laser along a vertical direction, ?.sub.o.sup.k is offset information of a k.sup.th laser along a pitch angle, and both V.sub.o.sup.k and ?.sub.o.sup.k are calibration parameters of the laser radar.

    20. A device for 2D regularized planar projection of a point cloud, the device comprising: a processor; and a memory storing instruction that, when executed by the processor, cause the device to perform operations comprising: obtaining original point cloud data; initializing a planar structure of 2D projection of the point cloud; calculating horizontal azimuth information of the point cloud based on the original point cloud data; and determining a mapping relationship between the original point cloud data and the planar structure of 2D projection based on the horizontal azimuth information, to obtain a planar structure of 2D regularized projection of the point cloud.

    21. The device according to claim 20, wherein obtaining original point cloud data comprising, the original point cloud data includes a group of 3D spatial points; Each spatial point records its geometric position information, and the geometric position information of the spatial point is expressed based on a Cartesian coordinate system.

    22. The device according to claim 20, wherein initializing a planar structure of 2D projection of the point cloud comprising, the 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.

    23. The device according to claim 20, wherein a formula for calculating the horizontal azimuth information is as follows:
    ?=arctan x/y; wherein ? represents horizontal azimuth information of a current point in the original point cloud data, and x and y are Cartesian coordinate components of the current point respectively.

    24. The device according to claim 20, wherein the determining the mapping relationship between the original point cloud data and the planar structure of 2D projection based on the horizontal azimuth information comprises: determining a row index of the original point cloud data in the planar structure of 2D projection; and determining a column index of the original point cloud data in the planar structure of 2D projection based on the horizontal azimuth information.

    25. The device according to claim 24, wherein the determining the column index of the original point cloud data in the planar structure of 2D projection based on the horizontal azimuth information comprises: establishing a relationship between the horizontal azimuth information of the point cloud and original collection azimuth information of the point cloud, and obtaining a corresponding relational expression; calculating the original collection azimuth information of the point cloud based on the relational expression; and calculating the column index of the original point cloud data in the planar structure of 2D projection based on the original collection azimuth information.

    26. The device according to claim 25, wherein the relational expression between the horizontal azimuth information of the point cloud and the original collection azimuth information of the point cloud is as follows: ? = ? 0 - ? - arctan H o r ; wherein ? represents the horizontal azimuth information of a current point in the original point cloud data, ?.sub.0 represents the original collection azimuth information of the current point, ? represents a horizontal correction angle of a laser to which the current point belongs, H.sub.o represents a horizontal offset of the laser to which the current point belongs, and r represents depth information of the current point.

    27. The device according to claim 25, wherein the relational expression between the horizontal azimuth information of the point cloud and the original collection azimuth information of the point cloud is as follows: ? = ? 0 - ? - arccos ( - H o r ) + 90 ? ; wherein ? represents the horizontal azimuth information of a current point in the original point cloud data, ?.sub.0 represents the original collection azimuth information of the current point, a represents a horizontal correction angle of a laser to which the current point belongs, H.sub.o represents a horizontal offset of the laser to which the current point belongs, and r represents depth information of the current point.

    28. The device according to claim 25, wherein a formula for calculating the column index of the original point cloud data in the planar structure of 2D projection is as follows: j = round ( ? 0 + 180 ? ? speed ) ; wherein j represents a column index of a current point in the original point cloud data in the planar structure of 2D projection, ?.sub.0 represents the original collection azimuth information of the current point, and ?.sub.speed represents a sampling angle resolution of the laser.

    Description

    BRIEF DESCRIPTION OF DRAWINGS

    [0037] FIG. 1 is a flowchart of a method for 2D regularized planar projection of a point cloud according to an embodiment of the present invention;

    [0038] FIG. 2 is a schematic diagram of calibration of a laser radar according to an embodiment of the present invention;

    [0039] FIG. 3 is a schematic diagram of calibration of a laser radar in an x-y plane according to an embodiment of the present invention;

    [0040] FIG. 4 is a schematic diagram of a planar structure of 2D projection of a point cloud according to an embodiment of the present invention; and

    [0041] FIG. 5 is a schematic structural diagram of an apparatus for 2D regularized planar projection of a point cloud according to an embodiment of the present invention.

    DESCRIPTION OF EMBODIMENTS

    [0042] 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.

    Embodiment 1

    [0043] FIG. 1 is a flowchart of a method for 2D regularized planar projection of a point cloud according to an embodiment of the present invention. The method includes the following steps. [0044] Step 1: Obtain original point cloud data.

    [0045] 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.

    [0046] 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. [0047] Step 2: Initialize a planar structure of 2D projection of a point cloud.

    [0048] 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.

    [0049] 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 ?.sub.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 V.sub.o and H.sub.o of the laser in a vertical direction and a horizontal direction, and offset information ?.sub.0 and ? of the laser in a pitch angle and a horizontal azimuth angle.

    [0050] 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 ?.sub.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.

    [00005] M = laserNum ; N = 360 ? ? speed or N = point NumPerLaser . [0051] Step 3: Calculate horizontal azimuth information of the point cloud based on the original point cloud data.

    [0052] For example, in this embodiment, the following formula may be used to calculate the horizontal azimuth information of the point cloud:

    [00006] ? = arctan x y ; [0053] ? represents horizontal azimuth information of a current point in the original point cloud data, and x and y are Cartesian coordinate components of the current point respectively.

    [0054] 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. [0055] Step 4: Determine a mapping relationship between the original point cloud data and the planar structure of 2D projection based on the horizontal azimuth information, to obtain a planar structure of 2D regularized projection of the point cloud.

    [0056] 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.

    [0057] First, a row index of the original point cloud data in the planar structure of 2D projection is determined.

    [0058] 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:

    [00007] i = arg min k = 1 ... laserNum .Math. "\[LeftBracketingBar]" z - V o k - r ? tan ? o k .Math. "\[RightBracketingBar]" ; [0059] z is a Cartesian coordinate component of a current point, r is depth information of the current point and r=?{square root over (x.sup.2+y.sup.2)}, laserNum represents a quantity of lasers included in the laser radar, V.sub.o.sup.k is offset information of a k.sup.th laser along a vertical direction, ?.sub.o.sup.k is offset information of a k.sup.th laser along a pitch angle, and both V.sub.o.sup.k and ?.sub.o.sup.k are calibration parameters of the laser radar.

    [0060] Because this formula is an optimization problem, laserNum absolute errors |z?V.sub.o.sup.k?r?tan ?.sub.o.sup.k| 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.

    [0061] 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. [0062] (a) The relationship between the horizontal azimuth information of the point cloud and original collection azimuth information is established, and a corresponding relational expression is obtained.

    [0063] 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.

    [0064] 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 r.sub.0 of the sampling point, an index number i(?.sub.0) of a laser to which the sampling point belongs, and original collection azimuth information ?.sub.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 FIG. 2, FIG. 2 is a schematic diagram of calibration of a laser radar according to an embodiment of the present invention.

    [0065] A formula for calibrating the laser radar is as follows. Through this formula, original collection information (r.sub.0,i(?.sub.0),?.sub.0) of a point is converted into Cartesian coordinates (x, y, z) In the original collection information of the point, r.sub.0 is original collection distance information of the point, i(?.sub.0) is an index number of a laser to which the point belongs, and ?.sub.0 is original collection azimuth information of the point:


    ?=?.sub.0??;


    x=(r.sub.0+D.sub.corr).Math.cos ?.sub.0.Math.sin ??H.sub.o.Math.cos ?;


    y=(r.sub.0+D.sub.corr).Math.cos ?.sub.0.Math.cos ??H.sub.o.Math.sin ?;


    z=(r.sub.0+D.sub.corr).Math.sin ?.sub.0+V.sub.o; [0066] D.sub.corr is a distance correction factor of the laser to which the point belongs, namely, an i.sup.th laser, of the laser radar, V.sub.o is a vertical offset of the laser to which the point belongs, H.sub.o is a horizontal offset of the laser to which the point belongs, ?.sub.0 is a vertical elevation angle of the laser to which the point belongs, and ? is a horizontal correction angle of the laser to which the point belongs. All the parameters are calibration parameters, namely, regularization parameters, of the laser.

    [0067] Next, it is assumed that (r.sub.0+D.sub.corr).Math.cos ?.sub.0??{square root over (x.sup.2+y.sup.2)}=r projected on an x-y plane, r represents depth information of a current point (x, y, z). In this case,


    x=r.Math.sin ??H.sub.o.Math.cos ?;


    y=r.Math.cos ?+H.sub.o.Math.sin ?; [0068] then, an auxiliary angle formula is used for conversion, to obtain:

    [00008] x = r .Math. sin ? - H o .Math. cos ? = r 2 + H o 2 .Math. sin ( ? - arctan H o r ) ; y = r .Math. cos ? + H o .Math. sin ? = r 2 + H o 2 .Math. cos ( ? - arctan H o r ) .

    [0069] Horizontal azimuth information ? of the point calculated by x and y is as follows:

    [00009] ? = arctan x y = arctan ( r .Math. sin ? - H o .Math. cos ? r .Math. cos ? + H o .Math. sin ? ) = arctan ( tan ( ? - arctan H o r ) ) = ? - arctan H o r

    [0070] Finally, ?=?.sub.0?? is substituted to the foregoing equation, to obtain a relational expression between the horizontal azimuth information ? and original collection azimuth information ?.sub.0 of a point cloud:

    [00010] ? = ? 0 - ? - arctan H o r ; [0071] r is depth information of a point in the point cloud, H.sub.o is the horizontal offset of the laser to which the point belongs, ? is the horizontal correction angle of the laser to which the point belongs, and both H.sub.o and ? are calibration parameters, namely, regularization parameters, of the laser.

    [0072] 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.

    [0073] 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 FIG. 2. However, because an azimuth of the point cloud is expressed in the x-y plane of the Cartesian coordinate system, FIG. 3 is further obtained from FIG. 2. FIG. 3 is a schematic diagram of calibration of a laser radar in the x-y plane according to embodiment of the present invention.

    [0074] It can be obtained, through deduction, from FIG. 3 that

    [00011] ? = arccos ( .Math. "\[LeftBracketingBar]" O world O laser .Math. "\[RightBracketingBar]" r ) = arccos ( - H 0 r ) , [0075] where r=?{square root over (x.sup.2+y.sup.2)} is depth information of a point, and H.sub.o is a horizontal offset of a laser to which the point belongs. Because H.sub.o is a negative value, |O.sub.worldO.sub.later|=?H.sub.o. Further, 90???=180?????, and then a relational expression between horizontal azimuth information and original collection azimuth information ?.sub.0 of a point cloud may be obtained by substituting ?=?.sub.0?? and

    [00012] ? = arccos ( - H 0 r ) : ? = ? 0 - ? - arccos ( - H o r ) + 90 ? . [0076] r is depth information of a point in the point cloud, H.sub.o is the horizontal offset of the laser to which the point belongs, ? is a horizontal correction angle of the laser to which the point belongs, and both H.sub.o and ? are calibration parameters, namely, regularization parameters, of the laser. It should be noted that, because approximate treatment is used in algebraic derivation, relational expressions obtained in two methods are different in form, but with almost same relation curves. [0077] (b) The original collection azimuth information of the point cloud is calculated based on the foregoing relational expression.

    [0078] 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:

    [00013] ? 0 = ? + ? + arctan H o r .

    [0079] 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:

    [00014] ? 0 = ? - 90 ? + ? + arccos ( - H o r ) . [0080] (c) A column index of the original point cloud data in the planar structure of 2D projection is calculated based on the original collection azimuth information. A calculation formula is as follows:

    [00015] j = round ( ? 0 + 180 ? ? speed ) ; [0081] j represents a column index of a current point in the original point cloud data in the planar structure of 2D projection, ?.sub.0 represents original collection azimuth information of the current point, and ?.sub.speed represents a sampling angle resolution of the laser.

    [0082] 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 FIG. 4, FIG. 4 is a schematic diagram of a planar structure of 2D projection of a point cloud according to an embodiment of the present invention. Each point in the point cloud is mapped to a corresponding pixel in the structure.

    [0083] 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.

    [0084] 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.

    Embodiment 2

    [0085] Based on the foregoing Embodiment 1, this embodiment provides an apparatus for the 2D regularized planar projection of the point cloud. FIG. 5 is a schematic structural diagram of an apparatus for 2D regularized planar projection of a point cloud according to an embodiment of the present invention. The apparatus includes: [0086] a data obtaining module 1, configured to obtain original point cloud data; [0087] an initializing module 2, configured to initialize a planar structure of 2D projection of a point cloud; [0088] a calculating module 3, configured to calculate horizontal azimuth information of the point cloud based on the original point cloud data; and [0089] a mapping module 4, configured to determine a mapping relationship between the original point cloud data and the planar structure of 2D projection based on the horizontal azimuth information, to obtain a planar structure of 2D regularized projection of the point cloud.

    [0090] 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.

    [0091] 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