CN117475398B - Ground segmentation optimization method and device based on voxel sampling - Google Patents

Ground segmentation optimization method and device based on voxel sampling Download PDF

Info

Publication number
CN117475398B
CN117475398B CN202311810539.9A CN202311810539A CN117475398B CN 117475398 B CN117475398 B CN 117475398B CN 202311810539 A CN202311810539 A CN 202311810539A CN 117475398 B CN117475398 B CN 117475398B
Authority
CN
China
Prior art keywords
point cloud
sampling point
cloud data
dimensional voxel
determining
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202311810539.9A
Other languages
Chinese (zh)
Other versions
CN117475398A (en
Inventor
李和意
张清
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Suzhou Metabrain Intelligent Technology Co Ltd
Original Assignee
Suzhou Metabrain Intelligent Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Suzhou Metabrain Intelligent Technology Co Ltd filed Critical Suzhou Metabrain Intelligent Technology Co Ltd
Priority to CN202311810539.9A priority Critical patent/CN117475398B/en
Publication of CN117475398A publication Critical patent/CN117475398A/en
Application granted granted Critical
Publication of CN117475398B publication Critical patent/CN117475398B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/588Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/26Segmentation of patterns in the image field; Cutting or merging of image elements to establish the pattern region, e.g. clustering-based techniques; Detection of occlusion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • Artificial Intelligence (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computing Systems (AREA)
  • Databases & Information Systems (AREA)
  • Evolutionary Computation (AREA)
  • General Health & Medical Sciences (AREA)
  • Medical Informatics (AREA)
  • Software Systems (AREA)
  • Optical Radar Systems And Details Thereof (AREA)

Abstract

The invention relates to the technical field of automatic driving, and discloses a ground segmentation optimization method and device based on voxel sampling. In the process, the point cloud data are divided into three-dimensional voxel grids, the sampling point cloud determined by each three-dimensional voxel grid is used for representing the point cloud data belonging to the same grid, the classification of the sampling point cloud is completed by using a mode of calculating an axial angle, the voxel grids have the functions of data sparsification and point cloud division, the multiplexing grid can avoid the time consumption caused by repeated reading and writing of the data, in addition, in the ground segmentation process, the thread pool is utilized, and the grouping, splicing, sequencing and classifying processes of the sampling point clouds are accelerated in parallel, so that the operation efficiency of the point cloud data is improved.

Description

Ground segmentation optimization method and device based on voxel sampling
Technical Field
The invention relates to the technical field of automatic driving, in particular to a ground segmentation optimization method and device based on voxel sampling.
Background
Environmental awareness is a critical capability necessary for intelligent networked automobiles, and can provide surrounding information for automatic driving of vehicles for decision making. Due to the complexity of real driving environments, different kinds of vehicle sensors are usually required to work cooperatively to meet the sensing requirements. The laser radar can provide the position information of the surrounding perceived target through collecting point cloud, and is one of the necessary hardware components of the L3+ vehicle-scale automatic driving system. The typical laser radar adopts laser transmitters and receivers with an array architecture, acquires the perception content of different gradient positions by densely transmitting multi-channel laser beam streams, and can realize 360-degree full-space information collection in the horizontal direction by means of an internal rotating device.
In view of the fact that the objects of environmental perception are mostly obstacles on the ground, the mixing of the ground point cloud and the target point cloud can influence the clustering of the obstacles, and the accuracy of target detection is reduced, the ground segmentation technology for separating the ground part and the non-ground part from the point cloud is a necessary preprocessing operation in laser radar perception.
In the related art, in order to realize ground segmentation, a grid mode is generally adopted to segment point cloud data into different grids, and feature combinations of point clouds contained in each grid are used as features of a new grid and are used for point cloud classification, so that geometric features of the point clouds are reserved to a certain extent, and the mode is independent of scenes and can be suitable for an uneven ground environment. However, in this method, the point cloud data is classified by adopting a grid mode, the size and the division mode of the grid are closely related to the division precision, when the grid is too large, the division precision is caused, and when the grid is too small, the calculation amount of the three-dimensional point cloud to be processed is quite huge, so that the calculation rate is reduced, in the process of classifying the point cloud data, the data is divided by units with different shapes, and the division modes among different units cannot be unified, so that the data needs to be subjected to dimension adjustment before ground division, and the adjusted data is used for reading calculation, so that the calculation amount of the data is further increased.
Disclosure of Invention
In view of the above, the invention provides a ground segmentation optimization method and device based on voxel sampling, so as to solve the technical problem of low calculation efficiency in the existing ground segmentation algorithm.
In a first aspect, the present invention provides a ground segmentation optimization method based on voxel sampling, including: acquiring point cloud data acquired by a laser radar; dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and determining the sampling point cloud of each three-dimensional voxel grid; calculating the axial angle of each sampling point cloud; grouping and splicing each sampling point cloud based on each axial angle through a thread pool to obtain a plurality of sampling point cloud sets corresponding to the groups one by one; calculating the gradient of each sampling point cloud in each set; and adding a classification label to the sampling point cloud based on the gradient, and determining the ground segmentation condition of the point cloud data.
With reference to the first aspect, in a possible implementation manner of the first aspect, dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, determining a sampling point cloud of each three-dimensional voxel grid includes: dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and establishing an association relation between each point cloud data and the three-dimensional voxel grids; based on the association, a sampling point cloud of each three-dimensional voxel grid is determined.
With reference to the first aspect, in one possible implementation manner of the first aspect, dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and establishing an association relationship between each point cloud data and the three-dimensional voxel grids includes: traversing the point cloud data based on the number of threads in the thread pool, and determining a minimum cuboid wrapping the point cloud data; dividing the minimum cuboid into uniform three-dimensional voxel grids, and determining the size of each three-dimensional voxel grid; dividing the point cloud data into each three-dimensional voxel grid; and determining the association relation between each point cloud data and each three-dimensional voxel grid based on the size.
With reference to the first aspect, in one possible implementation manner of the first aspect, traversing the point cloud data based on the number of threads in the thread pool, determining a minimum cuboid wrapping the point cloud data includes: based on the number of threads in the thread pool, uniformly dividing the point cloud data; traversing the point cloud data in each thread, and determining the maximum value and the minimum value of the corresponding point cloud data; and determining the vertex position and the side length of the minimum cuboid of the wrapping point cloud based on the maximum value and the minimum value corresponding to each thread.
With reference to the first aspect, in a possible implementation manner of the first aspect, determining a sampling point cloud of each three-dimensional voxel grid based on the association relation includes: determining the gravity center of each three-dimensional voxel grid based on the association relation; calculating the distance between the point cloud data and the center of gravity of each three-dimensional voxel grid; based on the distances, a sampling point cloud for each three-dimensional voxel grid is determined.
With reference to the first aspect, in a possible implementation manner of the first aspect, the association relationship includes: the grid number of the point cloud data, after determining the center of gravity of each three-dimensional voxel grid based on the association relationship, further includes: and carrying out one-dimensional code conversion on the grid numbers of the point cloud data in each three-dimensional voxel grid based on the number of threads in the threads.
With reference to the first aspect, in one possible implementation manner of the first aspect, grouping and stitching, based on each axial angle, each sampling point cloud through a thread pool to obtain a plurality of sets of sampling point clouds corresponding to the groups one to one, where the steps include: based on the number of threads in the thread pool, uniformly splitting sampling point clouds, and establishing a first corresponding relation between each thread and the sampling point clouds; dividing a corresponding sampling point cloud into a corresponding sector area in each thread based on the first corresponding relation of each axial angle; forming a group of sampling point clouds based on each sector area; based on the number of threads in the thread pool, uniformly splitting the groups, and establishing a second corresponding relation between each thread and the groups; and based on the second corresponding relation, respectively splicing the sampling point clouds in each group to obtain a plurality of sets of sampling point clouds corresponding to the groups one by one.
With reference to the first aspect, in a possible implementation manner of the first aspect, dividing, in each thread, a corresponding sampling point cloud into corresponding sector areas based on each axial angle and the first correspondence includes: determining a plurality of sector areas by rotation angle and horizontal angle resolution based on each axial angle; based on each axial angle, the corresponding sampling point cloud is divided into corresponding sector areas in each thread by a first correspondence.
With reference to the first aspect, in a possible implementation manner of the first aspect, calculating a gradient of each sampling point cloud in each set includes: determining the axial distance of each sampling point cloud in each set based on the sets; and traversing the sampling point clouds in each set in an ascending order based on the axial distance, and calculating the gradient of each sampling point cloud.
With reference to the first aspect, in a possible implementation manner of the first aspect, determining, based on the sets, an axial distance of each sampling point cloud in each set includes: based on the number of threads in the thread pool, respectively distributing different sets to the threads; and respectively calculating the axial distance of each sampling point cloud in the corresponding set in each thread.
With reference to the first aspect, in a possible implementation manner of the first aspect, based on the axial distance, traversing the sampling point clouds in each set in an ascending order, calculating a gradient of each sampling point cloud includes: traversing the sampling point clouds in each set in ascending order based on the axial distance; sequentially calculating the global gradient of each sampling point cloud after ascending; and calculating the relative gradient of each sampling point cloud after ascending in sequence.
With reference to the first aspect, in one possible implementation manner of the first aspect, adding a classification tag to the sampling point cloud, determining a ground segmentation situation of the point cloud data includes: based on each global gradient and each relative gradient, adding a classification label to the corresponding sampling point cloud; and determining the ground segmentation condition of the point cloud data belonging to the same three-dimensional voxel grid with the corresponding sampling point cloud based on the classification label.
In a second aspect, the present invention provides a ground segmentation optimization device based on voxel sampling, comprising: the acquisition module is used for acquiring point cloud data acquired by the laser radar; the sampling point cloud determining module is used for dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids and determining the sampling point cloud of each three-dimensional voxel grid; the axial angle calculation module is used for calculating the axial angle of each sampling point cloud; the grouping and splicing module is used for grouping and splicing each sampling point cloud through the thread pool based on each axial angle to obtain a plurality of sets of sampling point clouds corresponding to the groups one by one; the gradient calculation module is used for calculating the gradient of each sampling point cloud in each set; the segmentation module is used for adding classification labels to the sampling point cloud based on the gradient and determining the ground segmentation condition of the point cloud data.
In a third aspect, the present invention provides a computer device comprising: the system comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so as to execute the voxel sampling-based ground segmentation optimization method according to the first aspect or any corresponding implementation mode.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon computer instructions for causing a computer to perform the voxel sampling based ground segmentation optimization method of the first aspect or any of its corresponding embodiments.
The technical scheme of the invention has the following advantages:
according to the ground segmentation optimization method and device based on voxel sampling, laser radar point clouds are divided in the form of three-dimensional voxel grids, proper downsampling is carried out according to the size of a data sample, sampling point clouds of each three-dimensional voxel grid are obtained, axial angle information of the sampling point clouds is utilized for grouping the sampling point clouds, and finally the ground segmentation condition of point cloud data is determined by calculating gradient characteristics of each group of sampling point clouds. In the process, the point cloud data are divided into three-dimensional voxel grids, the sampling point cloud determined by each three-dimensional voxel grid is used for representing the point cloud data belonging to the same grid, the classification of the sampling point cloud is completed by using a mode of calculating an axial angle, the voxel grids have the functions of data sparsification and point cloud division, the multiplexing grid can avoid the time consumption caused by repeated reading and writing of the data, in addition, in the ground segmentation process, the thread pool is utilized, and the grouping, splicing, sequencing and classifying processes of the sampling point clouds are accelerated in parallel, so that the operation efficiency of the point cloud data is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic application view of a vehicle automatic driving system according to an embodiment of the present invention;
FIG. 2 is a flow chart of a method for optimizing ground segmentation based on voxel sampling according to an embodiment of the invention;
FIG. 3 is a schematic diagram providing angles in a voxel sampling based ground segmentation optimization method according to an embodiment of the invention;
FIG. 4 is a block diagram of a ground segmentation optimization device based on voxel sampling according to an embodiment of the present invention;
FIG. 5 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a computer-readable storage medium according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
The present embodiment provides an automatic driving system, as shown in fig. 1, the automatic driving system 10 includes: a ground segmentation unit 101 and an environment awareness unit 102. The ground segmentation unit 101 is used for segmenting a ground part and a non-ground part from point cloud data, so that the data processing process of the point cloud data acquired by the laser radar is completed, namely, the ground segmentation is completed, in the process, the ground segmentation unit 101 divides the laser radar point cloud data in a three-dimensional voxel grid mode, determines sampling point clouds of each three-dimensional voxel grid, calculates an axial angle through the sampling point clouds, groups and splices each sampling point cloud, and determines a set of the sampling point clouds, so that the ground segmentation condition of the point cloud data is determined by calculating gradients of the sampling point clouds in the set. The context awareness unit 102 is used to provide vehicle surrounding information to the vehicle for decision making by the autopilot system 10.
In accordance with an embodiment of the present invention, there is provided an embodiment of a voxel sampling based ground segmentation optimization method, it being noted that the steps illustrated in the flow chart of the figures may be performed in a computer system, such as a set of computer executable instructions, and, although a logical order is illustrated in the flow chart, in some cases, the steps illustrated or described may be performed in an order other than that illustrated herein.
In order to ensure the segmentation precision and the operation rate in the ground segmentation algorithm at the same time, the embodiment provides a ground segmentation optimization method based on voxel sampling, as shown in fig. 2, the method comprises the following steps:
s201, acquiring point cloud data acquired by a laser radar.
Specifically, acquiring point cloud data acquired by the laser radar refers to projecting the acquired point cloud data into a coordinate system of the vehicle, and determining three-dimensional coordinates corresponding to each point cloud data. Wherein, the origin of the coordinate system of the vehicle is the position corresponding to the laser radar, which is marked as the origin O, and the three-dimensional sitting mark corresponding to each point cloud data is marked as #x,y,z)。
S202, dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and determining the sampling point cloud of each three-dimensional voxel grid.
Specifically, based on the form of three-dimensional voxel grids, dividing the point cloud data into three-dimensional voxel grids, determining the sampling point cloud of each three-dimensional voxel grid means determining the smallest cuboid wrapping the point cloud data, dividing the smallest cuboid into uniform three-dimensional voxel grids, dividing the point cloud data into each three-dimensional voxel grid, and characterizing the point cloud data contained in the corresponding three-dimensional voxel grid with the determined sampling point cloud of each three-dimensional voxel grid.
S203, calculating the axial angle of each sampling point cloud.
Specifically, the axial angle of each sampling point cloud refers to the position of each sampling point cloudO-XShaft-YProjection of a plane formed by axesXThe included angle between the shafts, wherein the axial direction of the axial angle isZThe axial direction.
Specifically, the axial angle is represented by formula (1):
(1)
wherein,φthe axial angle is indicated as such,x i represent the firstiThe abscissa of the cloud of the individual sampling points,y i represent the firstiThe ordinate of the point cloud is sampled.
S204, grouping and splicing each sampling point cloud based on each axial angle through a thread pool to obtain at least one set of sampling point clouds corresponding to the grouping.
Specifically, based on each axial angle, grouping and splicing each sampling point cloud through a thread pool to obtain at least one set of sampling point clouds corresponding to grouping, namely uniformly splitting the sampling point clouds, grouping the adopted point clouds through threads in the thread pool in parallel through the determined axial angle, and splicing the sampling point clouds in each group through threads in the thread pool again after grouping to obtain at least one set of sampling point clouds corresponding to grouping.
S205, calculating the gradient of each sampling point cloud in each set.
Specifically, the slope of each sampling point cloud in each set includes the relative slope of each sampling point cloud and the global slope.
Specifically, calculating the gradient of each sampling point cloud in each set refers to calculating the relative gradient and the global gradient of each sampling point cloud by the axial distance of each sampling point cloud in each set.
S206, adding classification labels to the sampling point cloud based on the gradient, and determining the ground segmentation condition of the point cloud data.
Specifically, based on the gradient, a classification label is added to the sampling point cloud, and the ground segmentation condition of the point cloud data is determined by adding a classification label of the ground or the non-ground to each sampling point cloud through the calculated gradient and adding the same label to the point cloud data belonging to the same three-dimensional voxel grid with the sampling point cloud, so that the ground segmentation of the point cloud data is completed.
According to the ground segmentation optimization method based on voxel sampling, laser radar point cloud data are divided in the form of three-dimensional voxel grids, sampling point clouds of each three-dimensional voxel grid are determined, axial angles are calculated through the sampling point clouds, each sampling point cloud is grouped and spliced, a set of the sampling point clouds is determined, and therefore the ground segmentation condition of the point cloud data is determined through calculating gradients of the sampling point clouds in the set. In the process, the point cloud data are divided into a plurality of three-dimensional voxel grids, the sampling point cloud determined in each three-dimensional voxel grid is used for representing the point cloud data belonging to the same grid, and the classification of the sampling point cloud is completed by calculating an axial angle, namely by determining the projection of the sampling point cloud on a plane, so that the dividing and inserting process of grids is replaced by the voxel sampling mode, the problem of precision reduction caused by the classification of the point cloud is avoided, in the classifying process, the grouping and splicing process of the sampling point cloud is accelerated in parallel by utilizing a thread pool, and the computing efficiency of the point cloud data is improved.
To implement the process of mesh division and interpolation by voxel sampling, in an alternative embodiment, dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, determining a sampling point cloud of each three-dimensional voxel grid includes:
(1) Based on the form of the three-dimensional voxel grid, the point cloud data are divided into the three-dimensional voxel grid, and the association relation between each point cloud data and the three-dimensional voxel grid is established.
In an alternative embodiment, dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and establishing an association relationship between each point cloud data and the three-dimensional voxel grids, including:
(1-1) traversing the point cloud data based on the number of threads in the thread pool, determining a minimum cuboid wrapping the point cloud data.
In an alternative embodiment, to accelerate the process of searching for an outline cuboid, i.e. searching for a smallest cuboid of the wrapped point cloud data, traversing the point cloud data based on the number of threads in the thread pool, determining the smallest cuboid of the wrapped point cloud data includes:
and based on the number of threads in the thread pool, the point cloud data are evenly distributed.
Specifically, based on the number of threads in the thread pool, the point cloud data is uniformly divided into N parts, each part of point cloud data corresponds to one thread in the thread pool, the value of N is the number of threads in the thread pool, and may be the number of bus threads or the number of spare threads, which is not limited in particular, and may be selected according to the actual working condition.
And traversing the point cloud data in each thread, and determining the maximum value and the minimum value of the corresponding point cloud data.
Specifically, traversing the point cloud data in each thread, and determining the maximum value and the minimum value of the corresponding point cloud data refers to searching the local maximum value and the local minimum value of the three-dimensional coordinates for each group of point cloud data in each thread. Respectively marked asx r maxx r miny r maxy r minz r maxz r min WhereinnRepresent the firstrThe number of threads to be executed by a single thread,r=0,1,…,N-1。
and determining the vertex position and the side length of the minimum cuboid of the wrapping point cloud based on the maximum value and the minimum value corresponding to each thread.
Specifically, determining the vertex position and the side length of the smallest cuboid of the wrapping point cloud based on the maximum value and the minimum value corresponding to each thread includes:
and determining the vertex position of the minimum cuboid of the wrapping point cloud based on the maximum value and the minimum value corresponding to each thread.
Specifically, determining the vertex position of the smallest cuboid of the wrap point cloud based on the maximum value and the minimum value corresponding to each thread means determining by comparing the maximum value and the minimum value corresponding to each threadDetermining the maximum and minimum of the global three-dimensional coordinates, and recording asx maxx miny maxy minz maxz min . And determining the vertex position of the minimum cuboid of the wrapping point cloud through the maximum value and the minimum value of the global three-dimensional coordinates.
Specifically, comparing the maximum value and the minimum value corresponding to each thread, determining the maximum value and the minimum value of the global three-dimensional coordinate means that when each thread searches the local maximum value and the local minimum value of the three-dimensional coordinate, the task of the main thread is blocked, and the main thread is released after the global three-dimensional coordinate is determined, so that the task synchronization is achieved.
The global three-dimensional coordinates are expressed as:
x max =maxx r max );x min =minx r min );
y max =maxy r max );y min =miny r mi n);
z max =maxz r max );z min =minz r min )。
specifically, the vertex positions of the smallest cuboid of the wrapping point cloud are respectively marked as%x min ,y min ,z min )、
x min ,y min ,z max )、(x min ,y max ,z min )、(x min ,y max ,z max )、(x max ,y min ,z min )、
x max ,y min ,z max )、(x max ,y max ,z min )、(x max ,y max z max )。
And determining the side length of the minimum cuboid of the wrapping point cloud based on the maximum value and the minimum value of the global three-dimensional coordinates and a preset correction factor.
Specifically, the side lengths of the smallest cuboid of the wrapping point cloud are respectively recorded asabcThe side length can be expressed as:a=(x max -x min )+λb=(y max -y min )+λc=(z max -z min )+λwherein, the method comprises the steps of, wherein,λrepresenting the correction factor.
Specifically, determining the side length of the smallest cuboid of the wrapping point cloud based on the maximum value and the minimum value of the global three-dimensional coordinates and a preset correction factor refers to introducing the correction factor based on the determined maximum value and the determined minimum value of the global three-dimensional coordinates, and determining the side length of the smallest cuboid of the wrapping point cloud. The correction factors are used for properly expanding the smallest cuboid wrapping the point cloud, so that the point cloud data cannot appear on corners, edges and faces of the three-dimensional voxel grid. By introducing the correction factors, the origin of the coordinate system is located at the vertex of a certain voxel on the premise that the origin of the coordinate system is the corresponding position of the laser radar, so that the coordinates are integer, point cloud data are not appeared on the corners, edges and faces of the three-dimensional voxel grids, the operation difficulty of an algorithm can be reduced, because the points on the boundary are commonly owned by a plurality of adjacent grids and are specifically divided into which grids, the algorithm will be different, and therefore, the boundary problem can be avoided by introducing the correction factors.
(1-2) dividing the smallest cuboid into uniform three-dimensional voxel grids, and determining the size of each three-dimensional voxel grid.
Specifically, dividing the minimum cuboid into uniform three-dimensional voxel grids, and determining the size of each three-dimensional voxel grid refers to dividing the minimum cuboid into a plurality of three-dimensional voxel grids uniformly, and determining the size of each three-dimensional voxel grid according to actual requirements.
Specifically, determining the size of each three-dimensional voxel grid according to actual requirements refers to adjusting the size of each three-dimensional voxel grid through a sparsification factor. The size of each three-dimensional voxel grid is adjusted by a sparsification factor according to the volume of the smallest cuboidVAnd the number of point clouds of the point cloud dataqDetermining point cloud average densityρAnd by a sparsification factorβDetermining side lengths of a three-dimensional voxel gridL. Wherein,V=abcρ=q/Vthen the side length of the three-dimensional voxel grid is represented by equation (2):
(2)
it should be appreciated that each three-dimensional voxel grid behaves as a cube, since the three-dimensional voxel grid is a uniform division of the smallest cuboid, scaling the smallest cuboid by a three-fold of a fixed value corresponding to the sparsification factor will result in the number of three-dimensional voxel grids βThus, the volume of each three-dimensional voxel grid can be represented asβ*β*β*abc/qTherefore, the side length of the three-dimensional voxel grid can be obtained by cubic volume.
(1-3) dividing the point cloud data into each three-dimensional voxel grid.
In particular, the division of the point cloud data into each three-dimensional voxel grid means the division of the point cloud data intom*n*lIn a three-dimensional voxel grid, whereinmnlThe number of voxel grids included in three dimensions is represented.
In particular, the method comprises the steps of,mnlexpressed as:m=2*ceil(a/2L);n=2*ceil(b/2L);l=2*ceil(c/2L)。
wherein,ceil(f) Representing an upward rounding, representing not less thanfIs the largest integer of (a).
In particular, due to the smallest cuboidThe side lengths are respectively recorded asabcThe number of voxel grids in three dimensions is respectively recorded asmnlThe side length of the corresponding dimension and the number of voxel grids in the dimension are divided by 2 to ensure that the multiplication of 2 is the guaranteemnlIs an even numbermnlThe number of the scanning modes is even and has symmetry correlation with the scanning mode of the laser radar.
(1-4) determining an association of each point cloud data with each three-dimensional voxel grid based on the dimensions.
Specifically, determining the association relationship between each point cloud data and each three-dimensional voxel grid based on the size refers to determining the vertex coordinate position of the three-dimensional voxel grid and the grid number of the point cloud data.
Illustratively, the vertex coordinate positions of the three-dimensional voxel grid may be expressed as:
(k 1 L,k 2 L,k 3 L)、((k 1 +1)L,k 2 L,k 3 L)、(k 1 L,(k 2 +1)L,k 3 L)、
((k 1 +1)L,(k 2 +1)L,k 3 L)、(k 1 L,k 2 L,(k 3 +1)L)、((k 1 +1)L,k 2 L,(k 3 +1)L)、
(k 1 L,(k 2 +1)L,(k 3 +1)L)、((k 1 +1)L,(k 2 +1)L,(k 3 +1)L)。
wherein,k 1k 2k 3 belonging to integers and due to the symmetrical distribution of the laser radar scanning modek 1 ∈[-m/2,m/2),k 2 ∈[-n/2,m/2),k 3 ∈[-m/2,m/2)。
Specifically, since the correction factor λ is introduced so that the origin position is located at the vertices of the voxel grids, and the side length of each grid is L, the coordinates of each vertex of the three-dimensional voxel grid are integer multiples of the side length L, i.ek 1 Multiple times of,k 1 +1 times,k 2 Multiple, etc. Specifically, the point cloud data belongs to grid numbers to point cloud datap ix pi ,y pi ,z pi ) In the case of an example of this,p i the grid numbers belonging to the method are as follows:
m pi =ceil(x pi -x min )/Ln pi =ceil(y pi -y min )/Ll pi =ceil(z pi -z min )/L
by implementing the embodiment, the association relation between each point cloud data and the three-dimensional voxel grid is established, each voxel grid is represented in a coordinate mode, and the index of each voxel grid is determined, namely, the corresponding grid can be rapidly positioned according to the position of the point cloud data, so that the voxel grids can be multiplexed in the process of grouping and splicing the sampling point clouds, the data operand in the process of classifying the point clouds is reduced, and a data basis is provided for the subsequent grouping and splicing of the sampling point clouds. (2) Based on the association, a sampling point cloud of each three-dimensional voxel grid is determined.
In an alternative embodiment, determining a sampling point cloud for each three-dimensional voxel grid based on the association relationship includes:
Based on the association, a center of gravity of each three-dimensional voxel grid is determined.
Specifically, determining the centroid of each three-dimensional voxel grid based on the association relationship means determining the number of point cloud data to which each three-dimensional voxel grid is assigned, and determining the centroid of each three-dimensional voxel grid by the number.
Specifically, the barycentric coordinates of the three-dimensional voxel grid are represented by formulas (3), (4), (5):
(3)
(4)
(5)
wherein,grepresenting the quantity of point cloud data in a three-dimensional voxel grid, wherein the point cloud data is @x i ,y i ,z i ) Represent the firstiThe data of the point cloud and the barycentric coordinates are expressed as%X ct ,Y ct ,Z ct )。
In an alternative embodiment, after determining the center of gravity of each three-dimensional voxel grid based on the association relationship, the method further comprises: and performing one-dimensional code conversion on the grid codes of the point cloud data in each three-dimensional voxel grid based on the number of threads in the threads.
Specifically, the three-dimensional grid coding of the point cloud is regarded as%m pi ,n pi ,l pi ) For example, the corresponding codes are expressed as:V pt =m pi *n*l+n pi *l+l pi
specifically, based on the number of threads in the thread, performing one-dimensional code conversion on the grid code of the point cloud data in each three-dimensional voxel grid refers to uniformly dividing the point cloud data into N parts based on the number of threads in the thread pool, each part of point cloud data corresponds to one thread in the thread pool, the value of N is the number of threads in the thread pool, and the value of N can be the number of bus threads or the number of spare threads, which is not particularly limited in this embodiment and can be selected according to actual working conditions. Each thread performs one-dimensional transcoding in parallel. And the main thread task is blocked in the process of one-dimensional code conversion in parallel, and the main thread is released after the conversion is completed, so that the task synchronization is achieved.
And calculating the distance between the point cloud data and the center of gravity of each three-dimensional voxel grid.
Specifically, calculating the distance between the point cloud data and the center of gravity of each three-dimensional voxel grid refers to calculating the distance between the point cloud data and the center of gravity of each three-dimensional voxel grid, and three-dimensional codes are often required to be converted into one-dimensional codes for transmission in consideration of the communication requirements among calculation modules.
Based on the distances, a sampling point cloud for each three-dimensional voxel grid is determined.
Specifically, determining the sampling point cloud of each three-dimensional voxel grid based on the distance refers to selecting the point cloud data closest to the center of gravity in each three-dimensional voxel grid as the sampling point cloud of the corresponding three-dimensional voxel grid, and representing the point cloud data in the corresponding three-dimensional voxel grid by using the sampling point cloud. The sampling point cloud is selected in the mode, because the gravity center is not necessarily the data in the point cloud data, the direct selection of the gravity center as the sampling point can destroy the statistical framework of the point cloud data, and the sampling point cloud belongs to indirect sampling, so that the point cloud data closest to the gravity center is selected as the sampling point cloud of the corresponding three-dimensional voxel grid.
According to the embodiment, the point cloud data are divided into a plurality of three-dimensional voxel grids, the sampling point cloud determined in each three-dimensional voxel grid is used for representing the point cloud data belonging to the same grid, and the grid position corresponding to each point cloud data is positioned by utilizing the index relation between the point cloud data and the voxel grids, so that a data basis is provided for repeated reading of the avoidance data of the subsequent multiplexing voxel grids and parallel acceleration of grouping and splicing of the sampling point clouds by utilizing a thread pool.
In order to implement the grouping and splicing process of parallel acceleration sampling point clouds, in an optional implementation manner, based on each axial angle, grouping and splicing each sampling point cloud through a thread pool to obtain a plurality of sets of sampling point clouds corresponding to the groups one by one, including:
based on the number of threads in the thread pool, the sampling point cloud is evenly split, and a first corresponding relation between each thread and the sampling point cloud is established.
Specifically, the first correspondence refers to a correspondence between sampling point clouds and threads, i.e., a correspondence between which sampling point clouds are allocated to which threads. Based on the number of threads in the thread pool, the uniform splitting of the sampling point cloud refers to uniformly dividing the sampling point cloud into N parts, wherein each part of sampling point cloud corresponds to one thread in the thread pool, the value of N is the number of threads in the thread pool, and can be the number of bus threads or the number of spare threads, and the embodiment is not particularly limited in this respect and can be selected according to actual working conditions. Each thread and row divides the sampling point cloud into at least one sector. And the main thread task is blocked in the parallel execution process, and the main thread is released after the conversion is completed, so that the task synchronization is achieved.
Dividing a corresponding sampling point cloud into a corresponding sector area in each thread based on the first corresponding relation of each axial angle;
in an alternative embodiment, dividing the corresponding sampling point cloud into the corresponding sector area in each thread based on each axial angle and the first correspondence includes:
based on each axial angle, a plurality of sector areas are determined by the rotation angle and the horizontal angle resolution.
Specifically, determining at least one sector area by the rotation angle and the horizontal angle resolution based on each axial angle means determining the number of sector areas, which is denoted as m, according to the rotation angle and the horizontal angle resolution such that each determined axial angle has a corresponding sector area, i.e. is the same in the value of the angle.
Specifically, the calculation manner of the axial angle refers to the formula (1) in the above embodiment, and will not be described in detail. The rotation angle and the horizontal angle resolution are the inherent properties of the lidar, namely the rotation angle of the lidar and the horizontal angle resolution of the lidar, respectively. The horizontal angle resolution corresponds to how many degrees a laser generator of the laser radar rotates to emit a beam of rays, generally, the horizontal angle resolution is 1 degree, m is 360 degrees, and when the horizontal angle resolution is 1 degree, 360 rays are emitted in a circle, and one laser is emitted in each rotation angle. It should be understood that the selection of m may be set according to the actual working condition, which is not specifically limited in this embodiment. It should be understood that the number of the devices,
Based on each axial angle, the corresponding sampling point cloud is divided into corresponding sector areas in each thread by a first correspondence.
Specifically, based on each axial angle, dividing the corresponding sampling point cloud into at least one sector area in each thread through the first corresponding relation refers to traversing each sampling point cloud, and distributing the sampling point cloud to different threads for parallel processing in the first corresponding relation in a mode of calculating the axial angle, so that different point cloud data are classified into m different sector areas.
Based on each sector area, a grouping of the sampling point clouds is formed.
Specifically, based on each sector area, the grouping of the sampling point clouds means that the number of the sector areas and the angle value corresponding to each sector area are determined through the rotation angle and the horizontal angle resolution, so that the grouping of the sampling point clouds is realized according to the calculated angle of each sampling point cloud and the angle value corresponding to each sector area.
Specifically, the grouping process of forming the sampling point cloud is described by pseudo code as follows:
the variable std is established to be vector<PointCloudRefVector>&radial_ordered_points[i]Storing a sampling point cloudiIs used for the slice information of the slice,i∊[0,N-1]wherein PointCloudRefvector ispclStandard point cloud objects. Extending the variable first dimension to mI.e. radial_ordered_points [ i ]]Resize (m) before sampling point cloudiIs classified into sector areasjPointCloudRefVector pc are inserted one by one into the variable radial_ordered_points i]Corresponding to (a)In dimension j, namely radial_ordered_points [ i ]][j].emplace_back(pc), j ∊ [0, m-1]. And after all the sampling point cloud insertion threads are finished, namely after the grouping process of the sampling point cloud is finished, releasing the main thread.
Based on the number of threads in the thread pool, the grouping is evenly split, and a second corresponding relation between each thread and the grouping is established.
Specifically, the second correspondence refers to a correspondence between a packet and a thread, i.e., a correspondence of which group is assigned to that thread. That is, based on the number of threads in the thread pool, each packet is uniformly divided into N parts, and the multiple packets in each part correspond to one thread in the thread pool, where the value of N is the number of threads in the thread pool, which may be the number of bus threads or the number of spare threads, and this embodiment is not specifically limited, and may be selected according to the actual working condition. And each thread performs the splicing of the sampling point clouds in parallel. And the main thread task is blocked in the parallel execution process, and the main thread is released after the conversion is completed, so that the task synchronization is achieved.
And based on the second corresponding relation, respectively splicing the sampling point clouds in each group to obtain a plurality of sets of sampling point clouds corresponding to the groups one by one.
Specifically, based on the second correspondence, the sampling point clouds in each group are respectively spliced, and the acquisition of a plurality of sets of sampling point clouds corresponding to the groups one by one refers to a process of splicing the sampling point clouds distributed to the same group, and determining which groups are spliced by which threads through the second correspondence. The set of sampling point clouds corresponding to the group refers to a set of sampling point clouds formed by stitching point clouds within the same group.
Specifically, the splicing process of the sampling point cloud is described as follows by pseudo codes:
and splicing the sampling point clouds in each sector area. Distributing threads for splicing operation of each fan-shaped dimension from a thread pool to realize parallel acceleration; when the splicing task is carried out, the main thread is blocked to realize task synchronization; and after the splicing task is completed, releasing the main thread. Specifically, all radial_ordered_points [ i ]][j](i= 0,N-1 isCorresponding sample point cloud numbering) in the dimensionjSplicing to obtain the integral sampling point cloud std::: vector<PointCloudRefVector>&Sector packet of radial_ordered_points_all jInformation of (a), i.e.)
for (auto i = 0; i<N; i++) {
radial_ordered_points_all[j].insert(radial_ordered_points_all[j].end(),
radial_ordered_points[i][j].begin(), radial_ordered_points[i][j].end())
}
Creation from thread poolNA single thread for processing ceil [ (m-1)/N]* k to ceil [ (m-1)/N ]]* A concatenation of (k+1) dimensions, wherein,kn/(m-1), i.e. the first thread processes 0 to ceil [ (m-1)/N]Stitching of the dimensions, the second thread handles ceil [ (m-1)/N [ to 2 x ceil [ (m-1)/N)]And splicing the dimensions, and so on, and finally obtaining m groups of the complete sampling point cloud radial_ordered_points_all. When the splicing task is carried out, the main thread is blocked to realize task synchronization; and after the splicing task is finished, the main thread is released after the splicing process of the sampling point cloud is finished.
By implementing the embodiment, grouping and parallel acceleration of sampling point clouds are realized through a thread pool and a sector area determined through a rotation angle and a horizontal angle resolution, sampling point clouds in each group are spliced, and a set of sampling point clouds corresponding to the grouping is determined through parallel acceleration, so that the grouping and splicing processes of the sampling point clouds are accelerated in parallel by utilizing the thread pool in the classifying process, and the multiplexing grid further avoids time loss caused by repeated reading and writing of data in the classifying process due to the fact that the voxel grid has the function of dividing the point clouds, thereby improving the operation efficiency of the point cloud data and providing a data base for the ground dividing condition of the follow-up determined point cloud data.
In order to determine the ground segmentation condition of the point cloud data while ensuring segmentation accuracy and operation efficiency, in an alternative embodiment, calculating the gradient of each sampling point cloud in each set includes:
based on the sets, an axial distance of each sampling point cloud in each set is determined.
Specifically, the axial distance is represented by formula (6):
(6)
wherein,drepresenting the axial distance.
In an alternative embodiment, determining the axial distance of each sampling point cloud in each set based on the set includes:
different sets are assigned to threads, respectively, based on the number of threads in the thread pool.
Specifically, assigning different sets to threads based on the number of threads in a thread pool refers to creating from the thread poolNA single thread corresponding to ceil [ (m-1)/N ]]* k to ceil [ (m-1)/N ]]* (k+1) dimensions, wherein,kn/(m-1), i.e. the first thread corresponds to 0 to ceil [ (m-1)/N]The second thread corresponds to ceil [ (m-1)/N [ to 2 x ceil [ (m-1)/N)]Dimensions, and so on.
And respectively calculating the axial distance of each sampling point cloud in the corresponding set in each thread.
And traversing the sampling point clouds in each set in an ascending order based on the axial distance, and calculating the gradient of each sampling point cloud.
In an alternative embodiment, based on the axial distance, traversing the sampling point clouds in each set in an ascending order, calculating a slope of each sampling point cloud, comprising:
based on the axial distance, the sampling point clouds in each set are traversed in ascending order.
Specifically, the sampling point clouds in each set are arranged in ascending order by axial distance, and the point with the smallest axial distance is selected as a starting point and recorded as a starting point because the periphery of a common vehicle does not have an obstacle when the vehicle starts on a roadp' 0 (x 0 ,y 0 ,z 0 ) Traversing the sampling point clouds from small to large according to the axial distance, wherein the relative gradient of each sampling point cloud refers to the sampling point cloud relative to the previous sampling point cloudThe relative gradient of the sample point cloud. For the firstiCloud of sampling pointsp' i (x i ,y i ,z i ) First, thei-1 sample point cloudp' i-1 (x i-1 ,y i-1 ,z i-1 ) The order in ascending order is:p' 0 、…、p' i-1p' i …。
and calculating the global gradient of each sampling point cloud after ascending in sequence.
Specifically, the global gradient of the sampling point cloud is represented by formula (7):
(7)
wherein cosθRepresenting the global grade.
And calculating the relative gradient of each sampling point cloud after ascending in sequence.
Specifically, the relative gradient of the sampling point cloud is expressed by formula (8):
(8)
wherein cosαIndicating the relative grade.
In particular, with respect to the angle corresponding to the global gradient θAngle corresponding to relative gradientαAs shown in fig. 3, it should be understood that,p 0 the point cloud with the smallest axial distance in the corresponding set is also the origin of the coordinate system.
In an alternative embodiment, adding a classification tag to the sampling point cloud to determine a ground segmentation condition of the point cloud data includes:
and adding classification labels to the corresponding sampling point clouds based on each global gradient and each relative gradient.
Specifically, adding a classification label to the corresponding sampling point cloud based on each global gradient and each relative gradient refers to adding a classification label to the corresponding sampling point cloud through a comparison relationship between each global gradient and a global gradient threshold and a comparison relationship between each relative gradient and a relative gradient threshold. And taking the point with the smallest axial distance as a starting point, and adding a ground label to the starting point.
Specifically, for the firstiCloud of sampling pointsp' i (x i ,y i ,z i ) First, thei-1 sample point cloudp' i-1 (x i-1 ,y i-1 ,z i-1 ) The relative gradient threshold is recorded asδ local The global grade threshold is noted asδ all
If cos isα>=δ local Will thenp' i Impartingp' i-1 If the label of (3)p' i-1 The tag of (2) is the ground,p' i is marked as ground, otherwisep' i Is non-ground.
If cos isα<δ local Judging cosθ>=δ all If true thenp' i Is marked as ground, otherwise p' i Is non-ground.
In particular, the method comprises the steps of,δ all andδ local 0.996195 and 0.990268 may be set, respectively, and this embodiment is not particularly limited, and may be set according to actual conditions.
And determining the ground segmentation condition of the point cloud data belonging to the same three-dimensional voxel grid with the corresponding sampling point cloud based on the classification label.
Specifically, determining the ground segmentation condition of the point cloud data belonging to the same three-dimensional voxel grid as the corresponding sampling point cloud based on the classification label refers to taking the determined label of the sampling point cloud as the label of the point cloud data belonging to the same three-dimensional voxel grid, so that the label classification of all the point cloud data is completed, namely, the ground segmentation condition of the point cloud data is determined.
According to the embodiment, laser radar point cloud data are divided in a three-dimensional voxel grid mode, sampling point clouds of each three-dimensional voxel grid are determined, an axial angle is calculated through the sampling point clouds, each sampling point cloud is grouped and spliced, a set of the sampling point clouds is determined, and therefore the ground segmentation condition of the point cloud data is determined through calculating the relative gradient and the absolute gradient of the sampling point clouds in the set. In the process, the point cloud data are divided into a plurality of three-dimensional voxel grids, the sampling point cloud determined in each three-dimensional voxel grid is used for representing the point cloud data belonging to the same grid, and the axial angle is calculated, namely, the classification of the sampling point cloud is finished in a plane projection mode by determining the sampling point cloud.
In this embodiment, a ground segmentation optimization device based on voxel sampling is further provided, and the device is used to implement the foregoing embodiments and preferred implementation manners, which are not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The present embodiment provides a ground segmentation optimization device based on voxel sampling, as shown in fig. 4, the device includes:
the acquisition module 401 is configured to acquire point cloud data acquired by the laser radar. The specific process may be referred to the related description of step S201 in the above embodiment, and will not be repeated here.
The sampling point cloud determining module 402 is configured to divide the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and determine a sampling point cloud of each three-dimensional voxel grid. The specific process may be referred to the related description of step S202 in the above embodiment, and will not be repeated here.
An axial angle calculation module 403, configured to calculate an axial angle of each sampling point cloud. The specific process may be referred to the related description of step S203 in the above embodiment, and will not be repeated here.
The grouping and splicing module 404 is configured to group and splice each sampling point cloud through the thread pool based on each axial angle, so as to obtain at least one set of sampling point clouds corresponding to the grouping. The specific process may be referred to the related description of step S204 in the above embodiment, and will not be repeated here.
A gradient calculation module 405, configured to calculate a gradient of each sampling point cloud in each set. The specific process may be referred to the related description of step S205 in the above embodiment, and will not be repeated here.
The segmentation module 406 is configured to add a classification tag to the sampling point cloud based on the gradient, and determine a ground segmentation condition of the point cloud data. The specific process may be referred to the related description of step S206 in the above embodiment, and will not be repeated here.
The voxel sampling based ground segmentation optimization apparatus in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit ) circuit, a processor and a memory executing one or more software or fixed programs, and/or other devices that may provide the above functions.
The embodiment of the invention also provides computer equipment, which is provided with the ground segmentation optimization device based on voxel sampling shown in the figure 4.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 5, the computer device includes: one or more processors 501, memory 502, and interfaces for connecting components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 501 is illustrated in fig. 5.
The processor 501 may be a central processor, a network processor, or a combination thereof. The processor 501 may further include a hardware chip, among others. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 502 stores instructions executable by the at least one processor 501 to cause the at least one processor 501 to perform the methods illustrated by implementing the above embodiments.
Memory 502 may include a storage program area that may store an operating system, at least one application program required for functionality, and a storage data area; the storage data area may store data created according to the use of the computer device, etc. In addition, memory 502 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 502 optionally includes memory located remotely from processor 501, which may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
Memory 502 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; memory 502 may also include a combination of the types of memory described above. The computer device also includes a communication interface 503 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code, which when accessed and executed by the computer, processor or hardware, as shown in fig. 6, further provides a computer readable storage medium 601, the computer readable storage medium 601 storing computer instructions 6011, the computer instructions 6011 when executed by the processor, implementing the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (15)

1. A voxel sampling-based ground segmentation optimization method, the method comprising:
acquiring point cloud data acquired by a laser radar;
dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and determining the sampling point cloud of each three-dimensional voxel grid;
calculating the axial angle of each sampling point cloud;
grouping and splicing each sampling point cloud through a thread pool based on each axial angle to obtain a plurality of sets of sampling point clouds corresponding to the groups one by one;
calculating the gradient of each sampling point cloud in each set;
and adding a classification label to the sampling point cloud based on the gradient, and determining the ground segmentation condition of the point cloud data.
2. The method of claim 1, wherein the dividing the point cloud data into the three-dimensional voxel grids based on the form of the three-dimensional voxel grids, determining a sampling point cloud for each of the three-dimensional voxel grids, comprises:
Dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and establishing an association relation between each point cloud data and the three-dimensional voxel grids;
and determining the sampling point cloud of each three-dimensional voxel grid based on the association relation.
3. The method according to claim 2, wherein the dividing the point cloud data into the three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and establishing an association relationship between each point cloud data and the three-dimensional voxel grids, includes:
traversing the point cloud data based on the number of threads in a thread pool, and determining a minimum cuboid wrapping the point cloud data;
dividing the minimum cuboid into uniform three-dimensional voxel grids, and determining the size of each three-dimensional voxel grid;
dividing the point cloud data into each of the three-dimensional voxel grids;
and determining the association relation between each point cloud data and each three-dimensional voxel grid based on the size.
4. The method of claim 3, wherein traversing the point cloud data based on the number of threads in the thread pool, determining a minimum cuboid wrapping the point cloud data, comprises:
Equally dividing the point cloud data based on the number of threads in a thread pool;
traversing the point cloud data in each thread, and determining the maximum value and the minimum value of the corresponding point cloud data;
and determining the vertex position and the side length of the minimum cuboid of the wrapping point cloud based on the maximum value and the minimum value corresponding to each thread.
5. The method of claim 2, wherein the determining a sampling point cloud for each of the three-dimensional voxel grids based on the association comprises:
determining the gravity center of each three-dimensional voxel grid based on the association relation;
calculating the distance between the point cloud data and the center of gravity of each three-dimensional voxel grid;
and determining a sampling point cloud of each three-dimensional voxel grid based on the distance.
6. The method of claim 5, wherein the association relationship comprises: grid numbering of the point cloud data, after determining a center of gravity of each of the three-dimensional voxel grids based on the association relationship, further includes: and performing one-dimensional code conversion on the grid codes of the point cloud data in each three-dimensional voxel grid based on the number of threads in the threads.
7. The method according to claim 1, wherein grouping and stitching each of the sampling point clouds by a thread pool based on each of the axial angles to obtain a plurality of sets of the sampling point clouds in one-to-one correspondence with the groups comprises:
Based on the number of threads in a thread pool, uniformly splitting the sampling point cloud, and establishing a first corresponding relation between each thread and the sampling point cloud;
dividing the corresponding sampling point cloud into corresponding sector areas in each thread based on the first corresponding relation between each axial angle and the first corresponding relation;
forming a group of sampling point clouds based on each sector area;
based on the number of threads in a thread pool, uniformly splitting the groups, and establishing a second corresponding relation between each thread and each group;
and based on the second corresponding relation, respectively splicing the sampling point clouds in each group to obtain a plurality of sets of the sampling point clouds corresponding to the groups one by one.
8. The method of claim 7, wherein the partitioning the corresponding sample point cloud into the corresponding sector in each of the threads based on each of the axial angles and the first correspondence comprises:
determining a plurality of sector areas by rotation angle and horizontal angle resolution based on each of the axial angles;
based on each axial angle, the corresponding sampling point cloud is divided into corresponding sector areas in each thread through a first corresponding relation.
9. The method of claim 1, wherein said calculating a slope of each of said sample point clouds in each of said sets comprises:
determining an axial distance of each sampling point cloud in each set based on the set;
and traversing the sampling point clouds in each set in an ascending order based on the axial distance, and calculating the gradient of each sampling point cloud.
10. The method of claim 9, wherein the determining an axial distance of each of the sampling point clouds in each of the sets based on the sets comprises:
respectively distributing different sets to threads based on the number of threads in a thread pool;
and respectively calculating the axial distance of each sampling point cloud in the corresponding set in each thread.
11. The method of claim 9, wherein the computing a slope of each of the sampling point clouds by traversing the sampling point clouds in each of the sets in ascending order based on the axial distance comprises:
traversing the sampling point clouds in each of the sets in ascending order based on the axial distance;
sequentially calculating the global gradient of each sampling point cloud after ascending;
And calculating the relative gradient of each sampling point cloud after ascending in sequence.
12. The method of claim 11, wherein the adding a classification tag to the sampled point cloud to determine a ground split of the point cloud data comprises:
adding classification labels to the corresponding sampling point clouds based on each global gradient and each relative gradient;
and determining the ground segmentation condition of the point cloud data belonging to the same three-dimensional voxel grid with the corresponding sampling point cloud based on the classification label.
13. A voxel sampling based ground segmentation optimization device, the device comprising:
the acquisition module is used for acquiring point cloud data acquired by the laser radar;
the sampling point cloud determining module is used for dividing the point cloud data into three-dimensional voxel grids based on the form of the three-dimensional voxel grids, and determining the sampling point cloud of each three-dimensional voxel grid;
the axial angle calculation module is used for calculating the axial angle of each sampling point cloud;
the grouping and splicing module is used for grouping and splicing each sampling point cloud through a thread pool based on each axial angle to obtain a plurality of sets of sampling point clouds which are in one-to-one correspondence with the grouping;
The gradient calculation module is used for calculating the gradient of each sampling point cloud in each set;
and the segmentation module is used for adding classification labels to the sampling point cloud based on the gradient and determining the ground segmentation condition of the point cloud data.
14. A computer device, comprising:
a memory and a processor communicatively coupled to each other, the memory having stored therein computer instructions that, upon execution, perform the voxel sampling based ground segmentation optimization method of any one of claims 1-12.
15. A computer-readable storage medium having stored thereon computer instructions for causing a computer to perform the voxel sampling based ground segmentation optimization method of any one of claims 1-12.
CN202311810539.9A 2023-12-26 2023-12-26 Ground segmentation optimization method and device based on voxel sampling Active CN117475398B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311810539.9A CN117475398B (en) 2023-12-26 2023-12-26 Ground segmentation optimization method and device based on voxel sampling

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311810539.9A CN117475398B (en) 2023-12-26 2023-12-26 Ground segmentation optimization method and device based on voxel sampling

Publications (2)

Publication Number Publication Date
CN117475398A CN117475398A (en) 2024-01-30
CN117475398B true CN117475398B (en) 2024-02-23

Family

ID=89629687

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311810539.9A Active CN117475398B (en) 2023-12-26 2023-12-26 Ground segmentation optimization method and device based on voxel sampling

Country Status (1)

Country Link
CN (1) CN117475398B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111999741A (en) * 2020-01-17 2020-11-27 青岛慧拓智能机器有限公司 Method and device for detecting roadside laser radar target
WO2022126380A1 (en) * 2020-12-15 2022-06-23 深圳市大疆创新科技有限公司 Three-dimensional point cloud segmentation method and apparatus, and movable platform
CN117237913A (en) * 2023-09-11 2023-12-15 理工雷科智途(北京)科技有限公司 Multi-laser radar obstacle recognition method
CN117289296A (en) * 2023-08-08 2023-12-26 华能伊敏煤电有限责任公司 Mining area counter slope detection method and system based on laser radar

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111999741A (en) * 2020-01-17 2020-11-27 青岛慧拓智能机器有限公司 Method and device for detecting roadside laser radar target
WO2022126380A1 (en) * 2020-12-15 2022-06-23 深圳市大疆创新科技有限公司 Three-dimensional point cloud segmentation method and apparatus, and movable platform
CN117289296A (en) * 2023-08-08 2023-12-26 华能伊敏煤电有限责任公司 Mining area counter slope detection method and system based on laser radar
CN117237913A (en) * 2023-09-11 2023-12-15 理工雷科智途(北京)科技有限公司 Multi-laser radar obstacle recognition method

Also Published As

Publication number Publication date
CN117475398A (en) 2024-01-30

Similar Documents

Publication Publication Date Title
CN108648269B (en) Method and system for singulating three-dimensional building models
CN113178014B (en) Scene model rendering method and device, electronic equipment and storage medium
US7940279B2 (en) System and method for rendering of texel imagery
US7499053B2 (en) Real-time precision ray tracing
CN110533778B (en) Large-scale image point cloud parallel distributed gridding reconstruction method, system and device
US7088358B2 (en) Collision detection method for deformable objects in a scene
CN106558092B (en) Multi-light-source scene accelerated drawing method based on scene multidirectional voxelization
CN110097582B (en) Point cloud optimal registration and real-time display system and working method
CN113761999A (en) Target detection method and device, electronic equipment and storage medium
CN115661374B (en) Rapid retrieval method based on space division and model voxelization
CA2609283A1 (en) Real-time precision ray tracing
CN115098717A (en) Three-dimensional model retrieval method and device, electronic equipment and storage medium
CN115100616A (en) Point cloud target detection method and device, electronic equipment and storage medium
CN107993242B (en) Method for extracting boundary of missing area based on airborne LiDAR point cloud data
CN117475398B (en) Ground segmentation optimization method and device based on voxel sampling
CN116310060B (en) Method, device, equipment and storage medium for rendering data
CN113345072A (en) Multi-view remote sensing topographic image point cloud reconstruction method and system
Namouchi et al. Piecewise horizontal 3d roof reconstruction from aerial lidar
CN115272248A (en) Intelligent detection method for fan attitude and electronic equipment
CN111145085B (en) Method for sorting primitives and method, system, device and medium for model rasterization
KR20180046909A (en) Method for processing 3-dimensional data
CN117807154B (en) Time sequence data visualization method, device and medium for display system
CN112802117B (en) Laser radar and camera calibration parameter blind restoration method
CN113177984B (en) Semantic element distance measurement method and device based on sparse direct method and electronic equipment
CN116152389B (en) Visual angle selection and texture alignment method for texture mapping and related equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant