[go: up one dir, main page]

CN110163880B - Method for acquiring point cloud road surface height in Unity - Google Patents

Method for acquiring point cloud road surface height in Unity Download PDF

Info

Publication number
CN110163880B
CN110163880B CN201910481170.9A CN201910481170A CN110163880B CN 110163880 B CN110163880 B CN 110163880B CN 201910481170 A CN201910481170 A CN 201910481170A CN 110163880 B CN110163880 B CN 110163880B
Authority
CN
China
Prior art keywords
index
point cloud
map
data
height
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
CN201910481170.9A
Other languages
Chinese (zh)
Other versions
CN110163880A (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.)
AutoCore Intelligence Technology Nanjing Co Ltd
Original Assignee
AutoCore Intelligence Technology Nanjing 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 AutoCore Intelligence Technology Nanjing Co Ltd filed Critical AutoCore Intelligence Technology Nanjing Co Ltd
Priority to CN201910481170.9A priority Critical patent/CN110163880B/en
Publication of CN110163880A publication Critical patent/CN110163880A/en
Application granted granted Critical
Publication of CN110163880B publication Critical patent/CN110163880B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/11Region-based segmentation

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Architecture (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)
  • Instructional Devices (AREA)
  • Road Repair (AREA)

Abstract

The invention provides a method for obtaining point cloud pavement height in Unity, which comprises the steps of obtaining a point cloud map of a whole scene, segmenting the point cloud map to obtain a plurality of blocks, carrying out point cloud height calculation on each block point cloud, outputting a result and the like, and deriving height information of each block point cloud to obtain height information required by a pavement. The invention fully utilizes the advantages of the Unity engine, can quickly and accurately generate the point cloud ground height information, accelerates the data stream processing by utilizing some parallel processing methods, can automatically acquire the point cloud ground height information, and can automatically attach the subsequently added road elements to the ground, thereby greatly reducing the workload required by manual adjustment and reducing the probability of generating human errors.

Description

Method for acquiring point cloud road surface height in Unity
Technical Field
The invention discloses a method for obtaining point cloud road surface height when editing vector information by using a point cloud map, and belongs to the technical field of automatic driving simulation.
Background
The success of autonomous driving of automobiles involves a number of technologies such as high-precision maps, real-time positioning, and obstacle detection, and LiDAR (LiDAR) is a device that emits a laser beam in a given direction and detects a return beam to obtain data such as a target position. The common laser radar in the field of automatic driving is a multi-beam mechanical rotary laser radar, and is one of automatic driving core positioning and detecting equipment due to the advantages of accurate positioning, low algorithm implementation difficulty, no influence of day and night and the like. During the running process of the unmanned vehicle, the LiDAR rotates at a constant speed at a certain angular speed, and laser is continuously emitted and information of a reflection point is collected during the process, so that all-directional environmental information can be obtained. LiDAR also records the time and horizontal angle (Azimuth) at which the point occurred during the collection of the distance to the reflecting point, and each laser emitter has a number and a fixed vertical angle from which we can calculate the coordinates of all the reflecting points. The collection of all the collected coordinates of the reflection points for each revolution of the LiDAR forms a point cloud.
When the point cloud map is used for editing vector information, the height information of the point cloud pavement needs to be acquired, and the cloud height cannot be completely leveled when a map is built usually, so that the height information of the existing point cloud pavement is acquired by manpower, the automation degree is not high, and phenomena such as missing detection, wrong detection, missing drawing, wrong drawing and the like occur occasionally.
Disclosure of Invention
The purpose of the invention is as follows: the invention fully utilizes the advantages of the Unity engine and provides a method for automatically acquiring the height information of the point cloud pavement from the point cloud map in the Unity engine with high efficiency.
The technical scheme is as follows: in order to solve the technical problem, the method for automatically acquiring the point cloud road surface height information provided by the invention comprises the following steps:
step one, acquiring a point cloud map of a whole scene;
secondly, segmenting the point cloud map to obtain a plurality of blocks, namely segmenting the point cloud of the whole scene into small point clouds according to the blocks;
step three, carrying out point cloud height calculation on each block point cloud; the method comprises the following specific steps:
1) using IJobParallelFor type parallel processing, the indices of all points of each block are obtained, the pseudo code is as follows:
indices[index]= math.floor(data[index].xy / b);
wherein b is the sampling grid side length
2) Using IJobParallelFor type parallel processing, the index and corresponding point data are filled into a map of the native MultiHashMap < int3, float4> type, the pseudo code is as follows:
map[index].add(indices[index],data[index]);
3) index consistent points are processed in map using the ijobnative multishashmapmultiply sharedkeryindeces type Job process and get the nadir height fill in the array native array < float3> bottom, pseudo code as follows:
ExecuteFirst: height [index]= data[index].z;
ExecuteNext: if(bottom [firstIndex].z>data[index].z)
bottom [firstIndex].z = data[index].z;
step four, outputting the result
And (4) the bottom processed in the third step only comprises point clouds with the lowest points, and the height information of the point clouds is derived to obtain the height information required by the road surface.
Preferably, after the fourth step is completed, the height information of each point cloud in the bottom is derived to form a height map or drawn into a grid.
When the road surface height information is obtained, a large memory is needed for processing a single large scene, so that the point cloud is preferentially cut into blocks, namely the large scene is cut into a plurality of blocks, the large scene is processed in small blocks, the small blocks are processed each time, resources are released after the processing is finished, and the memory occupation is reduced. The invention fully utilizes the advantages of the Unity engine, can quickly and accurately generate the point cloud ground height information, accelerates the data stream processing by utilizing some parallel processing methods, can ensure that the subsequently added road surface elements can be automatically attached to the road surface, greatly reduces the workload required by manual adjustment, and also reduces the probability of generating artificial errors
In addition, as the point cloud of the whole scene is segmented, the hardware cost is also high, the segmentation of the block is only used as a precondition for height calculation, and in practical application, the segmented block can be obtained by at least the following two methods:
(1) and completing block segmentation in a point cloud map export stage, and exporting a small-block point cloud map file (usually a pcd file).
(2) The method comprises the following steps of utilizing a Unity engine to segment a point cloud map to obtain a plurality of blocks, wherein the method specifically comprises the following steps:
1) using IJobParallelFor type parallel processing to obtain the index of all point clouds, the pseudo code is as follows:
indices[index]= math.floor(data[index].xy / b);
wherein, b is the side length of the currently selected block;
2) using IJobParallelFor type parallel processing, the index and corresponding point data are filled into a map of the native MultiHashMap < int3, float4> type, the pseudo code is as follows:
map[index].add(indices[index],data[index]);
3) the inordinate data in map is inserted into the queue native queue < float4> queue using the Job procedure of type Job:
queue.Enqueue(data[index]);
4) converting native queue into native array, and keeping continuous information;
5) using IJobParalleFor type parallel processing to obtain the initial index NativeArray < int > startIndex of each block, wherein the pseudo code is as follows:
If(array[index]== array[index - 1])
startIndex[index]= index;
else
startIndex[index]= 0;
6) using IJobParallelForFilter type parallel processing to screen out indexes which are not 0 in each block, wherein the indexes are initial indexes of each block in array; and circularly reading the point data corresponding to the initial index in each block to obtain the point data of each block after being cut into blocks.
The technical problems, technical features constituting the technical solutions and advantages brought by the technical features of the technical solutions described above are not all the more. In order to make the objects, technical solutions and advantages of the present invention clearer, other technical problems, other technical features included in the technical solutions and advantages brought by the technical features which can be solved by the present invention will be described more clearly and completely with reference to the accompanying drawings in the embodiments of the present invention.
Drawings
FIG. 1 is a schematic flow diagram of an embodiment of the present invention;
FIG. 2 is a schematic diagram of block slicing;
FIG. 3 is a schematic diagram illustrating height information of a point cloud for a block according to an embodiment of the present invention;
fig. 4 is a schematic diagram of fig. 3 after being visualized into a grid.
Detailed Description
Example (b):
the Unity is used as a general graphic engine, a third-party physical engine is integrated inside the Unity, and the requirements of physics and image simulation in the field of automatic driving can be met. Thanks to these advantages, we can implement a new method for efficiently acquiring lidar point cloud in newer version Unity, whose implementation flow is shown in fig. 1, and includes the following steps:
step one, acquiring a point cloud map of the whole scene.
And secondly, segmenting the point cloud map to obtain a plurality of blocks, namely segmenting the point cloud of the whole scene into small point clouds according to the blocks as shown in FIG. 2.
The segmented block can be obtained generally by at least two methods: (1) and completing block segmentation in a point cloud map export stage, and exporting a small-block point cloud map file (usually a pcd file).
(2) The method comprises the following steps of utilizing a Unity engine to segment a point cloud map to obtain a plurality of blocks, wherein the specific method comprises the following steps:
1) using IJobParallelFor type parallel processing to obtain the index of all point clouds, the pseudo code is as follows:
indices[index]= math.floor(data[index].xy / b);
wherein, b is the side length of the currently selected block, can be set as required, and can be 1 meter generally;
2) using IJobParallelFor type parallel processing, the index and corresponding point data are filled into a map of the native MultiHashMap < int3, float4> type, the pseudo code is as follows:
map[index].add(indices[index],data[index]);
3) the inordinate data in map is inserted into the queue native queue < float4> queue using the Job procedure of type Job:
queue.Enqueue(data[index]);
4) converting native queue into native array, and keeping continuous information;
5) using IJobParalleFor type parallel processing to obtain the initial index NativeArray < int > startIndex of each block, wherein the pseudo code is as follows:
If(array[index]== array[index - 1])
startIndex[index]= index;
else
startIndex[index]= 0;
6) using IJobParallelForFilter type parallel processing to screen out indexes which are not 0 in each block, wherein the indexes are initial indexes of each block in array; and circularly reading the point data corresponding to the initial index in each block to obtain the point data of each block after being cut into blocks.
Step three, carrying out point cloud height calculation on each block point cloud; the method comprises the following specific steps:
1) using IJobParallelFor type parallel processing, the indices of all points of each block are obtained, the pseudo code is as follows:
indices[index]= math.floor(data[index].xy / b);
wherein b is the side length of the sampling grid, and can be 1 meter as in the second step;
2) using IJobParallelFor type parallel processing, the index and corresponding point data are filled into a map of the native MultiHashMap < int3, float4> type, the pseudo code is as follows:
map[index].add(indices[index],data[index]);
3) index consistent points are processed in map using the ijobnative multishashmapmultiply sharedkeryindeces type Job process and get the nadir height fill in the array native array < float3> bottom, pseudo code as follows:
ExecuteFirst: height [index]= data[index].z;
ExecuteNext: if(bottom [firstIndex].z>data[index].z)
bottom [firstIndex].z = data[index].z;
step four, outputting the result
The bottom processed in the third step only contains the point clouds with the lowest points, and the height information of the point clouds is derived to obtain the height information required by the road surface, which is the height information of a certain block as shown in fig. 3.
The embodiment can be further modified as follows: and after the fourth step is finished, exporting the height information of each point cloud in the bottom to form a height map or drawing the height map into a grid, as shown in fig. 4, namely drawing the grid into the grid.
The invention fully utilizes the advantages of the Unity engine, can quickly and accurately generate the point cloud ground height information, accelerates the data stream processing by utilizing some parallel processing methods, can automatically acquire the point cloud road surface height information, and avoids the phenomena of missing detection, wrong detection, missing drawing, wrong drawing and the like. And the point cloud pavement height information can be automatically acquired, and subsequently added pavement elements can be automatically attached to the pavement, so that the workload required by manual adjustment is greatly reduced, and the probability of generating human errors is also reduced.
In addition, as the point cloud of the whole scene is segmented, the hardware cost is high, the block segmentation is only used as a precondition of height calculation, and the block segmentation is completed in a point cloud map derivation stage during actual application.
The invention provides a brand-new thought and method for generating the environmental point cloud map in the field of automatic driving simulation, and the method and the way for realizing the technical scheme are many. The components of embodiments of the present invention generally described and illustrated in the figures herein may be arranged and designed in a wide variety of different configurations. Thus, the detailed description of the embodiments of the invention presented in the drawings is not intended to limit the scope of the invention as claimed, but is merely representative of selected embodiments of the invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.

Claims (3)

1. A method for acquiring point cloud pavement height in Unity comprises the following steps:
step one, acquiring a point cloud map of a whole scene;
secondly, segmenting the point cloud map to obtain a plurality of blocks, namely segmenting the point cloud of the whole scene into small point clouds according to the blocks;
step three, carrying out point cloud height calculation on each block point cloud; the method comprises the following specific steps:
1) using IJobParallelFor type parallel processing, the indices of all points of each block are obtained, the pseudo code is as follows:
indices[index]= math.floor(data[index].xy / b);
wherein b is the sampling grid side length
2) Using IJobParallelFor type parallel processing, the index and corresponding point data are filled into a map of the native MultiHashMap < int3, float4> type, the pseudo code is as follows:
map[index].add(indices[index],data[index]);
3) index consistent points are processed in map using the ijobnative multishashmapmultiply sharedkeryindeces type Job process and get the nadir height fill in the array native array < float3> bottom, pseudo code as follows:
ExecuteFirst: height [index]= data[index].z;
ExecuteNext: if(bottom [firstIndex].z>data[index].z)
bottom [firstIndex].z = data[index].z;
step four, outputting the result
And (4) the bottom processed in the third step only comprises point clouds with the lowest points, and the height information of the point clouds is derived to obtain the height information required by the road surface.
2. The method of Unity for finding point cloud pavement height as claimed in claim 1, wherein: the specific method for segmenting the point cloud map to obtain a plurality of blocks in the second step is as follows:
1) using IJobParallelFor type parallel processing to obtain the index of all point clouds, the pseudo code is as follows:
indices[index]= math.floor(data[index].xy / b);
wherein, b is the side length of the currently selected block;
2) using IJobParallelFor type parallel processing, the index and corresponding point data are filled into a map of the native MultiHashMap < int3, float4> type, the pseudo code is as follows:
map[index].add(indices[index],data[index]);
3) the inordinate data in map is inserted into the queue native queue < float4> queue using the Job procedure of type Job:
queue.Enqueue(data[index]);
4) converting native queue into native array, and keeping continuous information;
5) using IJobParalleFor type parallel processing to obtain the initial index NativeArray < int > startIndex of each block, wherein the pseudo code is as follows:
If(array[index]== array[index- 1])
startIndex[index]= index;
else
startIndex[index]= 0;
6) using IJobParallelForFilter type parallel processing to screen out indexes which are not 0 in each block, wherein the indexes are initial indexes of each block in array; and circularly reading the point data corresponding to the initial index in each block to obtain the point data of each block after being cut into blocks.
3. The method of Unity for finding point cloud pavement height as claimed in claim 1, wherein: and after the fourth step is finished, exporting the height information of each point cloud in the bottom to form a height map or drawing the height map into a grid.
CN201910481170.9A 2019-06-04 2019-06-04 Method for acquiring point cloud road surface height in Unity Active CN110163880B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910481170.9A CN110163880B (en) 2019-06-04 2019-06-04 Method for acquiring point cloud road surface height in Unity

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910481170.9A CN110163880B (en) 2019-06-04 2019-06-04 Method for acquiring point cloud road surface height in Unity

Publications (2)

Publication Number Publication Date
CN110163880A CN110163880A (en) 2019-08-23
CN110163880B true CN110163880B (en) 2020-04-14

Family

ID=67627396

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910481170.9A Active CN110163880B (en) 2019-06-04 2019-06-04 Method for acquiring point cloud road surface height in Unity

Country Status (1)

Country Link
CN (1) CN110163880B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111208530B (en) * 2020-01-15 2022-06-17 北京四维图新科技股份有限公司 Positioning layer generation method, device, high-precision map and equipment
CN112633376A (en) * 2020-12-24 2021-04-09 南京信息工程大学 Point cloud data ground feature classification method and system based on deep learning and storage medium

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109147050A (en) * 2018-08-02 2019-01-04 苏州蜗牛数字科技股份有限公司 Road grid creation method and device based on Unity engine topography system

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8818133B2 (en) * 2012-07-11 2014-08-26 Raytheon Company Point cloud construction with unposed camera
CN103778429B (en) * 2014-01-24 2017-03-08 青岛秀山移动测量有限公司 Automatic extraction method for road information in a kind of Vehicle-borne Laser Scanning point cloud
CN108919944B (en) * 2018-06-06 2022-04-15 成都中绳科技有限公司 Virtual roaming method for realizing data lossless interaction at display terminal based on digital city model
CN109584294B (en) * 2018-11-23 2020-08-28 武汉中海庭数据技术有限公司 Pavement point cloud extraction method and device based on laser point cloud
CN109798903B (en) * 2018-12-19 2021-03-30 广州文远知行科技有限公司 Method and device for acquiring road information from map data
CN109741450B (en) * 2018-12-29 2023-09-19 征图三维(北京)激光技术有限公司 Automatic road surface point cloud extraction method and device based on scanning lines
CN109800773B (en) * 2019-02-19 2021-01-22 北京大学 Extraction method of off-road road surface based on 3D lidar
CN109614966B (en) * 2019-03-07 2019-07-26 纽劢科技(上海)有限公司 It is a kind of based on information fusion Lidar sensor efficient road surface and curb detection method

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109147050A (en) * 2018-08-02 2019-01-04 苏州蜗牛数字科技股份有限公司 Road grid creation method and device based on Unity engine topography system

Also Published As

Publication number Publication date
CN110163880A (en) 2019-08-23

Similar Documents

Publication Publication Date Title
CN113034689B (en) Laser point cloud-based terrain three-dimensional model, terrain map construction method and system, and storage medium
CN109459734B (en) Laser radar positioning effect evaluation method, device, equipment and storage medium
CN108090957B (en) BIM-based terrain mapping method
CN114065339B (en) A method for site selection of high tower construction based on three-dimensional visualization model
Lo Brutto et al. UAV platforms for cultural heritage survey: first results
CN111724477A (en) Method for constructing multi-level three-dimensional terrain model through multi-source data fusion
CN109143257A (en) Unmanned aerial vehicle onboard radar mining land change monitors system and method
CN112729130A (en) Method for measuring height of tree canopy by satellite remote sensing
CN112652062A (en) Point cloud map construction method, device, equipment and storage medium
CN112419512A (en) Air three-dimensional model repairing system and method based on semantic information
CN114187357A (en) High-precision map production method and device, electronic equipment and storage medium
CN110163880B (en) Method for acquiring point cloud road surface height in Unity
CN110889899A (en) Method and device for generating digital earth surface model
US20240168166A1 (en) Processing LiDAR Data
CN114564779A (en) Planning method for complex mountain construction sidewalk based on BIM and unmanned aerial vehicle
CN119164374A (en) Geographic information surveying and mapping method and device, and geographic information surveying and mapping system
CN111693043B (en) Map data processing method and apparatus
CN113066181A (en) Terrain simulation method based on satellite images and digital elevation data
Su et al. A simulation method for LIDAR of autonomous cars
Rebelo et al. Building 3D city models: Testing and comparing Laser scanning and low-cost UAV data using FOSS technologies
CN117475398B (en) Ground segmentation optimization method and device based on voxel sampling
CN113052965A (en) Three-dimensional terrain reconstruction method
CN118135137A (en) Real scene three-dimensional construction method, system and storage medium for terrain complex area right determination
CN117372638A (en) Small-scale digital outcrop lithology mapping method based on semantic segmentation algorithm
CN116912443A (en) Mining area point cloud and image fusion modeling method using unmanned aerial vehicle aerial survey technology

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
CP02 Change in the address of a patent holder

Address after: 210012 room 401-404, building 5, chuqiaocheng, No. 57, Andemen street, Yuhuatai District, Nanjing, Jiangsu Province

Patentee after: AUTOCORE INTELLIGENT TECHNOLOGY (NANJING) Co.,Ltd.

Address before: 211800 building 12-289, 29 buyue Road, Qiaolin street, Pukou District, Nanjing City, Jiangsu Province

Patentee before: AUTOCORE INTELLIGENT TECHNOLOGY (NANJING) Co.,Ltd.

CP02 Change in the address of a patent holder
CP03 Change of name, title or address

Address after: 12th Floor, Building 5, Jieyuan Financial City, No. 55 Andemen Street, Yuhuatai District, Nanjing City, Jiangsu Province, China 210012

Patentee after: AUTOCORE INTELLIGENT TECHNOLOGY (NANJING) Co.,Ltd.

Country or region after: China

Address before: 210012 room 401-404, building 5, chuqiaocheng, No. 57, Andemen street, Yuhuatai District, Nanjing, Jiangsu Province

Patentee before: AUTOCORE INTELLIGENT TECHNOLOGY (NANJING) Co.,Ltd.

Country or region before: China

CP03 Change of name, title or address