Method and device for generating laser point cloud, vehicle and storage medium

By simplifying the detection target into a cuboid and using the angular relationship between laser lines to generate point cloud coordinates, the problem of high complexity in point cloud generation methods is solved, achieving efficient point cloud generation and resource conservation.

CN116299554BActive Publication Date: 2026-05-26CHONGQING CHANGAN AUTOMOBILE CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING CHANGAN AUTOMOBILE CO LTD
Filing Date
2023-02-24
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

Existing point cloud generation methods are complex and resource-intensive, making them difficult to apply to implementation testing and large-scale scenario testing.

Method used

By simplifying the target to a cuboid and ignoring complex shape factors, point cloud coordinates are generated using the angular relationship between laser lines. The angle between the lidar and the target is calculated, and the two-dimensional point cloud coordinates of the corner points are accurately calculated.

Benefits of technology

The calculation process was simplified, the calculation efficiency was improved, efficient point cloud generation was achieved, and resource consumption was reduced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116299554B_ABST
    Figure CN116299554B_ABST
Patent Text Reader

Abstract

This application relates to the field of autonomous driving technology, and particularly to a method, apparatus, vehicle, and storage medium for generating laser point clouds. The method includes the following steps: acquiring the horizontal position information, longitudinal position information, size information, and heading angle information of each detected target within the detection area of ​​a lidar; calculating the two-dimensional point cloud coordinates of each corner point of the detected target based on the horizontal position information, size information, and heading angle information, and calculating the angle between the lidar and the upper and lower edges of the detected target based on the longitudinal position information and size information; calculating the actual height of each corner point based on the angle, and generating the laser point cloud coordinates of the detected target based on the two-dimensional point cloud coordinates of each corner point and the actual height. This solves the problems of high complexity, high resource consumption, and difficulty in applying to implementation testing and large-scale scenario testing in current point cloud generation methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of autonomous driving technology, and in particular to a method, apparatus, vehicle, and storage medium for generating laser point clouds. Background Technology

[0002] In the field of autonomous driving, 3D point cloud annotation plays an important role. By segmenting the point cloud data of the road environment through 3D point cloud semantic segmentation, it is possible to identify pedestrians, roads, cars and other objects in the autonomous vehicle, enabling autonomous vehicles to drive safely on the road.

[0003] Current autonomous driving perception algorithms based on deep learning methods for LiDAR point clouds require a large amount of labeled data. However, the cost of acquiring and labeling LiDAR 3D point cloud data is high, making it difficult to efficiently generate large-scale data. On the other hand, simulation-based point cloud generation methods can quickly generate a large amount of traffic scene data and come with labeled ground truth values, which can greatly reduce the algorithm training cost for enterprises.

[0004] However, the point cloud generation methods in related technologies mainly rely on collisions based on laser lines and physics, but these methods are complex, resource-intensive, and difficult to apply to implementation testing and large-scale scene testing. Summary of the Invention

[0005] This application provides a method, apparatus, vehicle, and storage medium for generating laser point clouds, in order to solve the problems of high complexity, high resource consumption, and difficulty in applying point cloud generation methods to implementation testing and large-scale scene testing in related technologies.

[0006] The first aspect of this application provides a method for generating laser point clouds, comprising the following steps: acquiring horizontal position information, vertical position information, size information, and heading angle information of each target within the detection area of ​​a lidar; calculating the two-dimensional point cloud coordinates of each corner point of the target based on the horizontal position information, the size information, and the heading angle information, and calculating the included angle between the lidar and the upper and lower edges of the target based on the vertical position information and the size information; calculating the actual height of each corner point based on the included angle, and generating the laser point cloud coordinates of the target based on the two-dimensional point cloud coordinates of each corner point and the actual height.

[0007] Based on the above technical means, the embodiments of this application simplify the detection target, ignore the influence of the complex shape and contour of the target, obtain the two-dimensional point cloud coordinates of each corner point of the detection target and the angle between the lidar and the upper and lower edges of the detection target, thereby generating the lidar point cloud coordinates, simplifying the calculation process and improving the calculation efficiency.

[0008] Further, the step of calculating the two-dimensional point cloud coordinates of each corner point of the detected target based on the horizontal position information, the size information, and the heading angle information includes: calculating the coordinates of multiple horizontal corner points of the detected target based on the horizontal position information, length information, width information, and the heading angle information; if the heading angle in the heading angle information is less than or equal to a preset angle, calculating the first clamping angle between the two edge lines connecting the leftmost and rightmost corner points to the origin based on the coordinates of the leftmost and rightmost corner points of the detected target; matching the clamping angle with the preset laser beam angle list of the lidar to obtain the first target laser beam angle; and calculating the two-dimensional point cloud of the corner point based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line. Coordinates; if the heading angle in the heading angle information is greater than the preset angle, calculate the second clamping angle between the two edge lines connecting the leftmost corner point and the preset corner point to the origin of the coordinate system based on the coordinates of the leftmost corner point of the detected target and the preset corner point, and calculate the third clamping angle between the two edge lines connecting the rightmost corner point and the preset corner point to the origin of the coordinate system based on the coordinates of the rightmost corner point of the detected target and the preset corner point, and match the second target laser beam angle and the third target laser beam angle in the preset laser beam angle list of the lidar to obtain the second target laser beam angle and the third target laser beam angle, and calculate the two-dimensional point cloud coordinates of the corner point based on the second target laser beam angle and the third target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line.

[0009] Based on the above technical means, the embodiments of this application calculate different included angles by judging the heading angle of the detected target, and match the corresponding laser line angle, thereby accurately calculating the two-dimensional point cloud coordinates of the corner point.

[0010] Further, calculating the included angle between the lidar and the upper and lower edges of the target based on the longitudinal position information and the size information includes: calculating a first included angle between the lidar and the upper edge of the target, and a second included angle between the lidar and the lower edge of the target, based on the longitudinal position information and the height information of the target.

[0011] Based on the above technical means, the embodiments of this application calculate the angle between the lidar and the upper and lower edges of the target, which are the first angle and the second angle, respectively. The calculation method is simple.

[0012] Further, the step of calculating the actual height of each corner point based on the included angle includes: starting from the coordinate plane, calculating the actual height of the corner point by increasing the angle of resolution of the vertical angle of the lidar from the upper edge and the lower edge respectively, until the absolute value of the first included angle and the second included angle of the vertical angle, or when it is greater than a preset angle, stopping the increment, and obtaining the actual height of each corner point.

[0013] Based on the above-mentioned technical means, the embodiments of this application calculate the actual height of the corner point by incrementally increasing the calculation efficiency of the corner point.

[0014] A second aspect of this application provides a laser point cloud generation apparatus, comprising: an acquisition module for acquiring horizontal position information, longitudinal position information, size information, and heading angle information of each detected target within the detection area of ​​a laser radar; a calculation module for calculating two-dimensional point cloud coordinates of each corner point of the detected target based on the horizontal position information, the size information, and the heading angle information, and calculating the included angle between the laser radar and the upper and lower edges of the detected target based on the longitudinal position information and the size information; and a generation module for calculating the actual height of each corner point based on the included angle, and generating the laser point cloud coordinates of the detected target based on the two-dimensional point cloud coordinates of each corner point and the actual height.

[0015] Furthermore, the calculation module is further configured to: calculate the coordinates of multiple horizontal corner points of the detected target based on the horizontal position information, length information, width information, and heading angle information; if the heading angle in the heading angle information is less than or equal to a preset angle, calculate the first clamping angle between the two edge lines connecting the leftmost and rightmost corner points to the origin based on the coordinates of the leftmost and rightmost corner points of the detected target; match the clamping angle with the preset laser beam angle list of the lidar to obtain the first target laser beam angle; and calculate the two-dimensional point cloud coordinates of the corner point based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line; if the heading angle in the heading angle information is greater than a preset angle, calculate the first target laser beam angle based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line; if the heading angle in the heading angle information is greater than a preset angle, calculate the first target laser beam angle based on the preset laser beam angle list of the lidar; and calculate the first target laser beam angle based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line. The preset angle is described. Based on the coordinates of the leftmost corner point of the detected target and the preset corner point coordinates, the second clamping angle between the two edge lines connecting the leftmost corner point and the preset corner point to the origin is calculated. Based on the coordinates of the rightmost corner point of the detected target and the preset corner point coordinates, the third clamping angle between the two edge lines connecting the rightmost corner point and the preset corner point to the origin is calculated. Based on the second clamping angle and the third clamping angle, the second target laser beam angle and the third target laser beam angle are obtained by matching them with the preset laser beam angle list of the lidar. Based on the second target laser beam angle and the third target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line, the two-dimensional point cloud coordinates of the corner point are calculated.

[0016] Furthermore, the calculation module is further configured to: calculate a first angle between the lidar and the upper edge of the target, and a second angle between the lidar and the lower edge of the target, based on the longitudinal position information and the height information of the target.

[0017] Furthermore, the generation module is further configured to: starting from the coordinate plane, calculate the actual height of the corner points by increasing the vertical angle resolution angle of the lidar at the upper and lower edges respectively, until the absolute value of the first included angle and the second included angle of the vertical angle, or when it is greater than a preset angle, stop increasing the angle, and obtain the actual height of each corner point.

[0018] A third aspect of this application provides a vehicle, including: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the laser point cloud generation method as described in the above embodiments.

[0019] A fourth aspect of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the laser point cloud generation method as described in the above embodiments.

[0020] Therefore, this application has at least the following beneficial effects:

[0021] (1) The embodiments of this application simplify the detection target, ignore the influence of the complex shape and contour of the target, obtain the two-dimensional point cloud coordinates of each corner point of the detection target and the angle between the lidar and the upper and lower edges of the detection target, thereby generating the lidar point cloud coordinates, simplifying the calculation process and improving the calculation efficiency.

[0022] (2) In this embodiment of the application, different included angles are calculated by judging the heading angle of the target and matching the corresponding laser line angle, so as to accurately calculate the two-dimensional point cloud coordinates of the corner point.

[0023] (3) The embodiments of this application calculate the angle between the lidar and the upper and lower edges of the target, which are the first angle and the second angle, respectively. The calculation method is simple.

[0024] (4) The embodiments of this application calculate the actual height of the corner point by incrementing, which can improve the corner point calculation efficiency.

[0025] Additional aspects and advantages of this application will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of this application. Attached Figure Description

[0026] The above and / or additional aspects and advantages of this application will become apparent and readily understood from the following description of the embodiments taken in conjunction with the accompanying drawings, wherein:

[0027] Figure 1 This is a flowchart of a method for generating laser point clouds according to an embodiment of this application;

[0028] Figure 2 This is a schematic diagram illustrating the acquisition of target corner information by a lidar according to an embodiment of this application;

[0029] Figure 3 This is a schematic diagram showing the angle between the lidar and the upper and lower edges of the target according to an embodiment of this application;

[0030] Figure 4 This is a flowchart illustrating the method for generating laser point clouds according to an embodiment of this application;

[0031] Figure 5 This is an example diagram of a laser point cloud generation apparatus provided according to an embodiment of this application;

[0032] Figure 6 This is a structural schematic diagram of a vehicle provided according to an embodiment of this application. Detailed Implementation

[0033] The embodiments of this application are described in detail below. Examples of these embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.

[0034] The relevant technologies generate laser point clouds in the following ways:

[0035] (1) First, divide the space into an octree, then locate each object, and then generate a point cloud based on the collision relationship between each laser line and the target object.

[0036] (2) Divide the space into a grid, then calculate the mapping position of all surfaces of the object in the space in the grid, and then calculate the grid closed area through which the contour boundary line of each surface passes.

[0037] However, the above methods for generating laser point clouds involve large amounts of computation, are complex, and have low efficiency.

[0038] The following description, with reference to the accompanying drawings, outlines a method, apparatus, vehicle, and storage medium for generating laser point clouds according to embodiments of this application. Addressing the issues of high complexity, high resource consumption, and difficulty in applying point cloud generation methods to implementation testing and large-scale scene testing mentioned in the background, this application provides a method for generating laser point clouds. In this method, the detection target is simplified to a cuboid, ignoring the influence of the target's complex shape and contour. The target point cloud contour is generated through the angular relationships between laser lines, and the laser point cloud coordinates are then calculated. This calculation method is simple and efficient. Therefore, it solves the problems of high complexity, high resource consumption, and difficulty in applying point cloud generation methods to implementation testing and large-scale scene testing in related technologies.

[0039] Specifically, Figure 1 This is a schematic flowchart illustrating a method for generating laser point clouds provided in an embodiment of this application.

[0040] like Figure 1 As shown, the method for generating this laser point cloud includes the following steps:

[0041] In step S101, the horizontal position information, longitudinal position information, size information and heading angle information of each target within the detection area of ​​the lidar are acquired.

[0042] The detection area is defined by the horizontal viewing angle and maximum detection distance of the lidar. Dimensional information may include length, width, etc.

[0043] It is understood that if there are multiple detection targets in the detection area, the embodiments of this application can obtain the horizontal position information, longitudinal position information, size information and heading angle information of each detection target as needed.

[0044] It should be noted that before acquiring multiple pieces of information within the detection area of ​​the lidar, this embodiment sets the coordinates of the lidar's installation location, such as setting it to the origin (0,0,0), without limitation. The lidar's installation height is h, therefore the coordinates of the vertical intersection of the lidar and the ground are (0,0,-h). In addition, the horizontal position information, vertical position information, size information, and heading angle information of each detected target need to be stored in a target structure list.

[0045] In step S102, the two-dimensional point cloud coordinates of each corner point of the target are calculated based on the horizontal position information, size information and heading angle information, and the included angle between the lidar and the upper and lower edges of the target is calculated based on the longitudinal position information and size information.

[0046] In this embodiment, the calculation of the two-dimensional point cloud coordinates of each corner point of the detected target based on horizontal position information, size information, and heading angle information includes: calculating the coordinates of multiple horizontal corner points of the detected target based on horizontal position information, length information, width information, and heading angle information; if the heading angle in the heading angle information is less than or equal to a preset angle, calculating the first clamp angle between the two edge lines connecting the leftmost and rightmost corner points to the origin based on the coordinates of the leftmost and rightmost corner points of the detected target; matching the clamp angle with the preset laser beam angle list of the lidar to obtain the first target laser beam angle; and calculating the two-dimensional point cloud coordinates of the corner point based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line. If the heading angle in the heading angle information is greater than the preset angle, calculate the second clamping angle between the two edge lines connecting the leftmost corner point and the preset corner point to the origin based on the coordinates of the leftmost corner point and the preset corner point. Calculate the third clamping angle between the two edge lines connecting the rightmost corner point and the preset corner point to the origin based on the coordinates of the rightmost corner point and the preset corner point. Match the second target laser beam angle and the third target laser beam angle in the preset laser beam angle list of the lidar based on the second and third target laser beam angles. Calculate the two-dimensional point cloud coordinates of the corner point based on the longitudinal distance between the laser beam and the corresponding edge line, respectively, using the second and third target laser beam angles and the laser beam angle.

[0047] The preset angle can be set according to specific circumstances, such as being set to 0; the preset laser beam angle list refers to the list of laser beam horizontal angles sorted by the laser beam horizontal angle from smallest to largest, based on the laser radar beam and horizontal and vertical angle resolution information.

[0048] Understandably, the heading angle affects the two-dimensional point cloud coordinates of the corner point.

[0049] The formula for the two-dimensional point cloud coordinates of the corner point is P. y =tanα n *P x P y Let P be the horizontal coordinate of the corner point. x The vertical edge distance of the target.

[0050] For example, assuming the preset angle is 0, the horizontal corner coordinates of the target are calculated based on its length, width, and heading angle information in a horizontal position. If the target's heading is 0, which equals the preset angle of 0, there are two corner points and one edge line. The angle between the leftmost and rightmost corner points and the edge line is calculated. Based on the obtained angle, the nearest matching angle is searched in the laser beam angle list. The left corner point is selected based on the closest larger angle, and the right corner point is selected based on the closest smaller angle. This searches for all horizontal laser beams that intersect with the target, according to the formula P. y =tanα n *P x P y Let P be the horizontal coordinate of the corner point. x The target's longitudinal edge distance is given. If the target's heading angle is 1, which is greater than the preset angle 0, then there are three corner points and two edge lines. The corner point closest to the lidar and the left and right corner points form the two edge lines. The equations for the two edge lines are calculated based on the coordinates of the three corner points. The lidar beams between the left and nearest corner points and between the nearest and right corner points are searched from the lidar beam angle list. The corner points of each lidar beam and its corresponding edge line are calculated. Thus, the coordinates of all point clouds on the target's horizontal line are obtained (P). x P y ,0), the lidar acquires the corner information of the target, such as Figure 2 As shown.

[0051] In this embodiment of the application, calculating the included angle between the lidar and the upper and lower edges of the target based on the longitudinal position information and size information includes: calculating a first included angle between the lidar and the upper edge of the target, and a second included angle between the lidar and the lower edge of the target, based on the longitudinal position information and the height information of the target.

[0052] Understandably, based on the target's longitudinal position and height information, the angles θ1 and θ2 between the lidar and the target's upper and lower edges are calculated, such as... Figure 3 As shown, this is to facilitate the subsequent calculation of the laser point cloud coordinates of the target.

[0053] In step S103, the actual height of each corner point is calculated based on the included angle, and the laser point cloud coordinates of the target are generated based on the two-dimensional point cloud coordinates of each corner point and the actual height.

[0054] It is understandable that the laser point cloud coordinates of the target can be generated based on the two-dimensional point cloud coordinates of the corner point and its actual height. The calculation method of the two-dimensional point cloud coordinates of the corner point has been described in the above embodiments, and the calculation method of the actual height of the corner point will be described in detail in the following embodiments.

[0055] In this embodiment of the application, the actual height of each corner point is calculated based on the included angle, including: starting from the coordinate plane, calculating the actual height of the corner point by increasing the angle of resolution of the vertical angle of the lidar from the upper edge and the lower edge respectively, until the absolute value of the first included angle and the second included angle of the vertical angle, or when it is greater than a preset angle, stopping the increment, and obtaining the actual height of each corner point.

[0056] The preset angle refers to the angle parameter set by the lidar.

[0057] For example, starting from the coordinate plane, the angles of the laser beam with a vertical angle of θ at the upper and lower edges are increased according to the vertical angular resolution of the lidar. Using the formula h = tanθ·x, the corner point (P) of the laser beam with a vertical angle of θ at the corresponding horizontal position is calculated. x P y (h). When the absolute value of θ > the absolute values ​​of θ1 and θ2 or exceeds the angle parameters set by the lidar, the increment stops, and the coordinates of the entire laser point cloud of the target are obtained.

[0058] The following specific example illustrates the method for generating laser point clouds. Figure 4 As shown, the steps are as follows:

[0059] Step 1: Set the origin of the lidar installation location coordinates to (0,0,0). Establish a detection area based on the lidar's horizontal viewing angle and maximum detection distance. h represents the lidar installation height, and the vertical intersection point of the lidar and the ground is (0,0,-h).

[0060] Step 2: Randomly generate N vehicle targets within the horizontal detection area. Simultaneously, within a preset length, width, and height range, randomly generate the target's length, width, height, and heading angle attributes (i.e., horizontal position information, length information, width information, and heading angle information). Store all generated target position, length, width, height, and heading angle attribute information in a target structure list.

[0061] Step 3: Based on the laser radar settings for beamforming and horizontal and vertical angle resolution information, sort all laser beams by their horizontal angle from smallest to largest to improve the efficiency of subsequent laser beam searching.

[0062] Step 4: Iterate through the list of target structures above and perform the following steps for each target structure.

[0063] Step 5: Calculate the target corner position information.

[0064] In the horizontal position, the coordinates of the target's horizontal corner points are calculated based on the target's position, length, width, and heading angle information. If the target's heading angle is 0, there are two corner points and one edge line; if the target's heading angle is not 0, there are three corner points and two edge lines. Based on the coordinates of the leftmost and rightmost corner points of the target, the angle between them and the origin is calculated. The nearest matching angle is searched in the laser beam angle list based on the obtained angle, with the left corner point selecting the closest larger angle and the right corner point selecting the closest smaller angle, thus searching for all horizontal laser beams that intersect with the target. All searched laser beams are iterated over; if the target's heading angle is 0, according to formula P... y =tanα n *P x The point cloud coordinates (P) are obtained. x ,P y P y Let P be the horizontal coordinate of the corner point. x This represents the longitudinal edge distance of the target. If the target's heading angle is not 0, the nearest corner point and the left and right corner points form two edge lines. The equations for these two edge lines are calculated based on the coordinates of the three corner points. The laser beam angle list is searched for the laser beam between the left and nearest corner points and between the nearest and right corner points, respectively. The corner points of each laser beam and its corresponding edge line are then calculated. This yields the coordinates of all point clouds (P) on the target's horizontal line. x P y ,0).

[0065] Step 6: Based on the target's longitudinal position and height information, calculate the clamping angles θ1 and θ2 between the laser point cloud and the target's upper edge and line edge (ground).

[0066] Step 7: Starting from the coordinate plane, increase the angles at the upper and lower edges according to the vertical angular resolution of the lidar. Calculate the corner point P of the laser beam with a vertical angle of θ at the corresponding horizontal position using the formula h = tanθ·x. x P y (h). When the absolute value of θ > the absolute values ​​of θ1 and θ2 or exceeds the angle parameters set by the lidar, the increment stops. At this point, the complete laser point cloud coordinates of the target are obtained.

[0067] The laser point cloud generation method proposed in this application simplifies the detection target by ignoring the influence of its complex shape and contour. It obtains the two-dimensional point cloud coordinates of each corner point of the detection target and the angles between the laser radar and the upper and lower edges of the target, thereby generating the laser point cloud coordinates. This simplifies the calculation process and improves computational efficiency. Different angles are calculated by determining the heading angle of the detection target and matching the corresponding laser line angles, thus accurately calculating the two-dimensional point cloud coordinates of the corner points. The angles between the laser radar and the upper and lower edges of the target are calculated as the first and second angles, respectively, using a simple calculation method. The actual height of the corner points is calculated incrementally, which improves the efficiency of corner point calculation.

[0068] Next, the laser point cloud generation apparatus according to the embodiments of this application is described with reference to the accompanying drawings.

[0069] Figure 5 This is a block diagram of a laser point cloud generation device according to an embodiment of this application.

[0070] like Figure 5 As shown, the laser point cloud generation device 10 includes: an acquisition module 100, a calculation module 200, and a generation module 300.

[0071] The acquisition module 100 is used to acquire the horizontal position information, vertical position information, size information and heading angle information of each target within the detection area of ​​the lidar; the calculation module 200 is used to calculate the two-dimensional point cloud coordinates of each corner point of the target based on the horizontal position information, size information and heading angle information, and to calculate the angle between the lidar and the upper and lower edges of the target based on the vertical position information and size information; the generation module 300 calculates the actual height of each corner point based on the angle, and generates the lidar point cloud coordinates of the target based on the two-dimensional point cloud coordinates of each corner point and the actual height.

[0072] In this embodiment, the calculation module 200 is further configured to: calculate the coordinates of multiple horizontal corner points of the target based on horizontal position information, length information, width information, and heading angle information; if the heading angle in the heading angle information is less than or equal to a preset angle, calculate the first clamp angle between the two edge lines connecting the leftmost and rightmost corner points to the origin based on the coordinates of the leftmost and rightmost corner points of the target; match the clamp angle in the preset laser beam angle list of the lidar to obtain the first target laser beam angle; and calculate the two-dimensional point cloud coordinates of the corner point based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line; if the heading angle in the heading angle information is greater than or equal to a preset angle, calculate the first clamp angle between the two edge lines connecting the leftmost and rightmost corner points to the origin based on the coordinates of the leftmost and rightmost corner points of the target; and if the heading angle in the heading angle information is greater than or equal to a preset angle, calculate the first target laser beam angle based on the preset laser beam angle list of the lidar; and calculate the two-dimensional point cloud coordinates of the corner point based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line. Given an angle, calculate the second angle between the two edge lines connecting the leftmost and preset corner points of the target to the origin, based on the coordinates of the leftmost and preset corner points. Then, calculate the third angle between the two edge lines connecting the rightmost and preset corner points to the origin, based on the coordinates of the rightmost and preset corner points of the target. Match the second and third target laser beam angles from the preset laser beam angle list of the lidar to obtain the second and third target laser beam angles. Finally, calculate the two-dimensional point cloud coordinates of the corner points based on the longitudinal distance between the laser beams and the corresponding edge lines, using the second and third target laser beam angles and the laser beam angles.

[0073] In this embodiment of the application, the calculation module 200 is further configured to: calculate the first angle between the lidar and the upper edge of the target, and the second angle between the lidar and the lower edge of the target, based on the longitudinal position information and the height information of the target.

[0074] In this embodiment of the application, the generation module 300 is further configured to: starting from the coordinate plane, calculate the actual height of the corner point by increasing the vertical angle resolution angle of the lidar from the upper edge and the lower edge respectively, until the absolute value of the first and second vertical angles, or when it is greater than a preset angle, stop increasing the angle and obtain the actual height of each corner point.

[0075] It should be noted that the foregoing explanation of the laser point cloud generation method embodiment also applies to the laser point cloud generation apparatus of this embodiment, and will not be repeated here.

[0076] The laser point cloud generation apparatus proposed in this application simplifies the detection target, ignoring the influence of the target's complex shape and contour, and obtains the two-dimensional point cloud coordinates of each corner point of the detection target and the angles between the laser radar and the upper and lower edges of the detection target, thereby generating laser point cloud coordinates. This simplifies the calculation process and improves calculation efficiency. By judging the heading angle of the detection target, different angles are calculated and matched with the corresponding laser line angles, thereby accurately calculating the two-dimensional point cloud coordinates of the corner points. The angles between the laser radar and the upper and lower edges of the detection target are calculated as the first angle and the second angle, respectively, and the calculation method is simple. The actual height of the corner points is calculated in an incremental manner, which can improve the corner point calculation efficiency.

[0077] Figure 6 A schematic diagram of the structure of a vehicle provided in an embodiment of this application. The vehicle may include:

[0078] The memory 601, the processor 602, and the computer program stored on the memory 601 and capable of running on the processor 602.

[0079] When the processor 602 executes the program, it implements the laser point cloud generation method provided in the above embodiments.

[0080] Furthermore, the vehicle also includes:

[0081] Communication interface 603 is used for communication between memory 601 and processor 602.

[0082] The memory 601 is used to store computer programs that can run on the processor 602.

[0083] The memory 601 may include high-speed RAM (Random Access Memory) memory, and may also include non-volatile memory, such as at least one disk storage.

[0084] If the memory 601, processor 602, and communication interface 603 are implemented independently, then the communication interface 603, memory 601, and processor 602 can be interconnected via a bus to complete communication between them. The bus can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. The bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.

[0085] Optionally, in a specific implementation, if the memory 601, processor 602, and communication interface 603 are integrated on a single chip, then the memory 601, processor 602, and communication interface 603 can communicate with each other through an internal interface.

[0086] The processor 602 may be a CPU (Central Processing Unit), an ASIC (Application Specific Integrated Circuit), or one or more integrated circuits configured to implement the embodiments of this application.

[0087] This application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the above-described method for generating laser point clouds.

[0088] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with that embodiment or example is included in at least one embodiment or example of this application. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples. Moreover, without contradiction, those skilled in the art can combine and integrate the different embodiments or examples described in this specification, as well as the features of different embodiments or examples.

[0089] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise explicitly specified.

[0090] Any process or method described in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more N executable instructions for implementing custom logic functions or processes, and the scope of the preferred embodiments of this application includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as should be understood by those skilled in the art to which embodiments of this application pertain.

[0091] It should be understood that the various parts of this application can be implemented using hardware, software, firmware, or a combination thereof. In the above embodiments, the N steps or methods can be implemented using software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (FPGAs), field-programmable gate arrays (FPGAs), etc.

[0092] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware, and the program can be stored in a computer-readable storage medium. When executed, the program includes one or a combination of the steps of the method embodiments.

[0093] Although embodiments of this application have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting this application. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of this application.

Claims

1. A method for generating laser point clouds, characterized in that, Includes the following steps: Acquire the horizontal position, vertical position, size, and heading angle information of each target within the detection area of ​​the lidar; The two-dimensional point cloud coordinates of each corner point of the target are calculated based on the horizontal position information, the size information, and the heading angle information. The angle between the lidar and the upper and lower edges of the target is calculated based on the longitudinal position information and the size information. The actual height of each corner point is calculated based on the included angle, and the laser point cloud coordinates of the detected target are generated based on the two-dimensional point cloud coordinates of each corner point and the actual height. The step of calculating the two-dimensional point cloud coordinates of each corner point of the target based on the horizontal position information, the size information, and the heading angle information includes: The coordinates of multiple horizontal corner points of the target are calculated based on the horizontal position information, length information, width information, and heading angle information. If the heading angle in the heading angle information is less than or equal to a preset angle, calculate the first clamp angle between the two edge lines connecting the leftmost and rightmost corner points of the detected target to the origin, based on the coordinates of the leftmost and rightmost corner points. Match the clamp angle with the preset laser beam angle list of the lidar to obtain the first target laser beam angle, and calculate the two-dimensional point cloud coordinates of the corner point based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line. If the heading angle in the heading angle information is greater than the preset angle, the second clamping angle between the two edge lines connecting the leftmost corner point and the preset corner point to the origin is calculated based on the coordinates of the leftmost corner point and the preset corner point. The third clamping angle between the two edge lines connecting the rightmost corner point and the preset corner point to the origin is calculated based on the coordinates of the rightmost corner point and the preset corner point. The second target laser beam angle and the third target laser beam angle are obtained by matching them with the preset laser beam angle list of the lidar. The two-dimensional point cloud coordinates of the corner point are calculated based on the second target laser beam angle and the third target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line.

2. The method according to claim 1, characterized in that, Calculating the angle between the lidar and the upper and lower edges of the target based on the longitudinal position information and the size information includes: The first angle between the lidar and the upper edge of the target, and the second angle between the lidar and the lower edge of the target are calculated based on the longitudinal position information and the height information of the target.

3. The method according to claim 2, characterized in that, The calculation of the actual height of each corner point based on the included angle includes: Starting from the coordinate plane, calculate the actual height of the corner points by increasing the vertical angle resolution angle of the lidar at the upper and lower edges respectively, until the absolute value of the first included angle and the second included angle of the vertical angle, or when it is greater than a preset angle, stop increasing, and obtain the actual height of each corner point.

4. A laser point cloud generation device, characterized in that, include: The acquisition module is used to acquire the horizontal position information, vertical position information, size information and heading angle information of each target within the detection area of ​​the lidar; The calculation module is used to calculate the two-dimensional point cloud coordinates of each corner point of the target based on the horizontal position information, the size information and the heading angle information, and to calculate the angle between the lidar and the upper and lower edges of the target based on the longitudinal position information and the size information. The generation module calculates the actual height of each corner point based on the included angle, and generates the laser point cloud coordinates of the detected target based on the two-dimensional point cloud coordinates of each corner point and the actual height. The computing module is further used for: The coordinates of multiple horizontal corner points of the target are calculated based on the horizontal position information, length information, width information, and heading angle information. If the heading angle in the heading angle information is less than or equal to a preset angle, calculate the first clamp angle between the two edge lines connecting the leftmost and rightmost corner points of the detected target to the origin, based on the coordinates of the leftmost and rightmost corner points. Match the clamp angle with the preset laser beam angle list of the lidar to obtain the first target laser beam angle, and calculate the two-dimensional point cloud coordinates of the corner point based on the target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line. If the heading angle in the heading angle information is greater than the preset angle, the second clamping angle between the two edge lines connecting the leftmost corner point and the preset corner point to the origin is calculated based on the coordinates of the leftmost corner point and the preset corner point. The third clamping angle between the two edge lines connecting the rightmost corner point and the preset corner point to the origin is calculated based on the coordinates of the rightmost corner point and the preset corner point. The second target laser beam angle and the third target laser beam angle are obtained by matching them with the preset laser beam angle list of the lidar. The two-dimensional point cloud coordinates of the corner point are calculated based on the second target laser beam angle and the third target laser beam angle and the longitudinal distance between the laser beam and the corresponding edge line.

5. The apparatus according to claim 4, characterized in that, The computing module is further used for: The first angle between the lidar and the upper edge of the target, and the second angle between the lidar and the lower edge of the target are calculated based on the longitudinal position information and the height information of the target.

6. The apparatus according to claim 5, characterized in that, The generation module is further used for: Starting from the coordinate plane, calculate the actual height of the corner points by increasing the vertical angle resolution angle of the lidar at the upper and lower edges respectively, until the absolute value of the first included angle and the second included angle of the vertical angle, or when it is greater than a preset angle, stop increasing, and obtain the actual height of each corner point.

7. A vehicle, characterized in that, include: A memory, a processor, and a computer program stored in the memory and running on the processor, the processor executing the computer program to implement the method for generating laser point clouds as described in any one of claims 1-3.

8. A computer-readable storage medium having a computer program stored thereon, characterized in that, The computer program is executed by a processor to implement the method for generating laser point clouds as described in any one of claims 1-3.