Disclosure of Invention
In the prior art, methods for detecting road edges (such as vision-based methods) are easily blocked by vehicles, so that errors exist in the detected road edges. Therefore, the disclosed embodiments at least provide a road edge detection method, apparatus, high-precision map, vehicle and computer-readable storage medium to improve the detection precision of road edges.
In a first aspect, an embodiment of the present disclosure provides a road edge detection method, including:
segmenting the acquired point cloud map to obtain a plurality of point cloud sub-images;
extracting road edge seed points of each point cloud subgraph based on each point cloud subgraph;
detecting road edge points by using a normal vector and region growing clustering method based on each road edge seed point;
and splicing the detected road edge points to obtain a road boundary line.
In the embodiment of the disclosure, the point cloud map is divided into a plurality of point cloud sub-maps, the road edge seed points of each point cloud sub-map are extracted, the road edge points are detected by using a normal vector and region growing clustering method based on each seed point, and finally the edge points detected by each point cloud sub-map are spliced to obtain the road boundary line, so that complete road edge point clouds can be obtained, and the accuracy and robustness of road edge detection are improved.
In a possible implementation manner, the extracting, based on each point cloud sub-graph, a road edge seed point of each point cloud sub-graph includes:
searching a first seed point in a search area formed by two adjacent search directions; the searching direction is an outward radiation direction with a central point of the point cloud subgraph as a starting point.
And extracting the first seed points to serve as road edge seed points of each point cloud subgraph.
In the embodiment of the disclosure, based on the central point of each point cloud sub-graph, the searching is performed in a plurality of radial directions respectively towards a direction far away from the central point, so that a large number of road edge seed points with wide distribution can be obtained.
According to the first aspect, in a possible implementation manner, the searching for the first seed point in the search area formed by two adjacent search directions includes:
and searching the first seed point according to a search interval in the search area.
In a possible implementation manner, the first seed point is a point in a search interval with a larger height average value of the point cloud in two adjacent search intervals.
In a possible implementation manner, the method for detecting road edge points by using normal vectors and region growing clustering based on each seed point includes:
and based on each seed point, detecting the road edge points by using a region growing clustering method by using a normal vector of the ground and a normal vector of a point, the distance between which and each seed point is less than a preset distance.
In the embodiment of the disclosure, since the region growing clustering is performed by using the normal vector of the ground and the normal vector of the point, of which the distance from the normal vector of the ground to each seed point is smaller than the preset distance, the detection precision of the road edge point can be ensured, and the detection of other points (for example, the point on the road edge parallel to the ground) outside the road edge line is avoided.
In a possible implementation manner, based on each seed point, the detecting the road edge point by using a normal vector of the ground and a normal vector of a point whose distance from each seed point is smaller than a preset distance by using a region growing clustering method includes:
calculating a normal vector of a point, the distance between which and each seed point is less than a preset distance, and adding a point, the corresponding normal vector of which is vertical to the normal vector of the ground, into a clustering result;
respectively calculating normal vectors of points with the distance between each point in the clustering result being less than the preset distance, and adding points with the normal vectors corresponding to each point being perpendicular to the ground normal vectors into the clustering result until no new points are added into the clustering result;
and determining points in the clustering result as the road edge points.
In a possible implementation according to the first aspect, the determining points in the cluster as the road edge points comprises:
judging the height of the point cloud in each clustering result, and eliminating abnormal clustering results of which the height is greater than the reference height;
and determining points in other clustering results from which the abnormal clustering results are removed as the road edge points.
In the embodiment of the disclosure, by judging the height of the point cloud in each clustering result, the abnormal clustering result with the height of the point cloud being greater than the reference height can be removed, and then the point clouds of static vehicles, dynamic vehicles and the like can be removed, so that false detection can be avoided, and further the detection precision and robustness of the road edge can be further improved.
According to the first aspect, in a possible implementation, the stitching the edge points detected by each point cloud sub-graph to obtain a road boundary line includes:
splicing each point cloud subgraph to obtain a road edge point cloud of the point cloud map;
and connecting the road edge point clouds to obtain the road boundary line.
In a possible implementation manner, according to the first aspect, the connecting the road edge point clouds to obtain the road boundary line includes:
according to the extending track of the road, selecting road edge points close to the center of the road to be connected into a road line, and eliminating road edge points deviating from the straight line part in the road line;
and connecting the broken road edge lines along the extending direction of the road, thereby forming the road boundary line.
In the embodiment of the disclosure, the parts of the road edge point clouds broken due to vehicle shielding can be connected, so that the finished road boundary line is formed, and in the splicing process, the road edge points deviating from the straight line part in the road line are eliminated, so that the finally obtained road boundary line is accurate.
According to the first aspect, in a possible implementation, the segmenting the acquired point cloud map to obtain a plurality of point cloud sub-graphs includes:
segmenting the acquired point cloud map about the road along a preset direction to obtain a plurality of point cloud sub-images; an included angle between the preset direction and the specific direction is smaller than a preset included angle; the specific direction is perpendicular to an extending direction of the road.
In the embodiment of the disclosure, the point cloud map is segmented according to the method, so that subsequent extraction of seed points and detection of road edge points are facilitated.
In a possible implementation manner, before the segmenting the acquired point cloud map about the road along a preset direction, the method further includes:
determining a plurality of parallel pre-cut lines according to the placing mode of the point cloud map;
determining the intersection point of each cutting line and two edges of the road, and determining the central point of a line segment formed by the intersection points according to the intersection points;
and determining an extending direction formed by connecting lines of the central points as the extending direction of the road.
In a second aspect, an embodiment of the present disclosure provides a road edge detection apparatus, including:
the segmentation module is used for segmenting the acquired point cloud map to obtain a plurality of point cloud subgraphs;
the extraction module is used for extracting road edge seed points of each point cloud sub-graph based on each point cloud sub-graph;
the detection module is used for detecting road edge points by utilizing a normal vector and region growing clustering method based on each seed point;
and the splicing module is used for splicing the edge points of each detected point cloud sub-image to obtain a road boundary line.
According to the second aspect, in a possible implementation manner, the extraction module is specifically configured to:
and on the basis of the central point of each point cloud subgraph, searching in a plurality of radial directions away from the central point respectively, and further extracting road edge seed points of each point cloud subgraph.
According to the second aspect, in a possible implementation manner, the extraction module is specifically configured to:
and in each searching direction, searching in a direction far away from the central point by using a preset step length and a preset angle on the basis of the central point of each point cloud sub-graph.
According to the second aspect, in one possible implementation, in each search direction, a plurality of search sections are formed by the preset step length and the preset angle, and the areas of the plurality of search sections gradually increase along a direction away from the central point; the extraction module is specifically configured to:
and when the absolute value of the difference value of the height mean values of the point clouds in the two adjacent search intervals is larger than a first threshold value and smaller than a second threshold value, extracting the point in the search interval with the larger height mean value as the seed point.
According to the second aspect, in a possible implementation manner, the detection module is specifically configured to:
and based on each seed point, detecting the road edge points by using a region growing clustering method by using a normal vector of the ground and a normal vector of a point, the distance between which and each seed point is less than a preset distance.
According to the second aspect, in a possible implementation manner, the detection module is specifically configured to:
calculating a normal vector of a point, the distance between which and each seed point is less than a preset distance, and adding a point, the corresponding normal vector of which is vertical to the normal vector of the ground, into a clustering result;
respectively calculating normal vectors of points with the distance between each point in the clustering result being less than the preset distance, and adding the points with the corresponding normal vectors being perpendicular to the ground normal vectors into the clustering result until no new points are added into the clustering result;
and determining points in the clustering result as the road edge points.
According to the second aspect, in a possible implementation manner, the detection module is specifically configured to:
judging the height of the point cloud in each clustering result, and eliminating abnormal clustering results of which the height is greater than the reference height;
and determining points in other clustering results from which the abnormal clustering results are removed as the road edge points.
According to the second aspect, in a possible implementation, the splicing module is specifically configured to:
splicing each point cloud subgraph to obtain a road edge point cloud of the point cloud map;
and connecting the road edge point clouds to obtain the road boundary line.
According to the second aspect, in a possible implementation, the splicing module is specifically configured to:
according to the extending track of the road, selecting road edge points close to the center of the road to be connected into a road line, and eliminating road edge points deviating from the straight line part in the road line;
and connecting the broken road edge lines along the extending direction of the road, thereby forming the road boundary line.
According to a second aspect, in a possible implementation, the cutting module is specifically configured to:
segmenting the acquired point cloud map about the road along a preset direction to obtain a plurality of point cloud sub-images; an included angle between the preset direction and the specific direction is smaller than a preset included angle; the specific direction is perpendicular to an extending direction of the road.
According to a second aspect, in a possible implementation, the cutting module is specifically configured to:
determining a plurality of parallel pre-cut lines according to the placing mode of the point cloud map;
determining the intersection point of each cutting line and two edges of the road, and determining the central point of a line segment formed by the intersection points according to the intersection points;
determining an extending direction formed by connecting lines of the central points as an extending direction of the road
In a third aspect, the disclosed embodiments provide a high-precision map, which includes a plurality of roads, where each road includes a road boundary line, and the road boundary line is obtained by the method described in any one of the possible implementation manners of the first aspect and the first aspect.
In a fourth aspect, an embodiment of the present disclosure provides a vehicle, including: a processor, a memory and a bus, the memory storing machine readable instructions executable by the processor, the processor and the memory communicating over the bus when the vehicle is in operation, the machine readable instructions when executed by the processor performing the steps of the road edge detection method according to the first aspect.
In a fifth aspect, the disclosed embodiments provide a computer-readable storage medium having stored thereon a computer program, which, when executed by a processor, performs the steps of the road edge detection method according to the first aspect.
According to the method and the related device in the embodiment of the disclosure, the point cloud map is divided into the plurality of point cloud sub-maps, the road edge seed points of each point cloud sub-map are extracted, the road edge points are detected by using a normal vector and region growing clustering method based on each seed point, and finally the edge points detected by each point cloud sub-map are spliced to obtain the road boundary line, so that complete road edge point cloud can be obtained, and the accuracy and robustness of road edge detection are improved.
In order to make the aforementioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments accompanied with figures are described in detail below.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be described clearly and completely with reference to the drawings in the embodiments of the present disclosure, and it is obvious that the described embodiments are only a part of the embodiments of the present disclosure, not all of the embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
In recent years, with the great increase of the number of automobiles, many cities face increasingly serious road traffic problems, and unmanned driving receives more and more attention. The unmanned vehicle mainly comprises three parts of environment perception, path planning and decision control, wherein the environment perception is the basis of the path planning and the decision control, and the road environment detection is an important link in an environment perception system, so the road environment detection plays a crucial role in the overall performance of the unmanned vehicle.
Research shows that the traditional navigation map cannot meet the requirement of automatic driving due to insufficient precision. High-precision maps are becoming a common recognition in the industry as an essential part in unmanned driving, and have the advantages of high precision, multiple dimensions and the like. The high-precision map can provide more prospective information indication for the driving system, and matching positioning of the automobile is realized, so that the driving system can sense the traffic situation in a wider range, and the safety of automatic driving is ensured.
Among high-precision maps, point cloud maps are favored by the autopilot industry because of their advantages of being not affected by ambient lighting and accurate in modeling the environment. One of the indispensable links of the decision-making and planning part is semantic map construction of roads, and information such as each lane and road boundaries needs to be detected to assist the unmanned vehicle in making a decision and driving on the correct road.
However, in the prior art, methods for detecting road edges (such as vision-based methods) are easily blocked by vehicles, so that errors exist in the detected road edges. Therefore, how to improve the detection precision of the road edge to ensure the safety of vehicle driving is a technical problem to be solved by the disclosure.
Based on the research, the disclosure provides a road edge detection method, which includes segmenting an acquired point cloud map to obtain a plurality of point cloud subgraphs; extracting a road edge seed point of each point cloud subgraph; detecting road edge points by using a normal vector and region growing clustering method based on each seed point; and splicing the edge points detected by each point cloud sub-image to obtain a road boundary line. The road edge detection method can improve the detection precision and robustness of the road edge.
The above-mentioned drawbacks are the results of the inventor after practical and careful study, and therefore, the discovery process of the above-mentioned problems and the solutions proposed by the present disclosure to the above-mentioned problems should be the contribution of the inventor in the process of the present disclosure.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The term "and/or" herein merely describes an associative relationship, meaning that three relationships may exist, e.g., a and/or B, may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the term "at least one" herein means any one of a plurality or any combination of at least two of a plurality, for example, including at least one of A, B, C, and may mean including any one or more elements selected from the group consisting of A, B and C.
For the purpose of facilitating an understanding of the embodiments of the present application, the following detailed description is provided to explain the present application in conjunction with the specific embodiments. Referring to fig. 1, a flowchart of a road edge detection method provided in an embodiment of the present disclosure is shown, where the road edge detection method includes the following steps S101 to S104:
s101, segmenting the acquired point cloud map to obtain a plurality of point cloud sub-images.
Illustratively, referring to fig. 2, the acquired point cloud map about the road is segmented along a preset direction x3 to obtain a plurality of point cloud sub-graphs. Namely, the point cloud map can be segmented for multiple times along the preset direction, so that multiple point cloud sub-images can be obtained. Wherein, the plurality may be two, three, five or even more, which is not limited herein. The included angle theta between the preset direction x3 and the specific direction x2 is smaller than the preset included angle, and the specific direction x2 is perpendicular to the extending direction x1 of the road.
It is understood that, since the extending direction of the road may not be a straight line, the specific direction x2 is perpendicular to the extending direction x1 of the road, and it is understood that the specific direction x2 is perpendicular to the extending direction of a certain small portion (the small portion may be approximately regarded as a straight line) in the extending direction of the road. When the included angle θ is larger and larger, the preset direction is closer to the extending direction x1 of the road, which is not beneficial to map segmentation, therefore, the included angle θ needs to be smaller than the preset included angle, so that the segmented point cloud sub-graph is beneficial to the extraction of subsequent road seed points.
In some embodiments, referring to fig. 2, before cutting the point cloud map, a plurality of pre-cut lines L may be determined according to a placement manner of the point cloud map. For example, if the point cloud map is horizontally placed, the point cloud map is vertically cut; and if the point cloud map is vertically placed, transversely cutting. Wherein the plurality of pre-cut lines may be a set of pre-cut lines parallel to each other.
Then, determining intersection points D1 and D2 of each cutting line L with both edges of the road, and determining a center point DC of a line segment formed by the intersection points according to the intersection points; and determining an extending direction formed by connecting lines of the plurality of central points DC as the extending direction of the road.
Referring to fig. 3, a side view of a vehicle 100 for acquiring a point cloud map is provided according to an embodiment of the present disclosure. Wherein the vehicle 100 is a navigational mapping vehicle. That is, when the vehicle 100 is traveling on a road, a point cloud map relating to the surrounding environment may be acquired.
Illustratively, the vehicle 100 includes an image acquisition unit 10, a Global Navigation Satellite System (GNSS) unit 20, a point cloud data acquisition unit 30, a vehicle wheel speed meter unit 40, and a multi-sensor data time synchronization unit 50.
The image acquisition unit 10 is used to acquire a plurality of images relating to the surrounding environment. For example, the image capturing unit 10 may include a plurality of monocular cameras, which may be disposed at the outside of the vehicle 100 (e.g., the front of the upper surface of the vehicle).
The GNSS unit 20 is used to provide positioning data of the vehicle 100. For example, the GNSS unit 20 may be a dual-antenna GNSS signal receiving module, which may be installed in the middle of the upper surface of the vehicle 100.
The point cloud data acquisition unit 30 is used for acquiring a point cloud map related to the surrounding environment. Illustratively, the point cloud data acquisition unit 30 may include a lidar (e.g., an oblique multiline lidar). Lidar is used to transmit a first laser beam to the surrounding environment and receive a second laser beam reflected by objects in the environment (e.g., buildings, traffic lights, traffic signs, vehicles, pedestrians, road barriers, roads, etc.).
The vehicle wheel speed meter unit 40, which is used to provide wheel speed data, may be mounted near a wheel, such as a rear wheel.
The multi-sensor data time synchronization unit 50 is coupled to the image acquisition unit 10, the GNSS unit 20, the point cloud data acquisition unit 30, and the wheel speed meter unit 40, and is configured to synchronize data acquired by the image acquisition unit 10, the GNSS unit 20, the point cloud data acquisition unit 30, and the wheel speed meter unit 40, and may be disposed on a side surface of the vehicle 100.
It is understood that the vehicle 100 further includes a processor (not shown in fig. 2), which may be electrically connected to the above units and execute a corresponding method according to the data acquired by the above units, such as the road edge detection method in the embodiment of the present disclosure.
And S102, extracting road edge seed points of each point cloud sub-graph based on each point cloud sub-graph.
For example, a first seed point may be searched in a search area formed by two adjacent search directions, and the first seed point may be extracted as a road edge seed point of each point cloud sub-graph. The searching direction is an outward radiation direction with a central point of the point cloud subgraph as a starting point.
It will be appreciated that since the road edge will be higher than the road, when a search is made in each search area, a location having a significant change in height is searched for, i.e. it can be determined to be a road edge. Therefore, in order to distinguish the road heights in each search area, the search area needs to be divided into sections along the search direction, and a position with a high height needs to be found.
Referring to fig. 4, a first seed point may be searched in a search region composed of two adjacent search directions L1 and L2. In the present embodiment, an included angle a between adjacent search directions L1 and L2 is smaller than a preset angle. Specifically, the first seed point may be searched for by a search interval k in the search region constituted by L1 and L2. And the search interval k is an area formed in the search area according to a preset step length s in the direction away from the central point C. As such, a plurality of search sections k1 to kn may be formed in the search direction within the search area, and the areas of the plurality of search sections (sector sections in fig. 4) gradually increase in a direction away from the center point C. Therefore, when the height average value of the point clouds of two adjacent search sections k changes, the section with the higher height average value can be determined as the road edge seed point.
In the present embodiment, the preset step s is 0.1m, and the preset angle a is 1 °. It can be understood that if the step size is too small, the calculation amount is increased, and the step size is easily influenced by noise; if the step length is too large, the average height is not distinguished obviously (differentiation is not obvious), and the road edge is not easy to find, so that the preset step length and the preset angle can be specifically set according to the actual situation, and the limitation is not made herein.
It should be noted that, usually, the road edge is about 10cm higher than the road surface, and if the difference in height is too large, it indicates that the search interval can be an obstacle or a stationary vehicle, so in this embodiment, it is further limited that the absolute value of the difference in height mean is smaller than the second threshold, so that the extraction accuracy of the seed point can be ensured. For example, the first threshold may be 0.05m and the second threshold may be 0.2 m. Of course, in other embodiments, the first threshold and the second threshold may be other values, and are not limited herein.
Therefore, in the embodiment of the present disclosure, the first seed point is a point in a search interval in which the height average value of the point cloud is larger in two adjacent search intervals, and the absolute value of the difference between the height average values of the point clouds in the two adjacent search intervals is greater than the first threshold and smaller than the second threshold.
Referring to fig. 5, in order to improve the search coverage of the seed points at the edge of the road, the center point C of a single point cloud sub-graph T may be used as a basis, and a plurality of search areas y 1-yn in different directions are respectively searched in a direction away from the center point C, that is, the center point C of the point cloud sub-graph T is used as a basis to search the seed points d at the edge of the road radially and outwardly. In this embodiment, 8 search regions in different directions are respectively used to search in a direction away from the center point C, but it is understood that in other embodiments, more or fewer search regions may be used to search, and the search is not limited herein.
S103, detecting the road edge points by using a normal vector and region growing clustering method based on each road edge seed point.
For example, a clustering method of normal vector and region growing may be used to obtain a clustering result based on each seed point, and a point in the clustering result may be used as the road edge point.
And S104, splicing the detected edge points of the road to obtain a road boundary line.
And splicing the edge points determined by each point cloud sub-image to obtain a complete road boundary line.
In the embodiment of the disclosure, the acquired point cloud map is segmented to obtain a plurality of point cloud sub-maps, then the road edge seed points of each point cloud sub-map are extracted, then the road edge points are determined by a normal vector and growing area clustering method based on each seed point, so that complete road edge point clouds can be obtained, then the road edge point clouds of each point cloud sub-map are spliced, so that a complete road boundary line can be obtained, and the accuracy and robustness of road edge detection are further improved.
The above-mentioned S101 to S104 will be described in detail with reference to specific embodiments.
As shown in fig. 6, the above S101 includes the following S1011 to S1012 when acquiring the point cloud map:
s1011, acquiring a point cloud data frame and pose data corresponding to the point cloud data frame; and synchronizing the point cloud data frame with the time stamp of the corresponding pose data.
For example, the point cloud data frame may be acquired by the point cloud data acquisition unit 30 in fig. 3, the pose data may be acquired by the GNSS unit 20 in fig. 3, and the timestamp may be acquired by the multi-sensor data time synchronization unit 50 in fig. 3. Wherein the pose data comprises position coordinate data and pose data.
And S1012, splicing the point cloud data frames together according to the pose data to obtain a point cloud map.
Due to the fact that the time stamps of the pose data and the point cloud data frames are synchronous, the data frames of different time points are spliced according to the pose data (positioning information), and a point cloud map with high precision can be obtained.
For the above S103, when detecting the road edge point by using the normal vector and region growing clustering method based on each seed point, as shown in fig. 7, the following S1031 to S1033 are included:
and S1031, calculating normal vectors of points with distances between the points and each seed point smaller than a preset distance, and adding the points with the corresponding normal vectors perpendicular to the normal vectors of the ground into the clustering result.
Referring to fig. 8, for each seed point q, a normal vector to a point less than a preset distance (distance between q and p 1) from it is calculated, and a point where the normal vector is perpendicular to the ground is added to the cluster.
S1032, respectively calculating normal vectors of points with the distance between each point in the clustering result and the preset distance, and adding the points with the corresponding normal vectors perpendicular to the ground normal vectors into the clustering result until no new points are added into the clustering result.
Illustratively, for each point in the clustering result, searching outwards by a preset distance (the distance between p1 and p 2), and adding the point of which the normal phasor in the preset distance is perpendicular to the normal vector of the ground into the cluster. Step S1032 is repeated until no new points are added to the cluster. That is, all areas that can be connected are traversed step by step with a fixed search radius.
And S1033, determining the points in the clustering result as the road edge points.
For example, for each cluster, the height of the point cloud is verified, and the clustering result with the height higher than the reference height is removed, for example, the point clouds of static vehicles, dynamic vehicles and the like can be removed. Wherein, the reference height can be set to 1m, and then the condition of error detection can be effectively avoided. Thus, in some embodiments, step S1033 may include the following sub-steps:
a) judging the height of the point cloud in each clustering result, and eliminating abnormal clustering results of which the height is greater than the reference height;
b) and determining points in other clustering results from which the abnormal clustering results are removed as the road edge points.
For the above S104, when the edge points detected by each point cloud sub-image are spliced to obtain a road boundary line, as shown in fig. 9, the method includes the following steps S1041 to S1043:
s1041, splicing each point cloud sub-image to obtain a road edge point cloud of the point cloud map.
In an example, the detection results of all point cloud subgraphs are spliced to obtain complete road edge point clouds, and then the road edge point clouds are connected to obtain a road boundary line. However, in some cases, due to some parameter settings, such as vehicle occlusion, the extracted road edge point cloud may have some disconnection phenomena, and therefore, in some embodiments, in order to further improve the accuracy of the road boundary line, the subsequent steps are also required to be performed.
S1042, according to the extending track of the road, selecting road edge points close to the center of the road to be connected into a road line, and removing road edge points which deviate from a straight line part in the road line.
For example, according to the driving track (i.e. the road extending track) of the vehicle 100 in fig. 3, the road edge points close to the center of the road are selected to be connected into the route line, and the road edge points deviated from the straight line part in the route line are eliminated. For example, the angle between the current road edge point and the straight line part in the road line may be calculated, and when the angle deviation exceeds 15 °, the current road edge point is determined to be a wrong point, so that the current road edge point needs to be eliminated.
And S1043, connecting the broken road edge lines along the extending direction of the road, and further forming a road boundary line.
By way of example, the final road boundary line can be obtained by connecting broken road edges along the extension direction of the road.
It will be understood by those skilled in the art that in the method of the present invention, the order of writing the steps does not imply a strict order of execution and any limitations on the implementation, and the specific order of execution of the steps should be determined by their function and possible inherent logic.
Based on the same technical concept, the embodiment of the present disclosure further provides a road edge detection device corresponding to the road edge detection method, and as the principle of solving the problem of the device in the embodiment of the present disclosure is similar to that of the road edge detection method in the embodiment of the present disclosure, the implementation of the device may refer to the implementation of the method, and repeated details are not repeated.
Referring to fig. 10, a schematic diagram of a road edge detection apparatus 500 according to an embodiment of the present disclosure is shown, the road edge detection apparatus including:
the segmentation module 501 is configured to segment the acquired point cloud map to obtain a plurality of point cloud subgraphs;
an extracting module 502, configured to extract a road edge seed point of each point cloud sub-graph based on each point cloud sub-graph;
the detection module 503 is configured to detect road edge points based on each seed point by using a normal vector and a region growing clustering method;
and the splicing module 504 is configured to splice the detected road edge points to obtain a road boundary line.
In a possible implementation, the extracting module 502 is specifically configured to:
searching a first seed point in a search area formed by two adjacent search directions; the searching direction is an outward radiation direction with a central point of the point cloud subgraph as a starting point;
and extracting the first seed points to serve as road edge seed points of each point cloud subgraph.
In a possible implementation, the extracting module 502 is specifically configured to:
and searching the first seed point according to a search interval in the search area. The search interval is an area formed in the search area according to a preset step length in the direction away from the central point.
In a possible implementation manner, the first seed point is a point in a search interval with a larger height average value of the point cloud in two adjacent search intervals. Specifically, the absolute value of the difference between the height averages of the point clouds in the two adjacent search intervals is greater than a first threshold and smaller than a second threshold.
In a possible implementation, the detecting module 503 is specifically configured to:
and based on each seed point, detecting the road edge points by using a region growing clustering method by using a normal vector of the ground and a normal vector of a point, the distance between which and each seed point is less than a preset distance.
In a possible implementation, the detecting module 503 is specifically configured to:
calculating a normal vector of a point, the distance between which and each seed point is less than a preset distance, and adding a point, the corresponding normal vector of which is vertical to the normal vector of the ground, into a clustering result;
respectively calculating normal vectors of points with the distance between each point in the clustering result being less than the preset distance, and adding the points with the corresponding normal vectors being perpendicular to the ground normal vectors into the clustering result until no new points are added into the clustering result;
and determining points in the clustering result as the road edge points.
In a possible implementation, the detecting module 503 is specifically configured to:
judging the height of the point cloud in each clustering result, and eliminating abnormal clustering results of which the height is greater than the reference height;
and determining points in other clustering results from which the abnormal clustering results are removed as the road edge points.
In a possible implementation, the splicing module 504 is specifically configured to:
splicing each point cloud subgraph to obtain a road edge point cloud of the point cloud map;
and connecting the road edge point clouds to obtain the road boundary line.
In a possible implementation, the splicing module 504 is specifically configured to:
according to the extending track of the road, selecting road edge points close to the center of the road to be connected into a road line, and eliminating road edge points deviating from the straight line part in the road line;
and connecting the broken road edge lines along the extending direction of the road, thereby forming the road boundary line.
In a possible implementation, the segmentation module 501 is specifically configured to:
segmenting the acquired point cloud map about the road along a preset direction to obtain a plurality of point cloud sub-images; an included angle between the preset direction and the specific direction is smaller than a preset included angle; the specific direction is perpendicular to an extending direction of the road.
The description of the processing flow of each module in the device and the interaction flow between the modules may refer to the related description in the above method embodiments, and will not be described in detail here.
In the embodiment of the present disclosure, a high-precision map is further provided, where the high-precision map includes a plurality of roads, each road includes a road boundary line, and the road boundary line is obtained by a road edge detection method in any possible implementation manner.
Based on the same technical concept, the embodiment of the disclosure also provides a vehicle. Referring to fig. 11, a schematic structural diagram of a vehicle 700 provided in the embodiment of the present disclosure includes a processor 701, a memory 702, and a bus 703. The memory 702 is used for storing execution instructions and includes a memory 7021 and an external memory 7022; the memory 7021 is also referred to as an internal memory and temporarily stores operation data in the processor 701 and data exchanged with an external memory 7022 such as a hard disk, and the processor 701 exchanges data with the external memory 7022 via the memory 7021.
In this embodiment, the memory 702 is specifically configured to store application program codes for executing the scheme of the present application, and is controlled by the processor 701 to execute. That is, when the vehicle 700 is running, the processor 701 communicates with the memory 702 via the bus 703, so that the processor 701 executes the application program code stored in the memory 702, thereby executing the method in any of the foregoing embodiments.
The processor 701 may be an integrated circuit chip having signal processing capabilities. The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The Memory 702 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like.
It is to be understood that the illustrated structure of the embodiment of the present application does not specifically limit the vehicle 700. In other embodiments of the present application, the vehicle 700 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
The disclosed embodiments also provide a computer-readable storage medium having a computer program stored thereon, where the computer program is executed by a processor to perform the steps of the road edge detection method in the above method embodiments. The storage medium may be a volatile or non-volatile computer-readable storage medium.
The computer program product of the road edge detection method provided in the embodiments of the present disclosure includes a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute steps of the road edge detection method in the above method embodiments, which may be referred to specifically for the above method embodiments, and are not described herein again.
The embodiments of the present disclosure also provide a computer program, which when executed by a processor implements any one of the methods of the foregoing embodiments. The computer program product may be embodied in hardware, software or a combination thereof. In an alternative embodiment, the computer program product is embodied in a computer storage medium, and in another alternative embodiment, the computer program product is embodied in a Software product, such as a Software Development Kit (SDK), or the like.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described embodiments of the apparatus are merely illustrative, and for example, the division of the units is only one logical division, and there may be other divisions when actually implemented, and for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or units through some communication interfaces, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are merely specific embodiments of the present disclosure, which are used for illustrating the technical solutions of the present disclosure and not for limiting the same, and the scope of the present disclosure is not limited thereto, and although the present disclosure is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive of the technical solutions described in the foregoing embodiments or equivalent technical features thereof within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present disclosure, and should be construed as being included therein. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.