CN116630399A - Automatic roadway point cloud center line extraction method - Google Patents

Automatic roadway point cloud center line extraction method Download PDF

Info

Publication number
CN116630399A
CN116630399A CN202310146534.4A CN202310146534A CN116630399A CN 116630399 A CN116630399 A CN 116630399A CN 202310146534 A CN202310146534 A CN 202310146534A CN 116630399 A CN116630399 A CN 116630399A
Authority
CN
China
Prior art keywords
roadway
point cloud
bool
image
center line
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
Application number
CN202310146534.4A
Other languages
Chinese (zh)
Other versions
CN116630399B (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.)
Peking University
Beijing Longruan Technologies Inc
Original Assignee
Peking University
Beijing Longruan Technologies Inc
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 Peking University, Beijing Longruan Technologies Inc filed Critical Peking University
Priority to CN202310146534.4A priority Critical patent/CN116630399B/en
Publication of CN116630399A publication Critical patent/CN116630399A/en
Application granted granted Critical
Publication of CN116630399B publication Critical patent/CN116630399B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/68Analysis of geometric attributes of symmetry
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T11/002D [Two Dimensional] image generation
    • G06T11/20Drawing from basic elements, e.g. lines or circles
    • G06T11/203Drawing of straight lines or curves
    • G06T3/06
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/20Image enhancement or restoration by the use of local operators
    • G06T5/30Erosion or dilatation, e.g. thinning
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/66Analysis of geometric attributes of image moments or centre of gravity
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10028Range image; Depth image; 3D point clouds
    • YGENERAL 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
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Abstract

The invention provides an automatic extraction method for a central line of a roadway point cloud, and relates to the technical field of roadway construction detection. Comprising the following steps: collecting point cloud data of a roadway through three-dimensional laser scanning; establishing a right-hand coordinate system of roadway point cloud orientation through translation and rotation according to the collected roadway point cloud data; the point cloud is projected and rasterized into an image on the XOY plane and the XOZ plane with a given resolution; filtering the rasterized image to delete discrete points and extracting an initial center line; filtering the initial center line, and deleting the line segment with the extracted error; and aligning the central lines of the two-dimensional roadways, and calculating the XYZ coordinates of the central lines through coordinate conversion. The method can automatically extract the central line of the roadway without any priori information, does not need or only needs a small amount of manual intervention in the operation process, has high automation degree, and in addition, converts the central line of the extracted roadway into the central line of two-dimensional roadway images for extracting, reduces the difficulty of central line extraction of the point cloud of the roadway, and has better practicability.

Description

Automatic roadway point cloud center line extraction method
Technical Field
The invention relates to the technical field of roadway construction detection, in particular to an automatic roadway point cloud center line extraction method.
Background
In the technical field of roadway construction detection, various methods exist for extracting the center line of the roadway point cloud, but the existing extraction method has various problems, such as:
according to the method for automatically extracting the central line of the point cloud of the CN202110867862.7 tunnel and constructing the triangular net, according to the acquired data of the point cloud of the tunnel, a point on the tunnel and the initial direction of the tunnel are given, the point cloud of the tunnel can be segmented according to a certain step length, the point cloud of a section with a certain width is acquired, the convex hull point of the point cloud is calculated, then the points on the convex hull are uniformly sampled, the centers of all the sampling points are calculated, the next section is calculated, and the central line of the whole tunnel is automatically calculated. But this method requires a priori knowledge of the initial point and initial direction on the tunnel.
The patent CN202110156355.1 discloses a circular tunnel structure central line extraction method, which is based on a track surface central line extracted by scanning point clouds or a design structure central line as a reference, realizes tunnel point cloud interval division by setting point cloud interval extraction intervals, converts a point cloud interval into two-dimensional point clouds and denoises, calculates the structure central point of each interval by utilizing the gravity center, the direction vector and the projection vector of the point cloud interval corresponding to the track surface central line or the design structure central line, and connects to form the structure central line. But the method is only applicable to circular tunnel point clouds and requires a priori knowledge of the rail plane centerline or design structure centerline.
Various centerline extraction methods are not repeated, in short, the prior knowledge is needed in the current centerline extraction method, and how to achieve the automatic extraction of the roadway point cloud centerline is a problem to be solved urgently.
Disclosure of Invention
In view of the above problems, the invention provides an automatic extraction method for a roadway point cloud center line.
The embodiment of the invention provides an automatic extraction method for a central line of a roadway point cloud, which comprises the following steps:
step 100: scanning a roadway through three-dimensional laser, and collecting point cloud data of the roadway;
step 200: converting a coordinate system of the point cloud data into a coordinate system of the roadway through rotation and translation according to the point cloud data;
step 300: the point cloud data under the tunnel coordinate system are projected and rasterized into corresponding XOY images and XOZ images on the XOY plane and the XOZ plane with a given resolution;
step 400: filtering the XOY image and the XOZ image, deleting discrete points, extracting initial center lines, and respectively obtaining initial center lines of the XOY plane roadway and the XOZ plane roadway;
step 500: filtering the initial centerline of the XOZ plane roadway, deleting the generated error line segments to obtain an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image respectively;
step 600: and generating XYZ coordinates of the tunnel point cloud center line through coordinate conversion according to the XOY plane tunnel optimization center line image and the XOZ plane tunnel optimization center line image.
Optionally, step 200: converting the coordinate system of the point cloud data into the coordinate system of the roadway through rotation and translation according to the point cloud data, wherein the method specifically comprises the following steps of:
calculating the mass center of the point cloud according to the point cloud data;
determining a translation vector of the point cloud according to the centroid;
according to the translation vector, translating the point cloud so that the centroid is located at an origin point under the tunnel coordinate system;
and according to the coordinate system of the point cloud data, combining the point cloud of which the centroid is positioned at the origin under the tunnel coordinate system after translation, and converting the coordinate system of the point cloud data into the coordinate system of the tunnel.
Optionally, according to the coordinate system of the point cloud data, combining the translated point cloud with the centroid located at the origin under the tunnel coordinate system, converting the coordinate system of the point cloud data under the coordinate system of the tunnel includes:
after the point cloud translates, determining the first three main components of the point cloud through a main component analysis method;
defining a first principal component in the first three principal components as an X-axis direction under a point cloud coordinate system;
defining a second principal component in the first three principal components as a Y-axis direction under a point cloud coordinate system;
defining a third principal component in the first three principal components as a Z-axis direction under a point cloud coordinate system;
determining a rotation matrix of the point cloud through a conversion formula of a linear space base;
and according to the first main component, the second main component and the third main component, combining the rotation matrix of the point cloud, and obtaining new coordinates of the cloud data under the tunnel coordinate system by translating and rotating the coordinate system of the cloud data.
Optionally, step 300: and carrying out projection rasterization on point cloud data under a tunnel coordinate system in an XOY plane and an XOZ plane with a given resolution to obtain corresponding XOY images and XOZ images, wherein the method specifically comprises the following steps of:
on an XOY plane, determining an X coordinate range and a Y coordinate range of the point cloud to determine a projection range of the point cloud on the XOY plane;
on an XOZ plane, determining an X coordinate range and a Z coordinate range of the point cloud to determine a projection range of the point cloud on the XOZ plane;
and carrying out projection rasterization on the point cloud data under the roadway coordinate system according to the given resolution in combination with the projection range of the point cloud on the XOY plane and the projection range of the point cloud on the XOZ plane to obtain corresponding XOY images and XOZ images.
Optionally, step 400: filtering the XOY image and the XOZ image, deleting discrete points, extracting initial central lines, and respectively obtaining initial central lines of the XOY plane roadway and the XOZ plane roadway, wherein the method specifically comprises the following steps of:
filtering the XOY image and the XOZ image by using an open curve algorithm, and filtering and deleting discrete points at two sides of a roadway;
extracting initial central lines of the filtered XOY image and the XOZ image to respectively obtain initial central lines of the XOY plane roadway, wherein the initial central lines of the XOZ plane roadway are obtained.
Optionally, step 500: filtering the initial centerline of the XOZ plane roadway, deleting the generated error line segments to respectively obtain an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image, and specifically comprising the following steps:
determining initial central lines of the XOY plane roadway, wherein the initial central lines of the XOZ plane roadway respectively correspond to pixels belonging to nodes in an image, and the nodes are the starting points and the ending points of all line segments in the image;
tracking and determining initial centerlines of the XOY plane roadway according to the nodes, wherein the initial centerlines of the XOZ plane roadway respectively correspond to all line segments in an image;
judging all the line segments, and determining the line segments which need to be deleted and generate errors;
and deleting the generated wrong line segments to respectively obtain an XOY plane roadway optimization center line image and an XOZ plane roadway optimization center line image.
Optionally, step 600: generating XYZ coordinates of the roadway point cloud center line through coordinate conversion according to the XOY plane roadway optimization center line image and the XOZ plane roadway optimization center line image, wherein the XYZ coordinates specifically comprise:
aligning the rows of the XOY plane roadway optimization centerline images with the columns of the XOZ plane roadway optimization centerline images, and obtaining the XYZ coordinates of points on the roadway point cloud centerline through coordinate conversion;
and generating the XYZ coordinates of the central line of the roadway point cloud according to the XYZ coordinates of the point on the central line of the roadway point cloud.
Optionally, the point cloud data includes: XYZ coordinate information and other point cloud information including: RGB information, intensity information and time information, wherein the other point cloud information does not influence the operation results of the following steps 2 to 6.
Optionally, determining initial centerlines of the XOY plane roadway, where the initial centerlines of the XOZ plane roadway respectively correspond to portions belonging to nodes in the image, and including:
based on the initial center line of the XOY plane roadway, the initial center lines of the XOZ plane roadway respectively correspond to images, and a center pixel with a pixel value of 1 is defined as p;
if the line segment passes through the point p, based on the first-order 8 neighborhood and the second-order 16 neighborhood, the distribution of the corresponding grid is as follows:
if p 8 The pixel value is 1, p 7 ,p 0 ,p 1 At least one of the pixels has a value of 1, denoted as bool (p 8]and bool(p[7]or p[0]or p[1]));
If p 17 The pixel value is 1, p 5 ,p 4 At least one of the pixels has a value of 1, denoted as bool (p 17]and bool(p[4]or p[5]) And so on, all 16 cases are shown as follows:
bool(p[8]and bool(p[7]or p[0]or p[1])),bool(p[9]and bool(p[0]or p[1])),bool(p[10]and p[1]),bool(p[11]and bool(p[1]or p[2])),bool(p[12]and bool(p[1]or p[2]or p[3])),bool(p[13]and bool(p[2]or p[3])),bool(p[14]and p[3]),bool(p[15]and bool(p[3]or p[4])),bool(p[16]and bool(p[3]or p[4]or p[5])),bool(p[17]and bool(p[4]0r p[5])),bool(p[18]and p[5]),bool(p[19]and bool(p[5]or p[6])),bool(p[20]and bool(p[5]or p[6]or p[7])),bool(p[21]and bool(p[6]or p[7])),bool(p[22]and p[7]),bool(p[23]and bool(p[7]or p[0]))
and if and only if 1 or 3 or more line segments pass through the point p, the point p is a node in the grid graph, so that the part of the initial center line of the XOY plane roadway, which belongs to the node, in the image is obtained, and the part of the initial center line of the XOZ plane roadway, which does not belong to the node, in the image is obtained.
Optionally, the determining, by determining the determining, that all the line segments need to be deleted, the line segment with the generated error includes:
step a: calculating the included angle between the line formed by connecting the first and last nodes of all the line segments and the horizontal line of the corresponding image, and deleting the line segments according to the preset included angle condition;
step b: deleting special line segments with the first node and the last node as endpoints and the length smaller than a length threshold, wherein the length threshold takes pixels as a unit;
step c: deleting the line segments with the length smaller than the length threshold value except the special line segment in all the line segments;
and c, sequentially executing the steps a to c, and re-calculating the initial center line of the XOY plane roadway after each operation is executed, wherein the initial center line of the XOZ plane roadway corresponds to the part belonging to the node and the line segment corresponding to the part in the image respectively, and iterating each image until no pixel in the image is deleted again.
According to the automatic extraction method of the roadway point cloud center line, firstly, a roadway is scanned through three-dimensional laser, and point cloud data of the roadway are collected; and then converting the coordinate system of the point cloud data into the coordinate system of the roadway through rotary translation according to the point cloud data. Then, carrying out projection rasterization on the point cloud data under the tunnel coordinate system in the XOY and XOZ planes with a given resolution to obtain corresponding XOY images and XOZ images; filtering the XOY image and the XOZ image, deleting discrete points, extracting initial center lines, and respectively obtaining initial center lines of the XOY plane roadway and the XOZ plane roadway; filtering the initial centerline of the XOY plane roadway, deleting the initial centerline of the XOZ plane roadway, and generating wrong line segments to respectively obtain an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image; and finally, generating XYZ coordinates of the tunnel point cloud center line through coordinate conversion according to the XOY plane tunnel optimization center line image and the XOZ plane tunnel optimization center line image.
The automatic extraction method of the roadway point cloud center line can automatically extract the roadway center line without any priori information, does not need or only needs a small amount of manual intervention in the operation process, has high automation degree, and in addition, converts the extracted roadway center line into two-dimensional roadway image center line extraction, reduces the difficulty of extracting the roadway point cloud center line, and has good practicability.
Drawings
Various other advantages and benefits will become apparent to those of ordinary skill in the art upon reading the following detailed description of the preferred embodiments. The drawings are only for purposes of illustrating the preferred embodiments and are not to be construed as limiting the invention. Also, like reference numerals are used to designate like parts throughout the figures. In the drawings:
FIG. 1 is a flow chart of a method for automatically extracting a center line of a roadway point cloud according to an embodiment of the invention;
FIG. 2 is a schematic diagram showing the effect of translational rotation of a point cloud on a roadway toward an X-axis of a coordinate system in an embodiment of the present invention;
FIG. 3 is an image projected on the XOY plane, with the image projected on the XOZ plane on the right, in an embodiment of the present invention;
FIG. 4 is an image of an initial centerline of an XOY-plane roadway in an embodiment of the present invention;
FIG. 5 is a diagram of a detection template identifying segment nodes in a raster pattern in an embodiment of the present invention;
FIG. 6 is an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image in an embodiment of the present invention;
FIG. 7 is a schematic diagram of the final calculated roadway center line and roadway where it is located in an embodiment of the present invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the invention.
Referring to fig. 1, a flowchart of an automatic extraction method for a roadway point cloud center line is shown, and the automatic extraction method for the roadway point cloud center line comprises the following steps:
step 100: and (3) scanning the roadway through three-dimensional laser, and collecting point cloud data of the roadway.
In the embodiment of the invention, the roadway can be scanned in various modes, for example, the roadway is scanned by a three-dimensional laser radar, so that the point cloud data of the roadway are acquired, and the acquired point cloud data comprise: XYZ coordinate information and other information, which may include: RGB information, intensity information, time information. But other information does not affect the outcome of any arithmetic operations in subsequent steps. The collected point cloud data reflects the conditions inside the roadway, including roadway walls, internal equipment and the like, but is affected by the precision of the laser radar, and the point cloud data possibly contains noise.
Step 200: and converting the coordinate system of the point cloud data into the coordinate system of the roadway through rotary translation according to the point cloud data.
After the roadway point cloud data are obtained, the XYZ coordinate information is obtained based on the coordinate system of the three-dimensional laser radar, so that the information loss of subsequent projection is reduced, and the coordinate system of the point cloud data (the coordinate system of the three-dimensional laser radar) is required to be converted into a roadway coordinate system with roadway orientation as an X axis, so that an accurate basis is provided for the subsequent automatic extraction of the point cloud center line.
In one possible embodiment, step 200 may specifically include:
calculating to obtain the mass center of the point cloud according to the point cloud data;
determining a translation vector of the point cloud according to the mass center;
and translating the point cloud according to the translation vector so that the centroid is positioned at the origin point under the tunnel coordinate system.
For example: calculating centroid (X) of point cloud c ,Y c ,Z c ) The calculation method is as follows: after the centroid is obtained, the translation vector t= [ -X of the point cloud c ,-Y c ,-Z c ]And translating the point cloud according to t, so that the centroid of the point cloud is positioned at the origin point under the tunnel coordinate system.
And according to the coordinate system of the point cloud data, combining the point cloud of which the centroid is positioned at the original point under the coordinate system of the roadway after translation, and converting the coordinate system of the point cloud data into the coordinate system of the roadway.
After the translation of the point cloud is completed and the centroid of the point cloud is located at the origin under the tunnel coordinate system, the principal component of the point cloud needs to be calculated.
The method for calculating the principal components of the point cloud comprises the following steps: firstly, calculating a covariance matrix of the point cloud, and then carrying out SVD singular value decomposition on the covariance matrix to obtain a characteristic value and a corresponding characteristic vector. Sorting the characteristic values from big to small, and taking the first three characteristic values and the corresponding characteristic vectors a thereof 1 ,a 2 ,a 3 This is the first three principal components of the point cloud.
Since the main direction of the roadway is roadway direction, the first main component a can be defined 1 Represents the roadway orientation, and a 1 ,a 2 ,a 3 Mutually orthogonal, thus let a 1 The direction is the X-axis direction, a in the point cloud coordinate system 2 The direction is the Y-axis direction and a in the point cloud coordinate system 3 And the direction is the Z-axis direction under the point cloud coordinate system, and a tunnel orientation coordinate system is established.
Determining a rotation matrix of the point cloud according to a linear space base coordinate transformation formula; for example: point p in a point cloud 0 =[x 0 ,y 0 ,z 0 ] T At a 1 ,a 2 ,a 3 The lower coordinate p p =A -1 p 0 Wherein a= [ a ] 1 ,a 2 ,a 3 ]The method obtains the point cloud data under the tunnel coordinate systemNew coordinates, as shown in fig. 2.
Step 300: and (3) carrying out projection rasterization on the point cloud data under the tunnel coordinate system on the XOY and XOZ planes at a given resolution to obtain corresponding XOY images and XOZ images.
And based on the point cloud data under the tunnel coordinate system, carrying out projection rasterization on the point cloud data under the tunnel coordinate system in the XOY and XOZ planes with a given resolution to obtain corresponding XOY images and XOZ images.
In one possible embodiment, step 300 specifically includes:
on an XOY plane, determining an X coordinate range and a Y coordinate range of the point cloud to determine a projection range of the point cloud on the XOY plane;
and on the XOZ plane, determining an X coordinate range and a Z coordinate range of the point cloud to determine the projection range of the point cloud on the XOZ plane.
For example: determining a point cloud projection range X min ,X max ,Y min ,Y max ,Z min ,Z max . Due to the limitations of the acquisition environment and the acquisition means, a large number of sparse and invalid points often exist on two sides of the roadway time point cloud with two open ends, and the roadway center line generated by the points is low in confidence and can be abandoned in projection.
In the embodiment of the invention, the average value of the distribution density of the point cloud along the roadway direction (X axis) is used as the threshold value for judging the beginning and the end of the effective point cloud of the roadway, and the point cloud with the distribution density lower than the threshold value on the two sides of the roadway is discarded, and the X axis coordinate range corresponding to the threshold value is (X axis) min ,X max ). The point clouds are distributed in a narrower range in the directions of the Y axis and the Z axis, so the invention is provided withZ min =Y min ,Z max =Y max The length and the width of the rear projection images are equal, so that the subsequent processing and analysis are convenient.
And carrying out projection rasterization on the point cloud data under the roadway coordinate system to obtain corresponding XOY images and XOZ images according to a given resolution and combining the projection range of the point cloud on the XOY plane and the projection range of the point cloud on the XOZ plane.
The given image resolution is the theoretical precision of the extracted lane center line, and is set according to actual needs, and in the embodiment of the invention, the given resolution is set to be 0.1 meter. Then the number of lines of XOY and XOZ images is calculated,
col XOZ =row XOY
the row and column coordinates of points in the point cloud on the XOY and XOZ images are calculated, and for a point P (X, Y, Z) in the point cloud, on the XOY image,on the image of the XOZ image the image data,and calculating row and column numbers of all effective points in the point cloud according to the formula, assigning 1 to corresponding pixels, and keeping other pixels to be 0 so as to obtain corresponding XOY images and XOZ images. As shown in fig. 3, fig. 3 is divided into left and right images by black broken lines, the left image being an XOY plane projected image, and the right image being an XOZ plane projected image.
Step 400: filtering the XOY image and the XOZ image, deleting discrete points, extracting initial central lines, and respectively obtaining the initial central lines of the XOY plane roadway and the XOZ plane roadway.
After the corresponding XOY image and the corresponding XOZ image are obtained, as discrete points exist on two sides of the actual roadway, the discrete points can influence the extraction of the center line of the subsequent point cloud, filtering is needed, the discrete points are deleted, the initial center line is extracted, and the initial center line of the XOY plane roadway and the initial center line of the XOZ plane roadway are respectively obtained.
In one possible embodiment, step 400 specifically includes:
filtering the XOY image and the XOZ image by using an open curve algorithm, and filtering and deleting discrete points at two sides of the roadway. The open curve algorithm is used for removing isolated areas in the image and consists of two steps of corrosion and expansion.
And extracting initial central lines of the filtered grid images, namely extracting initial central lines of the filtered XOY images and the XOZ images. The algorithm for extracting the central line uses a Zhang-Suen algorithm, each iteration step of the algorithm is to erode the target pixels meeting specific conditions, and the algorithm is continuously iterated until no new pixel points are eroded in the current round of operation of the target after the last erosion.
The initial center line extraction result is shown in fig. 4, an initial center line of the XOY plane roadway and an initial center line of the XOZ plane roadway are respectively obtained, the initial center line of the XOZ plane roadway are divided into a left image and a right image by black dotted lines in fig. 4, the left image is the initial center line of the XOY plane roadway, and a plurality of line segments outside the initial center line are generated error line segments; the right graph is the initial center line of the XOZ plane roadway, and similarly, the line segments outside the initial center line are the generated wrong line segments.
Step 500: filtering the initial centerline of the XOY plane roadway, deleting the initial centerline of the XOZ plane roadway, and generating wrong line segments to respectively obtain an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image.
After the initial centerline of the XOY plane roadway and the initial centerline of the XOZ plane roadway are obtained, the initial centerline of the XOY plane roadway is filtered again, the initial centerline of the XOZ plane roadway is deleted to generate an incorrect line segment, the extracted roadway centerline possibly contains branch parts which do not meet the actual situation and need to be identified and deleted due to the restriction of an extraction centerline algorithm, and therefore an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image are obtained respectively.
In one possible embodiment, step 500 specifically includes:
determining an initial center line of the XOY plane roadway, wherein the initial center line of the XOZ plane roadway corresponds to pixels belonging to nodes in the image respectively, and the nodes are a starting point and an ending point of any line segment in the image. Based on the initial center line of the XOY plane roadway, the initial center lines of the XOZ plane roadway respectively correspond to the images, a node detection template shown in figure 5 is defined, and the pixel value of a center pixel p is 1;
if the line segment passes through the point p, based on the first-order 8 neighborhood and the second-order 16 neighborhood, the distribution of the corresponding grid is as follows:
if p 8 The pixel value is 1, p 7 ,p 0 ,p 1 At least one of the pixels has a value of 1, denoted as bool (p 8]and bool(p[7]or p[0]or p[1]));
If p 17 The pixel value is 1, p 5 ,p 4 At least one of the pixels has a value of 1, denoted as bool (p 17]and bool(p[4]or p[5]) And so on, all 16 cases are shown as follows: bool (p 8)]and bool(p[7]or p[0]or p[1])),bool(p[9]and bool(p[0]or p[1])),bool(p[10]and p[1]),bool(p[11]and bool(p[1]or p[2])),bool(p[12]and bool(p[1]or p[2]or p[3])),bool(p[13]and bool(p[2]or p[3])),bool(p[14]and p[3]),bool(p[15]and bool(p[3]or p[4])),bool(p[16]and bool(p[3]or p[4]or p[5])),bool(p[17]and bool(p[4]or p[5])),bool(p[18]and p[5]),bool(p[19]and bool(p[5]or p[6])),bool(p[20]and bool(p[5]or p[6]or p[7])),bool(p[21]and bool(p[6]or p[7])),bool(p[22]and p[7]),bool(p[23]and bool(p[7]or p[0]))
And if and only if 1 or 3 or more line segments pass through the point p, the point p is a node in the grid graph, so that the part belonging to the node in the image corresponding to the initial center line of the XOY plane roadway is obtained, and the part belonging to the node in the image corresponding to the initial center line of the XOZ plane roadway is obtained.
And then, according to the nodes, tracking and determining initial centerlines of the XOY plane roadway, wherein the initial centerlines of the XOZ plane roadway respectively correspond to all line segments in the image. In the embodiment of the invention, a firing algorithm is used for tracking the line segments, and the algorithm flow is as follows:
after all the line segments in the image are tracked, the line segments are judged, the line segments which need to be deleted and are wrong in generation are determined, and the judging rules comprise:
step a: and calculating the included angle between the line formed by connecting the head and tail nodes of all the line segments and the horizontal line of the corresponding image, and deleting the line segments according to the preset included angle condition. In the embodiment of the invention, for the XOY image, the central line of the roadway is mainly along the vertical direction, so that the line segment with the included angle smaller than 15 degrees is deleted; for the XOZ image, the lane center line mainly faces the horizontal direction, so the line segment with the included angle larger than 75 degrees is deleted.
Step b: deleting special line segments with the first and the last nodes as endpoints (namely, only 1 line passes through the node in the previous step) and the length smaller than a length threshold value, wherein the length threshold value takes pixels as a unit; the rule is mainly for discrete branches, in an embodiment of the invention the length threshold is set to 10 pixels.
Step c: and deleting all the line segments except the special line segment, wherein the length of the line segment is smaller than the length threshold value.
And c, sequentially executing the steps a to c, and re-calculating the initial center line of the XOY plane roadway after each operation is executed, wherein the initial center line of the XOZ plane roadway corresponds to the part belonging to the node and the corresponding line segment in the image respectively, and iterating each image repeatedly until no pixel in the image is deleted again.
And deleting the generated wrong line segments to obtain the XOY plane roadway optimization center line image and the XOZ plane roadway optimization center line image respectively. Exemplary as shown in fig. 6, fig. 6 is divided into two right images by a black dotted line, the left image is an XOY plane roadway optimization centerline image, and the right image is an XOZ plane roadway optimization centerline image. As can be seen from comparing fig. 4, the optimized centerline after optimizing the initial centerline, the line segment generating the error is deleted, and only the centerline remains.
Step 600: and generating XYZ coordinates of the tunnel point cloud center line through coordinate conversion according to the XOY plane tunnel optimization center line image and the XOZ plane tunnel optimization center line image.
After obtaining an XOY plane tunnel optimization central line image and an XOZ plane tunnel optimization central line image, generating XYZ coordinates of a tunnel point cloud central line through coordinate conversion according to the XOY plane tunnel optimization central line image and the XOZ plane tunnel optimization central line image.
In one possible embodiment, step 600 specifically includes:
aligning the rows of the XOY plane roadway optimization centerline images with the columns of the XOZ plane roadway optimization centerline images, and obtaining the XYZ coordinates of points on the roadway point cloud centerline through coordinate conversion; and generating the XYZ coordinates of the central line of the roadway point cloud according to the XYZ coordinates of the points on the central line of the roadway point cloud.
By aligning the rows of the XOY-plane roadway-optimized centerline image with the columns of the XOZ-plane roadway-optimized centerline image, the three-dimensional X, Y, Z coordinates of the image of the point on the centerline are obtained for a point on the XOY-plane roadway centerlineIts corresponding point on the XOZ plane tunnel centre line +.>Satisfy the following requirementsThree-dimensional coordinates of p
According to the formula, the three-dimensional coordinate XYZ of the center line of the roadway point cloud is calculated, and the result is shown in FIG. 7. The black line solid line in fig. 7 is the central line of the roadway point cloud obtained by the automatic extraction method of the central line of the roadway point cloud, and the gray area surrounding the central line of the roadway point cloud is the roadway.
In summary, according to the roadway point cloud central line automatic extraction method provided by the invention, firstly, roadway point cloud data are collected by scanning the roadway through three-dimensional laser; and then converting the coordinate system of the point cloud data into the coordinate system of the roadway through rotary translation according to the point cloud data. Then, carrying out projection rasterization on the point cloud data under the tunnel coordinate system in the XOY and XOZ planes with a given resolution to obtain corresponding XOY images and XOZ images; filtering the XOY image and the XOZ image, deleting discrete points, extracting initial center lines, and respectively obtaining initial center lines of the XOY plane roadway and the XOZ plane roadway; filtering the initial centerline of the XOY plane roadway, deleting the initial centerline of the XOZ plane roadway, and generating wrong line segments to respectively obtain an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image; and finally, generating XYZ coordinates of the tunnel point cloud center line through coordinate conversion according to the XOY plane tunnel optimization center line image and the XOZ plane tunnel optimization center line image.
The automatic extraction method of the roadway point cloud center line can automatically extract the roadway center line without any priori information, does not need or only needs a small amount of manual intervention in the operation process, has high automation degree, and in addition, converts the extracted roadway center line into two-dimensional roadway image center line extraction, reduces the difficulty of extracting the roadway point cloud center line, and has good practicability.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The embodiments of the present invention have been described above with reference to the accompanying drawings, but the present invention is not limited to the above-described embodiments, which are merely illustrative and not restrictive, and many forms may be made by those having ordinary skill in the art without departing from the spirit of the present invention and the scope of the claims, which are to be protected by the present invention.

Claims (10)

1. The automatic extraction method for the center line of the roadway point cloud is characterized by comprising the following steps of:
step 100: scanning a roadway through three-dimensional laser, and collecting point cloud data of the roadway;
step 200: converting a coordinate system of the point cloud data into a coordinate system of the roadway through rotation and translation according to the point cloud data;
step 300: the point cloud data under the tunnel coordinate system are projected and rasterized into corresponding XOY images and XOZ images on the XOY plane and the XOZ plane with a given resolution;
step 400: filtering the XOY image and the XOZ image, deleting discrete points, extracting initial center lines, and respectively obtaining initial center lines of the XOY plane roadway and the XOZ plane roadway;
step 500: filtering the initial centerline of the XOZ plane roadway, deleting the generated error line segments to obtain an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image respectively;
step 600: and generating XYZ coordinates of the tunnel point cloud center line through coordinate conversion according to the XOY plane tunnel optimization center line image and the XOZ plane tunnel optimization center line image.
2. The method for automatically extracting the center line of the roadway point cloud as claimed in claim 1, wherein the step 200: converting the coordinate system of the point cloud data into the coordinate system of the roadway through rotation and translation according to the point cloud data, wherein the method specifically comprises the following steps of:
calculating the mass center of the point cloud according to the point cloud data;
determining a translation vector of the point cloud according to the centroid;
according to the translation vector, translating the point cloud so that the centroid is located at an origin point under the tunnel coordinate system;
and according to the coordinate system of the point cloud data, combining the point cloud of which the centroid is positioned at the origin under the tunnel coordinate system after translation, and converting the coordinate system of the point cloud data into the coordinate system of the tunnel.
3. The method according to claim 2, wherein converting the coordinate system of the point cloud data into the coordinate system of the roadway according to the coordinate system of the point cloud data in combination with the point cloud of which the centroid is located at the origin under the coordinate system of the roadway after translation, comprises:
after the point cloud translates, determining the first three main components of the point cloud through a main component analysis method;
defining a first principal component in the first three principal components as an X-axis direction under a point cloud coordinate system;
defining a second principal component in the first three principal components as a Y-axis direction under a point cloud coordinate system;
defining a third principal component in the first three principal components as a Z-axis direction under a point cloud coordinate system;
determining a rotation matrix of the point cloud through a conversion formula of a linear space base;
and according to the first main component, the second main component and the third main component, combining the rotation matrix of the point cloud, and obtaining new coordinates of the cloud data under the tunnel coordinate system by translating and rotating the coordinate system of the cloud data.
4. The method for automatically extracting the center line of the roadway point cloud as recited in claim 1, wherein said step 300: and carrying out projection rasterization on point cloud data under a tunnel coordinate system in an XOY plane and an XOZ plane with a given resolution to obtain corresponding XOY images and XOZ images, wherein the method specifically comprises the following steps of:
on an XOY plane, determining an X coordinate range and a Y coordinate range of the point cloud to determine a projection range of the point cloud on the XOY plane;
on an XOZ plane, determining an X coordinate range and a Z coordinate range of the point cloud to determine a projection range of the point cloud on the XOZ plane;
and carrying out projection rasterization on the point cloud data under the roadway coordinate system according to the given resolution in combination with the projection range of the point cloud on the XOY plane and the projection range of the point cloud on the XOZ plane to obtain corresponding XOY images and XOZ images.
5. The method for automatically extracting a center line of a roadway point cloud as recited in claim 4, wherein said step 400: filtering the XOY image and the XOZ image, deleting discrete points, extracting initial central lines, and respectively obtaining initial central lines of the XOY plane roadway and the XOZ plane roadway, wherein the method specifically comprises the following steps of:
filtering the XOY image and the XOZ image by using an open curve algorithm, and filtering and deleting discrete points at two sides of a roadway;
extracting initial central lines of the filtered XOY image and the XOZ image to respectively obtain initial central lines of the XOY plane roadway, wherein the initial central lines of the XOZ plane roadway are obtained.
6. The method for automatically extracting the center line of the roadway point cloud as recited in claim 4, wherein said step 500: filtering the initial centerline of the XOZ plane roadway, deleting the generated error line segments to respectively obtain an XOY plane roadway optimization centerline image and an XOZ plane roadway optimization centerline image, and specifically comprising the following steps:
determining initial central lines of the XOY plane roadway, wherein the initial central lines of the XOZ plane roadway respectively correspond to pixels belonging to nodes in an image, and the nodes are the starting points and the ending points of all line segments in the image;
tracking and determining initial centerlines of the XOY plane roadway according to the nodes, wherein the initial centerlines of the XOZ plane roadway respectively correspond to all line segments in an image;
judging all the line segments, and determining the line segments which need to be deleted and generate errors;
and deleting the generated wrong line segments to respectively obtain an XOY plane roadway optimization center line image and an XOZ plane roadway optimization center line image.
7. The method for automatically extracting a center line of a roadway point cloud as recited in claim 4, wherein said step 600: generating XYZ coordinates of the roadway point cloud center line through coordinate conversion according to the XOY plane roadway optimization center line image and the XOZ plane roadway optimization center line image, wherein the XYZ coordinates specifically comprise:
aligning the rows of the XOY plane roadway optimization centerline images with the columns of the XOZ plane roadway optimization centerline images, and obtaining the XYZ coordinates of points on the roadway point cloud centerline through coordinate conversion;
and generating the XYZ coordinates of the central line of the roadway point cloud according to the XYZ coordinates of the point on the central line of the roadway point cloud.
8. The method for automatically extracting a roadway point cloud center line of claim 5, wherein the point cloud data comprises: XYZ coordinate information and other point cloud information including: RGB information, intensity information and time information, wherein the other point cloud information does not influence the operation results of the following steps 2 to 6.
9. The method for automatically extracting a roadway point cloud center line according to claim 6, wherein determining the XOY plane roadway initial center line, the XOZ plane roadway initial center line respectively corresponding to a portion belonging to a node in an image, comprises:
based on the initial center line of the XOY plane roadway, the initial center lines of the XOZ plane roadway respectively correspond to images, and a center pixel with a pixel value of 1 is defined as p;
if the line segment passes through the point p, based on the first-order 8 neighborhood and the second-order 16 neighborhood, the distribution of the corresponding grid is as follows:
if p 8 The pixel value is 1, p 7 ,p 0 ,p 1 At least one of the pixels has a value of 1, denoted as bool (p 8]and bool(p[7]or p[0]or p[1]));
If p 17 The pixel value is 1, p 5 ,p 4 At least one of the pixels has a value of 1, denoted as bool (p 17]and bool(p[4]or p[5]) And so on, all 16 cases are shown as follows:
bool(p[8]and bool(p[7]or p[0]or p[1])),bool(p[9]and bool(p[0]or p[1])),
bool(p[10]and p[1]),bool(p[11]and bool(p[1]or p[2])),
bool(p[12]and bool(p[1]or p[2]or p[3])),bool(p[13]and bool(p[2]or p[3])),
bool(p[14]and p[3]),bool(p[15]and bool(p[3]or p[4])),
bool(p[16]and bool(p[3]or p[4]or p[5])),bool(p[17]and bool(p[4]or p[5])),
bool(p[18]and p[5]),bool(p[19]and bool(p[5]or p[6])),
bool(p[20]and bool(p[5]or p[6]or p[7])),bool(p[21]and bool(p[6]or p[7])),
bool(p[22]and p[7]),bool(p[23]and bool(p[7]or p[0]))
and if and only if 1 or 3 or more line segments pass through the point p, the point p is a node in the grid graph, so that the part of the initial center line of the XOY plane roadway, which belongs to the node, in the image is obtained, and the part of the initial center line of the XOZ plane roadway, which does not belong to the node, in the image is obtained.
10. The method for automatically extracting the center line of the roadway point cloud according to claim 9, wherein the determining the line segment to be deleted and generating the error includes:
step a: calculating the included angle between the line formed by connecting the first and last nodes of all the line segments and the horizontal line of the corresponding image, and deleting the line segments according to the preset included angle condition;
step b: deleting special line segments with the first node and the last node as endpoints and the length smaller than a length threshold, wherein the length threshold takes pixels as a unit;
step c: deleting the line segments with the length smaller than the length threshold value except the special line segment in all the line segments;
and c, sequentially executing the steps a to c, and re-calculating the initial center line of the XOY plane roadway after each operation is executed, wherein the initial center line of the XOZ plane roadway corresponds to the part belonging to the node and the line segment corresponding to the part in the image respectively, and iterating each image until no pixel in the image is deleted again.
CN202310146534.4A 2023-02-08 2023-02-08 Automatic roadway point cloud center line extraction method Active CN116630399B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310146534.4A CN116630399B (en) 2023-02-08 2023-02-08 Automatic roadway point cloud center line extraction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310146534.4A CN116630399B (en) 2023-02-08 2023-02-08 Automatic roadway point cloud center line extraction method

Publications (2)

Publication Number Publication Date
CN116630399A true CN116630399A (en) 2023-08-22
CN116630399B CN116630399B (en) 2024-02-09

Family

ID=87625386

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310146534.4A Active CN116630399B (en) 2023-02-08 2023-02-08 Automatic roadway point cloud center line extraction method

Country Status (1)

Country Link
CN (1) CN116630399B (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117232394A (en) * 2023-11-10 2023-12-15 太原理工大学 Deviation detection method for coal mine tunneling roadway

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109919955A (en) * 2019-03-11 2019-06-21 南京林业大学 The tunnel axis of ground formula laser radar point cloud extracts and dividing method
CN110007324A (en) * 2019-02-21 2019-07-12 南京航空航天大学 A kind of fault satellites Relative Navigation based on SLAM
CN111524103A (en) * 2020-04-10 2020-08-11 山东科技大学 Circular tunnel central axis extraction method based on three-dimensional laser point cloud
US20200388044A1 (en) * 2019-06-06 2020-12-10 Zhejiang University Plant point cloud acquisition, registration and optimization method based on tof camera
CN113593038A (en) * 2021-07-28 2021-11-02 北京数字绿土科技有限公司 Tunnel point cloud central line automatic extraction and triangulation network construction method

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110007324A (en) * 2019-02-21 2019-07-12 南京航空航天大学 A kind of fault satellites Relative Navigation based on SLAM
CN109919955A (en) * 2019-03-11 2019-06-21 南京林业大学 The tunnel axis of ground formula laser radar point cloud extracts and dividing method
US20200388044A1 (en) * 2019-06-06 2020-12-10 Zhejiang University Plant point cloud acquisition, registration and optimization method based on tof camera
CN111524103A (en) * 2020-04-10 2020-08-11 山东科技大学 Circular tunnel central axis extraction method based on three-dimensional laser point cloud
CN113593038A (en) * 2021-07-28 2021-11-02 北京数字绿土科技有限公司 Tunnel point cloud central line automatic extraction and triangulation network construction method

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
李兵等: "基于点云数据的隧道中轴线自动提取方法研究", 重庆建筑, no. 1, pages 56 - 60 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117232394A (en) * 2023-11-10 2023-12-15 太原理工大学 Deviation detection method for coal mine tunneling roadway

Also Published As

Publication number Publication date
CN116630399B (en) 2024-02-09

Similar Documents

Publication Publication Date Title
CN110340891B (en) Mechanical arm positioning and grabbing system and method based on point cloud template matching technology
Sampath et al. Building boundary tracing and regularization from airborne LiDAR point clouds
CN106780524B (en) Automatic extraction method for three-dimensional point cloud road boundary
Cheng et al. 3D building model reconstruction from multi-view aerial imagery and lidar data
Xiong et al. A graph edit dictionary for correcting errors in roof topology graphs reconstructed from point clouds
Boulaassal et al. Automatic extraction of planar clusters and their contours on building façades recorded by terrestrial laser scanner
CN116630399B (en) Automatic roadway point cloud center line extraction method
CN109410183B (en) Plane extraction method, system and device based on point cloud data and storage medium
CN113593038A (en) Tunnel point cloud central line automatic extraction and triangulation network construction method
CN113066004A (en) Point cloud data processing method and device
Rashidi et al. Ground filtering LiDAR data based on multi-scale analysis of height difference threshold
CN114463521B (en) Building target point cloud rapid generation method for air-ground image data fusion
Liu et al. Application of three-dimensional laser scanning in the protection of multi-dynasty ceramic fragments
Chen et al. Range image segmentation for modeling and object detection in urban scenes
CN112465991B (en) Method for denoising tunnel point cloud and generating visual model
CN113838069A (en) Point cloud segmentation method and system based on flatness constraint
CN110458938B (en) Real-time three-dimensional reconstruction method and system for bulk material pile
Ni et al. Applications of 3d-edge detection for als point cloud
Sumi et al. Multiple TLS point cloud registration based on point projection images
CN114677388A (en) Room layout dividing method based on unit decomposition and space division
Sajadian et al. A data driven method for building reconstruction from LiDAR point clouds
Kurdi et al. Automated building footprint and 3d building model generation from lidar point cloud data
Bretar et al. Terrain modeling and airborne laser data classification using multiple pass filtering
Ye et al. Gaussian Mixture Model of Ground Filtering Based on Hierarchical Curvature Constraints for Airborne Lidar Point Clouds
JP2021039500A (en) Method of generating three-dimensional shape data of construct

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