CN116543129A - Highway cross section ground line parallel generation algorithm based on laser point cloud - Google Patents
Highway cross section ground line parallel generation algorithm based on laser point cloud Download PDFInfo
- Publication number
- CN116543129A CN116543129A CN202310522299.6A CN202310522299A CN116543129A CN 116543129 A CN116543129 A CN 116543129A CN 202310522299 A CN202310522299 A CN 202310522299A CN 116543129 A CN116543129 A CN 116543129A
- Authority
- CN
- China
- Prior art keywords
- section
- laser point
- point cloud
- laser
- coordinates
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 claims abstract description 26
- 238000012545 processing Methods 0.000 claims abstract description 16
- 238000005516 engineering process Methods 0.000 claims abstract description 11
- 238000007781 pre-processing Methods 0.000 claims abstract description 4
- 230000011218 segmentation Effects 0.000 claims abstract description 3
- 238000004364 calculation method Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 9
- 238000013519 translation Methods 0.000 claims description 6
- 230000000903 blocking effect Effects 0.000 claims description 4
- 230000008569 process Effects 0.000 claims description 4
- 238000003860 storage Methods 0.000 claims description 4
- 238000010276 construction Methods 0.000 claims description 3
- 230000001360 synchronised effect Effects 0.000 claims description 2
- 238000002360 preparation method Methods 0.000 description 3
- 238000013461 design Methods 0.000 description 2
- 238000005259 measurement Methods 0.000 description 2
- 230000008520 organization Effects 0.000 description 2
- 238000005192 partition Methods 0.000 description 2
- HPTJABJPZMULFH-UHFFFAOYSA-N 12-[(Cyclohexylcarbamoyl)amino]dodecanoic acid Chemical compound OC(=O)CCCCCCCCCCCNC(=O)NC1CCCCC1 HPTJABJPZMULFH-UHFFFAOYSA-N 0.000 description 1
- 238000013459 approach Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000009440 infrastructure construction Methods 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012805 post-processing Methods 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/20—Finite element generation, e.g. wire-frame surface description, tesselation
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01S—RADIO DIRECTION-FINDING; RADIO NAVIGATION; DETERMINING DISTANCE OR VELOCITY BY USE OF RADIO WAVES; LOCATING OR PRESENCE-DETECTING BY USE OF THE REFLECTION OR RERADIATION OF RADIO WAVES; ANALOGOUS ARRANGEMENTS USING OTHER WAVES
- G01S7/00—Details of systems according to groups G01S13/00, G01S15/00, G01S17/00
- G01S7/48—Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00
- G01S7/4802—Details of systems according to groups G01S13/00, G01S15/00, G01S17/00 of systems according to group G01S17/00 using analysis of echo signal for target characterisation; Target signature; Target cross-section
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T17/00—Three dimensional [3D] modelling, e.g. data description of 3D objects
- G06T17/05—Geographic models
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10028—Range image; Depth image; 3D point clouds
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02A—TECHNOLOGIES FOR ADAPTATION TO CLIMATE CHANGE
- Y02A90/00—Technologies having an indirect contribution to adaptation to climate change
- Y02A90/10—Information and communication technologies [ICT] supporting adaptation to climate change, e.g. for weather forecasting or climate simulation
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Geometry (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Computer Graphics (AREA)
- Remote Sensing (AREA)
- Computer Networks & Wireless Communication (AREA)
- Radar, Positioning & Navigation (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
Abstract
The invention discloses a road cross section ground line parallel generation algorithm based on laser point cloud, which comprises the following steps: step 1, data preprocessing: the method comprises the steps of reading pile files in a section, generating the section, and calculating the section-associated laser point cloud blocks; step 2, parallel generation of laser point cloud slices of the road section: realizing unlimited processing of the laser point cloud through Grid-Stride circulation, and realizing segmentation processing of the laser point cloud data by adopting a width-first multi-stream technology; step 3, generating a highway section ground line based on triangular net interpolation: and selecting ground points to construct a Delauney triangular network for the laser point cloud corresponding to each section, determining the position of a plane to be interpolated according to an equidistant method, positioning the triangle where the plane to be interpolated is positioned, and calculating the elevation coordinate of the plane to be interpolated by using a linear interpolation algorithm to realize the generation of the ground line of the section of the highway. The algorithm of the invention is not limited by the number of stimulated light point clouds and sections, and compared with the traditional method, the efficiency is improved by more than 10 times, and the algorithm has remarkable engineering application value.
Description
Technical Field
The invention belongs to the field of highway survey design, and particularly relates to a highway cross section land line parallel generation algorithm based on laser point cloud, which can realize rapid parallel generation of a highway cross section land line in a large area.
Background
The laser radar measurement technology (LiDAR) integrates a high-precision three-dimensional laser scanner, a positioning and attitude-determining system and a high-definition digital camera, and realizes active measurement on a real environment through laser ranging. Compared with other traditional measuring means, the method has the advantages of high automation degree, small weather influence, short data production period, high data precision and the like, can quickly and completely acquire high-precision three-dimensional space coordinate information and texture information in a large area, and is an important data source for infrastructure construction engineering application.
The acquisition of road section information by using laser point clouds is becoming the dominant approach. Firstly, a regular grid digital elevation model DEM is generated by laser point cloud, then section surface line information is extracted by the DEM, and the method has the advantages of small data size, high efficiency, simplicity in operation and the like, but in the process of converting the laser point cloud into the DEM, precision loss exists, and full information is enriched by the laser point cloud. The second way is to directly use the laser point cloud to generate the road cross section ground line, such as "a method for generating road design surface information by laser radar scanning" in patent technology (patent number: zl 20110300875. X). However, the "mass" of the laser point cloud presents great difficulties for post-processing of the point cloud data. When the number of sections to be generated is large, the current method for generating section ground lines by directly utilizing the laser point clouds tends to be low in efficiency when the number of engineering laser point clouds is large.
The current road cross section land line generation algorithm based on laser point cloud is mainly based on a CPU, and faces to the road cross section task of large data volume in practical engineering application and laser point cloud data, and has the problems of low cross section land line generation efficiency and the like.
Disclosure of Invention
In order to solve the technical problems in the prior art, the invention aims to provide a road cross section ground line parallel generation algorithm based on laser point cloud, which is based on CUDA architecture, adopts scientific and reasonable thread organization strategy, storage access strategy and work scheduling strategy, and comprehensively utilizes Grid-Stride circulation and flow technology to realize the rapid generation of the road cross section ground line without data volume limitation.
In order to achieve the above purpose, the present invention adopts the following technical measures:
a highway cross section ground line parallel generation algorithm based on laser point cloud comprises the following steps:
step 1, data preprocessing: the method mainly relates to preparation work before section ground line generation, and comprises section middle pile file reading, section generation, section associated laser point cloud block calculation and the like;
step 2, parallel generation of laser point cloud slices of the road section: realizing unlimited processing of the laser point cloud through Grid-Stride circulation, and realizing segmentation processing of the laser point cloud data by adopting a width-first multi-stream technology;
step 3, generating a highway section ground line based on triangular net interpolation: and selecting ground points to construct a Delauney triangular network for the laser point cloud corresponding to each section, determining the position of a plane to be interpolated according to an equidistant method, positioning the triangle where the plane to be interpolated is positioned, and calculating the elevation coordinate of the plane to be interpolated by using a linear interpolation algorithm to realize the generation of the ground line of the section of the highway.
Optionally, the step 1 interrupts pile file reading and section generation in the surface, specifically:
reading pile coordinate files in the section, generating a section information list according to the designated section width, representing the section information list by section_cpu, and storing coordinates of left and right endpoints of the section, section linear equation parameters and section length information;
assuming that n sections exist in the read section center pile file, the section center pile coordinates are (x 1 ,y 1 )、(x 2 ,y 2 )、……、(x n ,y n );
Calculating the route advancing direction of each section by utilizing the middle pile coordinates of the section and the middle pile coordinates of the next section, wherein the route advancing method of the last section is directly taken as the advancing direction of the last-last section;
the coordinates of the i-th section middle pile are (x) i ,y i ) The (x) coordinates of the (i+1) th section middle pile i+1 ,y i+1 ) The route advancing direction is represented by an angle θ, and the calculation formula is:
the direction of the section is perpendicular to the advancing direction of the route, the corresponding direction angles of the left end and the right end of the section are respectively theta+90 degrees and theta+270 degrees, and the left end point (X i_left ,Y i_left ) Right end point (X) i_right ,Y i_right ) The coordinates of (a) are:
the straight line equation corresponding to the section is expressed as:
AX+BY+C=0 (4)
wherein A, B and C are coefficients of linear equations respectively,B=-1,C=Y i_left -A*X i_left 。
optionally, the step 1 interrupts the surface-associated laser point cloud block calculation, specifically:
constructing a convex hull by utilizing coordinates of left and right endpoints of all sections;
performing block processing according to a fixed size, wherein each block corresponds to a labs format point cloud file, traversing the labs format point cloud file of each block, and reading the maximum and minimum value x of point cloud plane coordinates of the labs format point cloud file of the block from the file header min ,x max ,y min ,y max ;
And constructing a rectangular frame by utilizing the maximum and minimum values of coordinates, judging the spatial position relationship between a convex hull formed by the end points of the section and the rectangular frame of each las file, and when the convex hull and the rectangular frame are overlapped, indicating that the blocking laser point cloud is associated with the section file and adding the blocking laser point cloud to the associated laser point cloud file list.
Optionally, the implementation of step 2 specifically includes:
step 2.1, reading a las laser point cloud file from an associated laser point cloud file list, obtaining the number of laser points in the las file and laser point coordinate translation scaling parameters x_offset, x_scale, y_offset and y_scale, and distributing an internal memory on a CPU to store integer data coordinates of the laser points in the las file, wherein the integer data coordinates are represented by ptCoord_cpu;
wherein, x_offset, x_scale respectively represent the offset parameter and the scaling parameter of the X coordinate of the laser point plane, and y_offset, y_scale respectively represent the offset parameter and the scaling parameter of the Y coordinate of the laser point plane;
step 2.2, segmenting the laser points according to the set size, and assuming that the number of streams is m, the m streams are respectively represented by symbols stream_0, stream_1, … and stream_m, and each stream processes one segment of laser point, then m segments of point cloud data can be processed simultaneously;
using cudamallloc to allocate GPU memory, wherein a variable section_dev represents a section information list stored by the GPU, a chord_stream0, chord_stream1 and …, chord_streamm represents integer coordinates of each stream corresponding to a segmented laser spot, and para_stream0, para_stream1 and …, and para_streamm represents translational scaling parameters of each stream corresponding to the segmented laser spot coordinates;
copying m sections of point cloud data and section information list data into a GPU (graphic processing unit) device memory according to a width priority mode by utilizing a cudamem copy Async function, distributing GPU memory result_dev with a size of ptCount x sizeof (int), wherein ptCount is the number of laser points, storing an output result, and recording the section number of each laser point;
step 2.3, executing a section laser point slicing kernel function, wherein the number of blocks in the kernel function is set to be 2 times of the number of SM (synchronous mode) processors of the GPU equipment, the number of thread numbers in the blocks is set to be 512, and the calculation formula of the thread numbers i is as follows:
i=threadIdx.x+blockIdx.x*blockDim.x (5)
wherein, blockidx.x represents the number of the thread block where the thread is located, wireidx.x represents the number of the thread in the thread block, and blockdim.x represents the dimension of the thread block in the x direction;
step 2.4, each thread corresponds to a laser spot, and the real plane coordinates x and y of the laser spot are calculated by using the para_stream0 and the chord_stream0 transferred to the GPU memory:
wherein i is a thread number, the integral coordinates of the laser points are stored in sequence of x, y and z coordinates, the para_stream0 stores laser point coordinate translation scaling parameters in sequence of x_offset, x_scale, y_offset and y_scale, the integral_stream0 [ i.3 ] represents the x integral coordinates corresponding to the ith laser point, and the integral_stream0 [ i.3+1 ] represents the y integral coordinates of the ith laser point;
acquiring section information by using section_dev, calculating the vertical distance between the laser point and all sections, if the vertical distance is smaller than a specified threshold and within the section range, giving a result_dev [ i ] to the section number, wherein the thread number i corresponds to the laser point, and recording the section number corresponding to each laser point;
step 2.5, after the step 2.4 is executed, adding the grid_stride step length to the thread number i, and when the updated thread number is smaller than the laser point number ptCount, executing the step 2.4 in a circulating way to realize unlimited processing of the laser points;
step 2.6, copying data in result_dev from the GPU to the CPU memory, and assuming that the storage variable is result_cpu, attributing the laser points to a section laser point list according to the section number corresponding to each laser point stored in the result_cpu;
and 2.7, executing the steps 2.1 to 2.6 on each las laser point cloud file in the associated laser point cloud file list, and thus completing parallel generation of laser point cloud slices of the road section.
Optionally, the implementation of step 3 specifically includes:
step 3.1, taking out laser point clouds corresponding to the section from a section laser point list, and if the laser point category is a ground category, reserving Delauney triangle network construction participating in the next step;
step 3.2, constructing a Delauney triangle network for the reserved ground point set by using a divide-and-congregation algorithm;
step 3.3, generating plane positions of the section points according to a section linear equation at equal intervals, positioning triangles in the Delauney triangle network where the plane positions of the section points are positioned, and interpolating corresponding elevations by a linear interpolation method;
step 3.4, calculating plane and elevation coordinates of all section points on the section according to the method of step 3.3, and finishing the generation of the section ground line;
and 3.5, executing the steps 3.1-3.5 on each section to finish the generation of the surface line of all sections.
Compared with the prior art, the invention has the remarkable advantages and effects that:
(1) The GPU parallelization algorithm generated by the highway section laser point Yun Qiepian is provided for the first time, and thousands of threads (threads) of the GPU are utilized to accelerate calculation, so that remarkable improvement of operation efficiency is obtained;
(2) The Grid-Stride circulation technology and the breadth-first multi-stream technology are comprehensively utilized, scientific and reasonable thread organization and work scheduling are realized, parallel and stream processing of road section ground line generation is realized, and the algorithm is not limited by stimulated light point cloud and section quantity.
The invention fully utilizes the parallel computing capability of the GPU streaming multiprocessors (Streaming Multiprocessors, SM), each GPU is provided with a plurality of SM, each SM can support hundreds of threads to operate in parallel, and the efficient generation of the road cross section ground line based on laser point cloud is realized. Compared with the traditional CPU-based method, the operation efficiency is improved by more than 10 times, the problem of rapid generation of the ground line of the section of the long highway engineering is effectively solved, and great engineering application value is presented.
Detailed Description
The principles and features of the present invention are described below in connection with specific embodiments, examples of which are provided for illustration only and are not intended to limit the scope of the invention.
Example 1:
a highway cross section ground line parallel generation algorithm based on laser point cloud is described in detail as follows:
first, data preprocessing:
the preparation work before the section ground line generation is mainly carried out in the step, and the preparation work comprises the following steps: and reading a pile file in the section, generating the section, and calculating the section-associated laser point cloud blocks.
1) Section generation: and reading the section center pile coordinate file, wherein the section center pile coordinate file is generally in a txt format, reading the section center pile coordinate file stored in txt into a memory, generating a section information list according to the designated section width, representing the section information list by section_cpu, and storing important information such as coordinates of left and right end points of a section, section linear equation parameters, section length and the like.
Assuming that n sections exist in the read section center pile file, the section center pile coordinates are (x 1 ,y 1 )、(x 2 ,y 2 )、……、(x n ,y n ). And calculating the route advancing direction of each section by utilizing the middle pile coordinates of the section and the middle pile coordinates of the next section, wherein the route advancing method of the last section is directly taken as the advancing direction of the last-last section.
With the ith breakThe plane is exemplified by the section in which the pile coordinates are (x i ,y i ) The (x) coordinates of the (i+1) th section middle pile i+1 ,y i+1 ) The route advancing direction is represented by an angle θ, and the calculation formula is:
the direction of the section is perpendicular to the advancing direction of the route, the corresponding direction angles of the left end and the right end of the section are respectively theta+90 degrees and theta+270 degrees, and the left end point (X i_left ,Y i_left ) Right end point (X) i_right ,Y i_right ) The coordinates of (a) are:
the straight line equation corresponding to the section can be expressed as:
AX+BY+C=0 (4)
wherein A, B and C are coefficients of linear equations, respectively, specifically:
B=-1,C=Y i_left -A*X i_left 。
2) Calculating the cross section associated laser point cloud blocks:
first, a convex hull (cone hull) is constructed by using coordinates of left and right end points of all sections.
For the laser point cloud in the actual engineering, generally, the grid size is determined according to the fixed size (i.e. the density of the point cloud, the denser the point cloud, the larger the data volume, the smaller the grid), the partitioning processing is carried out, each partition corresponds to a las format point cloud file, and then the las format point cloud of each partition is traversedFile, reading maximum and minimum value x of point cloud plane coordinates of the point cloud file in the partitioned las format from file header thereof min ,x max ,y min ,y max That is, the coverage area of the laser point cloud can be constructed by using the maximum and minimum coordinates, the space position relationship between the convex hull formed by the end points of the cross section and the rectangular frame of each las file is judged, when the convex hull and the rectangular frame are overlapped, the segmented laser point cloud is associated with the cross section file, the segmented laser point cloud is added to the associated laser point cloud file list, and the i-th cross section is taken as an example, and the associated laser point cloud file list is namely the las file list set with the i-th cross section point coordinates.
Secondly, parallel generation of laser point cloud slices of the road section:
for massive laser point cloud data, laser point cloud slice generation is the most time-consuming part of the traditional method. In the step, parallel generation of laser point cloud slices of the road section is realized by comprehensively utilizing a Grid-Stride circulation technology, a shared memory storage technology and a width-first multi-stream technology. The specific implementation steps are as follows:
1) Reading a las laser point cloud file from an associated laser point cloud file list, obtaining the number of laser points in the las file and laser point coordinate translation scaling parameters x_offset, x_scale, y_offset and y_scale, wherein x_offset and x_scale respectively represent offset parameters and scaling parameters of laser point plane X coordinates, y_offset and y_scale respectively represent offset parameters and scaling parameters of laser point plane Y coordinates, and distributing and storing integer data coordinates of the laser points in the las file on a CPU (central processing unit), wherein the integer data coordinates are represented by ptCoord_cpu.
2) The laser points are segmented according to a set size (for example, 100 ten thousand points), and assuming that the number of streams is m, and the m streams are respectively represented by symbols stream_0, stream_1, … and stream_m, each stream processes one segment of laser point, then m segments of point cloud data can be processed simultaneously.
GPU memory is allocated using cudamallloc, the variable section_dev represents a list of section information stored by the GPU, the chord_stream1, …, the chord_streamm represents integer coordinates of the laser spot of each stream corresponding to a segment,
the para_stream0, the para_stream1, … and the para_streamm represent the translational scaling parameters of the coordinates of the laser points of each stream corresponding segment, and the values of the translational scaling parameters of the integer coordinates of the laser points of each stream corresponding segment and the coordinates of the laser points of each stream corresponding segment are the same, which are all
x_offset,x_scale,y_offset,y_scale。
And copying the m-section point cloud data and the section information list data into the memory of the GPU equipment according to a width priority mode by using a cudamem copy Async function. And distributing GPU memory result_dev, wherein the size is ptCount sizeof (int), the ptCount is the number of laser points, storing an output result, and recording the section number of each laser point.
3) Executing a section laser point slicing kernel function, wherein the number of blocks in the kernel function is set to be 2 times of the number of SM (stream processors) of the GPU equipment, the number of thread in the blocks is set to be 512, and the thread number i can be calculated by the following formula:
i=threadIdx.x+blockIdx.x*blockDim.x (5)
wherein, blockidx.x represents the number of the thread block where the thread is located, wireidx.x represents the number of the thread in the thread block, blockdim.x represents the dimension of the thread block in the x direction, and since the thread block is one-dimensional in this embodiment, it represents the size of a single thread block. In the same principle, grid dim.x represents the size of a single thread Grid, and the Grid step size grid_stride is blockdim.x.
4) Each thread corresponds to a laser spot, taking stream0 as an example, first, the real plane coordinates x, y of the laser spot are calculated by using para_stream0 and chord_stream0 transferred into the GPU memory:
where i is a thread number, the integrated_stream0 stores integer coordinates of the laser spot according to x, y, z coordinate order, and the para_stream0 stores laser spot coordinate translation scaling parameters according to x_offset, x_scale, y_offset, y_scale order. The chord_stream0 [ i×3] represents the x integer coordinate corresponding to the ith laser spot, and the chord_stream0 [ i×3+1] represents the y integer coordinate of the ith laser spot.
And acquiring section information by using section_dev, calculating the vertical distance between the laser point and all sections, if the vertical distance is smaller than a specified threshold (the more the point cloud is, the smaller the threshold is, the more the point cloud is, the less the point cloud is, the greater the threshold is) and within the section range, giving the section number to result_dev [ i ], and the thread number i corresponds to the laser point, namely recording the section number corresponding to each laser point.
5) After the step 4) is executed, adding the grid_stride step length to the thread number i, and when the updated thread number is smaller than the laser point number ptCount, executing the step 4) in a circulating way to realize unlimited laser point processing.
6) Copying data in result_dev from the GPU to the CPU memory, and assuming that the storage variable is result_cpu, attributing the laser points to a section laser point list according to the section number corresponding to each laser point stored in the result_cpu.
7) And (3) executing the step 1) to the step 6) on each las laser point cloud file in the associated laser point cloud file list, so as to finish the parallel generation of the laser point cloud slices of the road section.
Thirdly, generating a highway section ground line based on triangular net interpolation:
traversing a section laser point list, and generating section ground lines section by section according to the sequence in the section laser point list, wherein the step is mainly executed on a cpu, and the specific implementation steps are as follows:
1) And taking out the laser point cloud corresponding to the section from the section laser point list, and if the laser point type is the ground type, reserving the Delauney triangle network construction participating in the next step.
2) And constructing a Delauney triangle network for the reserved ground point set by using a divide-and-congregation algorithm.
3) Generating plane positions of the section points according to the section linear equation in the formula (4) at equal intervals (such as 1 m), positioning triangles in the Delauney triangle network according to the plane positions of the section points, and interpolating corresponding elevations by a linear interpolation method.
4) And 3) calculating plane and elevation coordinates of all section points on the section according to the method of the step 3), and finishing the generation of the section ground line.
5) And (3) executing the steps 1) to 4) on each section to finish the generation of the ground line of all sections.
The foregoing description of the preferred embodiments of the invention is not intended to limit the invention to the precise form disclosed, and any such modifications, equivalents, and alternatives falling within the spirit and scope of the invention are intended to be included within the scope of the invention.
Claims (5)
1. The highway cross section ground line parallel generation algorithm based on the laser point cloud is characterized by comprising the following steps of:
step 1, data preprocessing: the method comprises the steps of reading pile files in a section, generating the section, and calculating the section-associated laser point cloud blocks;
step 2, parallel generation of laser point cloud slices of the road section: realizing unlimited processing of the laser point cloud through Grid-Stride circulation, and realizing segmentation processing of the laser point cloud data by adopting a width-first multi-stream technology;
step 3, generating a highway section ground line based on triangular net interpolation: and selecting ground points to construct a Delauney triangular network for the laser point cloud corresponding to each section, determining the position of a plane to be interpolated according to an equidistant method, positioning the triangle where the plane to be interpolated is positioned, and calculating the elevation coordinate of the plane to be interpolated by using a linear interpolation algorithm to realize the generation of the ground line of the section of the highway.
2. The parallel generation algorithm of the road cross section ground line based on the laser point cloud according to claim 1, wherein the step 1 interrupts pile-in-plane file reading and section generation, specifically:
reading pile coordinate files in the section, generating a section information list according to the designated section width, representing the section information list by section_cpu, and storing coordinates of left and right endpoints of the section, section linear equation parameters and section length information;
assuming that n sections exist in the read section center pile file, the section center pile coordinates are (x 1 ,y 1 )、(x 2 ,y 2 )、……、(x n ,y n );
For each section, calculating the route advancing direction by utilizing the middle pile coordinates of the section and the middle pile coordinates of the next section, wherein the route advancing method of the last section is directly taken as the advancing direction of the last-last section:
the coordinates of the i-th section middle pile are (x) i ,y i ) The (x) coordinates of the (i+1) th section middle pile i+1 ,y i+1 ) The route advancing direction is represented by an angle θ, and the calculation formula is:
the direction of the section is perpendicular to the advancing direction of the route, the corresponding direction angles of the left end and the right end of the section are respectively theta+90 degrees and theta+270 degrees, and the left end point (X i_left ,Y i_left ) Right end point (X) i_right ,Y i_right ) The coordinates of (a) are:
the straight line equation corresponding to the section is expressed as:
AX+BY+C=0 (4)
wherein A, B and C are coefficients of linear equations respectively,B=-1,C=Y i_left -A*X i_left 。
3. the parallel generation algorithm of the road cross section ground line based on the laser point cloud according to claim 1, wherein the step 1 interrupts the calculation of the area-associated laser point cloud blocks, specifically:
constructing a convex hull by utilizing coordinates of left and right endpoints of all sections;
performing block processing according to a fixed size, wherein each block corresponds to a labs format point cloud file, traversing the labs format point cloud file of each block, and reading the maximum and minimum value x of point cloud plane coordinates of the labs format point cloud file of the block from the file header min ,x max ,y min ,y max ;
And constructing a rectangular frame by utilizing the maximum and minimum values of coordinates, judging the spatial position relationship between a convex hull formed by the end points of the section and the rectangular frame of each las file, and when the convex hull and the rectangular frame are overlapped, indicating that the blocking laser point cloud is associated with the section file and adding the blocking laser point cloud to the associated laser point cloud file list.
4. The laser point cloud based highway cross section ground line parallel generation algorithm according to claim 1, wherein the implementation of step 2 specifically comprises:
step 2.1, reading a las laser point cloud file from an associated laser point cloud file list, obtaining the number of laser points in the las file and laser point coordinate translation scaling parameters x_offset, x_scale, y_offset and y_scale, and distributing an internal memory on a CPU to store integer data coordinates of the laser points in the las file, wherein the integer data coordinates are represented by ptCoord_cpu;
wherein, x_offset, x_scale respectively represent the offset parameter and the scaling parameter of the X coordinate of the laser point plane, and y_offset, y_scale respectively represent the offset parameter and the scaling parameter of the Y coordinate of the laser point plane;
step 2.2, segmenting the laser points according to the set size, and assuming that the number of streams is m, the m streams are respectively represented by symbols stream_0, stream_1, … and stream_m, and each stream processes one segment of laser point, then m segments of point cloud data can be processed simultaneously;
using cudamallloc to allocate GPU memory, wherein a variable section_dev represents a section information list stored by the GPU, a chord_stream0, chord_stream1 and …, chord_streamm represents integer coordinates of each stream corresponding to a segmented laser spot, and para_stream0, para_stream1 and …, and para_streamm represents translational scaling parameters of each stream corresponding to the segmented laser spot coordinates;
copying m sections of point cloud data and section information list data into a GPU (graphic processing unit) device memory according to a width priority mode by utilizing a cudamem copy Async function, distributing GPU memory result_dev with a size of ptCount x sizeof (int), wherein ptCount is the number of laser points, storing an output result, and recording the section number of each laser point;
step 2.3, executing a section laser point slicing kernel function, wherein the number of blocks in the kernel function is set to be 2 times of the number of SM (synchronous mode) processors of the GPU equipment, the number of thread numbers in the blocks is set to be 512, and the calculation formula of the thread numbers i is as follows:
i=threadIdx.x+blockIdx.x*blockDim.x (5)
wherein, blockidx.x represents the number of the thread block where the thread is located, wireidx.x represents the number of the thread in the thread block, and blockdim.x represents the dimension of the thread block in the x direction;
step 2.4, each thread corresponds to a laser spot, and the real plane coordinates x and y of the laser spot are calculated by using the para_stream0 and the chord_stream0 transferred to the GPU memory:
wherein i is a thread number, the integral coordinates of the laser points are stored in sequence of x, y and z coordinates, the para_stream0 stores laser point coordinate translation scaling parameters in sequence of x_offset, x_scale, y_offset and y_scale, the integral_stream0 [ i.3 ] represents the x integral coordinates corresponding to the ith laser point, and the integral_stream0 [ i.3+1 ] represents the y integral coordinates of the ith laser point;
acquiring section information by using section_dev, calculating the vertical distance between the laser point and all sections, if the vertical distance is smaller than a specified threshold and within the section range, giving a result_dev [ i ] to the section number, wherein the thread number i corresponds to the laser point, and recording the section number corresponding to each laser point;
step 2.5, after the step 2.4 is executed, adding the grid_stride step length to the thread number i, and when the updated thread number is smaller than the laser point number ptCount, executing the step 2.4 in a circulating way to realize unlimited processing of the laser points;
step 2.6, copying data in result_dev from the GPU to the CPU memory, and assuming that the storage variable is result_cpu, attributing the laser points to a section laser point list according to the section number corresponding to each laser point stored in the result_cpu;
and 2.7, executing the steps 2.1 to 2.6 on each las laser point cloud file in the associated laser point cloud file list, and thus completing parallel generation of laser point cloud slices of the road section.
5. The laser point cloud based highway cross section ground line parallel generation algorithm according to claim 1, wherein the implementation of step 3 specifically comprises:
step 3.1, taking out laser point clouds corresponding to the section from a section laser point list, and if the laser point category is a ground category, reserving Delauney triangle network construction participating in the next step;
step 3.2, constructing a Delauney triangle network for the reserved ground point set by using a divide-and-congregation algorithm;
step 3.3, generating plane positions of the section points according to a section linear equation at equal intervals, positioning triangles in the Delauney triangle network where the plane positions of the section points are positioned, and interpolating corresponding elevations by a linear interpolation method;
step 3.4, calculating plane and elevation coordinates of all section points on the section according to the method of step 3.3, and finishing the generation of the section ground line;
and 3.5, executing the steps 3.1-3.4 on each section to finish the generation of the surface line of all sections.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310522299.6A CN116543129B (en) | 2023-05-06 | 2023-05-06 | Highway cross section ground line parallel generation algorithm based on laser point cloud |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310522299.6A CN116543129B (en) | 2023-05-06 | 2023-05-06 | Highway cross section ground line parallel generation algorithm based on laser point cloud |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116543129A true CN116543129A (en) | 2023-08-04 |
CN116543129B CN116543129B (en) | 2024-04-16 |
Family
ID=87453845
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310522299.6A Active CN116543129B (en) | 2023-05-06 | 2023-05-06 | Highway cross section ground line parallel generation algorithm based on laser point cloud |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116543129B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102445186A (en) * | 2011-09-28 | 2012-05-09 | 中交第二公路勘察设计研究院有限公司 | Method for generating road design surface information by laser radar scan |
CN106887020A (en) * | 2015-12-12 | 2017-06-23 | 星际空间(天津)科技发展有限公司 | A kind of road vertical and horizontal section acquisition methods based on LiDAR point cloud |
US20180225515A1 (en) * | 2015-08-04 | 2018-08-09 | Baidu Online Network Technology (Beijing) Co. Ltd. | Method and apparatus for urban road recognition based on laser point cloud, storage medium, and device |
CN110533778A (en) * | 2019-08-09 | 2019-12-03 | 中国科学院自动化研究所 | Large Scale Graphs picture point cloud parallel distributed gridding reconstruction method, system, device |
CN110780307A (en) * | 2019-05-29 | 2020-02-11 | 武汉星源云意科技有限公司 | Method for obtaining road cross section based on storage battery car-mounted laser point cloud mobile measurement system |
US20210049828A1 (en) * | 2019-08-14 | 2021-02-18 | Lg Electronics Inc. | Apparatus for transmitting point cloud data, a method for transmitting point cloud data, an apparatus for receiving point cloud data and a method for receiving point cloud data |
US20220205786A1 (en) * | 2019-05-14 | 2022-06-30 | China University Of Mining And Technology | Generation system and method for high-precision three-dimensional navigation map of fully mechanized mining surface |
CN115718305A (en) * | 2022-11-18 | 2023-02-28 | 武汉中交工程勘察有限公司 | Laser point cloud highway section processing method, device, equipment and storage medium |
-
2023
- 2023-05-06 CN CN202310522299.6A patent/CN116543129B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102445186A (en) * | 2011-09-28 | 2012-05-09 | 中交第二公路勘察设计研究院有限公司 | Method for generating road design surface information by laser radar scan |
US20180225515A1 (en) * | 2015-08-04 | 2018-08-09 | Baidu Online Network Technology (Beijing) Co. Ltd. | Method and apparatus for urban road recognition based on laser point cloud, storage medium, and device |
CN106887020A (en) * | 2015-12-12 | 2017-06-23 | 星际空间(天津)科技发展有限公司 | A kind of road vertical and horizontal section acquisition methods based on LiDAR point cloud |
US20220205786A1 (en) * | 2019-05-14 | 2022-06-30 | China University Of Mining And Technology | Generation system and method for high-precision three-dimensional navigation map of fully mechanized mining surface |
CN110780307A (en) * | 2019-05-29 | 2020-02-11 | 武汉星源云意科技有限公司 | Method for obtaining road cross section based on storage battery car-mounted laser point cloud mobile measurement system |
CN110533778A (en) * | 2019-08-09 | 2019-12-03 | 中国科学院自动化研究所 | Large Scale Graphs picture point cloud parallel distributed gridding reconstruction method, system, device |
US20210049828A1 (en) * | 2019-08-14 | 2021-02-18 | Lg Electronics Inc. | Apparatus for transmitting point cloud data, a method for transmitting point cloud data, an apparatus for receiving point cloud data and a method for receiving point cloud data |
CN115718305A (en) * | 2022-11-18 | 2023-02-28 | 武汉中交工程勘察有限公司 | Laser point cloud highway section processing method, device, equipment and storage medium |
Non-Patent Citations (3)
Title |
---|
ZHAOXIN FAN 等: "A Graph-baded One-shot learning Method for Point Cloud Recognition", COMPUTER GRAPHICS FORUM, 24 November 2020 (2020-11-24), pages 313 - 323 * |
关宏灿;李传荣;周梅;朱晓玲;黎荆梅;: "基于CUDA的三维成像载荷快速融合处理方法研究", 遥感技术与应用, no. 03, 15 June 2017 (2017-06-15), pages 52 - 57 * |
李海亮;陈楚江;余绍淮;张霄;: "基于密集激光雷达数据的公路设计地表信息生成方法", 中外公路, no. 04, 19 August 2011 (2011-08-19), pages 337 - 339 * |
Also Published As
Publication number | Publication date |
---|---|
CN116543129B (en) | 2024-04-16 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2021016751A1 (en) | Method for extracting point cloud feature points, point cloud sensing system, and mobile platform | |
KR20180107192A (en) | Orthogonal-projection-based texture atlas packing of 3D meshes | |
KR100959349B1 (en) | A method for accelerating terrain rendering based on quadtree using graphics processing unit | |
US20140354626A1 (en) | Block Based Level of Detail Representation | |
CN116543117B (en) | High-precision large-scene three-dimensional modeling method for unmanned aerial vehicle images | |
WO2023226654A1 (en) | Target object separation method and apparatus, device, and storage medium | |
KR102516008B1 (en) | Method of down sampling voxel using point cloud data and apparatus performing thereof | |
CN110910435B (en) | Building point cloud extraction method and device, computer equipment and readable storage medium | |
CN105701760A (en) | Histogram real-time generation method of geographic raster data optional polygon area | |
CN108986218A (en) | A kind of building point off density cloud fast reconstructing method based on PMVS | |
CN117036569B (en) | Three-dimensional model color generation network training method, color generation method and device | |
CN114972640B (en) | Cable three-dimensional reconstruction and parameter calculation method based on point cloud | |
CN113137919A (en) | Laser point cloud rasterization method | |
CN112712581B (en) | Ray tracing acceleration method | |
CN116543129B (en) | Highway cross section ground line parallel generation algorithm based on laser point cloud | |
CN110058945A (en) | The accelerating algorithm of Large Scale Graphs parallel computation max-flow based on cutpoint splicing mechanism | |
CN116659460B (en) | Rapid generation method for laser point cloud slice of road cross section | |
CN117274517A (en) | Method for generating light-weight body frame model of urban building based on three-dimensional model | |
CN111489386B (en) | Point cloud characteristic point extraction method, device, storage medium, equipment and system | |
CN115546455B (en) | Three-dimensional building model singulation method, device and storage medium | |
Fischer et al. | Dynamic 3D Gaussian Fields for Urban Areas | |
CN106504325A (en) | A kind of DEM feature point extraction parallel methods based on CUDA | |
CN113496461B (en) | Processing method and device of point cloud data, computer equipment and storage medium | |
CN110909749B (en) | Method for optimizing and extracting geometric linear contour from two-dimensional disordered point set | |
Ikeda et al. | Robust Edge Detection and GPU-Based Smoothing for Extracting Surface Primitives from Range Images |
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 |