Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a rural road network matching method based on an extended line segment.
In order to achieve the purpose, the invention adopts the following technical scheme:
the rural road network matching method based on the extended line segment comprises the following steps:
s1, establishing a buffer area by taking each reference line segment on the reference data set as a center, then calculating all line segments on the target data set falling in the buffer area to obtain the similarity between the reference line segments and the reference line segments, and setting the line segments meeting the threshold requirement as candidate line segments;
s2, performing line segment expansion operation on the reference line segment and all candidate line segments thereof, recalculating the similarity between the expanded reference line segment and the candidate line segments, and selecting the expanded line segment with high similarity as a new candidate line segment of the expanded reference line segment;
s3, constructing a self-adaptive parameter K to control the iteration cycle times, namely selecting the first K line segments with the highest similarity as new candidate line segments each time, and when K is 1, determining the line segment pair which is correctly matched.
Further, the similarity between the segments is calculated by the following formula:
in the formula Simlen,Simdis,Simang,SimshapeSimilarity in length, distance, angle, shape, w, respectively, of line segmentslen,wdis,wang,wshapeRespectively their corresponding weights.
Further, the calculation of step S1 is specifically as follows:
s11, the buffer zone construction method is as follows
Constructing a buffer area of a rectangular area around the reference line segment by taking the reference line segment as a central line, wherein the long edge of the rectangle is parallel to the reference line segment, and the length of the rectangle is slightly greater than that of the reference line segment; the wide side of the rectangle is bisected by the reference line segment; calculating the similarity between the line segment on the target data set in the buffer area and the reference line segment according to three geometric attributes of length, distance and angle;
s12 similarity Sim in length between line segment L1 on the target data set and reference line segment L2lenCalculated by the following formula:
Simlen=|LL1-LL2|
in the formula L
LiIs the length of the line segment Li, n is the total number of nodes in the line segment Li,
and
is the j-th node P in the line segment
jThe abscissa and ordinate of (a);
similarity in distance Sim of the line segment L1 on the target data set and the reference line segment L2disCalculated by the following formula:
in the formula La,LbAre respectively line segments L1,L2Any one fragment of above, | | Pa-LbI represents a line segment L1A certain node P onaTo LbPerpendicular distance, | | Pb-LaI then represents the line segment L2A certain node P onbTo LaThe vertical distance of (d);
angular similarity Sim of line segment L1 on the target data set and reference line segment L2angCalculated by the following formula:
in the formula
Are respectively line segments L
1And a line segment L
2The expression is the inner product operation of the vector, |, is the modulus of the vector.
Further, the calculation of step S2 is specifically as follows:
respectively extending the end points of the reference line segment and all the candidate line segments outwards by a line segment unit to form a new line segment; and calculating new similarity of the formed new line segments according to three characteristics of length, distance and shape, and finally selecting the first K corresponding line segments from high to low according to the similarity as new candidate line segments of the extended reference line segment.
Further, the similarity Sim in shape of the line segment L1 on the expanded target data set and the reference line segment L2shapeThe method comprises the following steps:
s211, setting a new complex network, and analyzing the shape of a curve; firstly, connecting all nodes on a curve pairwise to form a nondirectional fully-connected network with a weight value, wherein the weight value is a value obtained by normalizing the distance between the two nodes; then a threshold value R is given1If the weight of the edge in the network is less than or equal to the threshold R1The edge is retained, otherwise the edge is deleted, and the resulting new network is called the threshold R1A complex network of lower;
s212, constructing a shape descriptor sigma according to the complex networks obtained under different thresholds; as shown below
σ=[Ka(1),Km(1),Ka(2),Km(2),…,Ka(M),Km(M)]
In the formula Ka(j) Represents a threshold value RjAverage value of degrees of all nodes in the complex network under, Km(j) Represents the maximum value of the degrees of all nodes in the network;
s213, line segment L1And a line segment L2Similarity in shape SimshapeThe definition is as follows:
where M represents the total number of thresholds.
Further, step S3 specifically includes the following steps:
s31, constructing a self-adaptive parameter K to represent the number of new candidate line segments to be selected; setting the well-ordered similarity sequence { Simi,1,Simi,2,…,Simi,m},Simi,1≥Simi,2≥…≥Simi,mWhere Simi,jIndicating the extended reference line segment LiAnd the extended candidate line segment LjSimilarity between them; let j accumulate from 1, when it first encounters Simi,j-Simi,j+1≥TsWhen the accumulation stops, the value of j is the value of K needed, where TsIs an empirical threshold;
and S32, when the value of K is more than 1, the current candidate line segment is more than one, which does not accord with the requirement of accurate matching, and the candidate line segment needs to be further expanded until only one correct matching which accords with the requirement is found.
After the technical scheme is adopted, the corresponding candidate line segments can be selected from the reference line segments in a buffer area constructing mode, the searching space is greatly reduced, a line segment expanding mode is introduced on the basis, the topological connection relation between the line segments and the peripheral line segments is considered, the correct matching pairs are more accurately determined by combining context information, and finally, the whole matching efficiency is improved in a self-adaptive parameter constructing mode.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
Fig. 1 shows a flow chart of the present invention, which mainly includes the following steps:
s1, establishing a buffer area by taking each reference line segment on the reference data set as a center, and then calculating the similarity between the reference line segment and all line segments falling on the target data set in the buffer area, wherein all the line segments meeting the threshold requirement are regarded as candidate line segments;
s2, performing line segment expansion operation on the reference line segment and all candidate line segments thereof, recalculating the similarity among the expanded line segments, and selecting the expanded line segment with high similarity as a new candidate line segment of the expanded reference line segment;
s3, constructing an adaptive parameter K to control the number of iterative cycles, namely, selecting the first K line segments with the highest similarity as new candidate line segments each time, and finding a line segment pair which is correctly matched when K is 1.
Wherein, step S1 is specifically as follows:
s11, the buffer zone construction method is as follows
Constructing a buffer area of a rectangular area around the reference line segment by taking the reference line segment as a central line, wherein the long edge of the rectangle is parallel to the reference line segment, and the length of the rectangle is slightly greater than that of the reference line segment; the wide side of the rectangle is bisected by the reference line segment; and calculating the similarity between the line segment falling on the target data set in the buffer area and the reference line segment according to three geometric attributes of length, distance and angle.
S12, similarity between segments is calculated by the following formula
In the formula Simlen,Simdis,Simang,SimshapeRespectively, the similarity of the line segments in length, distance, angle, shape, where and hereinafter a line segment includes a line segment consisting of polylines after expansion, wlen,wdis,wang,wshapeTheir respective weights;
line segment L1And a line segment L2Similarity in length SimlenCalculated by the following formula:
Simlen=|LL1-LL2|
in the formula L
LiIs the length of the line segment Li, n is the total number of nodes in the line segment Li,
and
is the j-th node P in the line segment
jThe abscissa and ordinate of (a);
line segment L1And a line segment L2Similarity in distance SimdisCalculated by the following formula:
in the formula La,LbAre respectively line segments L1,L2Any one fragment of above, | | Pa-LbI represents a line segment L1A certain node P onaTo LbPerpendicular distance, | | Pb-LaI then represents the line segment L2A certain node P onbTo LaThe vertical distance of (d);
line segment L1And a line segment L2Similarity in angle SimangCalculated by the following formula:
in the formula
Are respectively line segments L
1And a line segment L
2The expression is the inner product operation of the vector, |, is the modulus of the vector.
On the basis of the candidate line segment obtained in step S1, step S2 is performed to obtain a new candidate line segment, which specifically includes:
respectively extending the end points of the reference line segment and all the candidate line segments outwards by a line segment unit to form a new line segment; and calculating new similarity of the formed new line segments according to three characteristics of length, distance and shape, and finally selecting the first K corresponding line segments from high to low according to the similarity as new candidate line segments of the extended reference line segment.
Shape similarity is defined as follows:
a new definition of a complex network is introduced to analyze the shape of a curve (formed by a plurality of broken line segments). Firstly, all nodes on the curve are connected pairwise to formAnd a completely connected network with undirected weight value, wherein the weight value is the value after the distance normalization of the two nodes. For example, assuming a total of n nodes on a curve, a fully connected network has
An edge. Then, a threshold value R is given
lIf the weight of the edge in the network is less than or equal to the threshold R
lThe edge is retained, otherwise the edge is deleted, and the resulting new network is called the threshold R
1The following complex network.
Next, a shape descriptor σ is constructed from the complex network obtained under different thresholds. In particular, a sequence of thresholds R of equal difference values is selected1,R2,…,RMWherein 0 is less than or equal to R1≤RM≤1,Rj+1-RjC is a constant. From this sequence of thresholds, M complex networks result. Then, from these M complex networks, a shape descriptor σ is constructed, as shown below
σ=[Ka(1),Km(1),Ka(2),Km(2),…,Ka(M),Km(M)]
In the formula Ka(j) Represents a threshold value RjAverage value of degrees of all nodes in the complex network under, Km(j) Representing the maximum value of degrees for all nodes in the network. Therefore, line segment L1And a line segment L2Similarity in shape SimshapeThe following can be defined:
where M represents the total number of thresholds.
On the basis of obtaining a new candidate line segment in step S2, an adaptive parameter is used to obtain an accurate matching result, which specifically includes the following steps:
an adaptive parameter K is constructed to indicate the number of new candidate segments to be selected. Suppose now thatWith well-ordered similarity sequences { Simi,1,Simi,2,…,Simi,m},Simi,1≥Simi,2≥…≥Simi,mWhere Simi,jIndicating the extended reference line segment LiAnd the extended candidate line segment LjThe similarity between them. Let j accumulate from 1, when it first encounters Simi,j-Simi,j+1≥TsWhen the accumulation stops, the value of j is the value of K needed, where TsIs an empirical threshold.
If the value of K is more than 1, the current candidate line segment is more than one, which does not meet the requirement of accurate matching, so the candidate line segment needs to be further expanded until only one correct matching meeting the requirement is found.
Fig. 2 is a diagram illustrating the road matching effect of the present invention applied to high-resolution satellite images. The target data set of the invention is a road network extracted from an image shot by a Pleiades-1A satellite, the resolution of the image is 0.5m, and the size of the image is 28648 multiplied by 37929 pixels; the reference data set is a road network formed by historical vehicle tracks provided by a Chinese traffic communication center. Fig. 2 is a graph of the effect of matching a part of the area of the whole road network, wherein fig. 2a is a target data set and fig. 2b is a reference data set.
Fig. 3 is an enlarged view of the matching effect within the two rectangular boxes in fig. 2. Fig. 3(a) corresponds to the enlargement of the frame No. 1 on the left in fig. 2, and fig. 3(b) corresponds to the enlargement of the frame No. 2 in the middle in fig. 2. In fig. 3,line 1 represents the reference data set, while for the target data setline 2 represents the correctly matched road segments,line 3 represents the unmatched road segments, andline 4 represents the incorrectly matched road segments.
The following table shows the data statistics of the road matching results:
the literature on relevant road matching algorithms is as follows:
[1]MengZhang and LiqiuMeng,“Delimited stroke oriented algorithm-working principle and implementation for the matching of road networks,”Geographic Information Sciences,vol.14,no.1,pp.44–53,2008.
due to the fact that rural roads are relatively cluttered, some small and remote roads are missed from the historical reference data set, and the matching rate of the algorithm is not high and is only 74.73%. However, the accuracy of the algorithm reaches 87.24%, which is much higher than the accuracy of 83.41% in the document [1], which proves that the accuracy of the rural road matching using the method is greatly improved.
The above is only a preferred embodiment of the present invention, but the scope of the present invention is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present invention are also within the scope of the present invention; therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.