Tunnel lining surface crack identification and detection method based on machine vision
By screening and connecting the crack edges in the tunnel lining surface identification method, the problem of light source halo interference is solved, the accurate identification and timely repair of tunnel lining surface cracks are achieved, and the safety of the tunnel structure is improved.
Patent Information
- Application Number
- CN202510515134.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-23
- Publication Date
- 2025-09-12
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies fail to effectively distinguish between light source halos and cracks in tunnel lining surface crack identification, resulting in incomplete and inaccurate identification, affecting tunnel structure safety and maintenance costs.
By acquiring the target image of the tunnel lining surface, the edge detection algorithm is used to screen the edges to be screened. The suspected crack edges are screened by combining the tangent slope difference and grayscale difference. The adjacent edges are further connected to obtain the actual crack edges and reduce the influence of the light source.
It improves the integrity and accuracy of crack identification on the tunnel lining surface, ensures timely detection and repair of cracks, and reduces tunnel safety risks.
Smart Images

Figure CN120634948A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of tunnel lining surface crack detection, and in particular to a tunnel lining surface crack recognition and detection method based on machine vision. Background Art
[0002] Since cracks on the tunnel lining surface can cause safety issues such as water seepage, softening of surrounding rock, and lining spalling, crack detection on the tunnel lining surface is currently crucial for tunnel structural safety, operational stability, and maintenance cost control. Tunnel lining refers to a layer of structure constructed on the inner wall of a tunnel during tunnel construction to support the surrounding rock, stabilize the structure, prevent landslides, and provide a driving passage. It is usually composed of materials such as concrete, reinforced concrete, shotcrete, masonry, or steel structures.
[0003] In the existing technology, machine vision and other technologies are generally used to first collect images of the tunnel lining surface, and then threshold segmentation, edge detection and other technologies are used to identify cracks from the collected images based on the grayscale difference between the cracks and the normal surface in the image. However, this crack identification process does not take into account the influence of the light source in the tunnel on the identification of cracks on the tunnel lining surface, resulting in incomplete and inaccurate crack identification when using the existing crack identification method to identify cracks on the tunnel lining surface, which in turn leads to the occurrence of untimely crack repair. For example, the tunnel lining surface near the light source is exposed to stronger light, which will cause the tunnel lining surface near the light source to be cracked. A strong halo is formed in the surface image. The halo not only blocks part of the cracks, but the halo edge and the crack edge also have some similar features. For example, the halo edge and the crack edge have obvious grayscale differences from the normal area, and the slope changes of the local edge pixels on the halo edge and the crack edge are random. The phenomenon that part of the cracks are blocked by the halo will cause incomplete crack identification. The phenomenon that the halo edge and the crack edge have similar features will cause inaccurate crack identification. Therefore, when identifying cracks on the tunnel lining surface, how to improve the integrity and accuracy of crack identification on the tunnel lining surface has become an urgent problem to be solved. Summary of the Invention
[0004] In order to solve the above problems, the present invention provides a method for identifying and detecting cracks on the tunnel lining surface based on machine vision. The technical solutions adopted are as follows: An embodiment of the present invention provides a method for identifying and detecting cracks on a tunnel lining surface based on machine vision, comprising the following steps: Acquire a target image of the tunnel lining surface and edges to be screened on the target image, wherein the edges to be screened are acquired by performing edge detection on the target image using an edge detection algorithm; The edges to be screened are screened based on the difference in tangent slopes between two adjacent edge pixels on the edges to be screened, to obtain suspected crack edges on the target image; the suspected crack edges are screened based on the difference in tangent slopes between each edge pixel on the suspected crack edge and the edge pixel points of the neighborhood of the corresponding edge pixel point, and the grayscale difference between each edge pixel on the suspected crack edge and the pixel points of the neighborhood of the corresponding edge pixel point, to obtain actual crack edges on the target image; According to the endpoint distance between the actual crack edges, the adjacent actual crack edges corresponding to the actual crack edges are obtained, and according to the extension difference and position difference between the actual crack edge and the adjacent actual crack edges corresponding to the corresponding actual crack edges, the actual crack edges on the target image are connected to obtain the complete crack edge.
[0005] Beneficial effects: The present invention first obtains a target image of the tunnel lining surface and an edge to be screened on the target image; then, based on the difference in tangent slopes between two adjacent edge pixels on the edge to be screened, the edge to be screened is screened to obtain a suspected crack edge on the target image; based on the difference in tangent slopes between each edge pixel on the suspected crack edge and the neighboring edge pixel of the corresponding edge pixel, and the difference in grayscale between each edge pixel on the suspected crack edge and the neighboring pixel of the corresponding edge pixel, the suspected crack edge is screened to obtain the actual crack edge on the target image; then, based on the endpoint distances between the actual crack edges, the corresponding pixel of the actual crack edge is obtained. Adjacent actual crack edges, and according to the extension difference and position difference between the actual crack edge and the adjacent actual crack edge corresponding to the corresponding actual crack edge, the actual crack edges on the target image are connected to obtain complete crack edges; and the present invention can reduce the influence of the light source in the tunnel on the identification of cracks on the tunnel lining surface as much as possible by screening the suspected crack edges and connecting the actual crack edges on the target image, thereby improving the integrity and accuracy of the identification of cracks on the tunnel lining surface, that is, the present invention can accurately and completely identify cracks on the tunnel lining surface by screening the suspected crack edges and connecting the actual crack edges on the target image. BRIEF DESCRIPTION OF THE DRAWINGS
[0006] In order to more clearly illustrate the technical solutions and advantages of the embodiments of the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the prior art descriptions. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0007] Figure 1This is a flow chart of a method for identifying and detecting cracks on the tunnel lining surface based on machine vision according to the present invention. DETAILED DESCRIPTION
[0008] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field fall within the scope of protection of the embodiments of the present invention.
[0009] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.
[0010] This embodiment provides a method for identifying and detecting cracks on the tunnel lining surface based on machine vision, which is described in detail as follows: like Figure 1 As shown, the method for identifying and detecting cracks on the tunnel lining surface based on machine vision includes the following steps: Step S001: obtaining a target image of a tunnel lining surface and edges to be screened on the target image.
[0011] Since it is relatively dark inside the tunnel, in order to ensure driving safety and improve traffic efficiency, light sources are usually arranged in the tunnel. When using existing crack recognition methods to identify cracks on the tunnel lining surface, the light sources in the tunnel will have a negative impact on the accuracy and completeness of the recognition, that is, the light sources in the tunnel will cause incomplete and inaccurate crack recognition when using existing crack recognition methods to identify cracks on the tunnel lining surface. When there are problems with incomplete and inaccurate crack recognition, it will also lead to the occurrence of untimely crack repair. For example, the light on the tunnel lining surface near the light source is stronger, which will cause a strong halo to be formed in the image of the tunnel lining surface near the light source. When a crack appears on the tunnel lining surface near the light source, the edge of the halo and the crack edge not only have some similar features, but also part of the crack will be blocked by the halo. For example, the halo edge and the crack edge have obvious grayscale differences with the normal area, and the halo edge The slope changes of local edge pixels on the crack edge have random characteristics, and the phenomenon that some cracks are blocked by halo will cause incomplete crack identification, and the phenomenon that the halo edge and the crack edge have similar characteristics will cause inaccurate crack identification. In addition, when cracks cannot be accurately and completely identified, it will lead to errors in judging whether there are cracks on the tunnel lining surface and the severity of the cracks on the tunnel lining surface. Currently, it is usually based on whether there are cracks on the lining surface and the severity of the cracks on the tunnel lining surface to determine whether to repair the cracks or to evaluate the urgency of the repair. Therefore, when cracks cannot be accurately and completely identified, it will also lead to the problem of untimely crack repair. The main purpose of this embodiment is to reduce the influence of the light source in the tunnel on the identification of cracks on the tunnel lining surface as much as possible, and to improve the accuracy and completeness of the identification of cracks on the tunnel lining surface. In order to facilitate understanding and analysis, this embodiment will take the crack identification process of any tunnel lining surface as an example for analysis.
[0012] In this embodiment, the acquisition equipment is first used to acquire images of the tunnel lining surface, and the acquired images are gray-scaled, and the processed images are recorded as target images of the tunnel lining surface; in this embodiment, an inspection vehicle can be used to acquire images of the tunnel lining surface. The inspection vehicle is equipped with a camera, and the driving speed of the inspection vehicle and the acquisition frequency of the camera carried by the inspection vehicle need to be set according to actual conditions such as the length of the tunnel. However, all images acquired by the camera carried by the inspection vehicle from the beginning to the end of acquisition need to completely cover the surface area of the tunnel lining, and the distance between the inspection vehicle and the inner wall of the tunnel should be kept as consistent as possible during the driving process.
[0013] Therefore, this embodiment obtains multiple target images of the tunnel lining surface through the above process. Since the crack recognition process on each target image in this embodiment is the same, in order to facilitate understanding and description, this embodiment will subsequently analyze and describe the crack recognition process on the target image of any tunnel lining surface, that is, the target images that appear subsequently in this embodiment are all the same target image.
[0014] After obtaining the target image, the canny edge detection algorithm is used to perform edge detection on the target image, and the images detected by the canny edge detection algorithm are recorded as the edges to be screened on the target image. There are non-crack edges in the image to be screened, so the edges to be screened need to be preliminarily screened later. In addition, since some edges in the edge detection results may be due to factors such as uneven color of the lining surface, resulting in relatively small gradients of some edge pixels in the unified edge, the continuity of some edges in the final edge detection results is poor. In order to facilitate the analysis of edge features of light and cracks or to reduce subsequent calculations, after the edge image is obtained by the canny edge detection algorithm, the edge image is closed, and the edges on the edge image after the closed operation are superimposed on the target image or the edges on the edge image after the closed operation are directly drawn on the target image, thereby obtaining the edges to be screened on the target image. That is, the obtained edge image is closed, which can connect some discontinuous edge pixels in the edge and reduce the amount of subsequent calculations.
[0015] Step S002: Filter the edge to be filtered according to the difference in tangent slopes between two adjacent edge pixels on the edge to be filtered, and obtain the suspected crack edge on the target image; filter the suspected crack edge according to the difference in tangent slopes between each edge pixel on the suspected crack edge and the neighboring edge pixel points of the corresponding edge pixel points, and the grayscale difference between each edge pixel on the suspected crack edge and the neighboring pixel points of the corresponding edge pixel points, and obtain the actual crack edge on the target image.
[0016] The halo edge formed in the tunnel lining surface image near the light source position will interfere with the identification of cracks. For example, the edge of the halo and the crack edge not only have some similar features, but also part of the crack will be blocked by the halo. For example, the halo edge and the crack edge have obvious grayscale differences with the normal area, and the slope changes of the halo edge and the crack edge are random. The similar features of the halo edge and the crack edge will cause inaccurate crack identification, that is, crack identification errors will occur. When crack identification errors occur, it will also affect the acquisition of complete cracks. Therefore, the main purpose of this embodiment is to accurately obtain the actual crack edge on the target image. The actual crack edge is generally caused by surrounding rock deformation, abnormal lining stress, etc. If it is not discovered and repaired in time, it may cause water seepage, surrounding rock softening, lining peeling, and even threaten driving safety. In this embodiment, before obtaining the actual crack edge, it is necessary to first screen the edge to be screened on the target image based on the difference in tangent slope between two adjacent edge pixels on the edge to be screened on the target image to obtain the suspected crack edge on the target image. The specific process of obtaining the suspected crack edge on the target image is as follows: For any edge to be filtered: first, start traversing from any endpoint on the edge to be filtered until the traversal reaches the other endpoint on the edge to be filtered, sort all edge pixel points on the edge to be filtered in the order of traversal, and record the sorted sequence as the edge pixel point sequence corresponding to the edge to be filtered; then obtain the tangent slope difference between two adjacent edge pixel points in the edge pixel point sequence, and record the sequence composed of the tangent slope differences between two adjacent edge pixel points in the edge pixel point sequence as the tangent slope difference sequence, that is, the gth tangent slope difference in the tangent slope difference sequence. The result of subtracting the tangent slope of the gth edge pixel in the edge pixel sequence from the tangent slope of the g+1th edge pixel in the edge pixel sequence is obtained. The calculation process of the tangent slope of the pixel is a well-known technique and is therefore not described in detail in this embodiment. Then, a slope change sequence of the tangent slope difference sequence is obtained, and the normalized value of the cumulative sum of all slope changes in the slope change sequence is recorded as the likelihood index value of the edge to be filtered. The absolute value of the difference between the ath tangent slope difference and the a+1th tangent slope difference in the tangent slope difference sequence is the ath slope change in the slope change sequence. In this embodiment, the specific calculation expression for the likelihood index value of the edge to be filtered is:
[0017] Among them, P is the possibility index value of the edge to be screened, Norm() is the normalization function, and N is the total number of slope change degrees in the slope change degree sequence. is the nth slope change in the slope change sequence; and when The smaller it is, the more consistent the slope change of the edge pixel points on the edge to be screened is, that is, the more regular the shape of the edge to be screened is. Since the edges of the connecting lines between different concrete modules have a more obvious regularity compared to the halo edges and crack edges, that is, the connecting lines between different concrete modules are usually regular straight lines or arcs, the consistency of the slope change between the edge pixel points on the edges of the connecting lines between different concrete modules is higher. The cracks on the lining surface have a certain regularity in the overall growth trend due to the characteristics of the concrete material, but are more random than the edges of the connecting lines between different concrete modules, that is, the consistency of the slope change between the edge pixel points on the crack edge of the lining surface is lower. The halo edge is also more random than the edge of the connecting line between different concrete modules, that is, the consistency of the slope change between the edge pixel points on the halo edge is lower. Therefore, when the consistency of the slope change between the edge pixel points on the edge to be screened is higher, that is, The smaller it is or the smaller P is, the less likely the edge to be screened is to be a true crack edge. On the contrary, when the consistency of the slope change between the edge pixels on the edge to be screened is lower, that is, The larger α or P is, the greater the possibility that the edge to be screened is a real crack edge.
[0018] This embodiment can obtain the likelihood index values of different edges to be screened through the above process. Since the larger the likelihood index value, the greater the likelihood that the corresponding edge to be screened is a true crack edge, after obtaining the likelihood index value, it is determined whether the likelihood index value of the edge to be screened is greater than a preset likelihood threshold. If so, the likelihood that the corresponding edge to be screened is a true crack edge is greater, and the corresponding edge to be screened is recorded as a suspected crack edge. In specific applications, the implementer needs to set the preset likelihood threshold based on the actual situation and the value range of the likelihood index value. For example, in this embodiment, the preset likelihood threshold can be set to 0.3.
[0019] After obtaining the suspected crack edge, further screening is required because the suspected crack edge may also contain a halo edge. The reason why the suspected crack edge still contains a halo edge is that the halo edge of the light is soft and has a certain gradient. Therefore, the halo edge and the crack edge both have similar characteristics such as obvious grayscale difference from the normal area, and the slope change of the local edge pixel points on the halo edge and the crack edge is random. Therefore, the above screening process cannot distinguish the halo edge from the real crack edge. Therefore, this embodiment will next screen the suspected crack edges on the target image, and the screening is mainly based on the difference characteristics between the halo and the real crack. That is, this embodiment will next screen the suspected crack edges on the target image based on the tangent slope difference between each edge pixel point on the suspected crack edge and the neighboring edge pixel points of the corresponding edge pixel point, and the grayscale difference between each edge pixel point on the suspected crack edge and the neighboring pixel points of the corresponding edge pixel point, to obtain the actual crack edge on the target image. The actual crack edge is a real tunnel lining surface crack. In this embodiment, the specific process of screening the suspected crack edges on the target image to obtain the actual crack edge on the target image is as follows: For any suspected crack edge: first, according to the tangent slope difference between each edge pixel point on the suspected crack edge and the neighboring edge pixel point of the corresponding edge pixel point and the grayscale difference between each edge pixel point on the suspected crack edge and the neighboring pixel point of the corresponding edge pixel point, the crack judgment index value of the suspected crack edge is obtained. The crack judgment index value is the basis for subsequent determination of whether the suspected crack edge is a real tunnel lining surface crack. Then the specific acquisition process of the crack judgment index value of the suspected crack edge is: according to the grayscale difference between each edge pixel point on the suspected crack edge and the neighboring edge pixel point of the corresponding edge pixel point The tangent slope difference between the points and the grayscale difference between each edge pixel point on the suspected crack edge and the neighborhood pixel point of the corresponding edge pixel point are obtained to obtain the neighborhood slope difference eigenvalue and the neighborhood grayscale difference eigenvalue of each edge pixel point on the suspected crack edge. Then, the product of the neighborhood slope difference index value of the edge pixel point on the suspected crack edge and the neighborhood grayscale difference index value of the corresponding edge pixel point is recorded as the target index value of the corresponding edge pixel point. After that, the target eigenvalues of all edge pixel points on the suspected crack edge are accumulated, and the normalized value of the accumulated result is recorded as the crack judgment index value of the suspected crack edge.
[0020] In this embodiment, the specific process of obtaining the neighborhood slope difference eigenvalues and neighborhood grayscale difference eigenvalues of each edge pixel point on the suspected crack edge is as follows: for any edge pixel point b on the suspected crack edge: in the edge pixel point sequence corresponding to the suspected crack edge, all edge pixel points located in the preset neighborhood of the edge pixel point b are obtained, and the sequence composed of all the acquired edge pixel points located in the preset neighborhood range of the edge pixel point b is recorded as the local sequence of the edge pixel point b, and then the feature difference value sequence of the local sequence of the edge pixel point b is obtained, and the cth feature difference value in the feature difference sequence is the absolute value of the difference between the tangent slope of the cth edge pixel point in the local sequence and the tangent slope of the c+1th edge pixel point, and then the to-be-accumulated value of each feature difference value in the feature difference sequence is obtained, and the edge pixel The sum of the accumulated values of all feature difference values in the feature difference value sequence of the local sequence of point b is recorded as the neighborhood slope difference index value of the edge pixel point b. The accumulated value of any feature difference value is the reciprocal of the corresponding feature difference value plus a preset constant. The preset constant here is to prevent the denominator from being 0; then all pixel points belonging to the eight neighborhoods of the edge pixel point b are obtained, and the set composed of all the obtained pixel points belonging to the eight neighborhoods of the edge pixel point b is recorded as the neighborhood set, and then all neighborhood grayscale differences corresponding to the edge pixel point b are obtained, and among all the neighborhood grayscale differences corresponding to the edge pixel point b, the opposite of the minimum neighborhood grayscale difference is selected as the neighborhood grayscale difference index value of the edge pixel point b, and the hth neighborhood grayscale difference corresponding to the edge pixel point b is the grayscale value of the edge pixel point b minus the grayscale value of the hth pixel in the neighborhood set.
[0021] In this embodiment, the implementer needs to set a preset neighborhood according to actual conditions. For example, the preset neighborhood can be set to 3. If the preset neighborhood is 3, then in the edge pixel point sequence corresponding to the suspected crack edge, if the qth edge pixel point on the edge pixel point sequence corresponding to the suspected crack edge is the edge pixel point b on the suspected crack edge, then the sequence constructed by all edge pixel points from the q-3th edge pixel point to the q+3th edge pixel point on the edge pixel point sequence corresponding to the suspected crack edge is the local sequence of edge pixel point b, and the local sequence of edge pixel point b contains the edge pixel point corresponding to the suspected crack edge. The q-3th edge pixel point and the q+3th edge pixel point on the edge pixel point sequence are analyzed. In this embodiment, when analyzing the crack determination index value of the suspected crack edge, the main purpose of considering the neighborhood factors of the edge pixel points on the suspected crack edge is to improve the accuracy of subsequent screening. That is, the main reason for improving the accuracy of subsequent screening by analyzing the neighborhood factors of the edge pixel points on the suspected crack edge is that there is a high probability that there will be a bend or bifurcation on the surface crack of the real tunnel lining, thereby significantly changing the slope of the crack edge, while there is a low probability that there will be a bend or bifurcation on the halo edge. In this embodiment, the implementer also needs to set a preset constant according to the actual situation. For example, the preset constant can be set to 1.
[0022] In addition, in this embodiment, the specific calculation expression of the crack determination index value of the suspected crack edge is:
[0023] Among them, R is the crack judgment index value of the suspected crack edge, M is the total number of edge pixels on the suspected crack edge, is the total number of characteristic differences in the characteristic difference sequence of the local sequence of the mth edge pixel point on the suspected crack edge, is the vth characteristic difference value in the characteristic difference value sequence of the local sequence of the mth edge pixel point on the suspected crack edge, is the minimum neighborhood grayscale difference among all neighborhood grayscale differences corresponding to the mth edge pixel point on the suspected crack edge. It is the inverse of the minimum neighborhood grayscale difference among all neighborhood grayscale differences corresponding to the mth edge pixel point, and is also the neighborhood grayscale difference index value corresponding to the mth edge pixel point. is the neighborhood slope difference index value corresponding to the mth edge pixel point on the suspected crack edge; and The larger the value is, the more consistent the change in the slope of the edge pixel points on the suspected crack edge is. The more consistent the change in the slope of the edge pixel points on the suspected crack edge is, the greater the possibility that the suspected crack edge is a real crack on the tunnel lining surface. The smaller the value, the smaller the grayscale value of the crack edge pixel is than that of the normal area. When the grayscale value of the crack edge pixel is smaller than that of the normal area, the greater the possibility that the suspected crack edge is a real crack on the tunnel lining surface. The greater the sum The smaller it is, the larger R is. Therefore, when R is larger, the possibility that the suspected crack edge is a real crack on the tunnel lining surface is greater. Conversely, when R is smaller, the possibility that the suspected crack edge is not a real crack on the tunnel lining surface is greater, that is, the possibility that it is a halo edge is greater.
[0024] In addition, the difference characteristics between the halo and the real crack are: the brightness of the halo is higher in the middle, and it gradually becomes looser and foggy near the edge of the halo. The interference of the concrete surface color and other light in the background will further aggravate the instability of the halo edge, so the slope change of the edge pixel points on the halo edge is more random than the slope change of the edge pixel points on the real crack edge; the cracks on the tunnel lining surface are usually caused by factors such as uneven tunnel force and concrete shrinkage, and the concrete material is relatively hard, so the cracks formed have certain rigidity characteristics, that is, although the slope change direction of the crack edge on the lining surface has a certain randomness, such as there may be some bends or bulges, but since the formation of the crack edge on the lining surface is related to the force on the tunnel surface, the slope of the edge pixel points on the crack edge on the lining surface is relatively random compared to the halo edge. The consistency of the changes is strong; when the light intensity of the light source is greatly affected, although it may cause the grayscale value of some pixels on the cracks to increase, and some normal areas to produce shadows, resulting in a decrease in the grayscale value of the normal area, but in the local area, the light intensity usually does not change significantly, so the grayscale value of the local crack area is still lower than the grayscale value of other normal areas. Therefore, when the difference between the grayscale of the edge pixel point on the suspected crack edge and the surrounding pixels is smaller, the grayscale of the edge pixel point relative to the surrounding pixels is smaller, and the corresponding edge pixel point is more likely to be a crack edge pixel point, and the corresponding suspected crack edge is more likely to be a real crack edge; therefore, based on the above description, it can be seen that the index value obtained by analyzing the slope change and grayscale characteristics of the edge pixel points on the suspected crack edge can reflect the possibility that the corresponding suspected crack edge is a real tunnel lining surface crack.
[0025] After obtaining the crack judgment index value of the suspected crack edge, it is determined whether the crack judgment index value of the suspected crack edge is greater than the preset crack judgment threshold value. If so, it indicates that the corresponding suspected crack edge is a real tunnel lining surface crack, and the corresponding suspected crack edge is recorded as the actual crack edge. Otherwise, it indicates that the corresponding suspected crack edge is not a real tunnel lining surface crack. In this embodiment, the implementer also needs to set the preset crack judgment threshold value according to the actual situation and the value range of the crack judgment index value. For example, in this embodiment, the preset crack judgment threshold value can be set to 0.5.
[0026] Therefore, this embodiment can obtain all actual crack edges on the target image through the above process.
[0027] Step S003: Obtain the adjacent actual crack edge corresponding to the actual crack edge based on the endpoint distance between the actual crack edges, and connect the actual crack edges on the target image based on the extension difference and position difference between the actual crack edge and the adjacent actual crack edge corresponding to the corresponding actual crack edge to obtain a complete crack edge.
[0028] Because areas with strong light often illuminate the surrounding area, reducing the contrast in that area, crack edges in areas with strong light cannot be detected by existing edge detection algorithms. Alternatively, the halo created by the light source may obscure portions of the crack, leading to the identification of a single crack as multiple edge segments or the acquisition of multiple actual crack edges belonging to the same crack. Furthermore, because crack length is considered when determining the hazard or severity of a crack, errors can occur when a long crack is identified as multiple short cracks. This can lead to untimely crack repairs and increase the probability of safety issues such as tunnel seepage, surrounding rock softening, and lining spalling. For example, when a crack is still short in its early stages of formation, its hazard level is not significant and the need for repair is not urgent. Therefore, the likelihood of a safety issue arising from the crack in its early stages is low. However, as the crack grows longer, the risk of tunnel safety issues increases. Therefore, identifying the entire crack as multiple segments can affect the assessment of the crack's severity. Therefore, this embodiment will then connect multiple actual crack edges belonging to the same crack, and record the connected crack edges as complete crack edges. The specific process is: this embodiment first obtains the adjacent actual crack edges corresponding to each actual crack edge based on the endpoint distance between the actual crack edges, and there is a high possibility that any actual crack edge and its corresponding adjacent actual crack edge belong to the same crack, so it is necessary to first obtain the adjacent actual crack edges corresponding to the actual crack edge, and then connect the actual crack edges on the target image based on the extension difference and position difference between the actual crack edge and the adjacent actual crack edge corresponding to the corresponding actual crack edge to obtain the complete crack edge on the target image.
[0029] In this embodiment, the specific process of obtaining the adjacent actual crack edges corresponding to each actual crack edge according to the endpoint distance between the actual crack edges is as follows: for any actual crack edge on the target image, a set constructed by all other actual crack edges except the actual crack edge on the target image is recorded as the to-be-screened set of the actual crack edge, and all endpoint combinations between the actual crack edge and the f-th actual crack edge in the to-be-screened set are obtained, where the endpoints in the endpoint combination belong to different actual crack edges, that is, at this time, one of the two endpoints in any endpoint combination comes from the actual crack edge and the other comes from the f-th actual crack edge; and since there are two endpoints on the actual crack edge, the number of endpoint combinations between the actual crack edge and the f-th actual crack edge is 4. For example, if the two endpoints on the actual crack edge are Denoted as A0 and A1 respectively, and the two endpoints on the f-th actual crack edge are denoted as B0 and B1 respectively, then the endpoint combinations between the actual crack edge and the f-th actual crack edge are (A0, B0), (A0, B1), (A1, B0), (A1, B1) respectively; then the position distance or Euclidean distance between the two endpoints in the endpoint combination is obtained, and recorded as the endpoint distance corresponding to the corresponding endpoint combination; then, among the endpoint distances corresponding to all endpoint combinations between the actual crack edge and the f-th actual crack edge, the smallest endpoint distance is selected as the minimum endpoint distance between the actual crack edge and the f-th actual crack edge; then, it is determined whether the minimum endpoint distance between the actual crack edge and the f-th actual crack edge is not greater than the preset distance threshold. If so, the f-th actual crack edge is taken as the adjacent actual crack edge corresponding to the actual crack edge. In addition, in specific applications, the implementer needs to set a preset distance threshold according to actual conditions. For example, in this embodiment, the preset distance threshold can be set to the length of 10 consecutive pixels in the same direction, that is, if the coordinates of a pixel point in the horizontal direction are (x1, y0), and the coordinates of the 10th pixel point obtained from this pixel point along the horizontal direction are (x10, y0), then the difference between the horizontal coordinate value x10 and the horizontal coordinate value x1 is the preset distance threshold, x1 and x10 are the horizontal coordinate values, and y0 is the vertical coordinate value.
[0030] In this embodiment, the specific process of connecting the actual crack edges on the target image based on the extension difference and position difference between the actual crack edge and the adjacent actual crack edge corresponding to the corresponding actual crack edge to obtain the complete crack edge on the target image is as follows: First, the set constructed by all actual crack edges on the target image is recorded as the first set, and the first subset corresponding to each actual crack edge in the first set is obtained, and the first subset corresponding to any actual crack edge in the first set is composed of all actual crack edges belonging to the first set in the feature set corresponding to the actual crack edge; then any actual crack edge in the first set is taken as the first starting edge, and according to the first subset corresponding to the first starting edge and the first subset corresponding to other actual crack edges in the first set except the first starting edge, the target set corresponding to the first starting edge is obtained; then the set constructed by other actual crack edges in the first set except the target set corresponding to the first starting edge is recorded as the second set, and it is judged whether the second set is an empty set. If not, the second subset corresponding to each actual crack edge in the second set is obtained, and the second subset corresponding to any actual crack edge in the second set is composed of all actual crack edges belonging to the second set in the first subset corresponding to the actual crack edge; then any actual crack edge in the second set is taken as the first starting edge. The actual crack edge is used as the second starting edge, and the target set corresponding to the second starting edge is obtained according to the second subset corresponding to the second starting edge and the second subset corresponding to the other actual crack edges in the second set except the second starting edge; the set constructed by the other actual crack edges in the second set except the target set corresponding to the second starting edge is recorded as the third set, and it is determined whether the third set is an empty set. If so, the acquisition of the target set is stopped, and all the actual crack edges in the target set corresponding to each starting edge are connected respectively, and the edge obtained after the connection is completed is recorded as the complete crack edge corresponding to the corresponding target set, and the edge obtained by connecting all the actual crack edges in the target set corresponding to each starting edge is the complete crack edge on the target image, that is, one target set corresponds to one complete crack edge, and the actual crack edges in the target set are connected in sequence in the order of adding to obtain the corresponding target set, and connecting two actual crack edges is to connect the two closest endpoints on the two actual crack edges.
[0031] Since the method for obtaining the target set corresponding to the second starting edge is the same as the method for obtaining the target set corresponding to the first starting edge, in this embodiment, only the process of obtaining the target set corresponding to the first starting edge is described, that is, the process of obtaining the target set corresponding to the first starting edge is: determine whether the first subset corresponding to the first starting edge is an empty set, if not, all actual crack edges in the first subset corresponding to the first starting edge are recorded as the first edges to be judged, the new set constructed by the first starting edge and all the first edges to be judged is recorded as the first updated set, and the set constructed by the actual crack edges in the first subset corresponding to the first edge to be judged that do not belong to the first updated set is recorded as the corresponding The first set to be judged corresponding to the first edge to be judged is determined, and it is continued to be determined whether the first sets to be judged corresponding to all the first edges to be judged are all empty sets. If not, the actual crack edges in the first set to be judged that are not empty sets are all recorded as second edges to be judged, and the new set re-composed of all the second edges to be judged and the first updated set is recorded as the second updated set. The set constructed by the actual crack edges in the first subset corresponding to the second edge to be judged that do not belong to the second updated set is recorded as the second set to be judged corresponding to the second edge to be judged, and it is continued to be determined whether the second sets to be judged corresponding to all the second edges to be judged are all empty sets. If they are all, the second updated set is recorded as the target set corresponding to the first starting edge.
[0032] Example of obtaining the target set: if there are 5 actual crack edges on the target image, namely S0, S1, S2, S3 and S4, if S0 is selected as the first starting edge, S1 is the adjacent actual crack edge of S0, S2 is the adjacent actual crack edge of S1, the connection judgment index value between S0 and S1 is greater than the preset connection judgment threshold, the connection judgment index value between S1 and S2 is greater than the preset connection judgment threshold, and when S3 and S4 are not adjacent actual crack edges of S2, then the set constructed by S0, S1 and S2 is the target set corresponding to the first starting edge, and then if S3 is selected as the second starting edge among S3 and S4, S4 is the adjacent actual crack edge of S3, and the connection judgment index value between S3 and S4 is greater than the preset connection judgment threshold, then the set constructed by S3 and S4 is the target set corresponding to the second starting edge; An example of connecting the actual crack edges in the target set to obtain the complete crack edges corresponding to the target set: if the actual crack edges in the target set corresponding to the first starting edge are S0, S1 and S2 respectively, if S0 is the starting edge, S1 is the adjacent actual crack edge of S0, and S2 is the adjacent actual crack edge of S1, then first connect the endpoint of S0 with the endpoint of S1, and then connect the endpoint of S2 with the endpoint of S1. The edge obtained after the connection is completed is a complete crack edge, and when connecting, if the distance between an endpoint t0 on S1 and an endpoint t1 on S0 is the minimum endpoint distance between S1 and S0, then use a straight line to connect from endpoint t1 to endpoint t0, and record the line segment connecting endpoint t1 to endpoint t0 as the connecting line segment F0, thereby obtaining an edge containing S1, S0 and F0.
[0033] In this embodiment, the process of obtaining the feature set corresponding to the actual crack edge is as follows: for any actual crack edge c on the target image, the connection judgment index value between the actual crack edge c and each adjacent actual crack edge corresponding to the actual crack edge c is obtained, and among all adjacent actual crack edges corresponding to the actual crack edge c, all adjacent actual crack edges whose connection judgment index value is greater than a preset connection judgment threshold are obtained, and the set constructed by all adjacent actual crack edges whose connection judgment index value is greater than the preset connection judgment threshold is recorded as the feature set corresponding to the actual crack edge c, that is, if the connection judgment index value between the actual crack edge c and any adjacent actual crack edge corresponding to it is greater than the preset connection judgment threshold, then the adjacent actual crack edge belongs to the feature set corresponding to the actual crack edge c. In addition, in specific applications, the implementer needs to set the preset connection judgment threshold according to the value range of the connection judgment index value and the actual situation. For example, in this embodiment, it can be set to 0.6.
[0034] In this embodiment, the process of obtaining the connection judgment index value between the actual crack edge c and each adjacent actual crack edge corresponding to the actual crack edge c is as follows: for the actual crack edge c and any adjacent actual crack edge d corresponding to the actual crack edge c: first, the endpoint combination corresponding to the minimum endpoint distance between the actual crack edge c and the adjacent actual crack edge d is recorded as a characteristic endpoint combination, that is, the distance between the two endpoints in the characteristic endpoint combination is the minimum endpoint distance between the actual crack edge c and the adjacent actual crack edge d, the endpoint on the actual crack edge c belonging to the characteristic endpoint combination is recorded as a first relative endpoint, and the endpoint on the adjacent actual crack edge d belonging to the characteristic endpoint combination is recorded as a second relative endpoint; then, starting from the first relative endpoint, a preset number of edge pixel points are continuously obtained on the actual crack edge c, and starting from the second relative endpoint, a preset number of edge pixel points are continuously obtained on the adjacent actual crack edge d, and a sequence constructed by the preset number of edge pixel points continuously obtained on the actual crack edge c starting from the first relative endpoint is recorded as a first relative sequence, and a sequence constructed by the preset number of edge pixel points continuously obtained on the adjacent actual crack edge d starting from the second relative endpoint is recorded as a second relative sequence; then, the first The average of the tangent slopes of all edge pixels in the relative sequence and the average of the tangent slopes of all edge pixels in the second relative sequence are calculated, and the absolute value of the difference between the average of the tangent slopes of all edge pixels in the first relative sequence and the average of the tangent slopes of all edge pixels in the second relative sequence is recorded as the extension trend difference representation value between the actual crack edge c and the adjacent actual crack edge d. The smaller the extension trend difference representation value, the more consistent the extension trends between the actual crack edge c and the adjacent actual crack edge d, indicating that the actual crack edge c and the adjacent actual crack edge d are more likely to belong to the same crack and are more likely to be connected. Then, the average of the tangent slopes of all edge pixels in the first relative sequence is used as the extension direction of the actual crack edge c, and the vertical distance from the second relative end point to the extension direction of the actual crack edge c is obtained as the position difference representation value between the actual crack edge c and the adjacent actual crack edge d. The smaller the position difference representation value, the closer the distance between the actual crack edge c and the adjacent actual crack edge d in the extension direction of the actual crack edge c, which also indicates that the actual crack edge c and the adjacent actual crack edge d are more likely to belong to the same crack and are more likely to be connected.As another real-time method, the principal component analysis method can also be used to perform principal component analysis on the actual crack edge c, and the direction of the first principal component obtained by the analysis can be used as the extension direction of the actual crack edge c; and in specific applications, the implementer needs to set a preset number based on the number of edge pixels on the actual crack edge and the actual situation. For example, when analyzing different actual crack edges, the rounded-up value of 20% of the total number of edge pixels on the corresponding actual crack edge is selected as the number of edge pixels selected on the corresponding actual crack edge, or the preset number can be set to an empirical value, such as setting the preset number to 10.
[0035] Then the reciprocal of the result of adding the extension trend difference characterization value and the preset constant is taken as the first eigenvalue, and the reciprocal of the result of adding the position difference characterization value and the preset constant is taken as the second eigenvalue, that is, the first eigenvalue is , the first eigenvalue is U1 is the extension trend difference characterization value, and U2 is the position difference characterization value. The product of the first and second eigenvalues is normalized, and the normalized result is used as the connection judgment index value between the actual crack edge c and the adjacent actual crack edge d. The preset constant here is also to prevent the denominator from being zero. At this time, the normalization function Norm() is used to normalize the product of the first and second eigenvalues. That is, the smaller the extension trend difference characterization value and the position difference characterization value, the larger the connection judgment index value between the actual crack edge c and the adjacent actual crack edge d. In addition, due to the rigid characteristics of cracks on the tunnel lining surface, the extension trend of the cracks will not change significantly. Therefore, if the extension trends of adjacent crack edges are similar and their relative positions are consistent with their extension directions, then the two crack edges can be considered as the edges of the same crack. That is, when the connection judgment index value is larger, the actual crack edge c and the adjacent actual crack edge d need to be connected.
[0036] So far, this embodiment obtains the complete crack edge on the target image of the tunnel lining surface; and if there is no actual crack edge on the target image during detection, it indicates that there is no crack in the lining surface area corresponding to the target image; in addition, the complete crack edge on all target images can be obtained through the above process, and the degree of crack hazard can be subsequently evaluated based on the complete crack edge on the target image of all tunnel lining surfaces, and the urgency of crack repair can be determined based on the evaluation result; and evaluating the degree of crack hazard based on the complete crack edge on the target image of all tunnel lining surfaces and determining the urgency of crack repair based on the evaluation result are not the focus of this embodiment. The main purpose of this embodiment is to accurately and completely obtain the complete crack edge on the target image of the lining surface.
[0037] In summary, this embodiment first obtains a target image of the tunnel lining surface and an edge to be screened on the target image; then, based on the difference in tangent slopes between two adjacent edge pixels on the edge to be screened, the edge to be screened is screened to obtain a suspected crack edge on the target image; based on the difference in tangent slopes between each edge pixel on the suspected crack edge and the neighboring edge pixel of the corresponding edge pixel, and the difference in grayscale between each edge pixel on the suspected crack edge and the neighboring pixel of the corresponding edge pixel, the suspected crack edge is screened to obtain the actual crack edge on the target image; then, based on the distance between the endpoints of the actual crack edges, the corresponding pixel of the actual crack edge is obtained. The adjacent actual crack edges are selected, and according to the extension difference and position difference between the actual crack edges and the adjacent actual crack edges corresponding to the corresponding actual crack edges, the actual crack edges on the target image are connected to obtain complete crack edges; and this embodiment can reduce the influence of the light source in the tunnel and the identification of cracks on the tunnel lining surface as much as possible by screening the suspected crack edges and connecting the actual crack edges on the target image, thereby improving the integrity and accuracy of the identification of cracks on the tunnel lining surface, that is, this embodiment can accurately and completely identify the cracks on the tunnel lining surface by screening the suspected crack edges and connecting the actual crack edges on the target image.
[0038] The above-described embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A method for identifying and detecting cracks on tunnel lining surfaces based on machine vision, characterized in that: The method comprises the following steps: Acquire a target image of the tunnel lining surface and edges to be screened on the target image, wherein the edges to be screened are acquired by performing edge detection on the target image using an edge detection algorithm; Screening the edge to be screened according to the difference in tangent slopes between two adjacent edge pixel points on the edge to be screened to obtain a suspected crack edge on the target image; The suspected crack edges are screened based on the differences in tangent slopes between each edge pixel point on the suspected crack edge and the neighboring edge pixel points of the corresponding edge pixel point, and the differences in grayscale between each edge pixel point on the suspected crack edge and the neighboring pixel points of the corresponding edge pixel point, to obtain the actual crack edges on the target image; According to the endpoint distance between the actual crack edges, the adjacent actual crack edges corresponding to the actual crack edges are obtained, and according to the extension difference and position difference between the actual crack edge and the adjacent actual crack edges corresponding to the corresponding actual crack edges, the actual crack edges on the target image are connected to obtain the complete crack edge.
2. The method for detecting cracks on the tunnel lining surface based on machine vision according to claim 1, characterized in that: The method for obtaining the suspected crack edge on the target image includes: For any edge to be filtered, the sequence formed by the edge pixel points on the edge to be filtered is recorded as the edge pixel point sequence corresponding to the edge to be filtered, and the sequence composed of the tangent slope differences between two adjacent edge pixel points in the edge pixel point sequence is recorded as the tangent slope difference sequence. The slope change degree sequence of the tangent slope difference sequence is obtained, and the normalized value of the cumulative sum of all slope changes in the slope change degree sequence is recorded as the possibility index value of the edge to be filtered. The absolute value of the difference between the ath tangent slope difference and the a+1th tangent slope difference in the tangent slope difference sequence is the ath slope change degree in the slope change degree sequence. If the possibility index value of the edge to be filtered is greater than the preset possibility threshold, the edge to be filtered is recorded as a suspected crack edge.
3. The method for detecting cracks on the tunnel lining surface based on machine vision according to claim 2, characterized in that: The method for obtaining the actual crack edge on the target image includes: Based on the difference in tangent slopes between each edge pixel point on the suspected crack edge and the neighboring edge pixel points of the corresponding edge pixel point, and the difference in grayscale between each edge pixel point on the suspected crack edge and the neighboring pixel points of the corresponding edge pixel point, the crack judgment index value of the suspected crack edge is obtained. If the crack judgment index value of the suspected crack edge is greater than the preset crack judgment threshold, the suspected crack edge is recorded as an actual crack edge.
4. The method for detecting cracks on the tunnel lining surface based on machine vision according to claim 3, characterized in that: The method for obtaining the crack determination index value of the suspected crack edge includes: For any suspected crack edge, based on the tangent slope difference between each edge pixel point on the suspected crack edge and the neighborhood edge pixel point of the corresponding edge pixel point, and the grayscale difference between each edge pixel point on the suspected crack edge and the neighborhood pixel point of the corresponding edge pixel point, the neighborhood slope difference eigenvalue and the neighborhood grayscale difference eigenvalue of each edge pixel point on the suspected crack edge are obtained, the product of the neighborhood slope difference index value of the edge pixel point and the neighborhood grayscale difference index value of the corresponding edge pixel point is recorded as the target index value of the corresponding edge pixel point, and the normalized value of the cumulative sum of the target eigenvalues of all edge pixel points on the suspected crack edge is recorded as the crack judgment index value of the suspected crack edge.
5. The method for detecting cracks on the tunnel lining surface based on machine vision according to claim 4, characterized in that: The method for obtaining the neighborhood slope difference index value and the neighborhood grayscale difference index value of each edge pixel point on the suspected crack edge includes: For any edge pixel point b on the suspected crack edge: In the edge pixel point sequence corresponding to the suspected crack edge, a sequence composed of all edge pixel points located in a preset neighborhood of the edge pixel point b is recorded as a local sequence, a feature difference value sequence of the local sequence is obtained, the cth feature difference value in the feature difference sequence is the absolute value of the tangent slope difference between the cth edge pixel point and the c+1th edge pixel point in the local sequence, the to-be-accumulated value of each feature difference value in the feature difference sequence is obtained, and the cumulative sum of the to-be-accumulated values of all feature differences in the feature difference sequence is recorded as the edge pixel value. The neighborhood slope difference index value of point b, the to-be-accumulated value of the characteristic difference value is the reciprocal of the sum of the characteristic difference value and a preset constant; the set consisting of all pixel points belonging to the eight neighborhoods of the edge pixel point b is recorded as a neighborhood set, and the grayscale value of the edge pixel point b minus the grayscale value of each pixel point in the neighborhood set is recorded as the neighborhood grayscale difference value corresponding to the edge pixel point b. Among all the neighborhood grayscale differences corresponding to the edge pixel point b, the inverse of the smallest neighborhood grayscale difference value is selected as the neighborhood grayscale difference index value of the edge pixel point b.
6. The method for identifying and detecting cracks on a tunnel lining surface based on machine vision according to claim 1, wherein: The method for obtaining the adjacent actual crack edge corresponding to the actual crack edge includes: For any actual crack edge on the target image, a set constructed by all other actual crack edges except the actual crack edge on the target image is recorded as the set to be screened of the actual crack edges, and all endpoint combinations between the f-th actual crack edge in the set to be screened and the actual crack edge are obtained, where the endpoints in the endpoint combination belong to different actual crack edges, and the distance between two endpoints in the endpoint combination is recorded as the endpoint distance corresponding to the corresponding endpoint combination. Among the endpoint distances corresponding to all endpoint combinations between the f-th actual crack edge and the actual crack edge, the smallest endpoint distance is selected as the minimum endpoint distance between the f-th actual crack edge and the actual crack edge. If the minimum endpoint distance is not greater than a preset distance threshold, the f-th actual crack edge is taken as the adjacent actual crack edge corresponding to the actual crack edge.
7. The method for detecting cracks on the tunnel lining surface based on machine vision according to claim 6, characterized in that: The method for obtaining the complete crack edge comprises: The set constructed by all actual crack edges on the target image is recorded as a first set, and the first subset corresponding to each actual crack edge in the first set is obtained. The first subset corresponding to any actual crack edge in the first set is composed of all actual crack edges belonging to the first set in the feature set corresponding to the corresponding actual crack edge. Any actual crack edge in the first set is used as a first starting edge. According to the first subset corresponding to the first starting edge and the first subsets corresponding to other actual crack edges in the first set except the first starting edge, the target set corresponding to the first starting edge is obtained; the set constructed by other actual crack edges in the first set except the target set corresponding to the first starting edge is recorded as a second set, and it is judged whether the second set is an empty set. If not, the second subset corresponding to each actual crack edge in the second set is obtained. Any actual crack edge in the second set is used as a first starting edge. The second subset corresponding to the crack edge is composed of all actual crack edges belonging to the second set in the first subset corresponding to the actual crack edge. Any actual crack edge in the second set is used as the second starting edge. According to the second subset corresponding to the second starting edge and the second subsets corresponding to the other actual crack edges in the second set except the second starting edge, the target set corresponding to the second starting edge is obtained; the set constructed by the other actual crack edges in the second set except the target set corresponding to the second starting edge is continued to be recorded as the third set, and it is judged whether the third set is an empty set. If so, the acquisition of the target set is stopped, and all actual crack edges in the target set are connected respectively, and the edges obtained after the connection is completed are recorded as the complete crack edges corresponding to the corresponding target set; the method for obtaining the target set corresponding to the second starting edge is the same as the method for obtaining the target set corresponding to the first starting edge.
8. The method for detecting cracks on the tunnel lining surface based on machine vision according to claim 7, characterized in that: The method for obtaining the feature set corresponding to the actual crack edge includes: For any actual crack edge c on the target image, the connection judgment index value between the actual crack edge c and each adjacent actual crack edge corresponding to the actual crack edge c is obtained, and among all adjacent actual crack edges corresponding to the actual crack edge c, the set constructed by all adjacent actual crack edges whose connection judgment index value is greater than the preset connection judgment threshold is recorded as the feature set corresponding to the actual crack edge c.
9. The method for identifying and detecting cracks on a tunnel lining surface based on machine vision according to claim 8, characterized in that: The method for obtaining the connection determination index value between the actual crack edge c and each adjacent actual crack edge corresponding to the actual crack edge c includes: For the actual crack edge c and any adjacent actual crack edge d corresponding to the actual crack edge c: the endpoint combination corresponding to the minimum endpoint distance between the actual crack edge c and the adjacent actual crack edge d is recorded as a characteristic endpoint combination, the endpoint on the actual crack edge c belonging to the characteristic endpoint combination is recorded as a first relative endpoint, and the endpoint on the adjacent actual crack edge d belonging to the characteristic endpoint combination is recorded as a second relative endpoint; a sequence constructed by continuously obtaining a preset number of edge pixel points on the actual crack edge c starting from the first relative endpoint is recorded as a first relative sequence, and a sequence constructed by continuously obtaining a preset number of edge pixel points on the adjacent actual crack edge d starting from the second relative endpoint is recorded as a second relative sequence, and the average value of the tangent slope of all edge pixel points in the first relative sequence is compared with the average value of the tangent slope of all edge pixel points in the second relative sequence. The absolute value of the difference between the mean values of the tangent slopes of the edge pixel points is recorded as the extension trend difference characterization value between the actual crack edge c and the adjacent actual crack edge d; the mean value of the tangent slopes of all edge pixel points in the first relative sequence is used as the extension direction of the actual crack edge c, and the vertical distance from the second relative end point to the extension direction of the actual crack edge c is used as the position difference characterization value between the actual crack edge c and the adjacent actual crack edge d; the reciprocal of the result obtained by adding the extension trend difference characterization value and a preset constant is used as the first eigenvalue, and the reciprocal of the result obtained by adding the position difference characterization value and the preset constant is used as the second eigenvalue; the normalized value of the product of the first eigenvalue and the second eigenvalue is used as the connection judgment index value between the actual crack edge c and the adjacent actual crack edge d corresponding to the actual crack edge c.
10. The method for identifying and detecting cracks on the tunnel lining surface based on machine vision according to claim 7, characterized in that: The method for acquiring the target set corresponding to the first starting edge includes: Determine whether the first subset corresponding to the first starting edge is an empty set. If not, all actual crack edges in the first subset corresponding to the first starting edge are recorded as first edges to be judged, and the new set constructed by the first starting edge and all first edges to be judged is recorded as the first updated set. The set constructed by the actual crack edges in the first subset corresponding to the first edge to be judged that do not belong to the first updated set is recorded as the first set to be judged corresponding to the first edge to be judged, and continue to determine whether all first sets to be judged corresponding to the first edges to be judged are empty sets. If not, all actual crack edges in the first set to be judged that is not an empty set are recorded as second edges to be judged, and the new set re-formed from all second edges to be judged and the first updated set is recorded as the second updated set. The set constructed by the actual crack edges in the first subset corresponding to the second edge to be judged that do not belong to the second updated set is recorded as the second set to be judged corresponding to the second edge to be judged, and continue to determine whether all second sets to be judged corresponding to the second edges to be judged are empty sets. If both are empty sets, the second updated set is recorded as the target set corresponding to the first starting edge.
Citation Information
Cited By
Mine surface crack automatic measurement and extraction method based on image recognition
CN122265897A