Point cloud convex hull determination method and device, computer equipment, readable storage medium and program product

By employing a multi-threaded parallel computing method, the outer cube and pixels of the obstacle cube are determined, activation data and traversal results are obtained, solving the problem of low efficiency in point cloud convex hull calculation and improving the efficiency of obstacle recognition for autonomous vehicles.

CN118657653APending Publication Date: 2024-09-17NINGBO LOTUS ROBOTICS CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410648409.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-23
Publication Date
2024-09-17

AI Technical Summary

Technical Problem

In existing technologies, the calculation efficiency of determining the convex hull of an obstacle cube based on laser point cloud data is low, which cannot effectively improve the recognition efficiency of autonomous vehicles for surrounding obstacles.

Method used

A multi-threaded parallel computing method is adopted. By collecting laser point cloud data, the outer cube of the obstacle cube and the corresponding outer cube pixels are determined. The pixel activation data and traversal results are obtained by using multi-threaded parallel processing, and finally the point cloud convex hull of the obstacle cube is determined.

Benefits of technology

It significantly improves the computational efficiency of point cloud convex hulls, enabling faster identification of the actual shape of obstacles and enhancing the obstacle recognition capabilities of autonomous vehicles.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657653A
    Figure CN118657653A
Patent Text Reader

Abstract

The invention relates to a point cloud convex hull determination method and device, computer equipment, a computer readable storage medium and a computer program product. The method comprises the following steps: collecting laser point cloud data, and determining at least one obstacle cube based on the laser point cloud data; determining an outsourcing cube of each obstacle cube; determining an outsourcing cube pixel corresponding to each outsourcing cube; based on at least one obstacle cube, an outsourcing cube of each obstacle cube and an outsourcing cube pixel corresponding to each outsourcing cube, obtaining pixel activation data of each outsourcing cube pixel in a multi-thread parallel mode; a point cloud convex hull of the obstacle cube is determined based on the pixel activation data. And the convex hull calculation efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of autonomous driving technology, and in particular to a method, apparatus, computer device, computer-readable storage medium, and computer program product for determining a point cloud convex hull. Background Art

[0002] In order to better identify obstacles around autonomous vehicles, it is necessary to determine the obstacle cube based on the laser point cloud data, calculate the convex hull of the point cloud cluster that falls on the obstacle cube from a bird's eye view, and then obtain the actual shape of the obstacle from a bird's eye view. However, the number of data points in the point cloud cluster is more than 100,000, and the current method of serially calculating the convex hull has the problem of low computational efficiency. Summary of the invention

[0003] Based on this, it is necessary to provide a point cloud convex hull determination method, device, computer equipment, computer-readable storage medium and computer program product that can improve the efficiency of convex hull calculation in order to solve the above technical problems.

[0004] In a first aspect, the present application provides a method for determining a point cloud convex hull, comprising:

[0005] Collect laser point cloud data, input the laser point cloud data into an obstacle recognition model, and obtain at least one obstacle cube; determine an outer cube of each obstacle cube; and determine outer cube pixels corresponding to each outer cube;

[0006] Based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner;

[0007] For each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions are obtained through multi-threaded parallelism; based on the activated pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined through multi-threaded parallelism; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined.

[0008] In one of the embodiments, determining the outer cube of each obstacle cube includes: determining a coordinate system for each obstacle cube according to the center coordinates of the vehicle and the driving direction of the vehicle; determining a first maximum value and a first minimum value of the obstacle cube on the horizontal axis of the coordinate system, and determining a horizontal width according to the first maximum value and the first minimum value; determining a second maximum value and a second minimum value of the obstacle cube on the vertical axis of the coordinate system, and determining a longitudinal width according to the second maximum value and the second minimum value; and determining the outer cube of the obstacle cube according to the transverse width, the longitudinal width, and the height of the obstacle cube.

[0009] In one of the embodiments, determining the outer cube pixels corresponding to each outer cube includes: for each outer cube, dividing the length and width of the outer cube into N equal parts to obtain the outer cube pixels corresponding to the outer cube, where N is a positive integer.

[0010] In one of the embodiments, based on at least one obstacle cube, an outer cube of each obstacle cube, and the outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner, including: determining a first number of threads for pixel activation processing based on the number of data points in the laser point cloud data and the number of obstacle cubes; each thread for pixel activation processing corresponds to a data point and an obstacle cube; calling the first number of threads; determining through each thread whether the corresponding data point is in the corresponding obstacle cube; if so, determining the pixel coordinates of the corresponding data point in the corresponding outer cube pixel, setting the pixel coordinates to an activated state, and writing the horizontal and vertical coordinates of the corresponding data point into the data storage area corresponding to the pixel coordinates; determining the pixel activation data of each outer cube pixel based on the processing results of each thread.

[0011] In one embodiment, determining the pixel coordinates of the corresponding data point in the corresponding outer cube pixel includes: calculating the offset distance between the corresponding data point and the center point of the corresponding obstacle cube according to the three-dimensional coordinates of the corresponding data point and the center coordinates of the corresponding obstacle cube; and determining the pixel coordinates of the corresponding data point in the corresponding outer cube pixel according to the offset distance, the equally divided length and width of the corresponding outer cube pixel, and the length and width of the corresponding outer cube.

[0012] In one of the embodiments, for each outsourced cube pixel, based on the pixel activation data of the outsourced cube pixel, the activated pixel traversal results of the outsourced cube pixel in multiple traversal directions are obtained in a multi-threaded parallel manner, including: determining a second number of threads for activated pixel traversal processing according to the number of equal parts of the outsourced cube pixel; calling the second number of threads; based on the pixel activation data of the outsourced cube pixel, performing activated pixel traversal in multiple traversal directions of the outsourced cube pixel by each thread to obtain the activated pixel traversal results of the outsourced cube pixel in multiple traversal directions.

[0013] In one of the embodiments, based on the traversal results of activated pixels in multiple traversal directions, the convex hull in each traversal direction is determined in a multi-threaded parallel manner, including: determining a third number of threads for calculating the convex hull according to the number of traversal directions, each thread for calculating the convex hull corresponds to a traversal direction; calling the third number of threads; based on the traversal results of activated pixels in multiple traversal directions, determining the convex hull in the corresponding traversal direction through each thread.

[0014] In one of the embodiments, determining the convex hull in the corresponding traversal direction by each thread includes: selecting the leftmost pixel coordinate in the corresponding pixel storage area by each thread, marking the position of the leftmost pixel coordinate in the pixel storage area as i, and marking it as the highest point; selecting the rightmost pixel coordinate in the corresponding pixel storage area, marking the position of the rightmost pixel coordinate in the pixel storage area as j; searching for the data points corresponding to each pixel coordinate in the interval between i and j in the pixel storage area, searching for the highest point in the corresponding traversal direction among each data point, marking the position of the pixel coordinate corresponding to the highest point in the pixel storage area as j; Denoted as k; set the pixel coordinates in the interval between k and j in the pixel storage area to an inactive state; traverse the pixel coordinates in the interval between i and j-2 in the pixel storage area; for the l-th pixel coordinate traversed, calculate the first tangent value between the data point corresponding to the l-th pixel coordinate and the highest point; traverse the pixel coordinates in the interval between l+1 and j, and when the second tangent value between the data point corresponding to the traversed pixel coordinate and the highest point is greater than or equal to the first tangent value, assign the second tangent value to the first tangent value, and set the pixel coordinates in the interval between l+1 and m-1 to an inactive state, and obtain the convex hull in the corresponding traversal direction.

[0015] In a second aspect, the present application also provides a point cloud convex hull determination device, comprising:

[0016] The recognition module is used to collect laser point cloud data, input the laser point cloud data into the obstacle recognition model, and obtain at least one obstacle cube; determine the outer cube of each obstacle cube; determine the outer cube pixels corresponding to each outer cube;

[0017] A pixel activation module, configured to obtain pixel activation data of each outer cube pixel in a multi-threaded parallel manner based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube;

[0018] The convex hull determination module is used to obtain the activated pixel traversal results of the outer cube pixels in multiple traversal directions in a multi-threaded parallel manner for each outer cube pixel based on the pixel activation data of the outer cube pixel; based on the activated pixel traversal results in multiple traversal directions, determine the convex hull in each traversal direction in a multi-threaded parallel manner; based on the convex hulls in multiple traversal directions, determine the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel.

[0019] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0020] Collect laser point cloud data, input the laser point cloud data into an obstacle recognition model, and obtain at least one obstacle cube; determine an outer cube of each obstacle cube; and determine outer cube pixels corresponding to each outer cube;

[0021] Based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner;

[0022] For each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions are obtained through multi-threaded parallelism; based on the activated pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined through multi-threaded parallelism; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined.

[0023] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the following steps are implemented:

[0024] Collect laser point cloud data, input the laser point cloud data into an obstacle recognition model, and obtain at least one obstacle cube; determine an outer cube of each obstacle cube; and determine outer cube pixels corresponding to each outer cube;

[0025] Based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner;

[0026] For each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions are obtained through multi-threaded parallelism; based on the activated pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined through multi-threaded parallelism; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined.

[0027] In a fifth aspect, the present application further provides a computer program product, including a computer program, which implements the following steps when executed by a processor:

[0028] Collect laser point cloud data, input the laser point cloud data into an obstacle recognition model, and obtain at least one obstacle cube; determine an outer cube of each obstacle cube; and determine outer cube pixels corresponding to each outer cube;

[0029] Based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner;

[0030] For each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions are obtained through multi-threaded parallelism; based on the activated pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined through multi-threaded parallelism; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined.

[0031] The above-mentioned point cloud convex hull determination method, device, computer equipment, computer-readable storage medium and computer program product, after collecting laser point cloud data, inputs the laser point cloud data into the obstacle recognition model to obtain at least one obstacle cube; then, determines the outer cube of each obstacle cube; determines the outer cube pixels corresponding to each outer cube; then, based on at least one obstacle cube, the outer cube of each obstacle cube and the outer cube pixels corresponding to each outer cube, obtains the pixel activation data of each outer cube pixel in a multi-threaded parallel manner; finally, for each outer cube pixel, based on the pixel activation data of the outer cube pixel, obtains the activation pixel traversal results of the outer cube pixel in multiple traversal directions in a multi-threaded parallel manner; based on the activation pixel traversal results in multiple traversal directions, determines the convex hull in each traversal direction in a multi-threaded parallel manner; based on the convex hulls in multiple traversal directions, determines the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel. This multi-threaded parallel computing method can greatly improve the computing efficiency of the point cloud convex hull. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 It is a schematic diagram of a flow chart of a method for determining a point cloud convex hull in one embodiment;

[0034] Figure 2 A schematic diagram of the principle of determining an outer bounding cube in one embodiment;

[0035] Figure 3 A schematic diagram of an outer packaging cube pixel in one embodiment;

[0036] Figure 4 A schematic diagram of an upper direction in one embodiment;

[0037] Figure 5 A schematic diagram of the right direction in one embodiment;

[0038] Figure 6 A schematic diagram of a downward direction in one embodiment;

[0039] Figure 7 is a schematic diagram of the left direction in one embodiment;

[0040] Figure 8is a structural block diagram of a device for determining a point cloud convex hull in one embodiment;

[0041] Fig. 9 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] The point cloud convex hull determination method provided in the embodiment of the present application can be applied to an autonomous driving vehicle. After the autonomous driving vehicle collects laser point cloud data, the laser point cloud data is input into an obstacle recognition model to obtain at least one obstacle cube; then the outer cube of each obstacle cube is determined; based on at least one obstacle cube and the outer cube of each obstacle cube, the outer cube pixels corresponding to each outer cube are determined in a multi-threaded parallel manner, and the pixel activation data of each outer cube pixel is obtained; for each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activation pixel traversal results of the outer cube pixel in multiple traversal directions are obtained in a multi-threaded parallel manner; based on the activation pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined in a multi-threaded parallel manner; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined. This multi-threaded parallel processing method greatly improves the calculation efficiency of the point cloud convex hull.

[0044] Among them, the autonomous driving vehicle can be a gasoline vehicle, a diesel vehicle, a hybrid vehicle, a plug-in hybrid vehicle, an extended-range vehicle, a pure electric vehicle, etc., and the embodiments of the present application do not limit this.

[0045] In an exemplary embodiment, Figure 1 As shown, a method for determining the convex hull of a point cloud is provided, and the method is applied to an autonomous driving vehicle as an example for explanation, including the following steps 102 to 106. Among them:

[0046] Step 102 , collect laser point cloud data, input the laser point cloud data into an obstacle recognition model, obtain at least one obstacle cube; and determine the outer cube of each obstacle cube.

[0047] Optionally, the autonomous vehicle can collect laser point cloud data through a laser radar, and the laser point cloud data includes the three-dimensional coordinates of many data points. The autonomous vehicle can input the laser point cloud data into a pre-trained obstacle recognition model, and the obstacle recognition model will output the size and center coordinates of at least one cube, and an obstacle cube can be determined based on the size and center coordinates of each cube.

[0048] Optionally, after determining at least one obstacle cube, for each obstacle cube, a coordinate system can be determined based on the center coordinates of the vehicle and the driving direction of the vehicle; the lateral width and longitudinal width of the obstacle cube in the coordinate system are obtained, and based on the lateral width and longitudinal width, the outer cube of the obstacle cube is determined.

[0049] Optionally, after determining at least one outer cube, for each outer cube, the length and width of the outer cube can be divided equally to obtain the outer cube pixels corresponding to the outer cube. That is to say, each obstacle cube has an outer cube, and each outer cube has an outer cube pixel, and the three have a one-to-one correspondence.

[0050] Step 104 , based on at least one obstacle cube, the outer cube of each obstacle cube, and the outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner.

[0051] Optionally, the number of threads for pixel activation processing can be determined based on the number of data points and the number of obstacle cubes in the laser point cloud data, and each thread for pixel activation processing is responsible for processing one data point and one obstacle cube; this number of threads is called, and each thread is used to judge the data point and obstacle cube it is responsible for. If the responsible data point is within the responsible obstacle cube, the pixel coordinates of the responsible data point in the outer cube pixel corresponding to the responsible obstacle cube are further calculated, the pixel coordinates are set to an activated state, and the horizontal and vertical coordinates of the corresponding data point are written into the data storage area corresponding to the pixel coordinates; based on the processing results of each thread, the pixel activation data of each outer cube pixel is determined, and the pixel activation data of each outer cube pixel is used to indicate whether each pixel coordinate on the outer cube pixel is activated.

[0052] It should be noted that: when the pixel coordinates calculated by multiple threads are the same, non-atomic operations are allowed. The non-atomic operation here means that when the pixel coordinates calculated by multiple threads are the same, the data storage area corresponding to the same pixel coordinate must be recorded. and ; Because different threads record and The different completion times will cause the thread that completes the record early to clear its own recorded data and write the data of the thread that completes the record later. and , since it doesn't matter which one is written, non-atomic operations are allowed to occur.

[0053] Step 106, for each outer cube pixel, based on the pixel activation data of the outer cube pixel, obtain the activated pixel traversal results of the outer cube pixel in multiple traversal directions through a multi-threaded parallel method; based on the activated pixel traversal results in multiple traversal directions, determine the convex hull in each traversal direction through a multi-threaded parallel method; based on the convex hulls in multiple traversal directions, determine the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel.

[0054] Optionally, after obtaining the outer cube pixels corresponding to each outer cube, for each outer cube pixel, the number of threads used for activation pixel traversal processing can be determined according to the number of equal parts of the outer cube pixel; this number of threads can be called; and by each thread performing activation pixel traversal in multiple traversal directions of the corresponding outer cube pixel, activation pixel traversal results of the corresponding outer cube pixel in multiple traversal directions are obtained.

[0055] Optionally, for each outer cube pixel, after obtaining the activated pixel traversal results of the outer cube pixel in multiple traversal directions, the number of threads used to calculate the convex hull is determined according to the number of traversal directions, each thread used to calculate the convex hull corresponds to one traversal direction, and this number of threads can be called; based on the activated pixel traversal results in the corresponding traversal direction, each thread determines the convex hull in the corresponding traversal direction; after obtaining the convex hull in each traversal direction, the convex hulls in each traversal direction can be combined to obtain the point cloud convex hull of the corresponding obstacle cube.

[0056] In the above embodiment, after the laser point cloud data is collected, the laser point cloud data is input into the obstacle recognition model to obtain at least one obstacle cube; then, the outer cube of each obstacle cube is determined; the outer cube pixels corresponding to each outer cube are determined; then, based on at least one obstacle cube, the outer cube of each obstacle cube and the outer cube pixels corresponding to each outer cube, the pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner; finally, for each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions are obtained in a multi-threaded parallel manner; based on the activated pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined in a multi-threaded parallel manner; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined. This multi-threaded parallel computing method can greatly improve the computing efficiency of the point cloud convex hull.

[0057] In some embodiments, the step of determining the outer cube of each obstacle cube includes: determining a coordinate system for each obstacle cube according to the center coordinates of the vehicle and the driving direction of the vehicle; determining a first maximum value and a first minimum value of the obstacle cube on the horizontal axis of the coordinate system, and determining a horizontal width according to the first maximum value and the first minimum value; determining a second maximum value and a second minimum value of the obstacle cube on the vertical axis of the coordinate system, and determining a longitudinal width according to the second maximum value and the second minimum value; determining the outer cube of the obstacle cube according to the transverse width, the longitudinal width and the height of the obstacle cube.

[0058] Optionally, a coordinate system can be established under a bird's eye view (BEV) with the center coordinates of the vehicle as the origin, with the positive direction of the longitudinal axis being the direction of travel of the vehicle, and the positive direction of the transverse axis being the positive direction of the longitudinal axis rotated 90 degrees clockwise. The point cloud convex hull of the obstacle cube in the embodiment of the present application is the point cloud convex hull under a bird's eye view.

[0059] Optionally, after determining the coordinate system, the first maximum value and the first minimum value of the obstacle cube on the horizontal axis of the coordinate system can be determined, and the horizontal width can be obtained by subtracting the first minimum value from the first maximum value; similarly, the second maximum value and the second minimum value of the obstacle cube on the horizontal axis of the coordinate system can be determined, and the vertical width can be obtained by subtracting the second maximum value from the second minimum value; based on the above-mentioned horizontal width, vertical width and the height of the obstacle cube, a cube can be determined, and the cube can be called the outer cube of the obstacle cube.

[0060] For example, see Figure 2 As shown, Figure 2The coordinate system determined by the center coordinates of the vehicle and the direction of travel of the vehicle is shown. Figure 2 The length in is the vertical width. Figure 2 The width in is the horizontal width. The dotted line indicates the outer cube. Due to the bird's-eye view, the vehicle, the obstacle cube and the outer cube are all degenerated into rectangles. The height of the outer cube is the same as the height of the obstacle cube. The rotation angle of the obstacle cube relative to the longitudinal axis is .

[0061] Exemplarily, the processing of threads for calculating the outer cube can be determined according to the number of obstacle cubes, each thread corresponds to one obstacle cube, and the number of threads is called to calculate the outer cube corresponding to the obstacle cube through each thread.

[0062] In the above embodiment, a specific method for determining the enclosing cube of each obstacle cube is provided, which provides a basis for the subsequent calculation of the convex hull of the point cloud. By calculating the enclosing cube of each obstacle cube in parallel through multi-threading, the calculation efficiency of the enclosing cube can be greatly improved.

[0063] In some embodiments, the step of determining the outer cube pixels corresponding to each outer cube includes: for each outer cube, dividing the length and width of the outer cube into N equal parts to obtain the outer cube pixels corresponding to the outer cube, where N is a positive integer.

[0064] Among them, the length of the outer cube can be understood as Figure 2 The vertical width of the outer cube can be understood as Figure 2 The horizontal width in the box degenerates the enclosing cube into a rectangle from a bird's eye view ( Figure 2 The vertical width in the Figure 2 The horizontal width in the image is divided into N equal parts, and the outer cube pixels corresponding to the outer cube can be obtained.

[0065] Exemplarily, N may be 8 or 12, and the value of N may be flexibly set according to actual conditions. Figure 3 The resulting bounding cube pixels are shown when N is 8.

[0066] Exemplarily, the processing of threads for calculating outer cube pixels may be determined according to the number of outer cubes, each thread corresponds to an outer cube, and the number of threads is called to calculate the outer cube pixels of the corresponding outer cube through each thread.

[0067] In the above embodiment, a specific method for determining the outer cube pixels corresponding to each outer cube is provided, which provides a basis for the subsequent calculation of the convex hull of the point cloud. By calculating the outer cube pixels corresponding to each outer cube in parallel through multi-threading, the calculation efficiency of the outer cube pixels can be greatly improved.

[0068] In some embodiments, based on at least one obstacle cube, an outer cube of each obstacle cube, and the outer cube pixels corresponding to each outer cube, the step of obtaining pixel activation data of each outer cube pixel in a multi-threaded parallel manner includes: determining a first number of threads for pixel activation processing according to the number of data points in the laser point cloud data and the number of obstacle cubes; each thread for pixel activation processing corresponds to a data point and an obstacle cube; calling the first number of threads; determining through each thread whether the corresponding data point is in the corresponding obstacle cube; if so, determining the pixel coordinates of the corresponding data point in the corresponding outer cube pixel, setting the pixel coordinates to an activated state, and writing the horizontal and vertical coordinates of the corresponding data point into the data storage area corresponding to the pixel coordinates; determining the pixel activation data of each outer cube pixel based on the processing results of each thread.

[0069] Optionally, the number of data points in the laser point cloud data and the number of obstacle cubes are multiplied, and the product is used as the number of threads for pixel activation processing. For ease of distinction, the number here is referred to as the first number, and each thread corresponds to one data point and one obstacle cube.

[0070] Optionally, a first number of threads are called, and each thread executes the following steps: determining whether a corresponding data point is within a corresponding obstacle cube; if so, determining the pixel coordinates of the corresponding data point in a corresponding outer cube pixel, setting the pixel coordinates to an activated state, and writing the horizontal and vertical coordinates of the corresponding data point into a data storage area corresponding to the pixel coordinates.

[0071] For each thread, the three-dimensional coordinates of the corresponding data point are x p ,y p 、z p , the corresponding center coordinate of the obstacle cube is x c ,y c 、z c , the length, width and height are x z ,y z 、z z The center coordinates, length, width and height of the obstacle cube are output by the obstacle recognition model, and the rotation angle of the obstacle cube is (For the definition of rotation angle, see Figure 2 ). The thread can determine whether the corresponding data point is within the corresponding obstacle cube in the following way:

[0072] First, calculate the offset between the corresponding data point and the center point of the corresponding obstacle cube , , :

[0073]

[0074]

[0075]

[0076] Then, judge , , Are the following conditions met?

[0077]

[0078] If satisfied, it is determined that the corresponding data point is within the corresponding obstacle cube.

[0079] It should be noted that non-atomic operations are allowed when the pixel coordinates calculated by two or more threads are the same.

[0080] After the parallel processing of the first number of threads, each pixel coordinate in each outer cube pixel has a state of being activated or not, and the state of each pixel coordinate constitutes the pixel activation data of the outer cube pixel.

[0081] In the above embodiment, a multi-threaded parallel pixel activation processing method is provided. Since the amount of data points in the laser point cloud data is huge, this parallel processing method can greatly improve the efficiency of the pixel activation processing.

[0082] In some embodiments, the step of determining the pixel coordinates of the corresponding data point in the corresponding outer cube pixel includes: determining the pixel coordinates of the corresponding data point in the corresponding outer cube pixel based on the equally divided length and equally divided width of the corresponding outer cube pixel, the three-dimensional coordinates of the corresponding data point, the center coordinates of the corresponding obstacle cube, and the length and width of the corresponding outer cube.

[0083] Optionally, first, the offset distance between the corresponding data point and the center point of the corresponding obstacle cube can be calculated according to the three-dimensional coordinates of the corresponding data point and the center coordinates of the corresponding obstacle cube; then, based on the offset distance, the equally divided length and width of the corresponding outer cube pixels, and the length and width of the corresponding outer cube, the pixel coordinates of the corresponding data point in the corresponding outer cube pixels are determined.

[0084] As described in the above-mentioned embodiment, the length and width of the rectangle into which the outer cube is degenerated from the bird's-eye view are equally divided into N parts, so that the outer cube pixels corresponding to the outer cube can be obtained. After the length of the rectangle is divided into N parts, the length of each small part is called the equal-division length; after the width of the rectangle is divided into N parts, the length of each small part is called the equal-division width.

[0085] The offset distance can be calculated by the following formula: , :

[0086] =x p -x c

[0087] = y p -y c

[0088] Getting the offset distance , After that, the pixel coordinates of the corresponding data point in the corresponding outer cube pixel can be calculated using the following formula:

[0089]

[0090]

[0091] in, Represents equally divided width and equally divided length respectively. Respectively represent the width and length of the corresponding outer cube.

[0092] In the above embodiment, a specific method for calculating the pixel coordinates of a data point in the outer cube pixel is provided. After the pixel coordinates are calculated, the pixel coordinates can be set to an activated state, and the horizontal and vertical coordinates (x p With y p ) is written into the data storage area corresponding to the pixel coordinates, providing a basis for the subsequent calculation of the point cloud convex hull. Multiple threads perform pixel activation processing in parallel, which can greatly improve the efficiency of pixel activation processing.

[0093] In some embodiments, for each outsourced cube pixel, based on the pixel activation data of the outsourced cube pixel, the step of obtaining the activated pixel traversal results of the outsourced cube pixel in multiple traversal directions in a multi-threaded parallel manner includes: determining a second number of threads for activated pixel traversal processing according to the number of equal parts of the outsourced cube pixel; calling the second number of threads; and based on the pixel activation data of the outsourced cube pixel, obtaining the activated pixel traversal results of the outsourced cube pixel in multiple traversal directions by each thread.

[0094] As described in the above-mentioned embodiment, the length and width of the rectangle into which the outer cube degenerates from a bird's-eye view are equally divided into N parts, so that the outer cube pixels corresponding to the outer cube can be obtained. Here, N is the number of equal parts of the outer cube pixels. The number of equal parts can be used as the number of threads for activating pixel traversal processing. For the sake of distinction, the number here is referred to as the second number.

[0095] Optionally, a second number of threads are called, and each thread executes the following steps: based on the pixel activation data of the outer cube pixels, activated pixel traversal is performed in multiple traversal directions of the outer cube pixels, and based on the traversal result of each thread, the activated pixel traversal results of the outer cube pixels in multiple traversal directions are determined.

[0096] For example, see Figure 4 As shown, Figure 4 An outer cube pixel is shown. The outer cube pixel is divided into 8 equal parts. It can be determined that the number of threads used to activate pixel traversal processing is 8, assuming that they are thread 1, thread 2, thread 3, thread 4, thread 5, thread 6, thread 7, and thread 8 respectively.

[0097] For each thread, traversal can be performed in four directions: top, right, bottom, and left. When traversing in each direction, when the pixel coordinates traversed are in an activated state, the pixel coordinates are recorded in the pixel storage area in that direction, and there is no need to continue traversing in that direction. The next direction is traversed. The top direction is from top to bottom, the right direction is from right to left, the bottom direction is from bottom to top, and the left direction is from left to right.

[0098] Here are some examples:

[0099] by Figure 4 For example, thread 1 in the example traverses from the top first, that is, thread 1 traverses the pixel coordinates of the first column from top to bottom. When the traversed pixel coordinates are in the activated state, the pixel coordinates are recorded in the pixel storage area in the upper direction, and there is no need to continue traversing in the upper direction; then proceed Figure 5 The traversal in the right direction shown, that is, thread 1 traverses the pixel coordinates of the first row from right to left. Similarly, when the traversed pixel coordinates are in the activated state, the pixel coordinates are recorded in the pixel storage area in the right direction, and there is no need to continue traversing in the right direction; the next step is Figure 6 The traversal in the downward direction shown, that is, thread 1 traverses the pixel coordinates of the last column from bottom to top. Similarly, when the traversed pixel coordinates are in the activated state, the pixel coordinates are recorded in the pixel storage area in the downward direction, and there is no need to continue traversing in the downward direction; the next step is Figure 7The traversal in the left direction shown, that is, thread 1 traverses the pixel coordinates of the last row from left to right. Similarly, when the traversed pixel coordinates are in an activated state, the pixel coordinates are recorded in the pixel storage area in the left direction, and there is no need to continue traversing in the left direction. It should be noted that no matter which direction, when traversing in that direction finds that all pixel coordinates are in an inactivated state, a special character is recorded in the pixel storage area in that direction, indicating that no activated pixel has been traversed. The principles of traversal of threads 2-8 in the upper, right, lower, and left directions are similar, and the embodiments of the present application will not be repeated here.

[0100] Optionally, the number of data storage bits included in the pixel storage area in the upward direction may also be the second number. When the thread responsible for traversing the first column traverses to the pixel coordinate in the activated state, the pixel coordinate may be written to the first data storage bit from left to right in the pixel storage area; when the thread responsible for traversing the second column traverses to the pixel coordinate in the activated state, the pixel coordinate may be written to the second data storage bit from left to right in the pixel storage area, and so on. Exemplary, combined with Figure 4 In the example shown, when thread 1 traverses to the pixel coordinates in the activated state, it writes the pixel coordinates to the first data storage bit from left to right in the pixel storage area corresponding to the upper direction; when thread 2 traverses to the pixel coordinates in the activated state, it writes the pixel coordinates to the second data storage bit from left to right in the pixel storage area corresponding to the upper direction, ... When thread 8 traverses to the pixel coordinates in the activated state, it writes the pixel coordinates to the eighth data storage bit from left to right in the pixel storage area corresponding to the upper direction.

[0101] Similarly, the number of data storage bits included in the pixel storage area in the right direction can also be the second number. When the thread responsible for traversing the first row traverses to the pixel coordinate in the activated state, the pixel coordinate can be written to the first data storage bit from left to right in the pixel storage area; when the thread responsible for traversing the second row traverses to the pixel coordinate in the activated state, the pixel coordinate can be written to the second data storage bit from left to right in the pixel storage area, and so on. Exemplary, combined with Figure 5 In the example shown, when thread 1 traverses to the pixel coordinates in the activated state, it writes the pixel coordinates to the first data storage bit from left to right in the pixel storage area corresponding to the right direction; when thread 2 traverses to the pixel coordinates in the activated state, it writes the pixel coordinates to the second data storage bit from left to right in the pixel storage area corresponding to the right direction, ... When thread 8 traverses to the pixel coordinates in the activated state, it writes the pixel coordinates to the eighth data storage bit from left to right in the pixel storage area corresponding to the right direction.

[0102] The lower and left directions are similar and will not be described in detail in the embodiments of the present application.

[0103] For the second number of threads, after one of the threads completes the traversal first, it can wait for other threads. After all threads complete the traversal, the pixel storage area corresponding to each traversal direction is filled. The data stored in the pixel storage area corresponding to each traversal direction can be used as the activated pixel traversal result of the outsourced cube pixel in the traversal direction.

[0104] In the above embodiment, the process of traversing activated pixels on the outer cube pixels is introduced. Through this process, the traversal results of activated pixels in the four traversal directions of up, right, down, and left can be obtained, which prepares for the subsequent calculation of the point cloud convex hull, and greatly improves the traversal efficiency of activated pixels through multi-threaded parallel traversal.

[0105] In some embodiments, for each outer bounding cube pixel, based on the traversal results of activated pixels in multiple traversal directions, the step of determining the convex hull in each traversal direction in a multi-threaded parallel manner includes: determining a third number of threads for calculating the convex hull according to the number of traversal directions, each thread for calculating the convex hull corresponding to a traversal direction; calling the third number of threads; and determining the convex hull in the corresponding traversal direction through each thread based on the traversal results of activated pixels in multiple traversal directions.

[0106] The number of traversal directions can be used as the number of threads used to calculate the convex hull. For the sake of distinction, the number here is called the third number, and each thread used to calculate the convex hull corresponds to one traversal direction. Exemplarily, when the traversal directions include up, right, down, and left, the number of threads used to calculate the convex hull is 4, of which one thread corresponds to the up direction, and the other three threads correspond to the right, down, and left directions, respectively.

[0107] It should be noted that: in the GPU, unlike the CPU, which is not a single thread scheduling, but is scheduled in thread clusters, so the third number of threads needs to belong to different thread clusters. Taking the third number of 4 as an example, since 32 threads in the GPU form a thread cluster, thread 1, thread 33, thread 65 and thread 97 can be selected as threads for calculating the convex hull, thread 1 corresponds to the upper direction, thread 33 corresponds to the right direction, thread 65 corresponds to the lower direction, and thread 97 corresponds to the left direction.

[0108] Optionally, a third number of threads may be called, and each thread performs the following steps: based on the activated pixel traversal result in the traversal direction corresponding to the thread, determining the convex hull in the corresponding traversal direction.

[0109] In some embodiments, the step of determining the convex hull in the corresponding traversal direction by each thread includes: selecting the leftmost pixel coordinate in the corresponding pixel storage area by each thread, marking the position of the leftmost pixel coordinate in the pixel storage area as i, and marking it as the highest point; selecting the rightmost pixel coordinate in the corresponding pixel storage area, marking the position of the rightmost pixel coordinate in the pixel storage area as j; searching for the data points corresponding to each pixel coordinate in the interval between i and j in the pixel storage area, searching for the highest point in the corresponding traversal direction among each data point, marking the position of the pixel coordinate corresponding to the highest point in the pixel storage area as j. Marked as k; set the pixel coordinates in the interval between k and j in the pixel storage area to an inactive state; traverse the pixel coordinates in the interval between i and j-2 in the pixel storage area; for the l-th pixel coordinate traversed, calculate the first tangent value between the data point corresponding to the l-th pixel coordinate and the highest point; traverse the pixel coordinates in the interval between l+1 and j, and when the second tangent value between the data point corresponding to the traversed pixel coordinate and the highest point is greater than or equal to the first tangent value, assign the second tangent value to the first tangent value, and set the pixel coordinates in the interval between l+1 and m-1 to an inactive state, and obtain the convex hull in the corresponding traversal direction.

[0110] As described in the above-mentioned embodiment, the pixel storage area in each traversal direction includes a second number of data storage bits, and the second number of data storage bits are sorted from left to right. If a pixel coordinate is the second from left to right in the pixel storage area, then the position of the pixel coordinate in the pixel storage area is 2.

[0111] As described in the above embodiment, the traversal direction may include up, right, down, and left, and thread 1, thread 33, thread 65, and thread 97 may be selected as threads for calculating the convex hull, thread 1 corresponds to the up direction, thread 33 corresponds to the right direction, thread 65 corresponds to the down direction, and thread 97 corresponds to the left direction.

[0112] As described in the above-mentioned embodiment, in the process of obtaining the pixel activation data of each outer cube pixel in a multi-threaded parallel manner, after the thread calculates the pixel coordinates of the data point in the outer cube pixel, the horizontal and vertical coordinates of the data point are written into the data storage area corresponding to the pixel coordinates. Therefore, the data points corresponding to each pixel coordinate in the interval between i and j can be searched in the data storage area.

[0113] Among them, as to how to find the highest point in the corresponding traversal direction among each data point, if the corresponding traversal direction is the upward direction, then find the data point with the largest y among each data point, and use this data point as the highest point here; if the corresponding traversal direction is the right direction, then find the data point with the largest x among each data point, and use this data point as the highest point here; if the corresponding traversal direction is the downward direction, then find the data point with the smallest y among each data point, and use this data point as the highest point here; if the corresponding traversal direction is the left direction, then find the data point with the smallest x among each data point, and use this data point as the highest point here.

[0114] The following uses thread 1 as an example to introduce how to calculate the convex hull in the upward direction:

[0115] Thread 1 selects the leftmost pixel coordinate in the pixel storage area corresponding to the upward direction, marks the position of the leftmost pixel coordinate in the pixel storage area as i, and marks it as the highest point; selects the rightmost pixel coordinate in the pixel storage area corresponding to the upward direction, marks the position of the rightmost pixel coordinate in the pixel storage area as j; searches for the data points corresponding to each pixel coordinate in the interval between i and j in the pixel storage area corresponding to the upward direction, searches for the data point with the largest y among the data points as the highest point, and marks the position of the pixel coordinate corresponding to the highest point in the pixel storage area corresponding to the upward direction as k; The pixel coordinates in the interval between k and j in the corresponding pixel storage area are set to an inactive state; the pixel coordinates in the interval between i and j-2 in the pixel storage area corresponding to the upward direction are traversed; for the lth pixel coordinate traversed, the first tangent value between the data point corresponding to the lth pixel coordinate and the highest point is calculated; the pixel coordinates in the interval between l+1 and j are traversed, and when the second tangent value between the data point corresponding to the traversed pixel coordinate and the highest point is greater than or equal to the first tangent value, the second tangent value is assigned to the first tangent value, and the pixel coordinates in the interval between l+1 and m-1 are set to an inactive state. After completing the traversal of all pixel coordinates in the interval between i and j-2 in the pixel storage area corresponding to the upward direction, the point cloud coordinates corresponding to the pixel coordinates in the activated state in the pixel storage area corresponding to the upward direction are set to the point cloud coordinates corresponding to the pixel coordinates in the activated state in the pixel storage area corresponding to the upward direction. and as the convex hull in the upward direction.

[0116] For each outer cube pixel, after obtaining the convex hull in all traversal directions, the convex hulls in all traversal directions are combined to form the point cloud convex hull of the corresponding obstacle cube. The point cloud convex hull of the obstacle cube can be used to determine the actual shape of the obstacle from the bev perspective, and the actual shape of the obstacle from the bev perspective can provide driving guidance for the autonomous driving vehicle.

[0117] In the above embodiment, a specific method of calculating the convex hull in each traversal direction is provided, and the convex hull calculation efficiency of each traversal direction is greatly improved by calculating the convex hull in parallel through multi-threading.

[0118] It should be understood that, although the steps in the flowcharts involved in the above embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above embodiments may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0119] Based on the same inventive concept, the embodiment of the present application also provides a point cloud convex hull determination device for implementing the point cloud convex hull determination method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more point cloud convex hull determination device embodiments provided below can refer to the limitations of the point cloud convex hull determination method above, and will not be repeated here.

[0120] In an exemplary embodiment, Figure 8 As shown, a point cloud convex hull determination device is provided, comprising:

[0121] The recognition module 801 is used to collect laser point cloud data, input the laser point cloud data into the obstacle recognition model, and obtain at least one obstacle cube; determine the outer cube of each obstacle cube; determine the outer cube pixels corresponding to each outer cube;

[0122] A pixel activation module 802 is used to obtain pixel activation data of each outer cube pixel in a multi-threaded parallel manner based on at least one obstacle cube, an outer cube of each obstacle cube, and an outer cube pixel corresponding to each outer cube;

[0123] The convex hull determination module 803 is used to obtain the activation pixel traversal results of the outer cube pixel in multiple traversal directions for each outer cube pixel based on the pixel activation data of the outer cube pixel through a multi-threaded parallel method; based on the activation pixel traversal results in multiple traversal directions, determine the convex hull in each traversal direction through a multi-threaded parallel method; based on the convex hulls in multiple traversal directions, determine the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel.

[0124] In some embodiments, the identification module 801 is specifically used to determine, for each obstacle cube, a coordinate system based on the center coordinates of the vehicle and the driving direction of the vehicle; determine the first maximum value and the first minimum value of the obstacle cube on the horizontal axis of the coordinate system, and determine the horizontal width based on the first maximum value and the first minimum value; determine the second maximum value and the second minimum value of the obstacle cube on the vertical axis of the coordinate system, and determine the longitudinal width based on the second maximum value and the second minimum value; determine the outer cube of the obstacle cube based on the horizontal width, the longitudinal width and the height of the obstacle cube.

[0125] In some embodiments, the identification module 801 is specifically configured to divide the length and width of each outer cube into N equal parts to obtain the outer cube pixels corresponding to the outer cube, where N is a positive integer.

[0126] In some embodiments, the pixel activation module 802 is specifically used to determine a first number of threads for pixel activation processing based on the number of data points and the number of obstacle cubes in the laser point cloud data; each thread for pixel activation processing corresponds to one data point and one obstacle cube; the first number of threads are called; and each thread determines whether the corresponding data point is in the corresponding obstacle cube; if so, the pixel coordinates of the corresponding data point in the corresponding outer cube pixel are determined, and the pixel coordinates are set to an activated state, and the horizontal and vertical coordinates of the corresponding data point are written into the data storage area corresponding to the pixel coordinates; based on the processing results of each thread, the pixel activation data of each outer cube pixel is determined.

[0127] In some embodiments, the pixel activation module 802 is specifically used to calculate the offset distance between the corresponding data point and the center point of the corresponding obstacle cube based on the three-dimensional coordinates of the corresponding data point and the center coordinates of the corresponding obstacle cube; determine the pixel coordinates of the corresponding data point in the corresponding outer cube pixel based on the offset distance, the equally divided length and width of the corresponding outer cube pixel, and the length and width of the corresponding outer cube.

[0128] In some embodiments, the convex hull determination module 803 is specifically used to determine the second number of threads for activation pixel traversal processing according to the number of equal parts of the outer cube pixels; call the second number of threads; and based on the pixel activation data of the outer cube pixels, obtain the activation pixel traversal results of the outer cube pixels in multiple traversal directions by each thread performing activation pixel traversal.

[0129] In some embodiments, the convex hull determination module 803 is specifically used to determine a third number of threads for calculating the convex hull according to the number of traversal directions, each thread for calculating the convex hull corresponds to a traversal direction; call the third number of threads; and determine the convex hull in the corresponding traversal direction through each thread based on the activated pixel traversal results in multiple traversal directions.

[0130] In some embodiments, the convex hull determination module 803 is specifically used to select the leftmost pixel coordinates in the corresponding pixel storage area through each thread, mark the position of the leftmost pixel coordinates in the pixel storage area as i, and mark it as the highest point; select the rightmost pixel coordinates in the corresponding pixel storage area, mark the position of the rightmost pixel coordinates in the pixel storage area as j; search for the data points corresponding to each pixel coordinate in the interval between i and j in the pixel storage area, search for the highest point in the corresponding traversal direction among the data points, and mark the position of the pixel coordinate corresponding to the highest point in the pixel storage area as k; The pixel coordinates in the interval between k and j in the pixel storage area are set to an inactive state; the pixel coordinates in the interval between i and j-2 in the pixel storage area are traversed; for the lth pixel coordinate traversed, the first tangent value between the data point corresponding to the lth pixel coordinate and the highest point is calculated; the pixel coordinates in the interval between l+1 and j are traversed, and when the second tangent value between the data point corresponding to the traversed pixel coordinate and the highest point is greater than or equal to the first tangent value, the second tangent value is assigned to the first tangent value, and the pixel coordinates in the interval between l+1 and m-1 are set to an inactive state, and the convex hull in the corresponding traversal direction is obtained.

[0131] Each module in the above-mentioned point cloud convex hull determination device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above-mentioned modules can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0132] In an exemplary embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as shown in FIG. Fig. 9As shown. The computer device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a method for determining a point cloud convex hull is implemented.

[0133] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0134] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0135] Collect laser point cloud data, input the laser point cloud data into an obstacle recognition model, and obtain at least one obstacle cube; determine an outer cube of each obstacle cube; and determine outer cube pixels corresponding to each outer cube;

[0136] Based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner;

[0137] For each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions are obtained through multi-threaded parallelism; based on the activated pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined through multi-threaded parallelism; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined.

[0138] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0139] For each obstacle cube, a coordinate system is determined according to the center coordinates of the vehicle and the driving direction of the vehicle; the first maximum value and the first minimum value of the obstacle cube on the horizontal axis of the coordinate system are determined, and the horizontal width is determined according to the first maximum value and the first minimum value; the second maximum value and the second minimum value of the obstacle cube on the vertical axis of the coordinate system are determined, and the longitudinal width is determined according to the second maximum value and the second minimum value; the outer cube of the obstacle cube is determined according to the horizontal width, the longitudinal width and the height of the obstacle cube.

[0140] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0141] For each outer cube, the length and width of the outer cube are equally divided into N parts to obtain the outer cube pixels corresponding to the outer cube, where N is a positive integer.

[0142] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0143] According to the number of data points and the number of obstacle cubes in the laser point cloud data, the first number of threads for pixel activation processing is determined; each thread for pixel activation processing corresponds to one data point and one obstacle cube; the first number of threads are called; and each thread determines whether the corresponding data point is in the corresponding obstacle cube; if so, the pixel coordinates of the corresponding data point in the corresponding outer cube pixel are determined, and the pixel coordinates are set to an activated state, and the horizontal and vertical coordinates of the corresponding data point are written into the data storage area corresponding to the pixel coordinates; based on the processing results of each thread, the pixel activation data of each outer cube pixel is determined.

[0144] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0145] According to the three-dimensional coordinates of the corresponding data point and the center coordinates of the corresponding obstacle cube, the offset distance between the corresponding data point and the center point of the corresponding obstacle cube is calculated; according to the offset distance, the equal-division length and width of the corresponding outer cube pixel, and the length and width of the corresponding outer cube, the pixel coordinates of the corresponding data point in the corresponding outer cube pixel are determined.

[0146] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0147] According to the number of equal parts of the outer cube pixels, the second number of threads for activation pixel traversal processing is determined; the second number of threads are called; based on the pixel activation data of the outer cube pixels, activation pixel traversal is performed by each thread in multiple traversal directions of the outer cube pixels to obtain activation pixel traversal results of the outer cube pixels in multiple traversal directions.

[0148] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0149] According to the number of traversal directions, a third number of threads for calculating the convex hull is determined, each thread for calculating the convex hull corresponds to a traversal direction; the third number of threads are called; based on the traversal results of activated pixels in multiple traversal directions, the convex hull in the corresponding traversal direction is determined by each thread.

[0150] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:

[0151] Each thread selects the leftmost pixel coordinate in the corresponding pixel storage area, marks the position of the leftmost pixel coordinate in the pixel storage area as i, and marks it as the highest point; selects the rightmost pixel coordinate in the corresponding pixel storage area, marks the position of the rightmost pixel coordinate in the pixel storage area as j; searches for the data points corresponding to each pixel coordinate in the interval between i and j in the pixel storage area, searches for the highest point in the corresponding traversal direction among each data point, marks the position of the pixel coordinate corresponding to the highest point in the pixel storage area as k; and marks the interval between k and j in the pixel storage area. The pixel coordinates in the interval are set to an inactive state; the pixel coordinates in the interval between i and j-2 in the pixel storage area are traversed; for the l-th pixel coordinate traversed, the first tangent value between the data point corresponding to the l-th pixel coordinate and the highest point is calculated; the pixel coordinates in the interval between l+1 and j are traversed, and when the second tangent value between the data point corresponding to the traversed pixel coordinate and the highest point is greater than or equal to the first tangent value, the second tangent value is assigned to the first tangent value, and the pixel coordinates in the interval between l+1 and m-1 are set to an inactive state, and the convex hull in the corresponding traversal direction is obtained.

[0152] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0153] Collect laser point cloud data, input the laser point cloud data into an obstacle recognition model, and obtain at least one obstacle cube; determine an outer cube of each obstacle cube; and determine outer cube pixels corresponding to each outer cube;

[0154] Based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner;

[0155] For each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions are obtained through multi-threaded parallelism; based on the activated pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined through multi-threaded parallelism; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined.

[0156] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0157] For each obstacle cube, a coordinate system is determined according to the center coordinates of the vehicle and the driving direction of the vehicle; the first maximum value and the first minimum value of the obstacle cube on the horizontal axis of the coordinate system are determined, and the horizontal width is determined according to the first maximum value and the first minimum value; the second maximum value and the second minimum value of the obstacle cube on the vertical axis of the coordinate system are determined, and the longitudinal width is determined according to the second maximum value and the second minimum value; the outer cube of the obstacle cube is determined according to the horizontal width, the longitudinal width and the height of the obstacle cube.

[0158] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0159] For each outer cube, the length and width of the outer cube are equally divided into N parts to obtain the outer cube pixels corresponding to the outer cube, where N is a positive integer.

[0160] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0161] According to the number of data points and the number of obstacle cubes in the laser point cloud data, the first number of threads for pixel activation processing is determined; each thread for pixel activation processing corresponds to one data point and one obstacle cube; the first number of threads are called; and each thread determines whether the corresponding data point is in the corresponding obstacle cube; if so, the pixel coordinates of the corresponding data point in the corresponding outer cube pixel are determined, and the pixel coordinates are set to an activated state, and the horizontal and vertical coordinates of the corresponding data point are written into the data storage area corresponding to the pixel coordinates; based on the processing results of each thread, the pixel activation data of each outer cube pixel is determined.

[0162] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0163] According to the three-dimensional coordinates of the corresponding data point and the center coordinates of the corresponding obstacle cube, the offset distance between the corresponding data point and the center point of the corresponding obstacle cube is calculated; according to the offset distance, the equal-division length and width of the corresponding outer cube pixel, and the length and width of the corresponding outer cube, the pixel coordinates of the corresponding data point in the corresponding outer cube pixel are determined.

[0164] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0165] According to the number of equal parts of the outer cube pixels, the second number of threads for activation pixel traversal processing is determined; the second number of threads are called; based on the pixel activation data of the outer cube pixels, activation pixel traversal is performed by each thread in multiple traversal directions of the outer cube pixels to obtain activation pixel traversal results of the outer cube pixels in multiple traversal directions.

[0166] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0167] According to the number of traversal directions, a third number of threads for calculating the convex hull is determined, each thread for calculating the convex hull corresponds to a traversal direction; the third number of threads are called; based on the traversal results of activated pixels in multiple traversal directions, the convex hull in the corresponding traversal direction is determined by each thread.

[0168] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented:

[0169] Each thread selects the leftmost pixel coordinate in the corresponding pixel storage area, marks the position of the leftmost pixel coordinate in the pixel storage area as i, and marks it as the highest point; selects the rightmost pixel coordinate in the corresponding pixel storage area, marks the position of the rightmost pixel coordinate in the pixel storage area as j; searches for the data points corresponding to each pixel coordinate in the interval between i and j in the pixel storage area, searches for the highest point in the corresponding traversal direction among each data point, marks the position of the pixel coordinate corresponding to the highest point in the pixel storage area as k; and marks the interval between k and j in the pixel storage area. The pixel coordinates in the interval are set to an inactive state; the pixel coordinates in the interval between i and j-2 in the pixel storage area are traversed; for the l-th pixel coordinate traversed, the first tangent value between the data point corresponding to the l-th pixel coordinate and the highest point is calculated; the pixel coordinates in the interval between l+1 and j are traversed, and when the second tangent value between the data point corresponding to the traversed pixel coordinate and the highest point is greater than or equal to the first tangent value, the second tangent value is assigned to the first tangent value, and the pixel coordinates in the interval between l+1 and m-1 are set to an inactive state, and the convex hull in the corresponding traversal direction is obtained.

[0170] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0171] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0172] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0173] The above embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for determining the convex hull of a point cloud, It is characterized in that The method comprises: Collecting laser point cloud data, inputting the laser point cloud data into an obstacle recognition model to obtain at least one obstacle cube; determining an outer cube of each obstacle cube; and determining outer cube pixels corresponding to each outer cube; Based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube, pixel activation data of each outer cube pixel is obtained in a multi-threaded parallel manner; For each outer cube pixel, based on the pixel activation data of the outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions are obtained through multi-threaded parallelism; based on the activated pixel traversal results in multiple traversal directions, the convex hull in each traversal direction is determined through multi-threaded parallelism; based on the convex hulls in multiple traversal directions, the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel is determined.

2. The method according to claim 1, It is characterized in that The step of determining the outer cube of each obstacle cube comprises: For each obstacle cube, determine the coordinate system based on the center coordinates of the vehicle and the direction of travel of the vehicle; Determine a first maximum value and a first minimum value of the obstacle cube on the horizontal axis of the coordinate system, and determine the horizontal width according to the first maximum value and the first minimum value; Determine a second maximum value and a second minimum value of the obstacle cube on the longitudinal axis of the coordinate system, and determine the longitudinal width according to the second maximum value and the second minimum value; An outer cube of the obstacle cube is determined according to the horizontal width, the vertical width, and the height of the obstacle cube.

3. The method according to claim 1, It is characterized in that The step of determining the outer cube pixel corresponding to each outer cube comprises: For each outer cube, the length and width of the outer cube are equally divided into N parts to obtain the outer cube pixels corresponding to the outer cube, where N is a positive integer.

4. The method according to claim 1, It is characterized in that The method of obtaining pixel activation data of each outer cube pixel in a multi-threaded parallel manner based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube includes: Determine a first number of threads for pixel activation processing according to the number of data points and the number of obstacle cubes in the laser point cloud data; each thread for pixel activation processing corresponds to one data point and one obstacle cube; Invoking the first number of threads; Determine through each thread whether the corresponding data point is in the corresponding obstacle cube; if so, determine the pixel coordinates of the corresponding data point in the corresponding outer cube pixel, and set the pixel coordinates to an activated state; Based on the processing results of each thread, the pixel activation data of each outer cube pixel is determined.

5. The method according to claim 4, It is characterized in that The step of determining the pixel coordinates of the corresponding data point in the corresponding outer bounding cube pixel includes: According to the three-dimensional coordinates of the corresponding data point and the center coordinates of the corresponding obstacle cube, the offset distance between the corresponding data point and the center point of the corresponding obstacle cube is calculated; The pixel coordinates of the corresponding data point in the corresponding outer cube pixel are determined according to the offset distance, the equally divided length of the corresponding outer cube pixel, the equally divided width, and the length and width of the corresponding outer cube.

6. The method according to claim 1, It is characterized in that The method of obtaining, for each outer cube pixel, activated pixel traversal results of the outer cube pixel in multiple traversal directions in a multi-threaded parallel manner based on the pixel activation data of the outer cube pixel, includes: Determining a second number of threads for activating pixel traversal processing according to the number of equal divisions of the outer bounding cube pixels; Invoking the second number of threads; Based on the pixel activation data of the outer cube pixels, each thread performs activated pixel traversal in multiple traversal directions of the outer cube pixels to obtain activated pixel traversal results of the outer cube pixels in multiple traversal directions.

7. The method according to claim 1, It is characterized in that Based on the results of traversing the activated pixels in multiple traversal directions, the convex hull in each traversal direction is determined in a multi-threaded parallel manner, including: Determine a third number of threads for calculating the convex hull according to the number of traversal directions, each thread for calculating the convex hull corresponds to one traversal direction; Invoking the third number of threads; Based on the activated pixel traversal results in multiple traversal directions, the convex hull in the corresponding traversal direction is determined by each thread.

8. The method according to claim 7, It is characterized in that Determining the convex hull in the corresponding traversal direction through each thread includes: Selecting the leftmost pixel coordinate in the corresponding pixel storage area through each thread, marking the position of the leftmost pixel coordinate in the pixel storage area as i, and marking the leftmost pixel coordinate as the highest point; selecting the rightmost pixel coordinate in the corresponding pixel storage area, marking the position of the rightmost pixel coordinate in the pixel storage area as j; Searching for data points corresponding to respective pixel coordinates in the interval between i and j in the pixel storage area, searching for the highest point in the corresponding traversal direction among the data points, marking the position of the pixel coordinate corresponding to the highest point in the pixel storage area as k; setting the pixel coordinates in the interval between k and j in the pixel storage area to an inactive state; Each pixel coordinate in the interval between i and j-2 in the pixel storage area is traversed; for the l-th pixel coordinate traversed, the first tangent value between the data point corresponding to the l-th pixel coordinate and the highest point is calculated; each pixel coordinate in the interval between l+1 and j is traversed, and when the second tangent value between the data point corresponding to the traversed pixel coordinate and the highest point is greater than or equal to the first tangent value, the second tangent value is assigned to the first tangent value, and each pixel coordinate in the interval between l+1 and m-1 is set to an inactive state, so as to obtain a convex hull in the corresponding traversal direction.

9. A device for determining a point cloud convex hull, It is characterized in that The device comprises: The recognition module is used to collect laser point cloud data, input the laser point cloud data into the obstacle recognition model, and obtain at least one obstacle cube; determine the outer cube of each obstacle cube; and determine the outer cube pixels corresponding to each outer cube; A pixel activation module, configured to obtain pixel activation data of each outer cube pixel in a multi-threaded parallel manner based on at least one obstacle cube, an outer cube of each obstacle cube, and outer cube pixels corresponding to each outer cube; The convex hull determination module is used to obtain, for each outer cube pixel, the activated pixel traversal results of the outer cube pixel in multiple traversal directions in a multi-threaded parallel manner based on the pixel activation data of the outer cube pixel; determine the convex hull in each traversal direction in a multi-threaded parallel manner based on the activated pixel traversal results in multiple traversal directions; and determine the point cloud convex hull of the obstacle cube corresponding to the outer cube pixel based on the convex hulls in multiple traversal directions.

10. A computer device comprising a memory and a processor, wherein the memory stores a computer program. It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.

11. A computer-readable storage medium having a computer program stored thereon, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.

12. A computer program product comprising a computer program, It is characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.