Fracture monitoring method and system based on image fusion and brightness enhancement and medium
By adopting the method of dual-mode image fusion and brightness segmentation linear enhancement in structural crack image processing, the problems of sensitivity to light changes and lack of adaptive adjustment mechanism in the prior art are solved, precise segmentation and parameter calculation of the crack area are realized, and the effect of crack monitoring is improved.
Patent Information
- Application Number
- CN202510694397.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2045-05-28
AI Technical Summary
The prior art has problems in the image processing of structural cracks that are sensitive to light changes and lack of adaptive adjustment mechanisms, and deep learning models are difficult to effectively learn and generalize in the absence of a large amount of labeled data.
Using an method based on image fusion and brightness enhancement, an adaptive image processing process is constructed through dual-mode image fusion and brightness segmentation linear enhancement to realize the precise segmentation and parameter calculation of the crack area.
The extraction performance of crack details features is improved, and the automatic optimization of structural cracks under different background brightness is achieved, the segmentation effect of the crack area is enhanced, and the development process of the crack can be effectively monitored and evaluated.
Smart Images

Figure CN120219190A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the technical fields of image processing and computer vision, and particularly to a crack monitoring method, system, and medium based on image fusion and brightness enhancement. Background Art
[0002] Structural cracks are usually caused by structural stress reaching its limit value, resulting in insufficient bearing capacity. Structural cracks generally include various types such as tunnel cracks, pavement cracks, and wall cracks. Over time, these cracks may gradually expand, weakening the integrity of the structure, and ultimately leading to local or overall instability, and even causing the structure to collapse. By regularly monitoring the development of cracks, potential structural problems can be detected in a timely manner, and instability or collapse events that may occur can be prevented.
[0003] In recent years, machine vision has shown great potential and advantages in the field of crack detection and analysis. This technology can achieve high-precision segmentation processing of the surface image of the structure, accurately extract the morphological characteristics of the cracks, and provide a solid data basis for the quantitative analysis of the cracks.
[0004] Existing image processing methods for structural cracks can be roughly classified into two mainstream strategies: one is digital image processing technology, and the other is large model methods based on deep learning. Digital image processing technology is usually sensitive to lighting conditions, and lighting changes will significantly affect the processing effect. Moreover, this technology lacks an adaptive adjustment mechanism and is difficult to automatically optimize processing parameters for diverse structural crack images. Deep learning methods can effectively cope with the challenges of complex image data, and can perform accurate identification and analysis through deep learning models trained with big data, showing high robustness and adaptability. However, this advantage of deep learning models is also accompanied by a high dependence on data. The training of the model requires a large number of accurately labeled data sets, and the process of data collection, collation, and annotation is time-consuming and laborious. In addition, the amount of data for certain specific structural cracks is small, and the data characteristics of different types of structural cracks are significantly different. These factors make it difficult for deep learning models to fully learn and generalize, and thus an effective deep learning network cannot be constructed. Therefore, there are many deficiencies in the existing technology for crack analysis problems of different structures under complex backgrounds. Summary of the Invention
[0005] The technical problem to be solved by this application is to overcome the deficiencies of the existing technology and provide a crack monitoring method, system, and medium based on image fusion and brightness enhancement to achieve effective monitoring and evaluation of the crack development process.
[0006] To achieve the above object, the first aspect of this application provides a crack monitoring method based on image fusion and brightness enhancement, including the following steps: Step S1, dual-modal image fusion; Obtain a pseudo-color image of the crack grayscale image, construct a dual-modal image fusion function to fuse the pseudo-color image with the original image to construct a dual-modal fusion image; Step S2, image brightness piecewise linear enhancement; Based on the dual-modal fusion image constructed in step S1, construct a brightness piecewise linear function, and adaptively select the adjustment parameters of the brightness piecewise linear function according to the global brightness of the image for image enhancement; Step S3, crack parameter calculation; Segment the enhanced image obtained in step S2 to obtain multiple segmented crack regions, and calculate the crack parameters of each crack region; Step S4, crack parameter comparison; Based on the crack parameters calculated in step S3, judge the relationship between each crack parameter and its corresponding preset parameter to achieve crack monitoring.
[0007] Furthermore, in step S1, weights are set for the pseudo-color image and the original image according to the Bhattacharyya coefficient, and the dual-modal fusion function is constructed, expressed as: ; Among them, A(x, y) and B(x, y) respectively represent the pixel values of the pseudo-color image and the original image at the coordinate (x, y), and are the fusion weights of the pseudo-color image and the original image respectively, is the Bhattacharyya coefficient of the pseudo-color image and the original image, is the Bhattacharyya coefficient between the two original images, and F(x, y) is the pixel value of the fusion image at the coordinate (x, y); Among them, if , it means that the original image contains more original information. Take as the numerator of the fusion weight of the pseudo-color image to give it a low weight, and take as the numerator of the fusion weight of the original image to give it a high weight; if , it means that the pseudo-color image contains more original information. Take as the numerator of the fusion weight of the pseudo-color image to give it a high weight, and take as the numerator of the fusion weight of the original image to give it a low weight.
[0008] Furthermore, in step S2, the global brightness of the image is obtained according to the brightness value of the original image, and the brightness piecewise linear function is constructed, expressed as: ; Among them, s represents the set grayscale value, f(x, y) is the original grayscale value of the pixel at coordinates (x, y) in the image, g(x, y) is the grayscale value after the transformation of f(x, y), T is the global brightness of the image, that is, the average value of the brightness values of all pixels in the image, [0, 255] is the grayscale range of the image, and [αT + β, b] is the grayscale interval of interest. α, β, γ, and δ are the adjustment parameters of the brightness piecewise linear function.
[0009] Furthermore, the brightness piecewise linear function adaptively selects the adjustment parameters α, β, γ, and δ of the brightness piecewise linear function according to the global brightness T of the image by setting a threshold Br. Among them, if T ≤ Br, then select [α; β; γ; δ] = [1.2; -112; -0.6; 331]; if T > Br, then select [α; β; γ; δ] = [0.2; 90; -1.2; 394].
[0010] Furthermore, in step S3, the enhanced image obtained in step S2 is subjected to image segmentation, including the following steps: Top-hat transformation, subtracting the original image from the result of the closing operation to obtain the valley bottom part filled by the closing operation, expressed as: ; Among them, I is the original image; B is the structuring element, is the closing operation; is the image after the top-hat transformation; Use the Otsu algorithm to perform binary processing on the image to determine a threshold T to maximize the between-class variance; ; Among them, is the number of foreground pixels, is the number of background pixels, is the average grayscale value of the foreground, is the average grayscale value of the background, N is the total number of pixels in the image, is the between-class variance; Connect the disconnected parts in the crack area and smooth the object boundary through the closing operation: ; Among them, represents the image after the closing operation, represents the original binary image, represents the erosion operation, represents the dilation operation.
[0011] Further, in step S3, before calculating the fracture parameters, all fracture regions are marked using the region marking method, and the fracture parameters of each fracture region are obtained, including: Calculating the fracture region area ratio, expressed as: ; where n is the number of wall fracture regions, is the number of pixels in the i-th fracture region, i is an index variable, and W and H are the length and width of the original image respectively; Calculating the fracture length. The binary image is iteratively thinned through morphological operations to gradually remove the edge pixels of the fracture until a fracture skeleton with a pixel width is obtained. Subsequently, the number of pixels of each skeleton is obtained to obtain the total fracture length, expressed as: ; where N is the number of skeletons, is the number of pixels of the j-th skeleton, and j is an index variable; Calculating the average fracture width. The average fracture width is calculated by obtaining the fracture area and the fracture length, expressed as: ; where B is the average fracture width, A is the fracture area, L is the fracture length, the n in is the number of wall fracture regions, is the number of pixels in the i-th fracture region, i is an index variable, the N in is the number of skeletons, is the number of pixels of the j-th skeleton, and j is an index variable.
[0012] Further, in step S4, judging the relationship between each fracture parameter and its corresponding preset parameter, including: If each fracture parameter is less than its corresponding preset parameter, the fracture is a safe fracture; if at least two of each fracture parameter are less than their corresponding preset parameters, the fracture is a fracture to be observed; if at most one of each fracture parameter is less than its corresponding preset parameter, the fracture is a dangerous fracture.
[0013] To achieve the above object, a second aspect of the present application provides a fracture monitoring system based on dual-modal image fusion and brightness piecewise linear enhancement. The system includes: A dual-modal image fusion module, which obtains a pseudo-color image of the fracture grayscale image, constructs a dual-modal image fusion function to fuse the pseudo-color image with the original image to construct a dual-modal fusion image; An image brightness piecewise linear enhancement module, which constructs a brightness piecewise linear function based on the bimodal fusion image constructed by the bimodal image fusion module, and adaptively selects the adjustment parameters of the brightness piecewise linear function according to the global brightness of the image to perform image enhancement; A crack area segmentation module and a crack parameter extraction module. The crack area segmentation module segments the enhanced image obtained by the image brightness piecewise linear enhancement module to obtain multiple segmented crack areas, and calculates the crack parameters of each crack area; A crack parameter comparison module, which determines the relationship between each crack parameter and its corresponding preset parameter based on the crack parameters calculated by the crack parameter extraction module to achieve crack monitoring.
[0014] To achieve the above object, the third aspect of the present application provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the crack monitoring method based on image fusion and brightness enhancement as described above.
[0015] Compared with the prior art, the present application has the following beneficial effects: In the present application, through bimodal image fusion, different modal image data are regarded as complementary information sources, and the performance of image analysis and understanding is improved by comprehensively using this information, and the detailed features of cracks are improved; by constructing a brightness piecewise linear function, appropriate adjustment parameters can be automatically selected for structural cracks with different background brightnesses for image enhancement. The adaptive adjustment parameters overcome the problem that the image enhancement technology with fixed parameters has a poor enhancement effect on the crack area, and can effectively segment the crack area; the safety level is determined by the obtained crack parameters, so as to realize the effective monitoring and evaluation of the crack development process.
[0016] In the present application, the connected component labeling method can assign a unique label to each crack, so as to realize the counting and positioning of cracks, and further calculate three parameters, namely, the crack area ratio, crack length, and average crack width, to judge the damage degree of the structure and determine the safety level of the structure. This method can calculate accurate crack parameters for crack images of different sizes and orders of magnitude and determine the safety level of the cracks.
[0017] The following further describes in detail the specific embodiments of the present application with reference to the accompanying drawings. Description of the Drawings
[0018] The accompanying drawings, as part of this application, are used to provide a further understanding of this application. The schematic embodiments and descriptions thereof of this application are used to explain this application, but do not unduly limit this application. Obviously, the accompanying drawings in the following description are only some embodiments, and for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0019] In the drawings of the specification: Figure 1 is the overall logic schematic diagram in this specific embodiment; Figure 2 is the logic schematic diagram of bimodal image fusion in this specific embodiment; Figure 3 is the schematic diagram of the brightness piecewise linear enhancement function in this specific embodiment; Figure 4 is the schematic diagram of the original piecewise linear enhancement function in this specific embodiment; Figure 5 is the logic schematic diagram of crack area segmentation in this specific embodiment; Figure 6 is the schematic diagram of the crack segmentation result in this specific embodiment; Figure 7 is the schematic diagram for comparing the effects of selecting different fusion weight values in this specific embodiment; Figure 8 is the schematic diagram for comparing the effects of selecting different adjustment parameter values in this specific embodiment. Specific Embodiment
[0020] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the following will clearly and completely describe the technical solutions in the embodiments of this application in conjunction with the accompanying drawings in the embodiments of this application. The following embodiments are used to illustrate this application, but do not limit the scope of this application.
[0021] Please refer to Figure 1 , this embodiment provides a crack monitoring method based on bimodal image fusion and brightness piecewise linear enhancement. This method includes the following steps: Step S1, bimodal image fusion; Obtain the pseudo-color image of the crack grayscale image, construct a bimodal image fusion function to fuse the pseudo-color image with the original image to construct a bimodal fusion image; Step S2, image brightness piecewise linear enhancement; Based on the bimodal fusion image constructed in step S1, construct a brightness piecewise linear function, and adaptively select the adjustment parameter of the brightness piecewise linear function according to the global brightness of the image to perform image enhancement; Step S3, crack area segmentation and crack parameter extraction; Segment the enhanced image obtained in step S2 to obtain multiple segmented crack areas, and calculate the crack parameters of each crack area; Step S4, crack parameter comparison; Based on the crack parameters calculated in step S3, determine the relationship between each crack parameter and its corresponding preset parameter to achieve crack monitoring.
[0022] It should be noted that in this embodiment, the execution subject of the monitoring method is a crack monitoring device based on dual-modal image fusion and brightness piecewise linear enhancement. This device can be an electronic device, a component in an electronic device, an integrated circuit, or a chip. The electronic device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a handheld computer, a vehicle-mounted electronic device, a wearable device, etc., and the non-mobile electronic device can be a server and a personal computer, etc. This application does not make specific limitations. Hereinafter, taking the execution subject as a server as an example, the crack monitoring method based on dual-modal image fusion and brightness piecewise linear enhancement in this embodiment will be described.
[0023] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more of such features. In the description of the embodiments of the present application, the meaning of "a plurality" is two or more unless otherwise specifically defined.
[0024] In an implementable embodiment, step S1, dual-modal image fusion.
[0025] First, obtain a pseudo-color image of the crack grayscale image.
[0026] Please refer to Figure 1 and Figure 2 , in this embodiment, the original image is grayscale, and a pseudo-color image of the crack grayscale image is obtained through the Jet pseudo-color mapping method. This mapping method maps the gray level to different colors based on the change of hue, so that different gray values in the image show obvious color differences in the color image, expressed as: ; ; ; where r(x), g(x), and b(x) respectively represent the color values of the red, green, and blue channels, and x represents the input gray value.
[0027] It should be noted that the three functions r(x), g(x), and b(x) respectively define the value-taking methods of different gray levels in the red, green, and blue channels. When specific values are assigned to each channel, the Jet pseudo-color mapping is achieved.
[0028] Second, calculate the Bhattacharyya coefficient of the histogram.
[0029] In this embodiment, the gray histograms of the pseudo-color image and the original image are first obtained, and then the Bhattacharyya coefficient is obtained based on the gray histograms. In this embodiment, the Bhattacharyya coefficient of the image histogram is used as an index to measure the similarity between the pseudo-color image and the original image. The value range of the Bhattacharyya coefficient is between [0, 1], where 0 indicates that the pseudo-color image and the original image are completely dissimilar, and 1 indicates that the pseudo-color image and the original image are exactly the same. The Bhattacharyya coefficient is expressed as follows: ; where i represents the gray level of each pixel point in the image, , are the probabilities of the occurrence of the pixels at the i-th gray level in the histograms of the pseudo-color image and the original image, and BC is the Bhattacharyya coefficient.
[0030] Third, construct a bimodal fusion image.
[0031] To achieve the fusion of the pseudo-color image and the original image, in this embodiment, a bimodal fusion function is constructed to construct a bimodal fusion image. The constructed bimodal fusion function can highlight the detailed features of the fissure while retaining the original information of the image using appropriate fusion weights.
[0032] Please continue to refer to Figure 2 , in this embodiment, weights are set for the pseudo-color image and the original image according to the Bhattacharyya coefficient, and a bimodal fusion function is constructed, which is specifically expressed as: ; where A(x, y) and B(x, y) respectively represent the pixel values of the pseudo-color image and the original image at the coordinate (x, y), and are the fusion weights of the pseudo-color image and the original image respectively, is the Bhattacharyya coefficient of the pseudo-color image and the original image, is the Bhattacharyya coefficient between the two original images, and F(x, y) is the pixel value of the fusion image at the coordinate (x, y).
[0033] In the bimodal fusion function, if , it means that the original image contains more original information, is used as the numerator of the fusion weight of the pseudo-color image to assign it a low weight, and As the numerator of the fusion weight of the original image to give it a high weight; if , it means that the pseudo-color image contains more original information, and is used as the numerator of the fusion weight of the pseudo-color image to give it a high weight, and is used as the numerator of the fusion weight of the original image to give it a low weight.
[0034] It should be noted that in order to make the fusion result obtain richer information and not lose the original information, the present application obtains the desired fusion effect by assigning appropriate fusion weights. The fusion weights of each image in the present application use two Bhattacharyya coefficients. The Bhattacharyya coefficient can accurately measure the similarity of the histograms of two images. In this embodiment, the fusion weights are determined by the Bhattacharyya coefficient, which can help balance the information of the pseudo-color image and the original image, so that the fused image retains both the enhanced features in the pseudo-color image and the real details in the original image.
[0035] In an implementable embodiment, in step S2, the image brightness is enhanced by piecewise linear.
[0036] Specifically, due to many differences in the acquisition process of the crack image, such as light intensity, background color, and image resolution, etc., there is a large gray-scale magnitude difference in the gray-scale results of different fused images. Using the image enhancement technology with fixed parameters to enhance the crack area has a poor effect. In this embodiment, by constructing a piecewise linear function of brightness, the adjustment parameters of the piecewise linear function of brightness can be adaptively selected according to the brightness value of the image for image enhancement to highlight the crack area.
[0037] Please refer to Figure 1 and Figure 3 , in this embodiment, the global brightness of the image is obtained according to the brightness value of the original image, and a piecewise linear function of brightness is constructed, expressed as: ; where s represents the set gray value, s = 10, which is the gray value expected to be output when f(x, y)=αT + β, f(x, y) is the original gray value of the pixel point with coordinates (x, y) in the image, and g(x, y) is the gray value after the transformation of f(x, y); [0, 255] is the gray scale range of the image, [αT + β, b] is the gray scale interval of interest, and α, β, γ, δ are the adjustment parameters of the piecewise linear function of brightness; T is the global brightness of the image, that is, the average value of the brightness values of all pixels in the image, which reflects the overall brightness of the image.
[0038] Please refer to specifically Figure 3, in this embodiment, the brightness piecewise linear function adaptively selects the adjustment parameters α, β, γ, δ of the brightness piecewise linear function according to the global brightness of the image by setting the threshold Br; if T ≤ Br, then select [α; β; γ; δ] = [1.2; -112; -0.6; 331]; if T > Br, then select [α; β; γ; δ] = [0.2; 90; -1.2; 394].
[0039] Figure 3 In and respectively represent the first turning points for controlling the gray-scale transformation of the dark image and the bright image, and respectively represent the output gray-scale values when the input gray-scale of the dark image and the bright image is 200, g(x, y) represents the output gray-scale value, and f(x, y) represents the input gray-scale value.
[0040] It should be noted that the brightness piecewise linear function proposed in this embodiment is an improvement on the original piecewise linear enhancement function. The original piecewise linear enhancement function has two turning points, as Figure 4 shown. These two turning points correspond to four parameters, which are set by the experimenter according to the image features. The brightness piecewise linear function proposed in this embodiment selects different enhancement strategies according to the comparison between the image brightness T and the threshold Br . If T ≤ Br , then select α 1 ; β 1 ; γ 1 ; δ 1 , if T > Br , then select α 2 ; β 2 ; γ 2 ; δ 2 ; as Figure 3 shown, the parameters of the brightness piecewise linear function correspond to the four types of parameters of the original function, and correspond to x1, 200 corresponds to , and correspond to y 2,10 corresponds to y1. Therefore, the meanings of these adjustment parameters set in this embodiment are the same as those of the original piecewise linear enhancement function parameters, representing the breakpoints for gray-scale transformation of different gray-scale intervals. Since the function in this embodiment needs to determine appropriate image enhancement parameters according to the image brightness T to determine appropriate image enhancement parameters, so this embodiment introduces other parameters: α, β, γ, δ to T perform transformation to obtain appropriate enhancement parameters. Through multiple experiments, it is found that setting two parameters to T perform transformation can obtain the most suitable image enhancement parameters, and it is applicable to enhancing different crack images. Therefore, at the turning point of gray-scale transformation, this embodiment uses two parameters to T combine with, as shown in ( αT + β and γT + δ ), which can control both the response amplitude and the offset reference at the same time, so as to more reasonably determine the key parameters of image enhancement and achieve better image enhancement effects.
[0041] It should be noted that the brightness piecewise linear function constructed in this embodiment can automatically select appropriate parameters for image enhancement of structural fissures with different background brightnesses, and overcomes the problem that the image enhancement technology with fixed parameters has poor enhancement effects on the fissure area through adaptive adjustment of parameters.
[0042] Please continue to refer to Figure 3 , in this embodiment, the global brightness T of the image is obtained according to the brightness values of the red, green, and blue channels of the original image, and then the brightness piecewise linear function is constructed by using the global brightness T, and image enhancement is performed through the brightness piecewise linear function. The global brightness T is the average value of the brightness values of all pixels in the image, reflecting the overall brightness of the image. Among them, the global brightness T is expressed as: ; where W and H are the length and width of the original image respectively, R(x, y), G(x, y), and B(x, y) respectively represent the brightness values of the red, green, and blue channels of the image at the point (x, y), and n is the number of pixels in the image.
[0043] Please refer to Figure 7 and Figure 8 , Figure 7 in (a) is the original image, (b) is the random fusion weight 1, (c) is the random fusion weight 2, (d) is the random fusion weight 3, (e) is the random fusion weight 4, and (f) is this embodiment. Figure 8 in (a) is the original image, (b) is the random brightness enhancement parameter, (c) is the random brightness enhancement parameter 2, and (d) is this embodiment.
[0044] It should be noted that due to many differences in the acquisition process of fissure images, such as light intensity, background color, and image resolution, there are significant differences in the graying results of different fused images. Using image enhancement techniques with fixed parameters to enhance the fissure area has poor effects. To solve this problem, this embodiment proposes a brightness piecewise linear function, which can adaptively select the adjustment parameters of the piecewise linear function according to the brightness value of the image for image enhancement.
[0045] In this embodiment, multiple experiments are carried out in combination with crack images of different brightnesses. A threshold Br is set. If the image brightness T ≤ Br, the parameters [α; β; γ; δ] = [1.2; -112; -0.6; 331] of the function are selected; if T > Br, then [α; β; γ; δ] = [0.2; 90; -1.2; 394] is selected.
[0046] The experimental verification method is adopted to verify the effectiveness of the parameter values: other parameter values are selected and compared with the experimental results obtained by the parameters set in this embodiment. According to the results, some fissure areas are missing in the results obtained by using other parameters, and there are many breaks. In contrast, the parameter value range set in this embodiment has significant effects in terms of fissure recognition accuracy and background noise suppression, and can basically reconstruct the real situation of the fissures.
[0047] In a realizable implementation manner, in step S3, fissure area segmentation.
[0048] Specifically, please refer to Figure 5 , in this embodiment, through top-hat transformation, the background area is suppressed, and the Otsu algorithm and closing operation are used to achieve accurate segmentation of the fissure area, which is beneficial to subsequent fissure parameter extraction and development monitoring. Step S3 specifically includes the following steps: First, top-hat transformation to suppress the background area; Specifically, in this embodiment, the result of the closing operation is subtracted from the original image to obtain the valley bottom part filled by the closing operation. In the fissure image, these valley bottom parts usually correspond to the darker fissure areas, that is, the so-called "black top-hat". The top-hat transformation is expressed as: ; where I is the original image; B is the structural element, is the closing operation; is the image after top-hat transformation; Second, use the Otsu algorithm to binarize the image and determine a threshold T to maximize the between-class variance; Specifically, in this embodiment, the best crack segmentation can be achieved by maximizing the inter-class variance. All possible thresholds T are traversed according to the calculation formula of the inter-class variance, and the threshold T that maximizes the inter-class variance is used as the best threshold. The calculation formula of the inter-class variance is as follows: ; where, is the number of foreground pixels, is the number of background pixels, is the average gray value of the foreground, is the average gray value of the background, N is the total number of pixels in the image, is the inter-class variance; Third, the disconnected parts in the crack area are connected by closing operation and the object boundary is smoothed; Specifically, in morphological processing, the closing operation can be described as dilating the input image first and then eroding it. This process has the effect of filling small holes inside the objects in the image. The expression of the closing operation is as follows: ; where, represents the image after the closing operation, represents the original binary image, represents the erosion operation, represents the dilation operation.
[0049] It should be noted that, Figure 6 is the crack segmentation result graph. From left to right, they are the original image, crack label, Otsu, Canny, Log, Prewitt, and the crack segmentation result of this embodiment.
[0050] Please refer to Figure 6 , based on the Otsu threshold segmentation algorithm, the segmentation effect is good in processing some crack images with a single background color and less noise interference. However, for crack images with a large overlap between the gray levels of the cracks and the background and serious local noise, this algorithm cannot accurately separate the cracks from the background. Based on the Canny edge detection operator algorithm, although it can suppress noise interference, the edges of some segmentation results are blurred and further parameter analysis cannot be achieved; based on the Log edge detection operator algorithm, there is relatively dense noise in the segmentation result and the segmentation effect is not good. Based on the Prewitt edge detection operator algorithm, serious crack loss occurs in the processing result.
[0051] It is worth noting that, compared with the above algorithms, for crack images with different types of complex backgrounds, this embodiment can not only suppress background noise but also obtain a good crack segmentation effect, which is beneficial to subsequent crack parameter extraction and development monitoring.
[0052] In a realizable embodiment, in step S4, crack parameter calculation.
[0053] Obtain the parameters of each crack area, calculate the following three crack parameters, and realize crack monitoring.
[0054] First, calculate the crack area ratio; Specifically, due to the differences in shooting distance and angle, the sizes and orders of magnitude of each obtained crack image are different, making it difficult to objectively evaluate the impact degree of the crack on the entire structure. Therefore, in this embodiment, the proportion of the crack area is calculated to judge the damage degree of the structure. The calculation formula for the crack area ratio is expressed as: ; where n is the number of wall crack areas, is the number of pixels in the i-th crack area, i is an index variable, and W and H are the length and width of the original image respectively; Second, calculate the crack length; Specifically, the crack length is an important index in crack detection. The length of the crack is usually related to the stress concentration area. Long cracks often appear in places with stress concentration, such as the connection points of the structure or the load concentration area. In the present invention, morphological operations are used to iteratively thin the binary image, gradually removing the edge pixels of the crack until a crack skeleton with a width of one pixel is obtained. Subsequently, the number of pixels of each skeleton is obtained, thereby obtaining the total crack length. The calculation formula for the crack length is expressed as: ; where N is the number of skeletons, is the number of pixels of the j-th skeleton, and j is an index variable; Third, calculate the average crack width; Specifically, the crack width usually reflects the damage and deformation degree of the structure. By measuring and recording the crack width, the safety condition of the structure can be evaluated, and corresponding repair and reinforcement measures can be taken. In this embodiment, the average crack width is calculated based on the obtained crack area and length. The calculation formula for the average crack width is expressed as: ; where B is the average crack width, A is the crack area, L is the crack length, the n in is the number of wall crack areas, is the number of pixels in the i-th crack area, i is an index variable, the N in is the number of skeletons, is the number of pixels of the j-th skeleton, and j is an index variable.
[0055] In this embodiment, in step S3, before calculating the fracture parameters, all fracture regions are marked using the region marking method. In this embodiment, before calculating the fracture parameters, all fracture regions are marked using the region marking method. The 8-connected region marking method is used to obtain multiple fracture regions in the segmented image. This method can more clearly observe the distribution, morphology, and topological structure of fractures through visualizing the connected regions, thereby discovering potential structural body features and rules.
[0056] In an implementable embodiment, step S4, fracture parameter comparison.
[0057] Specifically, after calculating various fracture parameters in step S3, this embodiment sets three preset parameters corresponding to the fracture parameters for fracture monitoring corresponding to different fracture danger levels. The preset parameters can be customized according to the specific structural body type and engineering detection requirements.
[0058] In step S4, if all fracture parameters are less than the preset parameters, the fracture is a safe fracture; if at least two of the fracture parameters are less than the preset parameters, the fracture is a fracture to be observed; if at least two of the fracture parameters are greater than the preset parameters, the fracture is a dangerous fracture.
[0059] Specifically, the safe fracture is set as: ; Wherein, is the mathematical logic "and". This formula indicates that a safe fracture requires simultaneously satisfying that the fracture region area ratio is less than 1%, the fracture length is less than 100, and the fracture width is less than 5; The fracture to be observed is set as: ; Wherein, is the mathematical logic "or". The fracture region area ratio is less than 1%, the fracture length is less than 100, and the fracture width is less than 5. This formula indicates that a fracture to be observed requires simultaneously satisfying two of these conditions; The dangerous fracture is set as: ; Wherein, is the mathematical logic "and". The fracture region area ratio is less than 1%, the fracture length is less than 100, and the fracture width is less than 5. This formula indicates that a dangerous fracture requires satisfying at most one of these conditions.
[0060] Specifically, according to the type of fracture parameters, the safety of the fracture can be judged, and a scientific and reasonable maintenance plan can be formulated to delay structural aging.
[0061] Based on the same inventive concept, the present application also provides a fissure monitoring system based on dual-modal image fusion and brightness piecewise linear enhancement. The fissure monitoring system includes a dual-modal image fusion module, an image brightness piecewise linear enhancement module, a fissure area segmentation module, a fissure parameter extraction module, and a fissure parameter comparison module.
[0062] Among them, the dual-modal image fusion module obtains a pseudo-color image of the fissure grayscale image, constructs a dual-modal image fusion function to fuse the pseudo-color image with the original image, so as to construct a dual-modal fusion image; The image brightness piecewise linear enhancement module constructs a brightness piecewise linear function based on the dual-modal fusion image constructed by the dual-modal image fusion module, and adaptively selects the adjustment parameters of the brightness piecewise linear function according to the global brightness of the image to perform image enhancement; The fissure area segmentation module segments several fissure areas based on the image enhanced by the image brightness piecewise linear enhancement module, determines the fissure areas by the fissure area marking method, and calculates the number of pixels in each fissure area to obtain fissure parameters; The fissure parameter comparison module judges the relationship between each fissure parameter and the preset parameter respectively based on the various fissure parameters calculated by the fissure parameter extraction module, so as to realize fissure monitoring.
[0063] Based on the same inventive concept, the present application also provides a computer-readable storage medium storing a computer program, which when executed by a processor, implements the fissure monitoring method based on image fusion and brightness enhancement as described above.
[0064] The program product for implementing the above method of the present application can adopt a portable compact disc read-only memory and includes program code, and can run on a terminal device, such as a personal computer. However, the program product of the present application is not limited to this. In the present application, the readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or combined with an instruction execution system, device, or component.
[0065] It should be noted that the computer-readable storage medium may include a data signal carried in a baseband or as part of a carrier wave, in which the readable program code is carried. Such a propagated data signal can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. The readable storage medium can also be any readable medium other than the readable storage medium, and this readable medium can send, propagate, or transmit a program for use by or combined with an instruction execution system, device, or component. The program code contained on the readable storage medium can be transmitted by any suitable medium, including but not limited to wireless, wired, optical cable, RF, etc., or any suitable combination of the above.
[0066] The above are only the preferred embodiments of the present application and do not impose any formal restrictions on the present application. Although the present application has been disclosed above with the preferred embodiments, it is not intended to limit the present application. Any person skilled in the art of the present application can make some changes or modifications to equivalent embodiments with equivalent changes by using the technical content prompted above within the scope of the technical solution of the present application. The implementation schemes in the above embodiments can also be further combined or replaced. However, as long as the content does not deviate from the technical solution of the present application, any simple modification, equivalent change and modification made to the above embodiments according to the technical essence of the present application still belong to the scope of the present application's solution.
Claims
1. A crack monitoring method based on image fusion and brightness enhancement, characterized in that The steps include: Step S1, dual-modal image fusion; Obtaining a pseudo-color image of the crack grayscale image, constructing a dual-modal image fusion function to fuse the pseudo-color image with the original image to construct a dual-modal fused image; Step S2, piecewise linear enhancement of image brightness; Based on the dual-modal fusion image constructed in step S1, a brightness piecewise linear function is constructed, and according to the global brightness of the image, an adjustment parameter of the brightness piecewise linear function is adaptively selected to perform image enhancement; Step S3, calculation of crack parameters; Segment the enhanced image obtained in step S2 into crack regions, obtain multiple crack regions after segmentation, and calculate crack parameters of each crack region; Step S4, comparing crack parameters; Based on the crack parameters calculated in step S3, the relationship between each crack parameter and the corresponding preset parameter is determined to achieve crack monitoring.
2. The method according to claim 1, wherein In step S1, weights are set for the pseudo-color image and the original image according to the Bhattacharyya coefficient to construct the bimodal fusion function, which is expressed as: ; Wherein, A(x, y) and B(x, y) respectively represent the pixel values of the pseudo-color image and the original image at the coordinate (x, y), and are respectively the fusion weights of the pseudo-color image and the original image, is the Bhattacharyya coefficient between the pseudo-color image and the original image, is the Bhattacharyya coefficient between the two original images, and F(x, y) is the pixel value of the fused image at the coordinate (x, y); Among them, if , it means that the original image contains more original information. is used as the numerator of the pseudo-color image fusion weight to give it a low weight, and is used as the numerator of the original image fusion weight to give it a high weight; if , it means that the pseudo-color image contains more original information. is used as the numerator of the pseudo-color image fusion weight to give it a high weight, and is used as the numerator of the original image fusion weight to give it a low weight.
3. The method according to claim 1, wherein In step S2, the global brightness of the image is obtained according to the brightness value of the original image, and the brightness piecewise linear function is constructed, which is expressed as: ; Where s represents the set grayscale value, f(x, y) is the original grayscale value of the pixel with coordinates (x, y) in the image, g(x, y) is the grayscale value after f(x, y) is transformed, T is the global brightness of the image, that is, the average brightness value of all pixels in the image, [0,255] is the grayscale range of the image, [αT+β, b] is the grayscale interval of interest, and α, β, γ, δ are the adjustment parameters of the brightness piecewise linear function.
4. The method according to claim 3, characterized in that The brightness piecewise linear function adaptively selects adjustment parameters α, β, γ and δ of the brightness piecewise linear function according to the global brightness T of the image by setting a threshold Br; wherein, If T≤Br, then select [α; β; γ; δ]=[1.2; -112; -0.6; 331]; If T>Br, select [α; β; γ; δ]=[0.2; 90; -1.2; 394].
5. The method according to claim 1, characterized in that In step S3, the enhanced image obtained in step S2 is segmented, including the following steps: The bottom hat transformation uses the result of the closing operation to subtract the original image to obtain the bottom part filled by the closing operation, which is expressed as: ; Among them, I is the original image; B is the structuring element, is the closing operation; is the image after bottom-hat transformation; Use the Otsu algorithm to binarize the image and determine a threshold T to maximize the inter-class variance; ; Among them, is the number of foreground pixels, is the number of background pixels, is the average gray value of the foreground, is the average gray value of the background, N is the total number of pixels in the image, is the between-class variance; Use closing to connect disconnected parts in the crack region and smooth the object boundaries: ; Among them, represents the image after the closing operation, represents the original binary image, represents the erosion operation, represents the dilation operation.
6. The crack monitoring method based on image fusion and brightness enhancement according to claim 1, wherein In step S3, before calculating the fracture parameters, all fracture regions are marked using the region marking method to obtain the fracture parameters of each fracture region, including: Calculate the crack area ratio, expressed as: ; Among them, n is the number of wall crack regions, is the number of pixels in the i-th crack region, i is an index variable, and W and H are the length and width of the original image respectively; To calculate the crack length, the binary image is iteratively refined through morphological operations, and the edge pixels of the crack are gradually removed until a crack skeleton with a width of one pixel is obtained. Then the number of pixels of each skeleton is obtained to obtain the total length of the crack, which is expressed as: ; where N is the number of skeletons, is the number of pixels of the j-th skeleton, and j is an index variable; Calculate the average crack width. The average crack width is calculated by the obtained crack area and crack length, expressed as: ; Among them, B is the average width of the crack, A is the crack area, and L is the crack width. In , n is the number of wall crack regions. is the number of pixels in the i-th crack region, and i is an index variable. In , N is the number of skeletons. is the number of pixels in the j-th skeleton, and j is an index variable.
7. The method according to claim 6, wherein In step S4, judging the relationships between the respective crack parameters and their corresponding preset parameters includes: If all the crack parameters are less than their corresponding preset parameters, the crack is a safe crack; if any one of the crack parameters is less than its corresponding preset parameter, the crack is a crack to be observed; if at least two of the crack parameters are greater than their corresponding preset parameters, the crack is a dangerous crack.
8. A crack monitoring system based on image fusion and brightness enhancement, characterized in that, The crack monitoring system includes: A dual-modal image fusion module, which is used to obtain a pseudo-color image of the crack grayscale image, construct a dual-modal image fusion function to fuse the pseudo-color image with the original image to construct a dual-modal fusion image; An image brightness piecewise linear enhancement module, which constructs a brightness piecewise linear function based on the dual-modal fusion image constructed by the dual-modal image fusion module, and adaptively selects the adjustment parameters of the brightness piecewise linear function according to the global brightness of the image to perform image enhancement; A crack region segmentation module and a crack parameter extraction module, the crack region segmentation module segments the enhanced image obtained by the image brightness piecewise linear enhancement module to obtain multiple segmented crack regions, and calculates the crack parameters of each crack region; A crack parameter comparison module, which judges the relationships between the respective crack parameters and their corresponding preset parameters based on the respective crack parameters calculated by the crack parameter extraction module to realize crack monitoring.
9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the crack monitoring method based on image fusion and brightness enhancement according to any one of claims 1 to 7.
Citation Information
Patent Citations
Zircon classification method based on multi-scale deep convolutional neural network
CN117218445A
Crack detection and pseudo labeling method and system based on deep learning and genetic algorithm
CN119048522A
Multi-frame image fusion method and system, electronic device, and storage medium
US20240127403A1