Axis-based crack binary image splicing method and storage medium

Through the axis-based method, the splicing coordinates and overlap degree are calculated, the problem of lack of feature points in crack binary map splicing is solved, automatic splicing and efficiency improvement are achieved, and the need for feature point recognition is reduced.

CN114742702BActive Publication Date: 2025-01-07ZHEJIANG SCI RES INST OF TRANSPORT
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210209963.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-04
Publication Date
2025-01-07
Estimated Expiration
2042-03-04

AI Technical Summary

Technical Problem

The prior art is difficult to automate the splicing of crack binary maps, and the lack of feature points makes it impossible to achieve effective splicing. Conventional methods require identification of feature points in overlapping areas, which increases the computational complexity and requirements.

Method used

Through an axis-based method, the axis diagram of the crack binary graph is extracted, the splicing coordinates and coincidence degree are calculated, and the maximum overlap degree is used for splicing, which avoids the need for feature point matching and reduces the requirement for the number of feature points.

Benefits of technology

Automatic splicing of crack binary graphs is realized, which improves the universality and efficiency of splicing algorithms and avoids the complexity of feature point recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114742702B_ABST
    Figure CN114742702B_ABST
Patent Text Reader

Abstract

The axis-based crack binary image splicing method disclosed in the present invention comprises the following steps: S1, sequentially extracting the nth crack binary image R from the crack binary image sequence n and the n+1th crack binary image R n+1 , get the crack binary map R n And crack binary map R n+1 The crack line axis diagram P n and crack line axis diagram P n+1 ; S2, obtain the crack axis map P n+1 Figure P near the crack axis n The crack endpoint on the side#imgabs0# is plotted against the crack axis n The cracks in the sample are sampled to form a crack point sequence {I n}; S3, calculate the crack endpoint #imgabs1# translation to the crack point sequence {I n The splicing coordinates (X k ,Y k ), and calculate the splicing coordinates (X k ,Y k ) Lower crack l n With cracks n+1 The crack overlap ratio R k ; S5, based on the splicing coordinates corresponding to the maximum overlap (X max ,Y max ) The crack binary map R n and crack binary map R n+1 The present invention realizes the splicing of different crack binary images based on the axis information of the crack image, reduces the requirement on the number of feature points in the spliced ​​original image, and improves the versatility of the crack splicing algorithm.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of image processing, and more specifically, to an axis-based crack binary image splicing method and a storage medium. Background Art

[0002] As a key factor in evaluating the service performance and health status of structures, the collection and analysis of crack geometry and development trends are of great significance. With the development of photography technology and computer vision technology, the use of machine vision methods to collect and analyze cracks has become increasingly common. When collecting crack images, a high resolution is required to analyze crack parameters. Therefore, the actual size covered by a single image is limited. However, as a long and narrow structure, cracks often require multiple images to express the entire crack. When counting the number of cracks, extracting the parameters of the entire crack, and generating crack distribution maps, the cracks need to be spliced. In order to automatically extract crack parameters, it is usually necessary to use feature-based or deep learning methods to segment the edges of the original crack image, use different colors to distinguish crack pixels from non-cracks, and form a crack binary map. However, since the classic tunnel lining image splicing often uses feature splicing methods to achieve crack splicing by matching the feature points of two images, but there are no feature points in the background of the crack binary map, this method cannot achieve the splicing of the segmented crack binary map. Summary of the invention

[0003] The invention provides an axis-based crack binary image splicing method, aiming to realize the splicing of crack binary images.

[0004] The present invention is implemented as follows: a crack binary image splicing method based on an axis, the method specifically comprising the following steps:

[0005] S1. Extract the nth crack binary image R from the crack binary image sequence n and the n+1th crack binary image R n+1 , get the crack binary map R n And crack binary map R n+1 The crack line axis diagram P n and crack line axis diagram P n+1 ;

[0006] S2. Obtain the crack axis map P n+1 Figure P near the crack axis n Side crack end P n The cracks in the sample are sampled to form a crack point sequence {I n};

[0007] S3. Calculate the crack endpoint Translate to the crack point sequence {I n Each crack point in The stitching coordinates (X k ,Y k ), and calculate the splicing coordinates (X k ,Y k ) Lower crack l n With cracks n+1 The crack overlap ratio R k ;

[0008] S5, based on the splicing coordinates corresponding to the maximum overlap (X max ,Y max ) The crack binary map R n and crack binary map R n+1 Make stitching.

[0009] Furthermore, the crack end The specific method of obtaining is as follows:

[0010] Get the crack axis map P n+1 The connected area of ​​crack pixels in the middle, close to the crack axis P n The first crack pixel on the side is the crack endpoint

[0011] Furthermore, the splicing coordinates (X k ,Y k ) is as follows:

[0012] Establish coordinate system O and obtain the crack endpoints Coordinates in coordinate system O Get the crack point sequence {I n Each crack point in Coordinates in coordinate system O Then the splicing coordinates (X k ,Y k ) is calculated as follows:

[0013]

[0014] Furthermore, the crack line axis diagram P n and crack line axis diagram P n+1 The overlap in the crack l n With cracks n+1 The crack overlap degree, or the crack binary map R n and crack binary map R n+1 The overlap degree indicates the crack l n With split segment l n+1 The overlap of cracks.

[0015] Furthermore, the crack line axis diagram P n and crack line axis diagram P n+1 The specific method for obtaining the overlap degree in is as follows:

[0016] Based on the stitching coordinates (X k ,Y k ) for the crack line axis diagram P n+1 Translate to form the crack line axis diagram P n ' +1 , determine the crack line axis diagram P n With crack spool figure P n ' +1 The overlap area between the crack line axis diagram P is calculated based on the following formula n and crack line axis diagram P n+1 The overlap R k ;

[0017]

[0018] Among them, C k Indicates that the overlap area is located at the crack axis p n and the crack axis p n+1 The number of pixels on L′ k Represents the total number of pixels that are crack pixels in the overlap area;

[0019] Furthermore, based on the crack binary map R n and crack binary map R n+1 The specific method for obtaining the overlap degree is as follows:

[0020] Based on the stitching coordinates (X k ,Y k ) for the crack binary image R n+1 Translate to form a crack binary map R n ' +1 , determine the crack binary map R n and crack binary map R n ' +1 The overlapping area between the cracks is calculated based on the following formula: n and crack binary map R n+1 The overlap R k ;

[0021]

[0022] Among them, C′ k Indicates that the overlapped area is also located in the crack l n and cracks n+1 The number of pixels on L′ k The total number of pixels representing crack pixels within the overlap region.

[0023] Furthermore, when obtaining the splicing coordinates (X k ,Y k ) to check whether the splicing coordinates meet X k ≤a,Y k ≤b, a is the stitching horizontal coordinate threshold, b is the stitching vertical coordinate threshold, if it is satisfied, the stitching coordinate (X k ,Y k ) into the splicing list. If it does not meet the requirements, the splicing coordinates (X k ,Y k ) into the splicing list, and calculate the splicing coordinates (X k ,Y k ) Lower crack l n With cracks n+1 The crack overlap ratio R k .

[0024] The present invention is implemented as a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the method for splicing a binary crack map based on an axis of a fir tree are implemented.

[0025] The present invention realizes the splicing of different crack binary images based on the axis information of the crack image, which not only solves the problem that the crack binary image has no feature points and it is difficult to construct a matching pair and form a splicing mapping matrix, but also avoids the problem that conventional crack splicing requires feature point identification and establishment of matching pairs in overlapping areas, reduces the requirement on the number of feature points in the original image to be spliced, and improves the versatility of the crack splicing algorithm. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 A flow chart of a method for splicing a binary crack image of an axis provided by an embodiment of the present invention;

[0027] Figure 2 A crack binary image provided by an embodiment of the present invention, wherein (a) is an image A to be stitched, and (b) is an image B to be stitched;

[0028] Figure 3 A crack axis diagram provided by an embodiment of the present invention, wherein (c) is an axis diagram of the image A to be stitched, and (d) is an axis diagram of the image B to be stitched;

[0029] Figure 4 A schematic diagram of a crack endpoint B0 provided in an embodiment of the present invention;

[0030] Figure 5 A schematic diagram of forming an overlapping area provided in an embodiment of the present invention;

[0031] Figure 6The crack stitching diagram of the image to be stitched and the image to be stitched B provided in the embodiment of the present invention. DETAILED DESCRIPTION

[0032] The specific implementation modes of the present invention are further explained in detail below by describing the embodiments with reference to the accompanying drawings, so as to help those skilled in the art to have a more complete, accurate and in-depth understanding of the inventive concept and technical solution of the present invention.

[0033] Figure 1 A flow chart of a method for splicing a binary crack image based on an axis provided in an embodiment of the present invention, the method specifically comprises the following steps:

[0034] S1. Extract the nth crack binary image R from the crack binary image sequence n and the n+1th crack binary image R n+1 , extract the crack binary map R n And crack binary map R n+1 The crack axis in the form of crack axis diagram P n and crack line axis diagram P n+1 ;

[0035] Crack binary map R n And crack binary map R n+1 The crack in the n With cracks n+1 , crack line axis diagram P n and crack line axis diagram P n+1 The crack axis p n With crack axis p n+1 , crack line axis diagram P n+1 The crack width in is one pixel;

[0036] The crack binary images in the crack binary image sequence are stored in sequence according to the order of shooting. The crack binary image is an image formed after the crack image is binarized. The crack image is a crack image collected by a machine vision method. The crack binary images of the same crack are placed in the same crack binary image sequence, that is, one crack corresponds to one crack binary image sequence.

[0037] S2. Obtain the crack axis map P n+1 Figure P near the crack axis n Side crack end P n The cracks in the sample are sampled to form a crack point sequence {I n}, crack point sequence {I n} stores s crack points, which are

[0038] In the embodiment of the present invention, the crack end point The specific method of obtaining is as follows:

[0039] Get the crack axis map P n+1 The connected area of ​​crack pixels in the middle, close to the crack axis P n The first crack pixel on the side is the crack endpoint In the crack binary image, the gray value of the crack pixel is 0, the gray value of the background pixel is 1, and the connected area with a value of 0 is the area where the crack pixel is located.

[0040] S3. Calculate the crack endpoint Translate to the crack point sequence {I n Each crack point in The stitching coordinates (X k ,Y k ), and calculate the splicing coordinates (X k ,Y k ) Lower crack l n With cracks n+1 The crack overlap R k ;

[0041] In the embodiment of the present invention, the splicing coordinates (X k ,Y k ) is as follows:

[0042] Establish coordinate system O and obtain the crack endpoints Coordinates in coordinate system O Get the crack point sequence {I n Each crack point in Coordinates in coordinate system O Then the splicing coordinates (X k ,Y k ) is calculated as follows:

[0043]

[0044] Furthermore, the splicing coordinates (X k ,Y k ) Lower crack l n With cracks n+1 There are two methods to obtain the crack overlap, as follows:

[0045] Method 1: Use the crack line axis diagram n and crack line axis diagram P n+1 The overlap in the crack l is used to represent the crack l n With cracks n+1 The crack overlap degree;

[0046] Based on the stitching coordinates (X k ,Y k) for the crack line axis diagram P n+1 Translate to form the crack line axis diagram P n ' +1 , determine the crack line axis diagram P n With crack spool figure P n ' +1 The overlap area between the crack line axis diagram P is calculated based on the following formula n and crack line axis diagram P n+1 The overlap R k ;

[0047]

[0048] Among them, C k Indicates that the overlap area is located at the crack axis p n and the crack axis p n+1 The number of pixels on L k Represents the total number of pixels that are crack pixels in the overlap area;

[0049] Method 2: Using crack binary map R n and crack binary map R n+1 The overlap of the crack l n With split segment l n+1 The crack overlap degree;

[0050] Based on the stitching coordinates (X k ,Y k ) for the crack binary image R n+1 Translate to form a crack binary map R n ' +1 , determine the crack binary map R n and crack binary map R n ' +1 The overlapping area between the cracks is calculated based on the following formula: n and crack binary map R n+1 The overlap R k ;

[0051]

[0052] Among them, C′ k Indicates that the overlapped area is also located in the crack l n and cracks n+1 The number of pixels on L′ k The total number of pixels representing crack pixels within the overlap region.

[0053] Compared with the calculation of coincidence directly based on cracks (i.e., method 2), method 1 uses crack axes for coincidence matching because the number of crack pixels used for matching is significantly reduced, which has a significant advantage in stitching efficiency.

[0054] S5, based on the splicing coordinates corresponding to the maximum overlap (X max ,Y max ) The crack binary map R n and crack binary map R n+1 Make stitching.

[0055] The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium or a volatile computer-readable storage medium. Instructions are stored in the computer-readable storage medium. When the instructions are executed on a computer, the computer executes the steps of the axis-based crack binary image splicing method.

[0056] The above crack binary image stitching method is specifically described as follows:

[0057] Figure 2 (a) and (b) are two crack binary images to be spliced, called crack binary image A and crack binary image B, where crack binary image A is the previous image of crack binary image B. Figure 3 is the axis map of the crack binary map A and the crack binary map B, (c) and (d) are called the crack axis map A and the crack axis map B respectively. The connected domain analysis is performed on the crack axis map B, and the first crack pixel point B0 close to the crack axis map A in the crack pixel connected domain is recorded, as shown in Figure 4 As shown, the coordinates of the crack pixel point B0 in the coordinate system O are obtained and recorded The crack axis in the crack axis diagram A is sampled to form a series of crack axis points A. i , i takes values ​​from 1 to s, and obtains the crack axis point A i The coordinates of the crack pixel point B0 in the coordinate system O are calculated relative to the crack axis point A. i The stitching coordinates (X i ,Y i ),like Figure 5 As shown, based on the splicing coordinates (X i ,Y i ) Calculate the crack axis p in the crack axis diagram A a The crack axis p in Figure B is b The overlap degree of cracks, or the crack l in the crack binary image A a and crack l in crack binary image B b The coincidence degree is based on the crack axis p in the crack axis diagram A. a The crack axis p in Figure B is bThe calculation of the overlap degree of the crack binary image B is used as an example to illustrate that since the crack binary image B generally overlaps with the second half of the crack binary image A, the splicing horizontal coordinate threshold a and the splicing vertical coordinate threshold b are set, and only the X i ≤a and Y i The splicing coordinates with a value less than or equal to b are added to the splicing table, and the coincidence degree of the splicing coordinates in the splicing list is calculated. For example, a and b are set to 30 and 800 respectively. Table 1 shows the overlap of the crack pixel point B0 in all splicing coordinates (X i ,Y i ) is the degree of coincidence between the crack axis A and the crack axis B.

[0058] Table 1 Splicing list

[0059]

[0060]

[0061]

[0062]

[0063]

[0064]

[0065]

[0066]

[0067]

[0068] Select the splicing coordinates (X max ,Y max ), that is, the coordinates of position 165 in Table 1, the vertical stitching coordinates are 0, and the horizontal stitching coordinates are 500. The crack binary images are stitched at this position to form the stitching images of cracks A and B, as shown in Figure 6 shown.

[0069] The present invention has been described exemplarily. Obviously, the specific implementation of the present invention is not limited to the above-mentioned method. As long as various non-substantial improvements are made using the method concept and technical solution of the present invention, or the concept and technical solution of the present invention are directly applied to other occasions without improvement, they are all within the protection scope of the present invention.

Claims

1. A crack binary image splicing method based on axis, characterized in that: The method specifically comprises the following steps: S1. Extract the nth crack binary image R from the crack binary image sequence n and the n+1th crack binary image R n+1 , get the crack binary map R n And crack binary map R n+1 Crack line axis diagram P n and crack line axis diagram P n+1 ; S2. Obtain the crack axis map P n+1 Figure P near the crack axis n Side crack end P n The cracks in the sample are sampled to form a crack point sequence {I n }; S3. Calculate the crack endpoint Translate to the crack point sequence {I n Each crack point in The stitching coordinates (X k ,Y k ), and calculate the splicing coordinates (X k ,Y k ) Lower crack l n With cracks n+1 The crack overlap R k ; S5, based on the splicing coordinates corresponding to the maximum overlap (X max ,Y max ) The crack binary map R n and crack binary map R n+1 To splice; Stitching coordinates (X k ,Y k ) is as follows: Establish coordinate system O and obtain the crack endpoints Coordinates in coordinate system O Get the crack point sequence {I n Each crack point in Coordinates in coordinate system O Then the splicing coordinates (X k ,Y k ) is calculated as follows: Based on the crack binary map R n and crack binary map R n+1 The specific method for obtaining the overlap degree is as follows: Based on the stitching coordinates (X k ,Y k ) for the crack binary image R n+1 Translate to form a crack binary map R n ' +1 , determine the crack binary map R n and crack binary map R n ' +1 The overlapping area between the cracks is calculated based on the following formula: n and crack binary map R n+1 The overlap R k ; Among them, C′ k Indicates that the overlapped area is also located in the crack l n and cracks n+1 The number of pixels on L′ k The total number of pixels representing crack pixels within the overlap region.

2. The axis-based crack binary image splicing method according to claim 1, characterized in that: Crack end point The specific method of obtaining is as follows: Get the crack axis map P n+1 The connected area of ​​crack pixels in the middle, close to the crack axis P n The first crack pixel on the side is the crack endpoint 3. The axis-based crack binary image splicing method according to claim 1, characterized in that: Using crack line axis diagram P n and crack line axis diagram P n+1 The overlap in the crack l n With cracks n+1 The crack overlap degree, or the crack binary map R n and crack binary map R n+1 The overlap degree indicates the crack l n With split segment l n+1 The overlap of cracks.

4. The axis-based crack binary image splicing method according to claim 1, characterized in that: Crack Line Spool P n and crack line axis diagram P n+1 The specific method for obtaining the overlap degree in is as follows: Based on the stitching coordinates (X k ,Y k ) for the crack line axis diagram P n+1 Translate to form the crack line axis diagram P n ' +1 , determine the crack line axis diagram P n With crack spool figure P n ' +1 The overlap area between the crack line axis diagram P is calculated based on the following formula n and crack line axis diagram P n+1 The overlap R k ; Among them, C k Indicates that the overlap area is located at the crack axis p n and the crack axis p n+1 The number of pixels on L k The total number of pixels representing crack pixels within the overlap region.

5. The axis-based crack binary image splicing method according to claim 1, characterized in that: When obtaining the stitching coordinates (X k ,Y k ) to check whether the splicing coordinates meet X k ≤a,Y k ≤b, a is the stitching horizontal coordinate threshold, b is the stitching vertical coordinate threshold, if it is satisfied, the stitching coordinate (X k ,Y k ) into the splicing list. If it does not meet the requirements, the splicing coordinates (X k ,Y k ) into the splicing list, and calculate the splicing coordinates (X k ,Y k ) Lower crack l n With cracks n+1 The crack overlap ratio R k .

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the axis-based crack binary image splicing method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Concrete crack picture splicing and detecting method

    CN111798423A

  • Tunnel image dynamic splicing method and device based on camera array, and electronic equipment

    CN113989117A