Abstract:
A lane detection method and a lane detection system mounted on a first vehicle are provided. The methods includes: calculating on which lane a first vehicle is located based on vehicle-to-vehicle data received by the first vehicle from at least one neighboring vehicle, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. The system may include: a communication device for receiving vehicle-to-vehicle data from at least one neighboring vehicle, and a processing device for calculating on which lane the first vehicle is located based on the vehicle-to-vehicle data received by the communication device, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. Lane detection may not rely on marks on roads which are inherently not clear or blur due to a bad weather.

Description:
TECHNICAL FIELD 
       [0001]    The present disclosure generally relates to lane detection. 
       BACKGROUND 
       [0002]    Nowadays, some vehicle-mounted systems can implement lane detection. In some existing solutions, lane information is detected based on image processing technology, which relies on marks on roads. When the marks on the roads are inherently not clear enough or blur due to a bad weather such as fog, lane detection may be affected seriously. 
       SUMMARY 
       [0003]    In one embodiment, a lane detection method is provided. The method includes: calculating on which lane a first vehicle is located based on vehicle-to-vehicle data received by the first vehicle from at least one neighboring vehicle, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. 
         [0004]    In some embodiments, the vehicle-to-vehicle data may include dynamic data containing at least one dynamic feature of the at least one neighboring vehicle. 
         [0005]    In some embodiments, on which lane the first vehicle is located may be calculated based on trajectories of the first vehicle and the at least one neighboring vehicle, where the trajectory of the at least one neighboring vehicle is calculated based on the dynamic data. 
         [0006]    In some embodiments, the dynamic data may include Global Positioning System (GPS) data of the at least one neighboring vehicle, and the trajectory of the at least one neighboring vehicle may be calculated based on the GPS data of the at least one neighboring vehicle. 
         [0007]    In some embodiments, the dynamic data may include velocity data and heading data of the at least one neighboring vehicle, and the trajectory of the at least one neighboring vehicle may be calculated based on the velocity data and heading data of the at least one neighboring vehicle, and a relative position of the at least one neighboring vehicle with regard to the first vehicle. In some embodiments, the relative position may be detected by an object detection sensor mounted on the first vehicle. 
         [0008]    In some embodiments, on which lane the first vehicle is located may be calculated based on a clustering result obtained by clustering the trajectories of the first vehicle and the at least one neighboring vehicle. 
         [0009]    In some embodiments, anomaly, such as a portion of the trajectories corresponding to an abnormal driving state, may be removed from the trajectories of the at least one neighboring device and the first vehicle, and the clustering may be performed based on the trajectories which have been subjected to the anomaly removal process. 
         [0010]    In some embodiments, anomaly, such as a portion of the received dynamic data corresponding to an abnormal driving state, may be removed from the received dynamic data, and the trajectory of the at least one neighboring vehicle may be calculated based on the dynamic data which have been subjected to the anomaly removal process. 
         [0011]    In some embodiments, the clustering may be performed based on a lane width. 
         [0012]    In some embodiments, on which lane the first vehicle is located may be calculated further based on a lane width. 
         [0013]    In some embodiments, on which lane the first vehicle is located may be obtained further based on a digital map. 
         [0014]    In some embodiments, a total number of lanes on a road where the first vehicle is located may be calculated, and a serial number of the lane on which the first vehicle is located among the calculated total number may be further calculated. 
         [0015]    In some embodiments, whether there is a vehicle on an adjacent lane may be calculated. 
         [0016]    In one embodiment, a lane detection method is provided. The method includes: calculating information of a first lane on which a first vehicle is located based on vehicle-to-vehicle data received by the first vehicle from at least one neighboring vehicle, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. 
         [0017]    In some embodiments, the vehicle-to-vehicle data may include dynamic data containing at least one dynamic feature of the at least one neighboring vehicle. 
         [0018]    In some embodiments, the information of the first lane may be calculated based on trajectories of the first vehicle and the at least one neighboring vehicle, where the trajectory of the at least one neighboring vehicle is calculated based on the dynamic data. 
         [0019]    In some embodiments, the information of the first lane may be calculated based on a clustering result obtained by clustering the trajectories of the first vehicle and the at least one neighboring vehicle. 
         [0020]    In some embodiments, the trajectory of the at least one neighboring vehicle may be calculated based on GPS data of the at least one neighboring vehicle contained in the dynamic data. 
         [0021]    In some embodiments, the trajectory of the at least one neighboring vehicle may be calculated based on velocity data and heading data of the at least one neighboring vehicle contained in the dynamic data, and a relative position of the at least one neighboring vehicle with regard to the first vehicle. In some embodiments, the relative position may be detected by an object detection sensor mounted on the first vehicle. 
         [0022]    In some embodiments, anomaly, such as a portion of the trajectories corresponding to an abnormal driving state, may be removed from the trajectories of the at least one neighboring device and the first vehicle, and the clustering may be performed based on the trajectories which have been subjected to the anomaly removal process. 
         [0023]    In some embodiments, anomaly, such as a portion of the received dynamic data corresponding to an abnormal driving state, may be removed from the received dynamic data, and the trajectory of the at least one neighboring vehicle may be calculated based on the dynamic data which have been subjected to the anomaly removal process. 
         [0024]    In some embodiments, the information of the first lane may be calculated further based on a lane width. 
         [0025]    In some embodiments, the information of the first lane may be obtained further based on a digital map. 
         [0026]    In some embodiments, the information of the first lane may include a serial number of the first vehicle or whether there are adjacent lanes. In some embodiments, the information of the first lane may include whether there are vehicles on the adjacent lanes. 
         [0027]    In one embodiment, a lane detection method is provided. The method includes: calculating information of a lane on which a first vehicle is located based on trajectories of the first vehicle and at least one neighboring vehicle, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. 
         [0028]    In some embodiments, the trajectory of the at least one neighboring vehicle may be calculated based on vehicle-to-vehicle data received by the first vehicle from the at least one neighboring vehicle. 
         [0029]    In one embodiment, a lane detection system mounted on a first vehicle is provided. The lane detection system may include: a communication device for receiving vehicle-to-vehicle data from at least one neighboring vehicle, and a processing device for calculating on which lane the first vehicle is located based on the vehicle-to-vehicle data received by the communication device, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. 
         [0030]    In some embodiments, the vehicle-to-vehicle data may include dynamic data containing at least one dynamic feature of the at least one neighboring vehicle. 
         [0031]    In some embodiments, the processing device may be configured to: calculate a trajectory of the at least one neighboring vehicle based on the received dynamic data; and obtain on which lane the first vehicle is located based on trajectories of the first vehicle and the at least one neighboring vehicle. 
         [0032]    In some embodiments, the dynamic data may include GPS data of the at least one neighboring vehicle, and the processing device may be configured to calculate the trajectory of the at least one neighboring vehicle based on the GPS data of the at least one neighboring vehicle. 
         [0033]    In some embodiments, the dynamic data may include velocity data and heading data of the at least one neighboring vehicle, and the processing device may be configured to calculate the trajectory of the at least one neighboring vehicle based on the velocity data and the heading data of the at least one neighboring vehicle, and a relative position of the at least one neighboring vehicle with regard to the first vehicle. In some embodiments, the lane detection system may further include an object detection sensor configured to detect the relative position. 
         [0034]    In some embodiments, the processing device may be configured to: perform clustering to the trajectories of the first vehicle and the at least one neighboring vehicle to obtain a clustering result; and obtain on which lane the first vehicle is located based on the clustering result. 
         [0035]    In some embodiments, the processing device may be configured to: remove anomaly, such as a portion of the trajectories corresponding to an abnormal driving state, from the trajectories of the at least one neighboring vehicle and the first vehicle; and perform the clustering to the trajectories which have been subjected to the anomaly removal process. 
         [0036]    In some embodiments, the processing device may be configured to: remove anomaly, such as a portion of the received dynamic data corresponding to an abnormal driving state, from the received dynamic data; and calculate the trajectory of the at least one neighboring vehicle based on the dynamic data which have been subjected to the anomaly removal process. 
         [0037]    In some embodiments, the processing device may be configured to perform the clustering based on a lane width. 
         [0038]    In some embodiments, the processing device may be configured to calculate on which lane the first vehicle is located further based on a lane width. 
         [0039]    In some embodiments, the processing device may be configured to calculate on which lane the first vehicle is located further based on a digital map. 
         [0040]    In some embodiments, the processing device may be configured to calculate a total number of lanes on a road where the first vehicle is located and further calculate a serial number of the lane on which the first vehicle is located among the calculated total number. 
         [0041]    In some embodiments, the processing device may be configured to determine whether there is a vehicle on an adjacent lane. 
         [0042]    In one embodiment, a lane detection system mounted on a first vehicle is provided. The lane detection system may include: a communication device for receiving vehicle-to-vehicle data from at least one neighboring vehicle, and a processing device for calculating information of a first lane on which the first vehicle is located based on vehicle-to-vehicle data received by the communication device, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. 
         [0043]    In some embodiments, the vehicle-to-vehicle data may include dynamic data containing at least one dynamic feature of the at least one neighboring vehicle. 
         [0044]    In some embodiments, the processing device may be configured to: calculate a trajectory of the at least one neighboring vehicle based on the received dynamic data; and obtain the information of the first lane based on trajectories of the first vehicle and the at least one neighboring vehicle. 
         [0045]    In some embodiments, the processing device may be configured to: perform clustering to the trajectories of the first vehicle and the at least one neighboring vehicle to obtain a clustering result; and obtain the information of the first lane based on the clustering result. 
         [0046]    In some embodiments, the processing device may be configured to calculate the trajectory of the at least one neighboring vehicle based on GPS data of the at least one neighboring vehicle contained in the dynamic data. 
         [0047]    In some embodiments, the processing device may be configured to calculate the trajectory of the at least one neighboring vehicle based on velocity data and heading data of the at least one neighboring vehicle contained in the dynamic data, and a relative position of the at least one neighboring vehicle with regard to the first vehicle. In some embodiments, the lane detection system may further include an object detection sensor configured to detect the relative position. 
         [0048]    In some embodiments, the processing device may be configured to: remove anomaly, such as a portion of the trajectories corresponding to an abnormal driving state, from the trajectories of the at least one neighboring vehicle and the first vehicle; and perform the clustering to the trajectories which have been subjected to the anomaly removal process. 
         [0049]    In some embodiments, the processing device may be configured to: remove anomaly, such as a portion of the received dynamic data corresponding to an abnormal driving state, from the received dynamic data; and calculate the trajectory of the at least one neighboring vehicle based on the dynamic data which have been subjected to the anomaly removal process. 
         [0050]    In some embodiments, the processing device may be configured to calculate the information of the first lane further based on a lane width. 
         [0051]    In some embodiments, the processing device may be configured to calculate the information of the first lane further based on a digital map. 
         [0052]    In some embodiments, the information of the first lane may include a serial number of the first vehicle or whether there are adjacent lanes. In some embodiments, the information of the first lane may include whether there are vehicles on the adjacent lanes. 
         [0053]    In one embodiment, a lane detection system mounted on a first vehicle is provided. The lane detection system may include: a processing device for calculating information of a lane on which the first vehicle is located based on trajectories of the first vehicle and at least one neighboring vehicle, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. 
         [0054]    In some embodiments, the lane detection system may further include a communication device for receiving vehicle-to-vehicle data from the at least one neighboring vehicle, and the processing device may be configured to: calculate the trajectory of the at least one neighboring vehicle based on the vehicle-to-vehicle data received by the communication device. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0055]    The foregoing and other features of the present disclosure will become more fully apparent from the following description and appended claims, taken in conjunction with the accompanying drawings. Understanding that these drawings depict only several embodiments in accordance with the disclosure and are, therefore, not to be considered limiting of its scope, the disclosure will be described with additional specificity and detail through use of the accompanying drawings. 
           [0056]      FIG. 1  is a schematic diagram of a driving scenario. 
           [0057]      FIG. 2  is a flow chart of a lane detection method  100  according to an embodiment; 
           [0058]      FIG. 3  is a schematic diagram of detected trajectories of vehicles according to an embodiment; 
           [0059]      FIG. 4  is an enlarged view of a trajectory L 2  shown in  FIG. 3 ; 
           [0060]      FIG. 5  is a schematic diagram of corrected trajectories of vehicles according to an embodiment; 
           [0061]      FIG. 6  is a flow chart of a clustering process  200  according to an embodiment; 
           [0062]      FIG. 7  is a schematic diagram of trajectories of vehicles according to an embodiment; and 
           [0063]      FIG. 8  is a schematic block diagram of a lane detection system  300  mounted on a first vehicle according to an embodiment. 
       
    
    
     DETAILED DESCRIPTION 
       [0064]    In the following detailed description, reference is made to the accompanying drawings, which form a part hereof. In the drawings, similar symbols typically identify similar components, unless context dictates otherwise. The illustrative embodiments described in the detailed description, drawings, and claims are not meant to be limiting. Other embodiments may be utilized, and other changes may be made, without departing from the spirit or scope of the subject matter presented here. It will be readily understood that the aspects of the present disclosure, as generally described herein, and illustrated in the Figures, can be arranged, substituted, combined, and designed in a wide variety of different configurations, all of which are explicitly contemplated and make part of this disclosure. 
         [0065]    In some safety applications, such as Blind Spot Warning or Lane Change Warning, lane information of a vehicle is important. For example, the lane information may include on which lane the vehicle is located or whether there are vehicles on adjacent lanes. 
         [0066]    Clustering is a process of grouping a set of objects in such a way that objects in a same group (called a cluster) are more similar (in some sense or another) to each other than to those in other groups (other clusters).  FIG. 1  is a schematic diagram of a driving scenario. Referring to  FIG. 1 , vehicles V 0  to V 4  are driving on four lanes of a road. The four different lanes may be considered as four clusters, and vehicles on a same lane may be determined to belong to a same cluster. For example, the vehicles V 0  and V 3  are driving on a same lane, thus, they belong to a same cluster. Further, a trajectory of a vehicle which denotes to a path that the vehicle follows may be used to indicate on which lane the vehicle is located. Therefore, a vehicle may obtain its lane information using a clustering process based on trajectories of itself and neighboring vehicles. It should be noted that, a neighboring vehicle of a vehicle may denote to another vehicle located within a vehicle-to-vehicle communication range of the vehicle. 
         [0067]      FIG. 2  illustrates a flow chart of a lane detection method  100  according to one embodiment. 
         [0068]    Referring to  FIG. 2 , in S 101 , a first vehicle generates its trajectory. 
         [0069]    In some embodiments, the first vehicle may obtain its trajectory based on GPS data of the first vehicle. During travelling, a GPS device may provide the GPS data which include geographical coordinates of the first vehicle and corresponding time points. 
         [0070]    In some embodiments, the trajectory of the first vehicle may be generated by performing curve fitting to the GPS data of the first vehicle. The curve fitting technology is well known in the art and is not described in detail here. 
         [0071]    In S 103 , the first vehicle generates trajectories of neighboring vehicles. 
         [0072]    In some embodiments, the trajectories of the neighboring vehicles may be generated based on vehicle-to-vehicle data of the neighboring vehicles received from the neighboring vehicles. It should be noted that, the vehicle-to-vehicle data denotes to data wirelessly exchanged among vehicles traveling in the same vicinity. In some embodiments, the vehicle-to-vehicle data may include dynamic data containing at least one dynamic feature of the neighboring vehicles. Inn some embodiments, the dynamic data may include GPS data, velocity data or heading data. In some embodiments, the vehicle-to-vehicle data may be transmitted in vehicle safety messages, such as basic safety messages (BSMs) or cooperative awareness messages (CAMs). 
         [0073]    In some embodiments, the first vehicle may generate the trajectories of the neighboring vehicles based on the GPS data of the neighboring vehicles using curve fitting technology, which is similar with S 101 . 
         [0074]    In some embodiments, the first vehicle may generate the trajectories of the neighboring vehicles based on the velocity data and the heading data of the neighboring vehicles, and a relative position of each of the neighboring vehicles with regard to the first vehicle. Detailed information of the trajectory detection can be found in International Application No. PCT/CN2014/090823. 
         [0075]    Referring to  FIG. 3 ,  FIG. 3  is a schematic diagram of detected trajectories of vehicles according to an embodiment. The first vehicle V 0  generates five trajectories L 1  to L 5  of the five vehicles V 0  to V 4 . The trajectories L 1 , L 2 , L 3  and L 5  are the trajectories of the neighboring vehicles, and the trajectory L 4  is the trajectory of the first vehicle V 0 . 
         [0076]    As described above, during a clustering process, vehicles driving on a same lane may belong to one cluster. In practical scenarios, a vehicle may not travel on a same lane on a road all the time. For example, in  FIG. 3 , the trajectory of the vehicle V 2  crosses two lanes. Obviously, a portion L 21  of the trajectory is on a first lane and a portion L 23  is on a second lane, that is, the portion L 21  belongs to one cluster and the portion L 23  belongs to another cluster. A portion L 22  of the trajectory crossing the two lanes neither belongs to the first lane nor belongs to the second lane, which may not be used in a subsequent clustering process. Generally, an anomaly portion of a trajectory may correspond to an abnormal driving state of a vehicle. Still taking the trajectory L 2  of the vehicle V 2  for example, the portion L 22  indicates the vehicle V 2  is changing lanes in a time period corresponding to the portion L 22 . In some embodiments, to ensure accuracy of clustering results, an anomaly portion of a trajectory like the portion L 22  may be removed from the trajectory. 
         [0077]    In S 105 , the first vehicle removes anomaly from the trajectories of the neighboring vehicles and the first vehicle to obtain corrected trajectories of the neighboring vehicles and the first vehicle. 
         [0078]    In some embodiments, anomaly in a trajectory of a vehicle may represent a portion of the trajectory of the vehicle which corresponds to an abnormal driving state of the vehicle. In some embodiments, removing the anomaly from the trajectories of the neighboring vehicles may include removing a portion of the trajectories which corresponds to vehicle-to-vehicle data in the abnormal driving state of the neighboring vehicles, that is, the anomaly may be removed based on the vehicle-to-vehicle data. 
         [0079]      FIG. 4  is an enlarged view of the trajectory L 2  shown in  FIG. 3 . The portion L 22  of the trajectory L 2  may be removed to obtain trajectories L 1 , L 21 , L 22 , L 3 , L 4  and L 5  to be used in a subsequent clustering process, as shown in  FIG. 5 . Specifically, the first vehicle V 0  may remove the portion L 22  of the trajectory L 2  based on received vehicle-to-vehicle data of the vehicle V 2 . Referring to  FIG. 4 , from a point P 1  at the trajectory L 22 , the vehicle V 2  starts to change lanes, and the vehicle V 2  finishes changing lanes at a point P 2 . The first vehicle V 0  may determine the portion L 22  to be the anomaly based on a lateral acceleration and/or heading information of the vehicle V 2  contained in the vehicle-to-vehicle data of the vehicle V 2 . Besides, the vehicle V 2  may turn on a cornering lamp when it changes lanes and turn off the cornering lamp when it finishes changing lanes. Accordingly, the vehicle V 2  adds information about turning on the cornering lamp and information about turning off the cornering lamp into messages sent to neighboring vehicles via vehicle-to-vehicle communication. Thus, the first vehicle V 0  may determine the portion L 22  to be the anomaly further based on the information about turning on/off the cornering lamp from the vehicle V 2 . 
         [0080]    From above, in some embodiments, after the trajectories of the neighboring vehicles and the first vehicle are generated, the anomaly may be removed from the generated trajectories. 
         [0081]    Optionally, in some embodiments, anomaly, such as a portion of the received vehicle-to-vehicle data corresponding to an abnormal driving state, may be removed from the received vehicle-to-vehicle data, and the trajectories of the neighboring vehicles may be calculated based on the vehicle-to-vehicle data which have been subjected to the anomaly removal process. 
         [0082]    For example, the first vehicle may generate the trajectories of the neighboring vehicles and the first vehicle shown in  FIG. 5  directly by excluding data of vehicles during an abnormal driving state before generating the trajectories. 
         [0083]    In S 107 , the first vehicle performs a clustering process to the corrected trajectories of the neighboring vehicles and the first vehicle. 
         [0084]    As described above, the clustering process enables similar objects to be in a same cluster. 
         [0085]    Considering two vehicles on different lanes of a road have at least one lane width therebetween, the clustering process may rely on the lane width. 
         [0086]      FIG. 6  is a flow chart of a clustering process  200  according to an embodiment. Hereinafter, the clustering process  200  may be described as an example. 
         [0087]    In S 201 , the first vehicle generates a set to carry reference trajectories. 
         [0088]    In S 203 , the first vehicle selects a side trajectory from the corrected trajectories as a first reference trajectory and determines the first reference trajectory to belong to a first cluster. 
         [0089]    In some embodiments, each of the corrected trajectories may be represented by a function like y=T(x) under a same coordinate system. To find a side trajectory among the corrected trajectories, the functions y=T(x) may be converted to another form x=T′(y). In some embodiments, a maximum intercept on a y-axis of curves defined by the functions x=T′(y) may be determined, and the trajectory which corresponds to the maximum intercept may be selected as the side trajectory. In some embodiments, a minimum intercept on the y-axis of the curves defined by the functions x=T′(y) may be determined, and the trajectory which corresponds to the minimum intercept may be selected as the side trajectory. 
         [0090]    In some embodiments, the first reference trajectories may be sent to the set carrying reference trajectories. 
         [0091]    In S 205 , the first vehicle determines whether a longest distance between one of the corrected trajectories and the first reference trajectory is shorter than a lane width, if yes, the process goes to S 207 ; else, the process goes to s 209 . 
         [0092]    In some embodiments, a distance between two trajectories means a shortest distance between any two points respectively on the two trajectories. 
         [0093]    In some embodiments, the lane width is stipulated to be 3.75 meters in related standards. In some embodiments, the lane width may be obtained from a digital map. 
         [0094]    In S 207 , the first vehicle determines that all the corrected trajectories belong to the first cluster. 
         [0095]    In some embodiments, if a distance between any of the corrected trajectories and the reference trajectory is shorter than the lane width, all the corrected trajectories may belong to one cluster, that is, the neighboring vehicles and the first vehicle may be travelling on a same lane of a road. 
         [0096]    In S 209 , the first vehicle determines the trajectory which has the longest distance to the first reference trajectory to be a second reference trajectory and to belong to a second cluster. 
         [0097]    In some embodiments, the second reference trajectory may be sent to the set carrying reference trajectories. 
         [0098]    In S 211 , the first vehicle determines whether a longest distance between one of the remained corrected trajectories and the reference trajectories carried in the set is longer than a lane width, if yes, the process goes to S 213 ; else, the process goes to S 215 . 
         [0099]    In some embodiments, a distance between a trajectory and the reference trajectories may denote to a sum of distances between the trajectory and each of the reference trajectories. 
         [0100]    In S 213 , the first vehicle determines the trajectory which has the longest distance to the reference trajectories carried in the set to be a third reference trajectory and to belong to a third cluster, and repeats step S 211 . 
         [0101]    In S 215 , the first vehicle determines clusters for the remained trajectories. 
         [0102]    In some embodiments, a remained trajectory may be determined to belong to one of the detected clusters if a distance between the remained trajectory and a clustered trajectory belonging to the one of the detected clusters is shorter than the lane width. In this manner, all the corrected trajectories are clustered to the detected trajectories. 
         [0103]    In some embodiments, the number of detected clusters may actually be the number of lanes. In some embodiments, the number of detected clusters may be not equal to an actual number of lanes, because, for example, one lane may not have any vehicles travelling thereon. 
         [0104]    In S 217 , based on the first reference trajectory and distances between the first reference trajectory and each of other corrected trajectories, the first vehicle determines a sequence of detected clusters. 
         [0105]    In some embodiments, a sequence of the detected clusters may include a distribution of the detected clusters along a direction perpendicular to a heading direction of the first vehicle. 
         [0106]    In S 109 , the first vehicle obtains on which lane it is located based on a clustering result. 
         [0107]    Based on the above clustering process, the first vehicle obtains the number of clusters of the corrected trajectories and a serial number of its trajectory. In some embodiments, the clusters may correspond to lanes. Thus, the first vehicle may obtain on which lane it is located based on the serial number of its trajectory. 
         [0108]    In some embodiments, the number of clusters may be smaller than the number of lanes. For example, referring to  FIG. 7 , five trajectories L 1 ′ to L 5 ′ are generated along a north direction, and the trajectory L 4 ′ is the trajectory of the first vehicle. After a clustering process, three clusters  1 ,  2  and  3  may be formed from west to east and the first vehicle may be determined to travel on a second lane from west to east. However, actually, the first vehicle is travelling on a third lane from west to east. The incorrect determination is because that no vehicle is travelling on the second lane. Thus, following steps may be necessary in some embodiments. Assuming that the trajectory L 4 ′ of the first vehicle belongs to the cluster  2 , and adjacent two clusters are clusters  1  and  3 , a distance between the trajectory L 4 ′ and a trajectory L 1 ′ in the cluster  1  and a distance between the trajectory L 4 ′ and a trajectory L 5 ′ in the cluster  3  may be calculated. The first vehicle may find that the distance between the trajectories L 4 ′ and L 1 ′ is more than one lane width, which indicates that the adjacent cluster  1  on a west side does not correspond to a lane adjacent to the lane on which the first vehicle is travelling actually. Thus, the first vehicle may determine that there is no vehicle travelling on an adjacent lane on a west side nearby. 
         [0109]    In some embodiments, on which lane the first vehicle is located may be obtained further based on a digital map. For example, if it is determined that the first vehicle belongs to a second cluster from west to east and the number of the clusters is four, and the number of lanes presented on the digital map is also four, the first vehicle may determine that it is located on the second lane from west to east. 
         [0110]    To better understanding the clustering process  200 , a detailed example is described combining with  FIG. 5 . 
         [0111]    Referring to  FIG. 5 , the first vehicle V 0  may select the most east trajectory L 5  as a reference trajectory and determines the trajectory L 5  to belong to a cluster  1 . Afterwards, the first vehicle V 0  calculates a distance between the trajectory L 5  and each of the trajectories L 1 , L 21 , L 22 , L 3  and L 4 , and determines the trajectory L 1  to be farthest from the trajectory L 5  and to belong to a cluster  2 . Afterwards, the first vehicle V 0  finds a trajectory farthest to the clustered trajectories L 1  and L 5 , that is, the sum of a distance between the trajectory to be found and the trajectory L 1  and a distance between the trajectory to be found and the trajectory L 5  should reach the maximum value. For example, the first vehicle V 0  determines the trajectory L 22  to be the trajectory farthest to the clustered trajectories L 1  and L 5 . Further, both a distance between the trajectories L 22  and L 1  and a distance between the trajectories L 22  and L 5  are greater than a lane width, thus, the first vehicle V 0  determines the trajectory L 22  to belong to a cluster  3 . So far, the clustered trajectories include L 1 , L 22  and L 5 . Similarly, the first vehicle V 0  may determine the trajectory L 3  to be the trajectory farthest to the clustered trajectories L 1 , L 22  and L 5 . As a distance between the trajectory L 3  and any one of the trajectories L 1 , L 22  and L 5  is longer than the lane width, the trajectory L 3  is determined to belong to a cluster  4 . Afterwards, among the remained trajectories L 21  and L 4 , neither the trajectory L 21  nor the trajectory L 4  has distances greater than the lane width to each of the clustered trajectories L 1 , L 22 , L 3  and L 5 , thus, no new cluster may be formed. By comparing distances between the trajectory L 21  and each of the clustered trajectories L 1 , L 22 , L 3  and L 5  with the lane width, the first vehicle V 0  finds the trajectory L 21  has a distance shorter than the lane width to the trajectory L 1 , and thus determines the trajectory L 21  to belong to the cluster  2 . Similarly, the trajectory L 4  is determined to belong to the cluster  4 . In this manner, the clustering process is performed. Four clusters are obtained and the trajectories L 1 , L 21 , L 22 , L 3 , L 4  and L 5  are classified to the four clusters. Based on the reference trajectory L 5  and distances between the reference trajectory L 5  and each of the trajectories L 1 , L 21 , L 22 , L 3  and L 4 , the first vehicle V 0  may find that the four clusters from east to west are clusters  1 ,  4 ,  3  and  2 , respectively. As the trajectory L 4  of the first vehicle V 0  belongs to the cluster  4 , the first vehicle V 0  determines that it is located on the second lane from east to west. 
         [0112]    From above, based on trajectories of a host vehicle and its neighboring vehicles, a clustering process may be performed to the trajectories to obtain a clustering result. And the host vehicle may obtain on which lane it is located or whether there are vehicles on adjacent lanes according to the clustering result. 
         [0113]      FIG. 8  illustrates a schematic block diagram of a lane detection system  300  mounted on a first vehicle according to one embodiment. Referring to  FIG. 8 , the lane detection system  300  includes a positioning device  301 , a communication device  303 , a processing device  305 , a displaying device  307  and a memory device  309 . 
         [0114]    In some embodiments, the positioning device may be configured to obtain GPS data of the first vehicle. In some embodiments, the communication device  303  may be configured to receive vehicle-to-vehicle data from neighboring vehicles. In some embodiments, the processing device  305  may be configured to calculate on which lane the first vehicle is located based on the vehicle-to-vehicle data received by the communication device  303 . In some embodiments, the displaying device  307  may be configured to present the lane information to a user. 
         [0115]    In some embodiments, the processing device  305  may be further configured to: calculate trajectories of the neighboring vehicles based on the vehicle-to-vehicle data of the neighboring vehicles; generate a trajectory of the first vehicle based on the GPS data of the first vehicle; perform clustering to the trajectories of the neighboring vehicles and the first vehicle to obtain a clustering result; and obtain on which lane the first vehicle is located based on the clustering result. 
         [0116]    In some embodiments, the vehicle-to-vehicle data may be transmitted in vehicle safety messages, such as BSMs or CAMs. In some embodiments, the vehicle-to-vehicle data may include dynamic data containing at least one dynamic feature of the neighboring vehicles. 
         [0117]    In some embodiments, the dynamic data may include GPS data of the neighboring vehicles. In some embodiments, the processing device  305  may be configured to generate the trajectories of the neighboring vehicles based on the GPS data of the neighboring vehicles. 
         [0118]    In some embodiments, the dynamic data may include velocity data and heading data of the neighboring vehicles. In some embodiments, the lane detection system  300  may further include an object detection sensor for detecting a relative position of each of the neighboring vehicles with regard to the first vehicle. In some embodiments, the processing device  305  may be configured to generate the trajectories of the neighboring vehicles based on the velocity data and the heading data of the neighboring vehicles, and the relative position of each of the neighboring vehicles with regard to the first vehicle. 
         [0119]    In some embodiments, the processing device  305  may be further configured to: remove anomaly, such as a portion of the trajectories corresponding to an abnormal driving state, from the trajectories of the neighboring vehicles; and perform the clustering to the trajectories which have been subjected to the anomaly removal process. 
         [0120]    In some embodiments, the processing device  305  may be configured to: remove anomaly, such as a portion of the received dynamic data corresponding to an abnormal driving state, from the received dynamic data; and calculate the trajectories of the neighboring vehicles based on the dynamic data which have been subjected to the anomaly removal process. 
         [0121]    In some embodiments, the processing device  305  may be configured to perform the clustering based on a lane width. In some embodiments, the processing device  305  may be configured to calculate on which lane the first vehicle is located further based on the lane width. In some embodiments, the processing device  305  may be configured to obtain on which lane the first vehicle is located further based on a digital map. 
         [0122]    In some embodiments, the processing device  305  may be configured to calculate a total number of lanes on a road where the first vehicle is located and further calculate a serial number of the lane on which the first vehicle is located among the calculated total number. 
         [0123]    In some embodiments, the processing device  305  may be configured to determine whether there is a vehicle on an adjacent lane. 
         [0124]    In some embodiments, the processing device  305  may be a CPU, or a MCU, or a DSP etc., or any combination thereof. The memory device  309  may store an operating system and program instructions. 
         [0125]    According to one embodiment, a non-transitory computer readable medium, which contains a computer program for lane detection, is provided. When the computer program is executed by a processor, it will instruct the processor to: calculate on which lane a first vehicle is located based on vehicle-to-vehicle data received by the first vehicle from at least one neighboring vehicle, where the neighboring vehicle means another vehicle located within a vehicle-to-vehicle communication range of the first vehicle. 
         [0126]    There is little distinction left between hardware and software implementations of aspects of systems; the use of hardware or software is generally a design choice representing cost vs. efficiency tradeoffs. For example, if an implementer determines that speed and accuracy are paramount, the implementer may opt for a mainly hardware and/or firmware vehicle; if flexibility is paramount, the implementer may opt for a mainly software implementation; or, yet again alternatively, the implementer may opt for some combination of hardware, software, and/or firmware. 
         [0127]    While various aspects and embodiments have been disclosed herein, other aspects and embodiments will be apparent to those skilled in the art. The various aspects and embodiments disclosed herein are for purposes of illustration and are not intended to be limiting, with the true scope and spirit being indicated by the following claims.