Transfer from https://www.cnblogs.com/Jessica-jie/p/7523364.html
Reference article: An efficient and robust line segment matching approach based on LBD descriptor and pairwise geometric consistency--- -lilian Zhang, Reinhard Koch
Part II: Line Detection and description
1. Extracting line segments in scale space
To overcome the problem of on-line detection of fragmentation and to improve the performance of large scale changes, our detection framework consists of a scale space pyramid (n-layer image) with Gaussian down sampling of the original image (with a set of scale factor and Gaussian blur). We first use the Edline algorithm to generate a set of lines per layer of scale space. Each line has a direction, which is made up of the gradient of most of the edge pixels from the left side of the line to the right. They are then organized by locating the corresponding lines in the scale space. In the scale space of all the lines, they are assigned a unique ID, and if they are related to the same event in the image, they are stored in a vector called linevecs (that is, the same area of the image has the same direction). The line detection method differs from Wang et al.[5] by re-organizing all segments extracted from the scale space to form LINEVECS, thus reducing the dimensionality of the graph matching problem. The result of the final extraction is a set of linevecs such as:
As shown in 1, each Linevec may include multiple lines of scale space. To describe a Linevec local appearance, for each of these lines, we produce a line descriptor in each layer of the extracted segment.
2. Stripe (Band) to represent the line's support domain
In octave image, the segment is given, and the descriptor is computed from the Segment support field (LSR). The support area is divided into a set of strips {b1;b2; ; Bm}, each stripe is a sub-region of the LSR and they are parallel, the bar algebra m and the width of each stripe w, the length of the strip equals the length of the segment, as in the case of M =5, the LSR example of w=3.
Similar to msld[11], introduces two directions to form a local 2D coordinate frame (local two-dimensional coordinate system), which distinguishes parallel lines with opposite gradient directions and causes the descriptor to rotate unchanged. Depending on the direction of the line, the orthogonal direction (vertical direction) is defined as a clockwise vertical direction. The midpoint of the line is selected as the origin of the local coordinate system. The gradient of each pixel in the LSR is projected into this local frame, where: the pixel gradient in the image frame: the pixel gradient in the local frame.
For sift[23] and MSLD, the two Gaussian functions are applied along the direction of each line. First, the global weighting factor is the line I of the LSR, which is the distance from line I to the center of the LSR, second, consider a strip BJ, and he is in the adjacent strip bj-1,bj+1, local weighting coefficients in BJ K Line, where the K line to BJ Center line distance, The purpose of the global Gaussian window is to give a small degree of attention (sensitivity) to the slight gradient of variation in the LSR along the direction away from the line. The purpose of the local Gaussian window is to reduce the boundary effect, which avoids the abrupt change of the pixel moving from one strip to the next descriptor.
This method describes the advantages of a sub-region: First, it is more robust for small position changes in the direction, because in this case, most of the contents of the in-band image remain unchanged, with only a slight change in the band boundary. Note that this feature is important because, in general, because the line endpoint is unstable, the position accuracy of the line is lower than the direction in the direction. Second, it is more computationally efficient because each stripe does not overlap in the direction, and the Gaussian weights are applied directly to each row, not to each pixel.
3. Constructing stripe descriptors
(The line Band descriptor) LBD:
Description Sub-BDJ of each strip: through its nearest two adjacent rows of strip Bj-1; Bj+1 to calculate. In particular, for strips with B1 and BM at the top and bottom, the description of B1 and BM is not considered outside the LSR. (So the value of the following n will j=1| | M separate out)
BDJ calculation (In fact, the description of the upper and lower left and right four directions):
K: Indicates that in the strip BJ the K line, we accumulate the gradient of the pixels in this line;: Gaussian weights.
Stripe description Matrix The band Description Matrix (BDM):
BDJ is obtained by the mean vector of the BDMJ matrix MJ and the standard variance Sj:
The mean part and the standard variance part of LBD are normalized by their different sizes. In addition, to reduce the effects of nonlinear illumination changes, the LBD of each dimension is suppressed, making it less than a threshold value (experience: 0.4 is a good value). Finally, we re-standardize the constraint vectors to get the LBD of the units.
Two. Descriptor Performance evaluation
Before testing our proposed image matching algorithm, we analyzed the effect of the LSR parameters, such as the number of bands M and the width of the strip W, to evaluate the performance of LBD compared with MSLD descriptors.
Mikolajczyk and Schmid [33] establishes a benchmark for evaluating the performance of local descriptors. We use this framework to compare the performance of line descriptors. The experimental data set includes eight groups of images: Illumination variation, in-plane rotation, JPEG compression, image blur, image occlusion, viewpoint changes and texture scenes in low-texture scenes, and scale changes.
For the matching performance of the descriptor described in this section, we select the nearest neighbor matching criterion to match the line according to the distance of the descriptor, and avoid the deviation of the distance threshold due to the different descriptors ' preference for the different threshold values. Another advantage of this matching criterion is that the recall rate (the number of correctly matched numbers divided by the number of ground counterparts) and the matching precision (the correct number of matches divided by the total number of matches) are the only ones that determine the correct number of matches because the denominator of the different descriptors is equal.
Describe the number of child dimensions
Shows that the number of correct matches for all images is affected by these two parameters (M and W). It is clear this LBD and MSLD share similar rules:the performance increases fast at the beginning with the increment of M Or W, then reaches the most performance when M=9 and W are about 7 or 9, after that there are a steady performance decrease .
The results is well explained by the fact, larger values of M and w (i.e. larger LSR) make the descriptor more Distin Ctive (unique) while they also reduce the repeatability (repeatable) of the LSR.
We also evaluate the time performances of these the descriptors which is given in Table 1.
Although the time performances change from image to image, their relative relationship would keep the same. We only show the results which is generated from a example image with the size of 900x600 and 573 extracted lines. Basically, the larger m and W are, the more computational time is consumed.
LBD is less sensitivity (sensitive) to the increase of M and w than that's msld, especially for the increase of w.based on the AF orementioned evaluation, through the rest of the paper, the descriptor would be computed from a LSR with m= 9 and w= 7, Res Ulting in a 72-dimensional descriptor. Then the computing times of LBD and MSLD for the example image is MS, and 137 MS, respectively.
2.MSLD and LBD More comparisons
Compare each group of photos, MSLD and LBD recall ratios such as:
(a) shows the performances of MSLD and LBD for the image illumination changes. From image 1 to image 5, the lighting condition gets worse. The recall ratios decrease with the increment (growth) of the lighting distortion (illumination distortion).
(b) shows the results for images which is generated by a set of in-plane rotation varying from15°to75°. It is interesting this when the rotation angle is (between Image 3 and the reference image), LBD and MSLD perform worst Because of the aliasing of discrete lines (aliasing of discrete lines).
(c) and (d) show the descriptor performance against the image compression (compressed) and the image blurring (blur), respectively. Not surprisingly, the performances decrease with the increment of the image compression ratio (compression ratio) or the image blurring.
(e) shows the descriptor performance against image occlusion (occlusion). To evaluate the occlusion effect, we first artificially (artificially) add some vertical line (vertical) features in a background image, T Hen shift the region of interest along the vertical direction of the artificial image to generate a set of smaller images As shown in Fig. 5 (E). This process makes sure. The most of the lines, their LSR in the image sequence (images sequence) would change gradually (some Part of the LSR moves out or in). The results show, the descriptor performance decreases with the increment of the image occlusion.
(f) shows the descriptor performance in the lowtexture scene (low texture scene). Images in this sequence is captured in front of the windows with small view point changes. The results does not show drastic change (great changes) in performance because of the small baseline between.
(g) shows the descriptor performance against large view point change. The view angles between the query images and the reference image range approximately from
-70°to 60°. No doubt, the descriptors perform better when the absolute value of the view angle is smaller (image3 and image4).
(h) shows the most challenging case for the descriptors, i.e, and the large scale change. The scale ratio (ratio) between the query images and the reference image range from 0.9 to 0.3. The performance decreases fast with the.
Linear Matching-LSD algorithm