Disclosure of Invention
In order to overcome the problems in the related art, an object of the present disclosure is to provide a method, an apparatus, a storage medium, and an electronic device for constructing a road network at a road intersection.
In order to achieve the above object, a first aspect of the embodiments of the present disclosure provides a method for constructing a road network at a road intersection, including:
acquiring lane line information of a road connected with an intersection and pointing information of a guide arrow of the road close to the intersection;
for each road, determining the connection relationship between the road and the intersection according to the pointing information of the guide arrow of the road, wherein the connection relationship is used for representing that the road is an incoming road or an outgoing road of the intersection;
and determining the pairing relationship between the lane in the entering road of the intersection and the lane in the exiting road of the intersection according to the lane line information and the direction information of the guide arrow in each entering road and the lane line information and the direction information of the guide arrow in each exiting road.
Optionally, the determining, for each road, a connection relationship between the road and the intersection according to the pointing information of the guide arrow of the road includes:
for each road, if the guide arrow of the road points to the direction close to the intersection, determining that the road is the driving road of the intersection;
and if the guide arrow of the road points to the direction far away from the intersection, determining that the road is the outgoing road of the intersection.
Optionally, the lane line information of each road includes a reference line of the road, the number of lane lines included, and position information of each lane, and the direction information of the guide arrow of each road near the intersection includes a direction of the guide arrow corresponding to each lane of the road;
the determining a pairing relationship between a lane in the entry road of the intersection and a lane in the exit road of the intersection according to lane line information and direction information of a guide arrow in each of the entry roads, and lane line information and direction information of a guide arrow in each of the exit roads includes:
aiming at each driving road, determining the driving direction of each driving road relative to the driving road according to the included angle between the reference line of the driving road and the reference line of each driving road;
classifying the lanes in the driving road according to the corresponding direction of the guide arrow to obtain the guide type of each lane of the driving road and the number of lanes of each guide type;
for each lane of the incoming road, selecting a target outgoing road from the outgoing roads of the intersection according to the target guidance type to which the lane belongs and the driving direction of each of the outgoing roads relative to the incoming road, and
and determining a target lane matched with the lane in the target outgoing road according to the position information of the lane, the number of the target guidance type lanes of the incoming road, the number of the lanes of the target outgoing road and the position information of each lane of the target outgoing road, and connecting the lane with the target lane.
Optionally, each of said lanes belongs to at least one of the following types of guidance: straight, left turn, right turn.
Optionally, the selecting, for each lane of the incoming road, a target outgoing road from the outgoing roads at the intersection according to the target guidance type to which the lane belongs and the driving direction of each of the outgoing roads with respect to the incoming road includes:
if the target guide type comprises a left turn, selecting a left turn exit road relative to the driving direction of the entrance road from the exit roads of the intersection as the target exit road;
the determining a target lane paired with the lane in the target outgoing road according to the position information of the lane, the number of the target guidance type lanes of the incoming road, the number of the lanes of the target outgoing road and the position information of each lane of the target outgoing road, and establishing connection between the lane and the target lane comprises:
and taking the leftmost lane line of the driving road along the direction pointing to the intersection as a first reference, taking the leftmost lane line of the target driving road along the direction far away from the intersection as a second reference, and taking the nth lane of the target driving road close to the second reference as the target lane if the lane is the nth lane close to the first reference, wherein N is an integer greater than or equal to 1.
Optionally, the selecting, for each lane of the incoming road, a target outgoing road from the outgoing roads at the intersection according to the target guidance type to which the lane belongs and the driving direction of each of the outgoing roads with respect to the incoming road includes:
if the target guide type comprises a right turn, selecting a right turn exit road relative to the driving direction of the entrance road from the exit roads of the intersection as the target exit road;
the determining a target lane paired with the lane in the target outgoing road according to the position information of the lane, the number of the target guidance type lanes of the incoming road, the number of the lanes of the target outgoing road and the position information of each lane of the target outgoing road, and establishing connection between the lane and the target lane comprises:
and taking the rightmost lane line of the driving road along the direction pointing to the intersection as a first reference, taking the rightmost lane line of the target driving road along the direction far away from the intersection as a second reference, and taking the nth lane of the target driving road close to the second reference as the target lane if the lane is the nth lane close to the first reference, wherein N is an integer greater than or equal to 1.
Optionally, the selecting, for each lane of the incoming road, a target outgoing road from the outgoing roads at the intersection according to the target guidance type to which the lane belongs and the driving direction of each of the outgoing roads with respect to the incoming road includes:
if the target guidance type comprises straight running, selecting an exit road which runs straight relative to the running direction of the entrance road from exit roads of the intersection as the target exit road;
the determining a target lane paired with the lane in the target outgoing road according to the position information of the lane, the number of the target guidance type lanes of the incoming road, the number of the lanes of the target outgoing road and the position information of each lane of the target outgoing road, and establishing connection between the lane and the target lane comprises:
taking a leftmost lane line of the incoming road in a direction pointing to the intersection as a first reference and a leftmost lane line of the incoming road in a direction away from the intersection as a second reference, in a case where the number of the target-oriented type lanes of the incoming road is not equal to the number of lanes of the target outgoing road;
if the number of the target guidance type lanes of the entering road is equal to the number of the lanes of the target exiting road, if the lane is the Nth lane close to the first reference, taking the Nth lane close to the second reference in the target exiting road as the target lane;
in the case that the number of the target guidance-type lanes of the incoming road is not equal to the number of lanes of the target outgoing road, if the lane is the nth lane close to the first reference, one or more lanes of N-2 th to N +2 th lanes close to the second reference in the target outgoing road are taken as the target lane;
wherein N is an integer greater than or equal to 1.
Optionally, the determining, for each of the incoming roads, a driving direction of each of the outgoing roads with respect to the incoming road according to an included angle between a reference line of the incoming road and a reference line of each of the outgoing roads includes:
for each driving road and any one driving road, if an included angle between a reference line of the driving road and a reference line of the driving road is within a first preset range, determining that the driving direction of the driving road relative to the driving road is straight;
if the included angle between the reference line of the driving road and the reference line of the driving road is within a second preset range, determining that the driving direction of the driving road relative to the driving road is a right turn, wherein the lower limit value of the second preset range is greater than the upper limit value of the first preset range;
and if the included angle between the reference line of the driving road and the reference line of the driving road is within a third preset range, determining that the driving direction of the driving road relative to the driving road is a left turn, wherein the upper limit value of the second preset range is smaller than the lower limit value of the first preset range.
A second aspect of the embodiments of the present disclosure provides a device for constructing a road network at a road intersection, including:
the system comprises an acquisition module, a display module and a control module, wherein the acquisition module is used for acquiring lane line information of a road connected with an intersection and pointing information of a guide arrow of the road close to the intersection;
the first determining module is used for determining the connection relation between the road and the intersection according to the pointing information of the guide arrow of the road aiming at each road, wherein the connection relation is used for representing that the road is an entering road or an exiting road of the intersection;
and the second determining module is used for determining the pairing relationship between the lane in the driving road of the intersection and the lane in the driving road of the intersection according to the lane line information and the direction information of the guide arrow in each driving road, and the lane line information and the direction information of the guide arrow in each driving road.
Optionally, the first determining module includes:
the first determining submodule is used for determining that the road is the driving road of the intersection if the guide arrow of the road points to the direction close to the intersection aiming at each road; and if the guide arrow of the road points to the direction far away from the intersection, determining that the road is the outgoing road of the intersection.
Optionally, the lane line information of each road includes a reference line of the road, the number of lane lines included, and position information of each lane, and the direction information of the guide arrow of each road near the intersection includes a direction of the guide arrow corresponding to each lane of the road;
the second determining module includes:
a second determining submodule, configured to determine, for each of the incoming roads, a driving direction of each of the outgoing roads with respect to the incoming road according to an included angle between a reference line of the incoming road and a reference line of each of the outgoing roads;
the classification submodule is used for classifying the lanes in the driving road according to the corresponding direction of the guide arrow to obtain the guide type of each lane of the driving road and the number of lanes of each guide type;
and the matching sub-module is used for selecting a target outgoing road from the outgoing roads of the intersection according to the target guidance type of the lane and the driving direction of each outgoing road relative to the incoming road for each lane in the incoming road, determining a target lane matched with the lane in the target outgoing road according to the position information of the lane, the number of the target guidance type lanes of the incoming road, the number of the lanes of the target outgoing road and the position information of each lane of the target outgoing road, and establishing connection between the lane and the target lane.
Optionally, each of said lanes belongs to at least one of the following types of guidance: straight, left turn, right turn.
Optionally, the pairing submodule is configured to:
if the target guide type comprises a left turn, selecting a left turn exit road relative to the driving direction of the entrance road from the exit roads of the intersection as the target exit road;
and taking the leftmost lane line of the driving road along the direction pointing to the intersection as a first reference, taking the leftmost lane line of the target driving road along the direction far away from the intersection as a second reference, and taking the nth lane of the target driving road close to the second reference as the target lane if the lane is the nth lane close to the first reference, wherein N is an integer greater than or equal to 1.
Optionally, the pairing submodule is configured to:
if the target guide type comprises a right turn, selecting a right turn exit road relative to the driving direction of the entrance road from the exit roads of the intersection as the target exit road;
and taking the rightmost lane line of the driving road along the direction pointing to the intersection as a first reference, taking the rightmost lane line of the target driving road along the direction far away from the intersection as a second reference, and taking the nth lane of the target driving road close to the second reference as the target lane if the lane is the nth lane close to the first reference, wherein N is an integer greater than or equal to 1.
Optionally, the pairing submodule is configured to:
if the target guidance type comprises straight running, selecting an exit road which runs straight relative to the running direction of the entrance road from exit roads of the intersection as the target exit road;
taking a leftmost lane line of the incoming road in a direction pointing to the intersection as a first reference and a leftmost lane line of the incoming road in a direction away from the intersection as a second reference, in a case where the number of the target-oriented type lanes of the incoming road is not equal to the number of lanes of the target outgoing road;
if the number of the target guidance type lanes of the entering road is equal to the number of the lanes of the target exiting road, if the lane is the Nth lane close to the first reference, taking the Nth lane close to the second reference in the target exiting road as the target lane;
in the case that the number of the target guidance-type lanes of the incoming road is not equal to the number of lanes of the target outgoing road, if the lane is the nth lane close to the first reference, one or more lanes of N-2 th to N +2 th lanes close to the second reference in the target outgoing road are taken as the target lane;
wherein N is an integer greater than or equal to 1.
Optionally, the second determining submodule is configured to:
for each driving road and any one driving road, if an included angle between a reference line of the driving road and a reference line of the driving road is within a first preset range, determining that the driving direction of the driving road relative to the driving road is straight;
if the included angle between the reference line of the driving road and the reference line of the driving road is within a second preset range, determining that the driving direction of the driving road relative to the driving road is a right turn, wherein the lower limit value of the second preset range is greater than the upper limit value of the first preset range;
and if the included angle between the reference line of the driving road and the reference line of the driving road is within a third preset range, determining that the driving direction of the driving road relative to the driving road is a left turn, wherein the upper limit value of the second preset range is smaller than the lower limit value of the first preset range.
A third aspect of the embodiments of the present disclosure provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, performs the steps of the method of the first aspect of the embodiments of the present disclosure.
A fourth aspect of the embodiments of the present disclosure provides an electronic device, including: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method of the first aspect of the embodiments of the present disclosure.
Through the technical scheme provided by the disclosure, the following technical effects can be at least achieved:
by acquiring lane line information of a road connected to an intersection and direction information of a guide arrow of the road near the intersection, according to the direction information of the guide arrow of each road, the connection relation between the road and the intersection can be determined, the driven-in road and the driven-out road of the intersection can be obtained, and finally, determining the pairing relationship between the lanes of the driving-in road and the lanes of the driving-out road according to the lane line information and the direction information of the guiding arrow of the driving-in road and the lane line information and the direction information of the guiding arrow of the driving-out road, realizing the automatic construction of the road intersection network, solving the problems that the road intersection network of the existing high-precision map is difficult to construct and needs manual participation, compared with the construction of the road network at the road intersection by manual participation in the related technology, the construction efficiency and accuracy of the road network at the road intersection are improved, and further the construction efficiency of the whole high-precision map is improved. Further, after the road network of the road intersection is constructed by the method, the matching result can be loaded into a road network file which is established in advance, the intersection, the driving-in road and the driving-out road which are connected with the intersection are displayed in a two-dimensional or three-dimensional view format, and the matched lanes are smoothly connected by a spline fitting method according to the matching relation between the lanes of the driving-in road and the lanes of the driving-out road to obtain the road network view of the road intersection so as to more intuitively display the constructed road network of the road intersection. In addition, based on the constructed road intersection road network, powerful support can be provided for high-precision map semantic generation, so that the method is applied to automatic driving and simulation tests of automatic driving.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Detailed Description
The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.
The terms "first," "second," and the like in the embodiments of the present disclosure are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
The embodiment of the disclosure provides a method for constructing a road network at a road intersection, which can be implemented by electronic equipment. As shown in fig. 1, fig. 1 is a flowchart illustrating a method of constructing a road network at a road intersection according to an exemplary embodiment of the present disclosure, the method including:
s101, acquiring lane line information of a road connected with the intersection and direction information of a guide arrow of the road close to the intersection.
The lane line information of each road connected to the intersection may include the number of lanes included in the road, lane lines and positions of the lanes, a reference line of the road, and the like, and the direction information of the guide arrow of each road near the intersection may include the direction (e.g., left turn or straight, right turn or straight) of the guide arrow corresponding to the lanes of the road, and the like. The intersections described in the embodiments of the present disclosure may include, but are not limited to, crossroads, t-intersections, roundabout intersections, and the like.
In an optional implementation manner, the environment image and point cloud data acquired by the acquisition vehicle may be processed and integrated, and attribute information (including the number, color, type, and the like of lane lines), information of adjacent positions and consistent directions, and pointing information of a guide arrow close to the intersection, of the intersection and the lane lines connected to the intersection, are extracted. And then, clustering the lane lines according to the attribute information of the lane lines and the information of adjacent positions and consistent trend, and binding the guide arrows corresponding to the lane lines to obtain a set of lane lines belonging to the same road and guide arrow pointing information corresponding to each lane of each road.
And S102, determining the connection relation between the road and the intersection according to the lane line information of the road and the pointing information of the guide arrow of the road aiming at each road.
The connection relation between the road and the intersection is used for representing that the road is an incoming road or an outgoing road of the intersection.
In an alternative embodiment, for each road, if the guide arrow of the road close to the intersection points to the direction close to the intersection, the road is determined to be the driven-in road of the intersection, such as the roads 110, 120, 130 and 140 shown in fig. 2; for each road, if the guiding arrow of the road close to the intersection points to the direction away from the intersection, the road is determined to be the outgoing road of the intersection, such as the roads 210, 220, 230 and 240 shown in fig. 2.
S103, determining the pairing relation between the lane in the entering road of the intersection and the lane in the exiting road of the intersection according to the lane line information and the direction information of the guide arrow in each entering road and the lane line information and the direction information of the guide arrow in each exiting road.
In this regard, the pairing relationship between a lane in an incoming road (hereinafter referred to as an "incoming lane") and a lane in an outgoing road (hereinafter referred to as an "outgoing lane") is used to characterize that a vehicle entering the intersection from the incoming lane needs to exit from the outgoing lane.
In an optional implementation manner, the acquired lane line information of the roads connected to the intersection includes a reference line of each road, the number of lane lines included, and position information of each lane, and the pointing information of the guide arrow of the road near the intersection includes pointing directions of the guide arrows corresponding to each lane of the road. Accordingly, as shown in fig. 3, this step may include:
and S311, determining the driving direction of each outgoing road relative to each incoming road according to the included angle between the reference line of the incoming road and the reference line of each outgoing road.
The driving direction of the outgoing road relative to the incoming road refers to the driving direction of the vehicle entering the outgoing road from the incoming road, and the driving direction includes any one of left-turning, straight-going, right-turning and the like.
In particular implementations, for an incoming road, its reference line may be its leftmost lane line in the direction pointing towards the intersection, such as lane lines a1, a2, A3, and a4 shown in fig. 2; for an outgoing road, the reference line may be the leftmost lane line in the direction away from the intersection, such as lane lines B1, B2, B3, and B4 shown in fig. 2. For each driving road and any driving road, if an included angle between a reference line of the driving road and a reference line of the driving road is within a first preset range, determining that the driving direction of the driving road relative to the driving road is straight; if the included angle between the reference line of the driving road and the reference line of the driving road is within a second preset range, determining that the driving direction of the driving road relative to the driving road is a right turn, wherein the lower limit value of the second preset range is greater than the upper limit value of the first preset range; and if the included angle between the reference line of the driving road and the reference line of the driving road is within a third preset range, determining that the driving direction of the driving road relative to the driving road is a left turn, wherein the upper limit value of the third preset range is smaller than the lower limit value of the first preset range. The first preset range, the second preset range and the third preset range can be set according to actual needs.
For example, the first preset range may be set to (-45 °,45 °), the second preset range may be set to (46 °,135 °), and the third preset range may be set to (-135 °, -46 °). Still taking the scene diagram shown in fig. 2 as an example, taking the incoming road 110 as an example, if the included angle between the reference line a1 of the incoming road and the reference line B1 of the outgoing road 210 is within the first preset range, it may be determined that the driving direction of the outgoing road 210 with respect to the incoming road 110 is straight; if the angle between the reference line a1 of the incoming road and the reference line B4 of the outgoing road 240 is within a second predetermined range, it is determined that the driving direction of the outgoing road 240 with respect to the incoming road is a right turn; the angle between the reference line a1 of the incoming road and the reference line B2 of the outgoing road 220 is within the third predetermined range, it can be determined that the driving direction of the outgoing road 220 with respect to the incoming road is a left turn.
S312, classifying the lanes in the driving road according to the corresponding direction of the guide arrow to obtain the guide type of each lane of the driving road and the number of lanes of each guide type.
In specific implementation, for each entering road, the corresponding guide arrow in the entering road points to a lane including straight running as a straight running lane, the corresponding guide arrow in the entering road points to a lane including a left turn as a left turn lane, the corresponding guide arrow in the entering road points to a lane including a right turn as a right turn lane, and the corresponding guide arrow in the entering road includes a lane including a turn around as a turn around lane.
It is worth noting that each lane entering the road is of at least one of the following types of guidance: straight, left turn, right turn, etc. For example, if a lane 111 entering the road 110 shown in fig. 2 is indicated by a directional arrow including a left turn and a straight line, it can be determined that the lane belongs to both a left turn lane type and a straight line lane type.
S313, aiming at each lane in the entering road, selecting a target exiting road from the exiting roads of the intersection according to the target guiding type of the lane and the driving direction of each exiting road relative to the entering road, determining a target lane in the target exiting road, which is matched with the lane, according to the position information of the lane, the number of the target guiding type lanes of the entering road, the number of the lanes of the target exiting road and the position information of each lane of the target exiting road, and connecting the lane with the target lane.
In specific implementation, for each lane in the incoming road, if the target guidance type to which the lane belongs includes a left turn, an outgoing road that is a left turn with respect to the driving direction of the incoming road is selected from the outgoing roads at the intersection as a target outgoing road. Considering that the vehicle usually enters the leftmost lane of the target outgoing road preferentially after turning left from the incoming road to the intersection, correspondingly, the leftmost lane line of the incoming road along the direction pointing to the intersection may be used as a first reference line, the leftmost lane line of the target outgoing road along the direction away from the intersection may be used as a second reference line, and if the lane is the nth lane close to the first reference line, the nth lane close to the second reference line in the target outgoing road may be used as a target lane paired with the lane, and the lane and the target lane are connected. Wherein N is an integer greater than or equal to 1.
Still taking the implementation scenario shown in fig. 2 as an example, for the lane 111 in the inbound road 110, the outbound road 220 turning left relative to the traveling direction of the inbound road 110 may be taken as the target outbound road. With the lane line a1 of the incoming road 110 as a first reference, the lane B2 of the target outgoing road as a second reference line, and the lane 111 being the 1 st lane close to the first reference a1, the 1 st lane 221 of the target outgoing road 220 close to the second reference B2 is a target lane paired with the lane 111, where the dashed arrows in the figure indicate the paired relationship.
And if the target guidance type of the lane comprises a right turn, selecting the outgoing road which is a right turn relative to the driving direction of the incoming road from the outgoing roads at the intersection as the target outgoing road. Considering that the vehicle normally enters the rightmost lane of the target outgoing road preferentially after turning right from the incoming road into the intersection, correspondingly, the rightmost lane line of the incoming road in the direction pointing to the intersection may be used as a first reference, the rightmost lane line of the target outgoing road in the direction away from the intersection may be used as a second reference, and if the lane is the nth lane close to the first reference, the nth lane close to the second reference in the target outgoing road is used as the target lane paired with the lane, and the lane is connected with the target lane. Wherein N is an integer greater than or equal to 1.
Still taking the implementation scenario shown in fig. 2 as an example, for the lane 112 in the incoming road 110, the outgoing road 240 turning right relative to the driving direction of the incoming road 110 may be taken as the target outgoing road. With the lane line a1 'of the incoming road 110 as a first reference, the lane 112 as the 1 st lane near the first reference a 1' and the lane B4 'of the target outgoing road as a second reference line, the 1 st lane 242 of the target outgoing road 240 near the second reference B4' is the target lane to be paired with the lane 112, wherein the dashed arrows in the figure indicate the pairing relationship.
And for each lane in the driving road, if the target guidance type of the lane comprises straight running, selecting the driving road which runs straight relative to the driving direction of the driving road from the driving roads at the intersection as the target driving road. Accordingly, the magnitude relationship between the number of target guidance type lanes and the number of target exit lanes for the incoming road may be divided into three case pairs, namely (1) the number of target exit lanes and the number of target guidance type lanes included in the incoming road is equal to the number of target exit lanes; (2) the number of the target guide type lanes contained in the entering road is less than that of the target exiting road; (3) the number of the target guidance type lanes included in the entry road is larger than the number of the target exit road lanes.
In case (1), a one-to-one correspondence relationship may be established between the lanes of the incoming road and the lanes of the target outgoing road, that is, a leftmost lane line of the incoming road along a direction pointing to the intersection may be used as a first reference, a leftmost lane line of the target outgoing road along a direction away from the intersection may be used as a second reference, and if the lane is an nth lane close to the first reference, an nth lane close to the second reference in the target outgoing road may be used as a target lane paired with the lane, and the lane and the target lane may be connected. Wherein N is an integer greater than or equal to 1.
Illustratively, as shown in fig. 4, the straight-through lane of the entering road includes a lane 1 and a lane 2, and the target exiting road includes a lane 1 'and a lane 2', according to the above method, it is determined that the lane 1 is paired with the lane 1 'and the lane 2 is paired with the lane 2', wherein the dotted arrows in the figure represent the paired relationship.
For the cases (2) and (3), it is also possible to use the leftmost lane line of the incoming road in the direction toward the intersection as the first reference, use the leftmost lane line of the target outgoing road in the direction away from the intersection as the second reference, and if the lane is the nth lane close to the first reference, use one or more lanes of the N-2 th to N +2 th lanes close to the second reference in the target outgoing road as the target lanes paired with the lane, and establish connection between the lane and the target lane. Wherein N is an integer greater than or equal to 1.
Further, for case (2), the specific algorithm is:
setting the traversal start subscript t _ start of the target outgoing road to 1, and circularly executing a first operation until the sum of t _ start and the number of straight lanes in the incoming road is greater than the number of lanes in the target outgoing road, starting from the straight lane closest to the first reference (i.e., the straight lane numbered k 1) in the incoming road, wherein the first operation is to pair the straight lane numbered k in the incoming road with the lane numbered t in the target outgoing road and to add 1 to t _ start.
Illustratively, as shown in FIG. 5, the straight-through lanes of the incoming road comprise lanes 1-3, and the target outgoing road comprises lanes 1 '-4', according to the above method, lane 1 may be paired with lane 1 'and 2', lane 2 may be paired with lane 2 'and 3', and lane 3 may be paired with lane 3 'and 4', respectively, wherein the dashed arrows in the figure represent the paired relationship.
For case (3), the specific algorithm is:
and setting a traversal starting subscript k _ start of the incoming road to a number k1 of a straight lane closest to the first reference in the incoming road, and circularly executing a second operation from a lane with a number t of 1 in the target outgoing road until the number k _ start and the number of lanes in the target outgoing lane are larger than the number of straight lanes in the incoming road, wherein the second operation is to pair the straight lane with the number k in the incoming road and the number t of lanes in the target outgoing road and add 1 to the number k _ start.
Illustratively, as shown in FIG. 6, the straight-through lanes in the incoming road comprise lanes 1-4, and the target outgoing road comprises lanes 1 'and 2', according to the above method, it can be determined that both lane 1 and 2 are paired with lane 1 ', and both lane 2 and 4 are paired with lane 2', wherein the dashed arrows in the figure represent the paired relationship.
It should be noted that, for lanes where the corresponding guiding arrow has multiple directions, multiple outgoing roads may be selected from the outgoing roads at the intersection as target outgoing roads, and accordingly, according to the above method embodiment, the lane may be paired with lanes of the multiple outgoing roads. For example, for the lanes where the corresponding directional arrows point to include left turn and straight, an exit road that is left turn with respect to the driving direction of the entry road and an exit road that is straight may be selected as target exit roads, and accordingly, according to the above method embodiment, the lanes paired with the lane include a left turn lane in the target exit road that is left turn and one or more lanes in the target exit road that is straight, as shown in fig. 7.
In addition, the embodiment of the disclosure is only illustrated by one intersection, and for the condition of a plurality of intersections, a complete road network of the road intersection is constructed according to the method embodiment for each intersection.
Further, the method may further include: before step S103 is executed, the validity of the intersection is confirmed based on the acquired shape of the intersection, the connection relationship between each road and the intersection, and the like. Specifically, if the roads connected to the intersection include an incoming road and an outgoing road, it is determined that the intersection is legitimate.
By adopting the method for constructing the road network of the road intersection provided by the embodiment of the disclosure, the connection relationship between the road and the intersection can be determined by acquiring the lane line information of the road connected with the intersection and the direction information of the guide arrow of the road close to the intersection, and the driven-in road and the driven-out road of the intersection can be obtained according to the direction information of the guide arrow of each road, and finally, the pairing relationship between the lane of the driven-in road and the lane of the driven-out road can be determined according to the lane line information of the driven-in road and the direction information of the guide arrow, as well as the lane line information of the driven-out road and the direction information of the guide arrow, so as to realize the automatic construction of the road network of the road intersection, solve the problems that the road network of the road intersection of the existing high-precision map is difficult to construct and needs to manually participate in the construction, and improve the construction efficiency and the accuracy of the road intersection compared, and further, the efficiency of the whole high-precision map construction is improved. Further, after the road network of the road intersection is constructed by the method, the matching result can be loaded into a road network file which is established in advance, the intersection, the driving-in road and the driving-out road which are connected with the intersection are displayed in a two-dimensional or three-dimensional view format, and the matched lanes are smoothly connected by a spline fitting method according to the matching relation between the lanes of the driving-in road and the lanes of the driving-out road to obtain the road network view of the road intersection so as to more intuitively display the constructed road network of the road intersection. In addition, based on the constructed road intersection road network, powerful support can be provided for high-precision map semantic generation, so that the method is applied to automatic driving and simulation tests of automatic driving.
The embodiment of the disclosure also provides a device for constructing a road network of a road intersection, which can be applied to electronic equipment. As shown in fig. 8, fig. 8 is a block diagram illustrating an apparatus for constructing a road network at a road intersection according to an exemplary embodiment of the present disclosure, where the apparatus 800 includes:
an obtaining module 801, configured to obtain lane line information of a road connected to an intersection and direction information of a guide arrow of the road near the intersection;
a first determining module 802, configured to determine, for each road, a connection relationship between the road and the intersection according to the pointing information of the guiding arrow of the road, where the connection relationship is used to represent that the road is an incoming road or an outgoing road of the intersection;
a second determining module 803, configured to determine, according to the lane line information and the direction information of the guiding arrow in each of the incoming roads, and the lane line information and the direction information of the guiding arrow in each of the outgoing roads, a pairing relationship between a lane in the incoming road of the intersection and a lane in the outgoing road of the intersection.
Optionally, as shown in fig. 9, the first determining module 802 includes:
a first determining submodule 821, configured to determine, for each road, that the road is an entering road of the intersection if the guide arrow of the road points to a direction approaching the intersection; and if the guide arrow of the road points to the direction far away from the intersection, determining that the road is the outgoing road of the intersection.
Optionally, the lane line information of each road includes a reference line of the road, the number of lane lines included, and position information of each lane, and the direction information of the guide arrow of each road near the intersection includes a direction of the guide arrow corresponding to each lane of the road;
as shown in fig. 9, the second determining module 803 includes:
a second determining submodule 831, configured to determine, for each of the incoming roads, a driving direction of each of the outgoing roads with respect to the incoming road according to an included angle between a reference line of the incoming road and a reference line of each of the outgoing roads;
a classification submodule 832, configured to classify lanes in the incoming road according to corresponding directions of the guidance arrows, so as to obtain guidance types to which the lanes of the incoming road belong and the number of lanes of each guidance type;
the matching sub-module 833 is configured to select a target outgoing road from the outgoing roads at the intersection according to a target guidance type to which the lane belongs and a driving direction of each outgoing road relative to the incoming road for each lane in the incoming road, determine a target lane in the target outgoing road, which is matched with the lane, according to location information of the lane, the number of target guidance type lanes of the incoming road, the number of lanes of the target outgoing road, and location information of each lane of the target outgoing road, and establish a connection between the lane and the target lane.
Optionally, each of said lanes belongs to at least one of the following types of guidance: straight, left turn, right turn.
Optionally, the pairing sub-module 833 is configured to:
if the target guide type comprises a left turn, selecting a left turn exit road relative to the driving direction of the entrance road from the exit roads of the intersection as the target exit road;
and taking the leftmost lane line of the driving road along the direction pointing to the intersection as a first reference, taking the leftmost lane line of the target driving road along the direction far away from the intersection as a second reference, and taking the nth lane of the target driving road close to the second reference as the target lane if the lane is the nth lane close to the first reference, wherein N is an integer greater than or equal to 1.
Optionally, the pairing sub-module 833 is configured to:
if the target guide type comprises a right turn, selecting a right turn exit road relative to the driving direction of the entrance road from the exit roads of the intersection as the target exit road;
and taking the rightmost lane line of the driving road along the direction pointing to the intersection as a first reference, taking the rightmost lane line of the target driving road along the direction far away from the intersection as a second reference, and taking the nth lane of the target driving road close to the second reference as the target lane if the lane is the nth lane close to the first reference, wherein N is an integer greater than or equal to 1.
Optionally, the pairing sub-module 833 is configured to:
if the target guidance type comprises straight running, selecting an exit road which runs straight relative to the running direction of the entrance road from exit roads of the intersection as the target exit road;
taking a leftmost lane line of the incoming road in a direction pointing to the intersection as a first reference and a leftmost lane line of the incoming road in a direction away from the intersection as a second reference, in a case where the number of the target-oriented type lanes of the incoming road is not equal to the number of lanes of the target outgoing road;
if the number of the target guidance type lanes of the entering road is equal to the number of the lanes of the target exiting road, if the lane is the Nth lane close to the first reference, taking the Nth lane close to the second reference in the target exiting road as the target lane;
in the case that the number of the target guidance-type lanes of the incoming road is not equal to the number of lanes of the target outgoing road, if the lane is the nth lane close to the first reference, one or more lanes of N-2 th to N +2 th lanes close to the second reference in the target outgoing road are taken as the target lane;
wherein N is an integer greater than or equal to 1.
Optionally, the second determining submodule is configured to:
for each driving road and any one driving road, if an included angle between a reference line of the driving road and a reference line of the driving road is within a first preset range, determining that the driving direction of the driving road relative to the driving road is straight;
if the included angle between the reference line of the driving road and the reference line of the driving road is within a second preset range, determining that the driving direction of the driving road relative to the driving road is a right turn, wherein the lower limit value of the second preset range is greater than the upper limit value of the first preset range;
and if the included angle between the reference line of the driving road and the reference line of the driving road is within a third preset range, determining that the driving direction of the driving road relative to the driving road is a left turn, wherein the upper limit value of the second preset range is smaller than the lower limit value of the first preset range.
It is obvious to those skilled in the art that, for convenience and simplicity of description, the foregoing division of the functional modules is merely used as an example, and in practical applications, the above function distribution may be performed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to perform all or part of the above described functions. For the specific working process of the functional module, reference may be made to the corresponding process in the foregoing method embodiment, which is not described herein again.
By adopting the device for constructing the road network of the road intersection, the connection relation between the road and the intersection can be determined by acquiring the lane line information of the road connected with the intersection and the direction information of the guide arrow of the road close to the intersection according to the direction information of the guide arrow of each road, the driven-in road and the driven-out road of the intersection are obtained, finally, the pairing relation between the lane of the driven-in road and the lane of the driven-out road is determined according to the lane line information of the driven-in road and the direction information of the guide arrow, the lane line information of the driven-out road and the direction information of the guide arrow, the automatic construction of the road network of the road intersection is realized, the problems that the road network of the road intersection of the existing high-precision map is difficult to construct and needs to be manually constructed are solved, and compared with the manual construction in the related technology, the construction efficiency and the accuracy of the road network of the road intersection, and further, the efficiency of the whole high-precision map construction is improved. Further, after the road network of the road intersection is constructed by the method, the matching result can be loaded into a road network file which is established in advance, the intersection, the driving-in road and the driving-out road which are connected with the intersection are displayed in a two-dimensional or three-dimensional view format, and the matched lanes are smoothly connected by a spline fitting method according to the matching relation between the lanes of the driving-in road and the lanes of the driving-out road to obtain the road network view of the road intersection so as to more intuitively display the constructed road network of the road intersection. In addition, based on the constructed road intersection road network, powerful support can be provided for high-precision map semantic generation, so that the method is applied to automatic driving and simulation tests of automatic driving.
The disclosed embodiments also provide a computer readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the method for constructing a road network at a road intersection provided by the above method embodiments.
The disclosed embodiments also provide an electronic device, which may be provided as a server, including: a memory having a computer program stored thereon; a processor for executing the computer program in the memory to implement the steps of the method for constructing a road network at an intersection provided by the above method embodiments.
Fig. 10 is a schematic structural diagram of the electronic device, and as shown in fig. 10, the electronic device 1000 may include: a processor 1001 and a memory 1002. The electronic device 1000 may also include one or more of a multimedia component 1003, an input/output (I/O) interface 1004, and a communications component 1005.
The processor 1001 is configured to control the overall operation of the electronic device 1000, so as to complete all or part of the steps in the method for constructing a road intersection network. The memory 1002 is used to store various types of data to support operation of the electronic device 1000, such as instructions for any application or method operating on the electronic device 1000 and application-related data, such as contact data, messaging, pictures, audio, video, and so forth. The Memory 1002 may be implemented by any type of volatile or non-volatile Memory device or combination thereof, such as a Static Random Access Memory (SRAM), an Electrically Erasable Programmable Read-Only Memory (EEPROM), an Erasable Programmable Read-Only Memory (EPROM), a Programmable Read-Only Memory (PROM), a Read-Only Memory (ROM), a magnetic Memory, a flash Memory, a magnetic disk, or an optical disk. The multimedia components 1003 may include screen and audio components. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signals may further be stored in memory 1002 or transmitted through communication component 1005. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 1004 provides an interface between the processor 1001 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 1005 is used for wired or wireless communication between the electronic device 1000 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 1005 may include: Wi-Fi module, bluetooth module, NFC module.
In an exemplary embodiment, the electronic Device 1000 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components, for performing the above-described method for constructing road crossing networks.
In another exemplary embodiment, a computer readable storage medium is also provided, which comprises program instructions, which when executed by a processor, implement the steps of the above-described method of constructing a road crossing network. For example, the computer readable storage medium may be the memory 1002 comprising program instructions executable by the processor 1001 of the electronic device 1000 to perform the method of constructing a road network at an intersection as described above.
The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.
It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.
In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.