Concrete crack image splicing method based on improved ORB algorithm

Through the improved ORB algorithm, combined with the improved FAST feature point detection and BRIEF feature descriptor algorithm, the forward and reverse bidirectional matching and offset error technology are used to solve the problems of low splicing efficiency and poor robustness of concrete crack images, and the rapid and accurate splicing of concrete crack images is achieved.

CN119540040APending Publication Date: 2025-02-28CCCC SECOND HIGHWAY ENG CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311008005.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-10
Publication Date
2025-02-28

AI Technical Summary

Technical Problem

The existing image stitching algorithm is inefficient in concrete crack image stitching, and is poorly robust, making it difficult to achieve fast and accurate stitching.

Method used

The improved ORB algorithm is adopted to detect and describe the feature point of concrete crack images through the improved FAST feature point detection algorithm and the BRIEF feature descriptor algorithm, and combine forward and reverse bidirectional matching and offset error techniques to achieve rapid stitching of images.

Benefits of technology

It improves the splicing efficiency and accuracy of concrete crack images, and can observe and understand the crack distribution of components faster and more accurately, thus supporting more complete restoration work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119540040A_ABST
    Figure CN119540040A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of image processing, and particularly relates to a concrete crack image splicing method based on an improved ORB algorithm. The method comprises the following steps: reading a reference image and a to-be-matched image of a concrete crack; performing feature point detection on a reference image and an image to be matched by using an improved FAST feature point detection algorithm, and then performing feature description by using a BRIEF feature description sub-algorithm; performing forward and reverse bidirectional matching on all the feature points to obtain a matching point pair set; and after error elimination is carried out on the matching point pairs by utilizing offset error elimination, the reference image and the to-be-matched image are fused and spliced. According to the method, the improved FAST feature point detection algorithm is adopted, the matching accuracy of the feature points is improved, the matching accuracy is improved through forward and reverse bidirectional matching and offset error removal, concrete crack pictures are spliced rapidly and accurately, and the crack distribution condition of a complete component can be observed and known more visually.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image processing, and in particular relates to a concrete crack image splicing method based on an improved ORB algorithm. Background Art

[0002] In the field of construction, concrete is one of the most commonly used materials. However, due to construction technology, later environment and other reasons, concrete components may suffer some damage, among which cracks account for a large proportion. Before repairing concrete cracks, they need to be inspected. Compared with the inefficient manual inspection in the past, machine inspection has become the general trend. To conduct machine inspection, the cracks must be photographed. Only by taking a large number of photos can we fully understand the crack distribution of a component, collect data and conduct quantitative analysis on the existing cracks, so as to carry out the most complete repair.

[0003] The development of cracks is irregular. Sometimes they will penetrate the entire component. A complete crack will be distributed in multiple photos in most cases. In this case, it is necessary to stitch the photos taken to meet the detection needs. When it comes to image stitching, SIFT, SURF, and ORB algorithms must be mentioned. The SIFT algorithm is a scale-invariant feature transformation algorithm. The algorithm has strong robustness to image rotation, scaling, etc., and has strong anti-interference ability, but it consumes time performance for stability, and the overall computational efficiency is low. The SURF algorithm is an improvement on the SIFT algorithm, and the computational efficiency is improved. The ORB algorithm is based on the FAST corner detection algorithm and the BRIEF descriptor, so it is called ORB (OrientedFAST and Rotated BRIEF). Both the FAST corner detection algorithm and the BRIEF descriptor have the characteristics of high performance and low computational complexity. The computational efficiency is one order of magnitude higher than that of the SIFT and SURF algorithms. It is an efficient alternative algorithm to the SIFT and SURF algorithms, but its robustness is relatively poor, and there is instability during the operation process. Summary of the invention

[0004] In view of the above problems, the purpose of the present invention is to provide a concrete crack image stitching method based on an improved ORB algorithm, which can quickly stitch concrete crack photos, so that the crack distribution of a complete component can be more intuitively observed and understood, thereby collecting data and quantitatively analyzing the existing cracks for complete repair.

[0005] The technical solution of the present invention is: a concrete crack image stitching method based on an improved ORB algorithm, comprising the following steps:

[0006] S1: Read concrete crack images, including reference images and images to be matched;

[0007] S2: Use the improved FAST feature point detection algorithm to perform feature point detection on the reference image read by S1 and the image to be matched, and then use the BRIEF feature descriptor algorithm to describe the features;

[0008] S3: Perform forward and reverse bidirectional matching on all feature points of the reference image and the image to be matched to obtain a set of matching point pairs;

[0009] S4: offset and eliminate errors in the set of matching point pairs obtained in S3;

[0010] S5: According to the set of matching point pairs after the errors are eliminated in step S4, the reference image and the image to be matched are fused and spliced.

[0011] The concrete crack image read in step S1 is a regularly photographed concrete crack plane image, and the concrete crack image is a rectangle.

[0012] In step S2, the improved FAST feature point detection algorithm is used to detect feature points of the reference image and the image to be matched, and then the BRIEF feature descriptor algorithm is used to perform feature description.

[0013] The specific process of improving the FAST feature point detection algorithm is as follows:

[0014] Draw a circle with a radius of 3 pixels with the pixel point P of the reference image read by S1 and the image to be matched as the center, and select four pixel points 1, 2, 3, and 4 on the circle that form a 45° angle with the center as the points to be determined. If the absolute value of the gray value difference between three of the four points and point P is greater than the threshold T, then the point to be determined is a feature point, otherwise it is determined to be a noise point. After determining that the point is a feature point to be determined, draw a circle with a radius of 6 pixels with pixel point P as the center. The four pixel points 5, 6, 7, and 8 on the circle that form a 45° angle with the center are still selected as the points to be judged. By using the grayscale extensibility of the image pixel points, if the grayscale value difference between these four points 5, 6, 7, and 8 and point P is the same as the grayscale value difference between the four points 1, 2, 3, and 4 in the same direction before, that is, the same size or the same size, then this point P is judged as a feature point, otherwise it is judged as a noise point. The threshold T is adaptively calculated according to the brightness change in the image. The specific calculation formula is:

[0015] T=0.1*I P +24 (1)

[0016] In the formula, I P is the gray value of the pixel P to be compared.

[0017] In step S3, all feature points of the reference image and the image to be matched are matched in both positive and negative directions. 1 And the image to be matched is image I 2 , first I 1 As a reference graph, then for I 1 All the feature points in it are selected one by one and marked as Calculate I 2 The Hamming distance of each feature point is calculated, and the feature point with the smallest Hamming distance is found and marked as At this point, this pair of feature points As a pair of matching points; then 1 All feature points in it are matched according to the above steps, and all the matching points obtained are put into a matching set Q 1 At this time, the forward matching is completed; then I 2 As a reference map to match I 1 The feature points among them are matched points Collection Q 2 , and then compare the feature matching point pairs of the two sets. If there is Q 1 The matching point pairs With Q 2 The matching point pairs If there is such an intersection, it will be retained, if not, it will be removed, and finally the matching point pair is obtained. Set Q to complete positive and negative bidirectional matching.

[0018] In step S4, the set of matching point pairs obtained in step S3 is offset and error removed, and an error removal calculation formula is proposed:

[0019]

[0020] In the above formula, D is the maximum pixel coordinate difference, S w is the number of image pixel columns, S h is the number of pixel rows in the image.

[0021] For the matching point pair set Q, if the two images are spliced ​​left and right, if the row pixel coordinate difference of the two matching points is within the range of D, then they are retained, otherwise they are eliminated. If the two images are spliced ​​top and bottom, if the column pixel coordinate difference of the two matching points is within the range of D, then they are retained, otherwise they are eliminated, and the final matching point pair set G is obtained to complete the offset error elimination.

[0022] The technical effects of the present invention are: 1. The present invention improves the FAST feature point detection algorithm, from the original detection of 16 points to the current detection of 8 points, reducing the amount of calculation by half; 2. The present invention improves the threshold in the FAST feature point detection algorithm, changing the original fixed threshold to a threshold for adaptive grayscale value changes, thereby improving the detection accuracy; 3. The present invention utilizes positive and negative bidirectional matching, and then offsets and eliminates errors on the set of matching point pairs, eliminates erroneous matches, improves the accuracy of matching, and realizes fast and accurate splicing of concrete crack photos.

[0023] The following is a further description with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] Figure 1 The present invention is a flowchart of a method for stitching concrete crack images based on an improved ORB algorithm.

[0025] Figure 2 Schematic diagram of feature point extraction of the FAST feature point detection algorithm before and after improvement in an embodiment of the present invention.

[0026] Figure 3 Schematic diagram of offset error rejection in an embodiment of the present invention.

[0027] Figure 4 This is a schematic diagram of feature points and matching before algorithm improvement in Figure Group 1 of an embodiment of the present invention.

[0028] Figure 5 This is a schematic diagram of feature points and matching after the algorithm of Figure Group 1 is improved according to an embodiment of the present invention.

[0029] Figure 6 This is a schematic diagram of feature points and matching before algorithm improvement in Figure Group 2 of an embodiment of the present invention.

[0030] Figure 7 This is a schematic diagram of feature points and matching after the algorithm of Figure Group 2 is improved according to an embodiment of the present invention.

[0031] Figure 8 This is a schematic diagram of feature points and matching before algorithm improvement in Figure Group 3 of an embodiment of the present invention.

[0032] Fig. 9 This is a schematic diagram of feature points and matching after the algorithm is improved in Figure Group 3 of the embodiment of the present invention. DETAILED DESCRIPTION

[0033] like Figure 1 As shown, a concrete crack image stitching method based on an improved ORB algorithm includes the following steps:

[0034] S1: Read concrete crack images, including reference images and images to be matched;

[0035] S2: Use the improved FAST feature point detection algorithm to perform feature point detection on the reference image read by S1 and the image to be matched, and then use the BRIEF feature descriptor algorithm to describe the features;

[0036] S3: Perform forward and reverse bidirectional matching on all feature points of the reference image and the image to be matched to obtain a set of matching point pairs;

[0037] S4: offset and eliminate errors in the set of matching point pairs obtained in S3;

[0038] S5: According to the set of matching point pairs after the errors are eliminated in step S4, the reference image and the image to be matched are fused and spliced.

[0039] The concrete crack image read in step S1 is a regularly photographed concrete crack plane image, and the concrete crack image is a rectangle.

[0040] In step S2, the improved FAST feature point detection algorithm is used to detect feature points of the reference image and the image to be matched, and then the BRIEF feature descriptor algorithm is used to perform feature description.

[0041] The specific process of improving the FAST feature point detection algorithm is as follows:

[0042] like Figure 2 As shown in the figure, using the original FAST feature point detection algorithm principle, with the pixel point P to be compared as the center, draw a circle with a radius of 3 pixels, select the four pixel points 1, 2, 3, and 4 on the circle that are at an angle of 45° to the center as the points to be determined, if the absolute value of the grayscale value difference between three of the four points and the point P is greater than the threshold T, then the point is determined to be a feature point, otherwise it is determined to be a noise point. After determining that the point is a pending feature point, draw a circle with a radius of 6 pixels with the pixel point P as the center, and still select the four pixel points 5, 6, 7, and 8 on the circle that are at an angle of 45° to the center as the points to be determined. Using the grayscale extensibility of the image pixel points, if the grayscale value difference between the four points 5, 6, 7, and 8 and the point P is the same as the grayscale value difference between the four points 1, 2, 3, and 4 in the same direction before (i.e., the same size or the same small), then the point P is determined to be a feature point, otherwise it is determined to be a noise point.

[0043] The thresholds mentioned in the above steps are also improved, and an adaptive threshold calculation formula is proposed for the brightness changes in the image:

[0044] T=0.1*I P +24 (1)

[0045] In the formula, I P is the gray value of the pixel P to be compared.

[0046] In step S3, all feature points of the reference image and the image to be matched are matched in both positive and negative directions. 1 And the image to be matched is image I 2 , first I 1 As a reference graph, then for I 1 All the feature points in it are selected one by one and marked as Calculate I 2 The Hamming distance of each feature point is calculated, and the feature point with the smallest Hamming distance is found and marked as At this point, this pair of feature points As a pair of matching points; then 1 All feature points in it are matched according to the above steps, and all the matching points obtained are put into a matching set Q 1 At this time, the forward matching is completed; then I 2 As a reference map to match I 1 The feature points among them are matched points Collection Q 2 , and then compare the feature matching point pairs of the two sets. If there is Q 1 The matching point pairs With Q 2 The matching point pairs If there is such an intersection, it will be retained, if not, it will be removed, and finally the matching point pair is obtained. Set Q to complete positive and negative bidirectional matching.

[0047] like Figure 3 As shown, in step S4, the set of matching point pairs obtained in S3 is offset and error removed, and an error removal calculation formula is proposed:

[0048]

[0049] In the above formula, D is the maximum pixel coordinate difference, S w is the number of image pixel columns, S h is the number of pixel rows in the image.

[0050] For the matching point pair set Q, if the two images are spliced ​​left and right, if the row pixel coordinate difference of the two matching points is within the range of D, then they are retained, otherwise they are eliminated. If the two images are spliced ​​top and bottom, if the column pixel coordinate difference of the two matching points is within the range of D, then they are retained, otherwise they are eliminated, and the final matching point pair set G is obtained to complete the offset error elimination.

[0051] Figure 4-Figure 9The figure shows the feature points and matching schematic diagrams before and after the improvement of the three groups of image algorithms in the embodiment of the present invention, and Table 1 shows the comparison of the results before and after the improvement of the three groups of image algorithms in the embodiment of the present invention. It can be seen from the figure that the improved matching accuracy is higher, and when the grayscale variation in the image is large or the overall grayscale value is small, the number of feature points and matching point pairs is large, and it has strong robustness.

[0052] Table 1

[0053]

[0054] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed by the present invention should be covered within the protection scope of the present invention.

Claims

1. A concrete crack image stitching method based on an improved ORB algorithm, characterized by: The following steps are involved: S1: Read concrete crack images, including reference images and images to be matched; S2: Use the improved FAST feature point detection algorithm to perform feature point detection on the reference image read by S1 and the image to be matched, and then use the BRIEF feature descriptor algorithm to describe the features; S3: Perform forward and reverse bidirectional matching on all feature points of the reference image and the image to be matched to obtain a set of matching point pairs; S4: offset and eliminate errors in the set of matching point pairs obtained in S3; S5: According to the set of matching point pairs after the errors are eliminated in step S4, the reference image and the image to be matched are fused and spliced.

2. According to claim 1, a concrete crack image stitching method based on an improved ORB algorithm is characterized in that: The concrete crack image read in step S1 is a regularly photographed concrete crack plane image, and the concrete crack image is a rectangle.

3. The concrete crack image stitching method based on the improved ORB algorithm according to claim 1 is characterized by: In step S2, the improved FAST feature point detection algorithm is used to perform feature point detection on the reference image and the image to be matched, and then the BRIEF feature descriptor algorithm is used to perform feature description.

4. The concrete crack image stitching method based on the improved ORB algorithm according to claim 1 is characterized by: The specific process of the improved FAST feature point detection algorithm is as follows: Draw a circle with a radius of 3 pixels with the pixel point P of the reference image read by S1 and the image to be matched as the center, and select four pixel points 1, 2, 3, and 4 on the circle that form a 45° angle with the center as the points to be determined. If the absolute value of the gray value difference between three of the four points and point P is greater than the threshold T, then the point to be determined is a feature point, otherwise it is determined to be a noise point. After determining that the point is a feature point to be determined, draw a circle with a radius of 6 pixels with pixel point P as the center. The four pixel points 5, 6, 7, and 8 on the circle that form a 45° angle with the center are still selected as the points to be judged. By using the grayscale extensibility of the image pixel points, if the grayscale value difference between these four points 5, 6, 7, and 8 and point P is the same as the grayscale value difference between the four points 1, 2, 3, and 4 in the same direction before, that is, the same size or the same size, then this point P is judged as a feature point, otherwise it is judged as a noise point. The threshold T is adaptively calculated according to the brightness change in the image. The specific calculation formula is: T=0.1*I P +24 (1) In the formula, I P is the gray value of the pixel P to be compared.

5. The concrete crack image stitching method based on the improved ORB algorithm according to claim 1 is characterized by: In step S3, all feature points of the reference image and the image to be matched are matched in both positive and negative directions. Let the reference image be I1 and the image to be matched be I2. First, I1 is used as the reference image, and then all feature points in I1 are selected and marked one by one. Calculate the Hamming distance to each feature point of I2 respectively, find the feature point with the smallest Hamming distance, and mark it as At this point, this pair of feature points As a pair of matching points; then match all feature points in I1 according to the above steps, put all the matching points obtained into a matching set Q1, and then the forward matching is completed; then use I2 as the reference map to match the feature points in I1 and obtain the matching points Set Q2, and then compare the feature matching point pairs of the two sets. If there is a matching point pair of Q1 Matching points with Q2 If there is such an intersection, it will be retained, if not, it will be removed, and finally the matching point pair is obtained. Set Q to complete positive and negative bidirectional matching.

6. The concrete crack image stitching method based on the improved ORB algorithm according to claim 1 is characterized by: In step S4, the set of matching point pairs obtained in step S3 is offset and error removed, and an error removal calculation formula is proposed: In the above formula, D is the maximum pixel coordinate difference, S w is the number of image pixel columns, S h is the number of pixel rows in the image. For the matching point pair set Q, if the two images are spliced ​​left and right, if the row pixel coordinate difference of the two matching points is within the range of D, then they are retained, otherwise they are eliminated. If the two images are spliced ​​top and bottom, if the column pixel coordinate difference of the two matching points is within the range of D, then they are retained, otherwise they are eliminated, and the final matching point pair set G is obtained to complete the offset error elimination.