Disclosure of Invention
The invention aims to provide a method, a device, equipment and a storage medium for generating a center line of a lane, so as to improve the effectiveness of a generated crowdsourcing map. The specific technical scheme is as follows:
in a first aspect, to achieve the above object, an embodiment of the present invention provides a method for generating a center line of a lane, where the method includes:
acquiring a crowdsourcing map containing a plurality of constructed initial central lines and track points in a plurality of driving tracks as an initial crowdsourcing map;
generating a plurality of potential centerlines of the initial crowd-sourced map based on the constructed initial centerlines in the initial crowd-sourced map;
aiming at each driving track, determining a candidate matching point corresponding to each track point in the driving track on each potential central line, and determining a target matching point corresponding to the track point from each candidate matching point corresponding to the track point on the basis of the position relation between the track point and each corresponding candidate matching point; wherein, the candidate matching points corresponding to one track point on one potential central line are: a straight line passing through the locus point is perpendicular to the potential center line;
determining the potential center line with the largest number of target matching points from all the potential center lines as a matching center line matched with the driving track;
and determining the number of the running tracks matched with each matched central line as a first number, and determining the matched central line with the maximum corresponding first number from the matched central lines to obtain a supplementary central line of the initial crowdsourcing map.
Optionally, the method further includes:
and for each supplementary center line, connecting the supplementary center line and the initial center line adjacent to the supplementary center line in the initial crowdsourcing map to obtain a target crowdsourcing map.
Optionally, the determining, for each driving track, a candidate matching point corresponding to each track point in the driving track on each potential center line, and determining, from each candidate matching point corresponding to the track point, a target matching point corresponding to the track point based on a position relationship between the track point and each corresponding candidate matching point, includes:
for each driving track, determining the foot of a straight line passing through one track point in the driving track on a potential center line as a candidate matching point of the track point on the potential center line;
determining a track point which is one track point before each track point in the driving track according to each track point in the driving track;
calculating the transition probability of each candidate matching point corresponding to the previous track point of the track point aiming at each candidate matching point corresponding to the track point based on the Euclidean distance between the track point and the previous track point and the cost distance between each candidate matching point corresponding to the previous track point of the track point and each candidate matching point corresponding to the track point;
calculating the output probability of the track point aiming at each corresponding candidate matching point based on the comprehensive distance between the track point and each corresponding candidate matching point;
calculating the comprehensive probability of each candidate matching point corresponding to the track point based on each comprehensive probability of each candidate matching point corresponding to the previous track point of the track point, the transition probability of each candidate matching point corresponding to the previous track point of the track point for each candidate matching point corresponding to the track point, and the output probability of the track point for each corresponding candidate matching point;
and determining target matching points corresponding to the track points from the candidate matching points corresponding to the track points based on the comprehensive probability of the candidate matching points corresponding to the track points in the driving track.
Optionally, the calculating, based on the synthetic distance between the track point and each corresponding candidate matching point, an output probability of the track point for each corresponding candidate matching point includes:
calculating the comprehensive distance between the track point and each corresponding candidate matching point based on the Euclidean distance between the track point and each corresponding candidate matching point and the difference parameter value between the track point and each corresponding candidate matching point; the difference parameter value between one track point and one corresponding candidate matching point represents whether the lane where the track point is located and the lane where the candidate matching point is located are the same lane or not;
and calculating the output probability of the track point aiming at each corresponding candidate matching point based on the comprehensive distance between the track point and each corresponding candidate matching point.
Optionally, the calculating a comprehensive distance between the track point and each corresponding candidate matching point based on the euclidean distance between the track point and each corresponding candidate matching point and the difference parameter value between the track point and each corresponding candidate matching point includes:
determining a segment which takes a front track point and a rear track point in a driving track to which the track point belongs as end points and passes through the track point as a first segment;
determining a straight line which passes through the track point and is perpendicular to the first line segment as a first straight line;
sequentially determining the type of the lane line which is intersected with the first straight line and has a preset distance with the track point according to the arrangement sequence of the lane lines to obtain the feature description information of the track point; wherein the type of the lane line is a single solid line or a single dotted line;
for each candidate matching point of the track point, determining a straight line which passes through the candidate matching point and is perpendicular to a potential center line where the candidate matching point is located as a second straight line;
sequentially determining the type of the lane line which is intersected with the second straight line and has the preset distance with the candidate matching point according to the arrangement sequence of the lane lines to obtain the feature description information of the candidate matching point;
carrying out character string matching on the feature description information of the track point and the feature description information of the candidate matching point to obtain a difference parameter value between the track point and the candidate matching point;
and calculating the comprehensive distance between the track point and each corresponding candidate matching point based on the Euclidean distance between the track point and each corresponding candidate matching point and the difference parameter value between the track point and each corresponding candidate matching point.
Optionally, the determining, based on the comprehensive probability of each candidate matching point corresponding to each track point in the driving track, a target matching point corresponding to each track point from the candidate matching points corresponding to each track point includes:
determining a subsequent track point of each track point in the driving track aiming at each track point in the driving track;
and determining candidate matching points used for calculating the comprehensive probability of the target matching points corresponding to the track point from the candidate matching points corresponding to the track point, and taking the candidate matching points as the target matching points of the track point.
Optionally, the generating a plurality of potential center lines of the initial crowdsourcing map based on the constructed initial center line in the initial crowdsourcing map comprises:
aiming at each initial center line, determining a sampling point on the initial center line as a node according to a preset sampling distance, and taking a line segment between adjacent nodes positioned on the same initial center line as an edge to obtain a center line network of the initial crowdsourcing map;
grouping the plurality of constructed initial center lines to obtain a plurality of center line groups; wherein, a center line group comprises an initial center line to which the connected edges in each lane in the center line network belong and an initial center line to which the connected edges in the adjacent lane of the lane belong;
for each centerline group, the line segments between each initial centerline in the centerline group and each initial centerline in the neighboring centerline group are taken as a plurality of potential centerlines of the initial crowd-sourced map.
In a second aspect, to achieve the above object, an embodiment of the present invention provides a center line generating apparatus for a lane, the apparatus including:
the acquisition module is used for acquiring a crowdsourcing map containing a plurality of constructed initial central lines and track points in a plurality of driving tracks as an initial crowdsourcing map;
a generating module for generating a plurality of potential centerlines of the initial crowd-sourced map based on the constructed initial centerlines in the initial crowd-sourced map;
the first determining module is used for determining a corresponding candidate matching point of each track point in each potential central line in each driving track, and determining a target matching point corresponding to the track point from the candidate matching points corresponding to the track point based on the position relation between the track point and the corresponding candidate matching points; wherein, the candidate matching points corresponding to one track point on one potential central line are: a straight line passing through the locus point is perpendicular to the potential center line;
the matching module is used for determining the potential center line with the largest number of target matching points from all the potential center lines as a matching center line matched with the driving track;
and the second determining module is used for determining the number of the running tracks matched with each matching center line as a first number, and determining the corresponding matching center line with the maximum first number from all the matching center lines to obtain a supplementary center line of the initial crowdsourcing map.
The embodiment of the invention also provides electronic equipment which comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete mutual communication through the communication bus;
a memory for storing a computer program;
and a processor for implementing any of the steps of the lane center line generation method described above when executing the program stored in the memory.
The embodiment of the present invention further provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the steps of the lane centerline generation method are implemented as described above.
Embodiments of the present invention also provide a computer program product containing instructions, which when run on a computer, cause the computer to perform any of the above-mentioned lane center line generation methods.
According to the lane center line generation method provided by the embodiment of the invention, a crowdsourcing map containing a plurality of constructed initial center lines and track points in a plurality of driving tracks is obtained and used as an initial crowdsourcing map. Based on the constructed initial center line in the initial crowdsourcing map, a plurality of potential center lines of the initial crowdsourcing map are generated. Aiming at each driving track, determining a candidate matching point corresponding to each track point in the driving track on each potential central line, and determining a target matching point corresponding to the track point from each candidate matching point corresponding to the track point on the basis of the position relation between the track point and each corresponding candidate matching point; the candidate matching points corresponding to a trace point on a potential central line are: a straight line passing through the locus point is sufficiently perpendicular to the potential centerline. And determining the potential center line containing the largest number of target matching points from the potential center lines as the matching center line matched with the driving track. And determining the number of the running tracks matched with each matching central line as a first number, and determining the corresponding matching central line with the maximum first number from the matching central lines to obtain a supplementary central line of the initial crowdsourcing map.
Based on the above processing, potential center lines of the initial crowdsourcing map can be generated based on the constructed initial center lines in the initial crowdsourcing map, each driving track in the initial crowdsourcing map is matched with each potential center line, and a matched center line of each driving track is determined from each potential center line. The matching center line of a travel track is the center line of the initial crowd-sourced map determined based on the travel track. Furthermore, from the matching center lines, a matching center line which matches with each driving track most frequently, that is, a supplementary center line which needs to be supplemented in the initial crowd-sourced map is determined. Furthermore, the center line in the initial crowdsourcing map can be completed, and the effectiveness of the generated crowdsourcing map can be improved.
Of course, not all of the advantages described above need to be achieved at the same time in the practice of any one product or method of the invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived from the embodiments given herein by one of ordinary skill in the art, are within the scope of the invention.
Referring to fig. 1, fig. 1 is a flowchart of a method for generating a center line of a lane according to an embodiment of the present invention, where the method may include the following steps:
s101: and acquiring a crowdsourcing map containing a plurality of constructed initial central lines and track points in a plurality of driving tracks as an initial crowdsourcing map.
S102: based on the constructed initial center line in the initial crowdsourcing map, a plurality of potential center lines of the initial crowdsourcing map are generated.
S103: and determining a candidate matching point corresponding to each track point in the driving track on each potential central line aiming at each driving track, and determining a target matching point corresponding to the track point from the candidate matching points corresponding to the track point on the basis of the position relation between the track point and the corresponding candidate matching points.
Wherein, the candidate matching points corresponding to one track point on one potential central line are: a straight line passing through the locus point is sufficiently perpendicular to the potential centerline.
S104: and determining the potential center line containing the largest number of target matching points from the potential center lines as the matching center line matched with the driving track.
S105: and determining the number of the running tracks matched with each matching central line as a first number, and determining the corresponding matching central line with the maximum first number from the matching central lines to obtain a supplementary central line of the initial crowdsourcing map.
Based on the lane center line generation method provided by the embodiment of the invention, the potential center lines of the initial crowdsourcing map can be generated based on the initial center lines constructed in the initial crowdsourcing map, the driving tracks in the initial crowdsourcing map are matched with the potential center lines, and the matched center lines of the driving tracks are determined from the potential center lines. The matching center line of a travel track is the center line of the initial crowd-sourced map determined based on the travel track. Furthermore, from the matching center lines, a matching center line which matches with each driving track most frequently, that is, a supplementary center line which needs to be supplemented in the initial crowd-sourced map is determined. Furthermore, the center line in the initial crowdsourcing map can be completed, and the effectiveness of the generated crowdsourcing map can be improved.
With respect to step S101, the initial crowdsourcing map is a crowdsourcing map generated based on map data acquired by the map acquisition device, and the initial crowdsourcing map includes an initial central line that has been constructed. Due to the fact that errors exist in the collected map data or the collected map data are missing, the generated initial crowdsourcing map lacks a part of the central line.
The map acquisition device may be an acquisition vehicle, and the map acquisition device may acquire map data of the target area, for example, the acquisition vehicle may travel in the target area and capture image data of the target area.
The map acquisition device acquires map data in an actual road scene corresponding to an initial crowdsourcing map, the initial crowdsourcing map comprises track points of a plurality of driving tracks of the map acquisition device, and the electronic device can acquire the track points of the map acquisition device determined by a Global Positioning System (GPS) in the plurality of driving tracks of the initial crowdsourcing map.
Exemplarily, referring to fig. 2, fig. 2 is a schematic diagram of an initial crowd-sourced map, where a line segment with a square in fig. 2 represents a lane line, and a solid line with a triangle represents an initial centerline that has been constructed. The initial crowd-sourced map shown in fig. 2 includes 3 lanes in map area a and map area C, each lane including a complete lane line and a center line. The map area B cannot generate a center line in the map area B due to the lack of the lane line.
In order to generate the center line of each lane of the map area B in the initial crowd-sourced map, it is necessary to acquire the initial center line in the initial crowd-sourced map in which the map area a and the map area C have been constructed, and the track points in the plurality of travel tracks in the initial crowd-sourced map. A track point may be represented by the coordinates of the track point in the initial crowd-sourced map.
With respect to step S102, according to the continuity of the lane, the potential center line that is not constructed in the initial crowdsourcing map should appear between the adjacent constructed initial center lines, and therefore, the electronic device may generate the potential center line of the initial crowdsourcing map based on the constructed initial center line in the initial map.
In an embodiment of the present invention, on the basis of fig. 1, referring to fig. 3, step S102 may include the following steps:
s1021: and aiming at each initial central line, determining a sampling point on the initial central line as a node according to a preset sampling distance, and taking a line segment between adjacent nodes positioned on the same initial central line as an edge to obtain the central line network of the initial crowdsourcing map.
S1022: and grouping the constructed initial centerlines to obtain a plurality of centerline groups.
Wherein, a center line group comprises an initial center line to which the connected edges in each lane in the center line network belong and an initial center line to which the connected edges in the adjacent lane of the lane belong.
S1023: for each centerline group, the line segments between each initial centerline in the centerline group and each initial centerline in the neighboring centerline group are taken as a plurality of potential centerlines of the initial crowd-sourced map.
Illustratively, referring to FIG. 4, the line segment with squares in FIG. 4 represents the lane lines and the solid line with triangles represents the constructed initial centerline. And determining sampling points (shown as triangles in fig. 4) on each initial central line in fig. 4 as nodes according to the preset sampling distance, and taking line segments between adjacent nodes on the same initial central line as edges to obtain the central line network of the initial crowdsourcing map.
Then, the constructed initial centerlines are grouped to obtain a plurality of centerline groups. A centerline group includes an initial centerline to which connected edges in each lane in the centerline network belong, and an initial centerline to which connected edges in adjacent lanes of the lane belong.
For the initial crowdsourcing map shown in fig. 4, the initial center line to which the connected edges in lane 1 belong is the initial center line a1, the lane adjacent to lane 1 is lane 2, the initial center line to which the connected edges in lane 2 belong is the initial center line a2, the lane adjacent to lane 2 is lane 3, and the initial center line to which the connected edges in lane 3 belong is the initial center line A3, then the initial center line a1, the initial center line a2, and the initial center line A3 may be determined as the center line group 1. Similarly, initial centerline C1, initial centerline C2, and initial centerline C3 may be determined to be centerline group 2.
As can be seen from the continuity of the lanes, the potential centerlines that are not constructed in the initial crowd-sourced map should appear between the adjacent constructed initial centerlines, that is, between the adjacent center groups, and after grouping the initial centerlines to obtain a plurality of centerline groups, for each centerline group, the electronic device may determine line segments between each initial centerline in the centerline group and each initial centerline in the adjacent centerline group as the plurality of potential centerlines of the initial crowd-sourced map.
The neighboring center groups in the initial crowdsourcing map shown in fig. 4 are the center line group 1 and the center line group 2, and the potential center lines of the initial crowdsourcing map shown in fig. 4 include: an imaginary line connecting initial centerline a1 with initial centerline C1, an imaginary line connecting initial centerline a1 with initial centerline C2, an imaginary line connecting initial centerline a1 with initial centerline C2, an imaginary line connecting initial centerline a2 with initial centerline C1, an imaginary line connecting initial centerline a2 with initial centerline C2, an imaginary line connecting initial centerline a2 with initial centerline C2, an imaginary line connecting initial centerline A3 with initial centerline C1, an imaginary line connecting initial centerline A3 with initial centerline C2, and an imaginary line connecting initial centerline A3 with initial centerline C2.
After determining the track points in the plurality of travel tracks in the initial crowd-sourced map and the potential centerlines in the initial crowd-sourced map, for step S103, for each track point in each travel track, the electronic device may determine candidate matching points for the track point on each potential centerline.
Because the GPS has a measurement error when determining the track point in the driving track of the map acquisition equipment in the initial crowdsourcing map, the determined track point may not be the real physical position of the map acquisition equipment in the actual road scene.
When the map acquisition equipment runs in the actual road scene, the map acquisition equipment runs according to the actual central line of the lane in the actual road scene, so that the actual physical position of the map acquisition equipment is positioned on the actual central line of the lane in the actual road scene. Accordingly, a candidate match point for a track point on the potential centerline represents a likely true physical location for the map capture device to travel to the track point.
Therefore, for each track point, the electronic device may determine, from the candidate matching points corresponding to the track point, a target matching point corresponding to the track point based on the position relationship between the track point and the corresponding candidate matching points, where the target matching point of one track point is the actual physical position of the track point in the actual road scene.
In an embodiment of the present invention, on the basis of fig. 1, referring to fig. 5, step S103 may include the following steps:
s1031: for each driving track, the foot of a straight line passing through a track point in the driving track on a potential center line is determined as a candidate matching point of the track point on the potential center line.
S1032: and determining the previous track point of each track point in the driving track aiming at each track point in the driving track.
S1033: and calculating the transition probability of each candidate matching point corresponding to the previous track point of the track point aiming at each candidate matching point corresponding to the track point based on the Euclidean distance between the track point and the previous track point and the cost distance between each candidate matching point corresponding to the previous track point of the track point and each candidate matching point corresponding to the track point.
S1034: and calculating the output probability of the track point aiming at each corresponding candidate matching point based on the comprehensive distance between the track point and each corresponding candidate matching point.
S1035: and calculating the comprehensive probability of each candidate matching point corresponding to the track point based on each comprehensive probability of each candidate matching point corresponding to the previous track point of the track point, the transition probability of each candidate matching point corresponding to the previous track point of the track point for each candidate matching point corresponding to the track point, and the output probability of the track point for each corresponding candidate matching point.
S1036: and determining target matching points corresponding to the track points from the candidate matching points corresponding to the track points based on the comprehensive probability of the candidate matching points corresponding to the track points in the driving track.
In one implementation, for each track point in each driving track, the electronic device may determine, from each potential center line, a point closest to the track point as a candidate matching point of the track point. Therefore, the electronic device can determine a straight line passing through the track point and perpendicular to a potential center line, the foot of the straight line on the potential center line is the closest point to the track point, and the foot of the straight line on the potential center line is the corresponding candidate matching point of the track point on the potential center line.
Illustratively, referring to FIG. 6, the dashed lines in FIG. 6 represent potential centerlines, the solid lines represent travel paths, and Y representstTo Yt+1The line segment between represents: slave track point Y of map acquisition equipmenttTravel to track point Yt+1A running track of. The initial crowdsourcing map shown in fig. 6 contains 2 potential centerlines, which are: potential centerline 1 and potential centerline 2.
Passing through the track point Y
tIs sufficiently perpendicular to the
potential centerline 1
Passing through the track point Y
tIs sufficiently perpendicular to the potential centerline 2
Then the track point Y
tThe corresponding candidate matching points include:
and
passing through the track point Y
t+1Is sufficiently perpendicular to the
potential centerline 1
Passing through the track point Y
t+1Is sufficiently perpendicular to the potential centerline 2
Then the track point Y
t+1The corresponding candidate matching points include:
and
then, for each track point, the electronic device can determine the previous track point in the travel track to which the track point belongs. Furthermore, for each candidate matching point corresponding to the track point, the electronic device may calculate, according to the following formula (1), a transition probability of each candidate matching point corresponding to a previous track point in the travel track to which the track point belongs, for each candidate matching point corresponding to the track point. The candidate matching point corresponding to the previous track point in the driving track to which the track point belongs, that is, the previous candidate matching point of the candidate matching point corresponding to the track point. For each candidate matching point, the transition probability of the previous candidate matching point for the candidate matching point is represented as: the probability that the map capture device traveled from a previous candidate match point to the candidate match point.
tp represents the transition probability of a candidate matching point corresponding to the track point before the track point for a candidate matching point corresponding to the track point; eu [ Y ]t-1,Yt]Representing the Euclidean distance between the previous track point of the track point and the track point; y ist-1Representing the locusCoordinates of a previous track point; y istRepresenting the coordinates of the track point; sp [ X ]t-1,Xt]Representing the cost distance between a candidate matching point corresponding to the track point before the track point and a candidate matching point corresponding to the track point; xt-1Representing the coordinates, X, of a candidate matching point corresponding to a track point preceding the track pointtCoordinates of a candidate matching point corresponding to the trajectory point are represented.
When the track point is the first track point in the travel track to which the track point belongs, the transition probability of each candidate matching point corresponding to the previous track point in the travel track to which the track point belongs to the candidate matching point corresponding to the track point may be a first initial value, for example, 1.
The cost distance between a candidate matching point corresponding to the previous track point of the track point and a candidate matching point corresponding to the track point (i.e. sp [ X ] in the above formula (1))t-1,Xt]) Represents: and whether a candidate matching point corresponding to the track point is positioned on the same potential central line or not is judged. If a candidate matching point corresponding to the previous track point of the track point and a candidate matching point corresponding to the track point are positioned on the same potential central line, sp [ X [ ]t-1,Xt]Can be as follows: the Euclidean distance between a candidate matching point corresponding to the track point before the track point and a candidate matching point corresponding to the track point. If a candidate matching point corresponding to a track point before the track point and a candidate matching point corresponding to the track point are not positioned on the same potential central line, sp [ X ] Xt-1,Xt]May be infinite.
Illustratively, for the embodiment shown in FIG. 6, trace point Y
t+1The front track point in the driving track is Y
t,Y
t+1The corresponding candidate matching points include:
and
point of track Y
tThe corresponding candidate matching points include:
and
aiming at the track point Y
t+1In the corresponding candidate matching point
The candidate matching points may be calculated based on the above formula (1)
For candidate matching points
Transition probability of, and candidate matching points
For candidate matching points
The transition probability of (2).
Aiming at the track point Y
t+1In the corresponding candidate matching point
The candidate matching points may be calculated based on the above formula (1)
For candidate matching points
Transition probability of, and candidate matching points
For candidate matching points
The transition probability of (2).
Track point YtIs the first track point in the associated driving track, track point YtAiming at the track point Y, each candidate matching point corresponding to the previous track point in the driving tracktThe transition probability of each candidate matching point of (a) may be a preset initial value.
Then, for each trace point, the electronic device may calculate an output probability of the trace point for each corresponding candidate matching point according to the following formula (2). The output probability of a track point for a candidate matching point is represented as: and when the map acquisition equipment drives to the track point, the real physical position of the map acquisition equipment is the probability of the candidate matching point. The first preset coefficient in the following formula (2) may be set by a skilled person based on experience, for example, the first preset coefficient may be 0.5.
ep represents the output probability of the track point aiming at a candidate matching point; exp represents an exponential function; a represents a first preset coefficient; dist [ Yt,Xt]Representing the comprehensive distance between the track point and the candidate matching point; y istRepresenting the coordinates of the track point; xtCoordinates representing the candidate matching points; g represents a measurement error when the GPS determines the coordinates of the trace point.
Illustratively, for the embodiment shown in fig. 6, the trajectory point Y may be calculated based on the above equation (2)
tFor candidate matching points
Output probability of (2), and trace point Y
tFor candidate matching points
And based on the above formula (2), calculatingCalculating the locus point Y
t+1For candidate matching points
Output probability of (2), and trace point Y
t+1For candidate matching points
The output probability of (1).
Further, for each trace point, the electronic device may calculate a comprehensive probability of each candidate matching point corresponding to the trace point based on the following formula (3). When the track point is the first track point in the travel track to which the track point belongs, the comprehensive probability of a candidate matching point corresponding to the previous track point in the travel track to which the track point belongs (i.e., cu (X) in the following formula (3))t-1) ) may be a second initial value, e.g., 1.
cu(Xt)=cu(Xt-1)+log(tp)+log(ep) (3)
cu(Xt) Representing the comprehensive probability of a candidate matching point corresponding to the track point; cu (X)t-1) Representing the comprehensive probability of a candidate matching point corresponding to the previous track point in the driving track to which the track point belongs; tp represents the transition probability of a candidate matching point corresponding to the previous track point in the driving track to which the track point belongs to aiming at a candidate matching point corresponding to the track point; ep represents the output probability of the trace point for a candidate matching point.
For example, for the embodiment shown in fig. 6, the second initial value may be used as cu (X) in the above formula (3)
t-1) Taking the first initial value as tp in the formula (3), and taking the track point Y
tFor candidate matching points
The output probability of (3) is used as ep in the formula (3), and the trace point Y is calculated
tFor candidate matching points
The integrated probability of (2). Can calculate by the same wayObtain the track point Y
tFor candidate matching points
The integrated probability of (2).
And, the track point Y can be marked
tFor candidate matching points
As cu (X) in the above formula (3)
t-1) Matching the candidate points
For candidate matching points
The transition probability of (2) is taken as tp in the formula (3), and the trace point Y is taken as
t+1For candidate matching points
The output probability of (3) is used as ep in the formula (3), and the trace point Y is calculated
t+1For candidate matching points
And match the candidate matching point
The corresponding integrated probability.
Will trace point Y
tFor candidate matching points
As cu (X) in the above formula (3)
t-1) Matching the candidate points
For candidate matching points
As the transition probability ofTp in formula (3), tracing point Y
t+1For candidate matching points
The output probability of (3) is used as ep in the formula (3), and the trace point Y is calculated
t+1For candidate matching points
And match the candidate matching point
The corresponding integrated probability.
Similarly, the track point Y can be calculated
t+1For candidate matching points
And match the candidate matching points
Corresponding integrated probability, and trace point Y
t+1For candidate matching points
And match the candidate matching points
The corresponding integrated probability.
Furthermore, the electronic device may determine, from the candidate matching points corresponding to each trace point, target matching points corresponding to each trace point based on the comprehensive probability of each candidate matching point corresponding to each trace point in each driving trace.
In an embodiment of the present invention, on the basis of fig. 5, referring to fig. 7, step S1034 may include the following steps:
s10341: and calculating the comprehensive distance between the track point and each corresponding candidate matching point based on the Euclidean distance between the track point and each corresponding candidate matching point and the difference parameter value between the track point and each corresponding candidate matching point.
And the difference parameter value between one track point and one corresponding candidate matching point represents whether the lane where the track point is located and the lane where the candidate matching point is located are the same lane or not.
S10342: and calculating the output probability of the track point aiming at each corresponding candidate matching point based on the comprehensive distance between the track point and each corresponding candidate matching point.
In one implementation, for each track point, the total distance between the track point and each corresponding candidate matching point is dist [ Y ] in equation (3) abovet,Xt]. The electronic device may calculate a composite distance between the trajectory point and each corresponding candidate matching point based on the following formula (4).
dist[Yt,Xt]=B×eu[Yt,Xt]+C×ch[Yt,Xt] (4)
dist[Yt,Xt]Representing the comprehensive distance between the track point and one corresponding candidate matching point; y istRepresenting the coordinates of the track point; xtCoordinates representing a candidate matching point corresponding to the trajectory point; b represents a second predetermined coefficient, eu [ Y ]t,Xt]Representing the Euclidean distance between the track point and a corresponding candidate matching point; c represents a third predetermined coefficient, ch [ Y ]t,Xt]And expressing the difference parameter value between the track point and one corresponding candidate matching point, wherein the difference parameter value expresses whether the lane where the track point is located and the lane where the corresponding candidate matching point is located are the same lane.
The second preset coefficient and the third preset coefficient may be set by a skilled person according to experience, and the sum of the second preset coefficient and the third preset coefficient is 1, for example, the second preset coefficient and the third preset coefficient may be both 0.5, or the second preset coefficient is 0.6 and the third preset coefficient is 0.4, but not limited thereto.
In one embodiment of the present invention, step S10341 may include the steps of:
step 1: and determining a line segment which takes the front track point and the back track point in the driving track to which the track point belongs as end points and passes through the track point as a first line segment.
And 2, step: and determining a straight line which passes through the track point and is perpendicular to the first line segment as a first straight line.
And step 3: and according to the arrangement sequence of the lane lines, sequentially determining the types of the lane lines which are intersected with the first straight line and have a preset distance with the track points, and obtaining the feature description information of the track points.
Wherein the type of the lane line is a single solid line or a single dotted line;
and 4, step 4: and determining a straight line which passes through each candidate matching point of the track points and is perpendicular to the potential center line where the candidate matching point is positioned as a second straight line.
And 5: and according to the arrangement sequence of the lane lines, sequentially determining the type of the lane line which is intersected with the second straight line and has a preset distance with the candidate matching point, and obtaining the feature description information of the candidate matching point.
Step 6: and performing character string matching on the feature description information of the track point and the feature description information of the candidate matching point to obtain a difference parameter value between the track point and the candidate matching point.
And 7: and calculating the comprehensive distance between the track point and each corresponding candidate matching point based on the Euclidean distance between the track point and each corresponding candidate matching point and the difference parameter value between the track point and each corresponding candidate matching point.
In one implementation, for each track point, if a previous track point and a next track point in a driving track to which the track point belongs are end points and a first line segment passing through the track point is a straight line segment, the electronic device can directly determine a first straight line passing through the track point and perpendicular to the first line segment.
If the previous track point and the next track point in the driving track to which the track point belongs are end points, and the first line segment passing through the track point is a curve segment, the electronic equipment can determine the tangent line of the curve segment at the track point, and then the electronic equipment can determine the first straight line passing through the track point and perpendicular to the tangent line.
If the extending direction of the lanes is the north-south direction, the arrangement order of the lane lines may be from east to west, or may be from west to east. If the extending direction of the lane is the east-west direction, the arrangement order of the lane lines may be the order from south to north, or may be the order from north to south.
Because the map acquisition equipment runs according to the actual central line of the lane in the actual road scene, a plurality of track points of the map acquisition equipment are distributed on the lane to which the actual central line belongs. Accordingly, if a lane line is located a greater distance from a point of track, the lane line may not be the lane line of the lane in which the true physical location of the point of track is located. Therefore, a lane line which is a preset distance away from the track point can be determined from the lane lines which intersect with the first straight line, and the determined lane line may be the lane line of the lane where the real physical position of the track point is located. The preset distance may be set by a technician empirically, for example, the preset distance may be a measurement error of a GPS.
For example, referring to fig. 8, in fig. 8, a thick solid line and a thick dotted line in a lateral direction each represent a lane line, a thin solid line in a lateral direction represents a potential center line, dots represent a plurality of track points in one travel track of the map capture device, and a direction indicated by an arrow in a straight line with an arrow represents a travel direction of the map capture device.
Point of track YtThe previous track point is Yt-1Track point YtThe latter track point is Yt+1Then the point Y of the track can be determinedt-1And track point Yt+1Is an end point and passes through a track point YtThe line segment (i.e., the first line segment). Then, the passing track point Y is determinedtAnd is perpendicular to the first straight line of the first line segment (the thick vertical solid line in fig. 8).
Then, according to the arrangement sequence of the lane lines, intersecting with the first straight line and the track point YtThe lane line for the preset distance includes: lane line 1, lane line 2, lane line 3 and vehicleAnd a lane 4. If the lane line is represented by a single solid line by "S", the lane line is represented by a single dotted line by "D", and the track point is represented by "-", the track point Y is represented by a track pointtThe characteristic description information is as follows: SD-DS.
Similarly, the second line (not shown in fig. 8) is intersected with the candidate matching point according to the arrangement order of the lane lines
The lane line for the preset distance includes:
lane line 1, lane line 2, lane line 3, and lane line 4. If the lane line is represented by "S" as a single solid line, "D" as a single dashed line, and "-" as a candidate matching point, the trajectory point Y can be determined
tCandidate matching points on
potential centerline 1
The characteristic description information is as follows: S-DDS. Due to the track point Y
tOn the potential centre line 2, the locus point Y
tCandidate matching points on potential centerline 2
And the track point Y
tIf they are at the same position, the matching points are selected
The characteristic description information is as follows: SD-DS. Track point Y
tCandidate matching points on the potential centerline 3
The characteristic description information is as follows: SDD-S.
Then, to the track point Y
tFeature description information and candidate matching points of
The character string matching is carried out on the characteristic description information to obtain the track point Y
tAnd candidate matching points
The value of the difference parameter between. Similarly, the track point Y can be obtained
tAnd candidate matching points
Value of the difference between, and the tracing point Y
tAnd candidate matching points
The value of the difference parameter between.
Furthermore, the electronic device may calculate a composite distance between the trajectory point and each corresponding candidate matching point based on the euclidean distance between the trajectory point and each corresponding candidate matching point and the difference parameter value between the trajectory point and each corresponding candidate matching point.
In an embodiment of the present invention, on the basis of fig. 5, referring to fig. 9, step S1036 may include the steps of:
s10361: and determining the next track point of the track points in the driving track aiming at each track point in the driving track.
S10362: and determining candidate matching points used for calculating the comprehensive probability of the target matching points corresponding to the track point from the candidate matching points corresponding to the track point, and taking the candidate matching points as the target matching points of the track point.
Because the GPS has a measurement error when determining the track point in the travel track of the map acquisition device, the determined travel track may not be the actual physical track of the map acquisition device in the actual road scene. Therefore, for each trace point, the electronic device can determine the target matching point of the trace point according to the comprehensive probability of the trace point for each candidate matching point. Since the track point represents the integrated probability of one candidate matching point: when the map acquisition equipment drives to the track point from the real physical position of the previous track point in the driving track, the real physical position of the map acquisition equipment is the probability of the candidate matching point, and the target matching point of the track point is the real physical position of the map acquisition equipment in the actual road scene when the map acquisition equipment drives to the track point.
In one implementation, for each driving track, the electronic device may select a last track point in the driving track, and determine a corresponding candidate matching point with the highest comprehensive probability from candidate matching points corresponding to the last track point, so as to obtain a target matching point corresponding to the last track point.
Then, the electronic device may determine a previous track point (i.e., the penultimate track point) of the last track point from the driving track, and determine a candidate matching point corresponding to the comprehensive probability of the target matching point of the last track point from candidate matching points corresponding to the penultimate track point, as a target matching point corresponding to the penultimate track point. And the comprehensive probability of the target matching point of the last track point is calculated based on the comprehensive probability of the target candidate matching point corresponding to the second last track point.
Furthermore, the electronic device may determine a previous track point (i.e., the third to last track point) of the second to last track point from the driving track, determine a candidate matching point corresponding to the comprehensive probability of the target matching point of the second to last track point from the candidate matching points corresponding to the third to last track point, and use the candidate matching point as the target matching point corresponding to the third to last track point, and so on, may determine the target matching point corresponding to each track point in the driving track.
Correspondingly, for each driving track, a matching path formed by the target matching points of the track points in the driving track is the real physical track of the map acquisition equipment corresponding to the driving track in the actual road scene.
For example, referring to fig. 10, in fig. 10, a thick solid line and a thick dotted line in the lateral direction each represent a lane line, a thin solid line in the lateral direction represents a potential center line, dots represent a plurality of track points in one travel track of the map capture device, and a direction indicated by an arrow in a straight line with an arrow represents a travel direction of the map capture device.
The driving track formed by a plurality of track points is as follows: y is0→Y1→Y2→Y3→Y4. The last track point in the driving track is Y4Track point Y4The corresponding candidate matching points include: l and M, if the corresponding candidate matching point with the maximum comprehensive probability is M, the candidate matching point M is a track point Y4The target matching point of (1).
Then, selecting a track point Y4The previous track point Y3Track point Y3The corresponding candidate matching points include: j and K. Point of track Y4The integrated probability of the target matching point M of (2) includes: the calculated comprehensive probability based on the candidate matching point J and the calculated comprehensive probability based on the candidate matching point K. If the track point Y4The maximum comprehensive probability of the target matching point M is calculated based on the comprehensive probability of the candidate matching point K, and then the track point Y is obtained3The target matching point of (2) is a candidate matching point K.
Then, selecting a track point Y3The previous track point Y2. Track point Y3The integrated probability of the target matching point K of (1) includes: the calculated probability of the candidate matching point G, the calculated probability of the candidate matching point H and the calculated probability of the candidate matching point I. If the track point Y3The maximum comprehensive probability of the target matching point K is calculated based on the comprehensive probability of the candidate matching point H, and then the track point Y is obtained2Is the candidate matching point H.
By analogy, the track point Y can be determined from the candidate matching point D, the candidate matching point E and the candidate matching point F1The target matching point is E, and a track point Y is determined from the candidate matching point A, the candidate matching point B and the candidate matching point C0The target matching point of (2) is B. Accordingly, B → E → H → K → M can be determined as the travel locus (i.e., Y)0→Y1→Y2→Y3→Y4) The matching path of (2).
For step S104 and step S105, for each driving track, the electronic device may determine a potential center line to which a target matching point of each track point in the driving track belongs, and determine, from the potential center lines, a potential center line including the largest number of target matching points of each track point in the driving track, to obtain a matching center line matching the driving track.
Since the matching path formed by the target matching points of the track points in one driving track is the real physical track of the map acquisition equipment corresponding to the driving track in the actual road scene, the matching center line matched with the driving track is the center line of the lane where the map acquisition equipment is located when the map acquisition equipment drives according to the real physical track.
For example, for the embodiment shown in FIG. 10, the travel trajectory Y0→Y1→Y2→Y3→Y4Is the potential centerline 2.
In order to improve the accuracy of the determined center line of the lane, the electronic device may determine matching center lines corresponding to a plurality of driving tracks of the map collecting device, respectively. Furthermore, the electronic device may determine the number (i.e., the first number) of the driving tracks matched with each matching center line, and determine the corresponding matching center line with the largest first number from the matching center lines corresponding to the driving tracks, so as to obtain a supplementary center line of the initial crowd-sourced map.
In an embodiment of the present invention, after step S105, the method may further include the steps of: and for each supplementary center line, connecting the supplementary center line and the initial center line adjacent to the supplementary center line in the initial crowdsourcing map to obtain a target crowdsourcing map.
Illustratively, for the embodiment shown in fig. 4, if the determined supplemental centerline of the initial crowdsourcing map comprises: a line segment between the initial centerline a1 and the initial centerline C1, a line segment between the initial centerline a2 and the initial centerline C2, and a line segment between the initial centerline A3 and the initial centerline C3, then connecting the initial centerline a1 and the initial centerline C1, connecting the initial centerline a2 and the initial centerline C2, and connecting the initial centerline A3 and the initial centerline C3 in the initial crowd-sourced map, may result in the target crowd-sourced map shown in fig. 11.
Referring to fig. 12, fig. 12 is a center line generating method for a lane, which is applied to a center line generating system for a lane, and the system includes: the system comprises a modeling module, a lane-level map matching module and a supplementary center line module.
And the modeling module is used for performing centerline modeling, track modeling and HMM (Hidden Markov Model) modeling. The centerline modeling is to obtain an initial centerline constructed in the initial crowdsourcing map, and generate a potential centerline of the initial crowdsourcing map based on the initial centerline in the initial crowdsourcing map. Track modeling is to obtain track points in a plurality of driving tracks in an initial crowd-sourced map. The HMM modeling is to determine a calculation method for calculating the transition probability, a calculation method for calculating the output probability, and a calculation method for calculating the composite probability based on the theoretical basis of the HMM.
And the lane-level map matching module is used for selecting candidate matching points and updating the comprehensive probability and the track state backtracking. And selecting candidate matching points, namely determining the corresponding candidate matching points of the track points on each potential central line aiming at each track point. The updated composite probability is that the composite probability of each candidate matching point corresponding to the track point is calculated based on the position relationship between each track point and each corresponding candidate matching point. The track state backtracking means that for each driving track, the target matching points corresponding to each track point in the driving track are determined based on the comprehensive probability of each track point in the driving track for each corresponding candidate matching point.
And the supplementary center line module is used for voting tracks and selecting supplementary center lines. The trajectory voting is to determine, for each travel trajectory, a potential center line including the largest number of target matching points of each trajectory point in the travel trajectory from among the potential center lines, as a matching center line matching the travel trajectory. And selecting the supplementary center line, namely determining the matched center line which is matched with each driving track for the most times from the matched center lines corresponding to the driving tracks to obtain the supplementary center line of the initial crowdsourcing map.
Corresponding to the embodiment of the method in fig. 1, referring to fig. 13, fig. 13 is a structural diagram of a center line generating apparatus for a lane according to an embodiment of the present invention, the apparatus including:
an obtaining module 1301, configured to obtain a crowdsourcing map including a plurality of initial center lines that have been constructed and track points in a plurality of driving tracks, as an initial crowdsourcing map;
a generating module 1302, configured to generate a plurality of potential center lines of the initial crowdsourcing map based on the constructed initial center lines in the initial crowdsourcing map;
a first determining module 1303, configured to determine, for each driving track, candidate matching points corresponding to each track point in the driving track on each potential center line, and determine, from the candidate matching points corresponding to the track point, a target matching point corresponding to the track point based on a position relationship between the track point and the corresponding candidate matching points; wherein, the candidate matching points corresponding to one track point on one potential central line are: a straight line passing through the locus point is perpendicular to the potential center line;
a matching module 1304, configured to determine, from the potential center lines, a potential center line containing the largest number of target matching points as a matching center line matching the driving trajectory;
the second determining module 1305 is configured to determine, for each matching center line, the number of the driving tracks matched with the matching center line as a first number, and determine, from the matching center lines, a corresponding matching center line with the largest first number, so as to obtain a supplementary center line of the initial crowd-sourced map.
The lane center line generating device provided by the embodiment of the invention can generate potential center lines of the initial crowdsourcing map based on the initial center lines constructed in the initial crowdsourcing map, match each driving track in the initial crowdsourcing map with each potential center line, and determine the matched center line of each driving track from each potential center line. The matching center line of a driving track is the center line of the initial crowdsourcing map determined based on the driving track. Furthermore, from the matching center lines, a matching center line which matches with each driving track most frequently, that is, a supplementary center line which needs to be supplemented in the initial crowd-sourced map is determined. Furthermore, the center line in the initial crowdsourcing map can be completed, and the effectiveness of the generated crowdsourcing map can be improved.
The embodiment of the present invention further provides an electronic device, as shown in fig. 14, which includes a processor 1401, a communication interface 1402, a memory 1403, and a communication bus 1404, wherein the processor 1401, the communication interface 1402, and the memory 1403 complete communication with each other through the communication bus 1404,
a memory 1403 for storing a computer program;
the processor 1401 is configured to implement the steps of the lane center line generating method according to any of the above embodiments when executing the program stored in the memory 1403.
The communication bus mentioned in the electronic device may be a Peripheral Component Interconnect (PCI) bus, an Extended Industry Standard Architecture (EISA) bus, or the like. The communication bus may be divided into an address bus, a data bus, a control bus, etc. For ease of illustration, only one thick line is shown, but this does not mean that there is only one bus or one type of bus.
The communication interface is used for communication between the electronic equipment and other equipment.
The Memory may include a Random Access Memory (RAM) or a Non-Volatile Memory (NVM), such as at least one disk Memory. Optionally, the memory may also be at least one memory device located remotely from the processor.
The Processor may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but also Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In yet another embodiment provided by the present invention, a computer readable storage medium is further provided, in which a computer program is stored, and the computer program is executed by a processor to implement the steps of the center line generation method of any of the lanes.
In yet another embodiment provided by the present invention, there is also provided a computer program product containing instructions which, when run on a computer, cause the computer to perform the method of centerline generation for any of the lanes in the above embodiments.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, cause the processes or functions described in accordance with the embodiments of the invention to occur, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, from one website site, computer, server, or data center to another website site, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, Digital Subscriber Line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., Solid State Disk (SSD)), among others.
It is noted that, herein, relational terms such as first and second, and the like may be 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. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in the process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on differences from other embodiments. In particular, for the apparatus, the electronic device, the computer-readable storage medium, and the computer program product embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and in relation to them, reference may be made to the partial description of the method embodiments.
The above description is only for the preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention shall fall within the protection scope of the present invention.