Fissure Monitoring Method, System and Medium Based on Image Fusion and Brightness Enhancement
Through the method of image fusion and brightness enhancement, the problems of crack detection to light sensitivity and data dependence in the prior art are solved, and efficient monitoring and evaluation of cracks are achieved, which is suitable for crack images with different background brightness.
Patent Information
- Application Number
- CN202510694397.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-07-25
- Estimated Expiration
- 2045-05-28
AI Technical Summary
The prior art is sensitive to light conditions in crack detection, lacks adaptive adjustment mechanisms, and it is difficult to deal with diverse structural crack images. Deep learning models have insufficient generalization capabilities due to data dependence and feature differences.
Using a method based on image fusion and brightness enhancement, crack monitoring is achieved through adaptive adjustment of parameters through dual-mode image fusion and brightness segmentation linear function, combined with crack region segmentation and parameter calculation.
It improves the accuracy and robustness of crack detection, and can automatically select appropriate adjustment parameters under different background brightness, effectively divide the crack areas and calculate safety levels, so as to achieve effective monitoring and evaluation of the crack development process.
Smart Images

Figure CN120219190B_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. Lighting changes will significantly affect the processing effect, and 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 address 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 amount 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 objective, the first aspect of this application provides a crack monitoring method based on image fusion and brightness enhancement, including the following steps:
[0007] Step S1, dual-modal image fusion;
[0008] 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;
[0009] Step S2, image brightness piecewise linear enhancement;
[0010] Based on the bimodal 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;
[0011] Step S3, crack parameter calculation;
[0012] Segment the enhanced image obtained in step S2 to obtain multiple crack regions after segmentation, and calculate the crack parameters of each crack region;
[0013] Step S4, crack parameter comparison;
[0014] 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.
[0015] Further, in step S1, weights are set for the pseudo-color image and the original image according to the Bhattacharyya coefficient, and the bimodal fusion function is constructed, expressed as:
[0016] ;
[0017] 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);
[0018] 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.
[0019] Further, 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:
[0020] ;
[0021] where s represents the set gray value, f(x, y) is the original gray value of the pixel at coordinates (x, y) in the image, g(x, y) is the gray 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 gray range of the image, and [αT + β, b] is the gray interval of interest, and α, β, γ, δ are the adjustment parameters of the brightness piecewise linear function.
[0022] Further, 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; where
[0023] if T ≤ Br, then [α; β; γ; δ] = [1.2; -112; -0.6; 331] is selected;
[0024] if T > Br, then [α; β; γ; δ] = [0.2; 90; -1.2; 394] is selected.
[0025] Further, in step S3, the enhanced image obtained in step S2 is subjected to image segmentation, including the following steps:
[0026] 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:
[0027] ;
[0028] where I is the original image; B is the structural element, is the closing operation; is the image after the top-hat transformation;
[0029] Using the Otsu algorithm to perform binary processing on the image to determine a threshold T to maximize the between-class variance;
[0030] ;
[0031] 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, and N is the total number of pixels in the image. is the variance between classes;
[0032] Connect the disconnected parts in the crack area through closing operation and smooth the object boundary:
[0033] ;
[0034] where, represents the image after closing operation, represents the original binary image, represents the erosion operation, represents the dilation operation.
[0035] Furthermore, in step S3, before calculating the crack parameters, first use the region labeling method to label all crack regions and obtain the crack parameters of each crack region, including:
[0036] Calculate the crack area ratio, expressed as:
[0037] ;
[0038] where, n is the number of wall crack regions, is the number of pixels in the i-th crack region, i is the index variable, and W and H are the length and width of the original image respectively;
[0039] Calculate the crack length. Through morphological operations, the binary image is iteratively thinned to gradually remove 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 to get the total crack length, expressed as:
[0040] ;
[0041] where, N is the number of skeletons, is the number of pixels in the j-th skeleton, j is the index variable;
[0042] Calculate the average crack width. Calculate the average crack width through the obtained crack area and crack length, expressed as:
[0043] ;
[0044] where, B is the average crack width, A is the crack area, L is the crack width, the n in is the number of wall crack regions, is the number of pixels in the i-th crack region, i is the index variable, the N in is the number of skeletons, is the number of pixels in the j-th skeleton, j is the index variable.
[0045] Further, in step S4, judging the relationship between each crack parameter and its corresponding preset parameter includes:
[0046] If each crack parameter is less than its corresponding preset parameter, the crack is a safe crack; if at least two of the crack parameters are less than their corresponding preset parameters, the crack is a crack to be observed; if at most one of the crack parameters is less than its corresponding preset parameter, the crack is a dangerous crack.
[0047] To achieve the above object, the second aspect of the present application provides a crack monitoring system based on dual - modal image fusion and brightness piece - wise linear enhancement. The system includes:
[0048] A dual - modal image fusion module, which obtains a pseudo - color image of the crack 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;
[0049] An image brightness piece - wise linear enhancement module, which constructs a brightness piece - wise linear function based on the dual - modal fusion image constructed by the dual - modal image fusion module, and adaptively selects the adjustment parameter of the brightness piece - wise linear function according to the global brightness of the image to perform image enhancement;
[0050] 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 piece - wise linear enhancement module to obtain multiple segmented crack regions, and calculates the crack parameters of each crack region;
[0051] A crack parameter comparison module, which judges 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.
[0052] 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.
[0053] Compared with the prior art, the present application has the following beneficial effects:
[0054] In this application, through bimodal image fusion, different modal image data are regarded as complementary information sources, and by comprehensively utilizing this information, the performance of image analysis and understanding is improved, and the detailed features of fractures are enhanced. By constructing a brightness piecewise linear function, appropriate adjustment parameters can be automatically selected for structural fractures with different background brightnesses for image enhancement. The self-adaptive adjustment parameters overcome the problem of poor enhancement effect on fracture regions in the image enhancement technology with fixed parameters, and can effectively segment the fracture regions. The safety level is determined based on the obtained fracture parameters, thereby realizing the effective monitoring and evaluation of the fracture development process.
[0055] In this application, the connected region labeling method can assign a unique label to each fracture, thereby realizing the counting and positioning of fractures, and further calculating three parameters, namely the fracture area ratio, fracture length, and average fracture width, to judge the damage degree of the structure and determine the safety level of the structure. This method can calculate accurate fracture parameters for fracture images of different sizes and orders of magnitude and determine the safety level of the fractures.
[0056] The following further describes the specific implementation manners of this application in detail with reference to the accompanying drawings. Description of the Drawings
[0057] The accompanying drawings, as part of this application, are used to provide a further understanding of this application. The schematic embodiments of this application and their descriptions are used to explain this application, but do not constitute an improper limitation to this application. Obviously, the accompanying drawings in the following description are only some embodiments, and those of ordinary skill in the art can obtain other drawings based on these drawings without creative efforts.
[0058] In the accompanying drawings of the specification:
[0059] Figure 1 is the overall logic schematic diagram in this specific implementation manner;
[0060] Figure 2 is the logic schematic diagram of bimodal image fusion in this specific implementation manner;
[0061] Figure 3 is the schematic diagram of the brightness piecewise linear enhancement function in this specific implementation manner;
[0062] Figure 4 is the schematic diagram of the original piecewise linear enhancement function in this specific implementation manner;
[0063] Figure 5 is the logic schematic diagram of fracture region segmentation in this specific implementation manner;
[0064] Figure 6 is the schematic diagram of the fracture segmentation result in this specific implementation manner;
[0065] Figure 7 Schematic diagram for comparing the effects of selecting different fusion weight values in this specific embodiment;
[0066] Figure 8 Schematic diagram for comparing the effects of selecting different adjustment parameter values in this specific embodiment. Specific embodiment
[0067] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. The following embodiments are used to illustrate the present application but are not intended to limit the scope of the present application.
[0068] Please refer to Figure 1 , this embodiment provides a fissure monitoring method based on bimodal image fusion and brightness piecewise linear enhancement. The method includes the following steps:
[0069] Step S1, bimodal image fusion;
[0070] Obtain a pseudo-color image of the fissure grayscale image, construct a bimodal image fusion function to fuse the pseudo-color image with the original image to construct a bimodal fusion image;
[0071] Step S2, image brightness piecewise linear enhancement;
[0072] Based on the bimodal 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;
[0073] Step S3, fissure area segmentation and fissure parameter extraction;
[0074] Segment the enhanced image obtained in step S2 to obtain multiple segmented fissure areas, and calculate the fissure parameters of each fissure area;
[0075] Step S4, fissure parameter comparison;
[0076] Based on the fissure parameters calculated in step S3, judge the relationship between each fissure parameter and its corresponding preset parameter to achieve fissure monitoring.
[0077] 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. The present 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.
[0078] In addition, the terms "first" and "second" are only used for descriptive purposes and cannot be construed 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, "a plurality" means two or more unless otherwise specifically defined.
[0079] In an implementable embodiment, step S1, dual-modal image fusion.
[0080] First, obtain the pseudo-color image of the crack grayscale image.
[0081] Please refer to Figure 1 and Figure 2 , in this embodiment, the original image is grayscale, and the pseudo-color image of the crack grayscale image is obtained through the Jet pseudo-color mapping method. This mapping method is based on the change of hue, maps the gray level to different colors, so that different gray values in the image present obvious color differences in the color image, expressed as:
[0082] ;
[0083] ;
[0084] ;
[0085] 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.
[0086] It should be noted that these three functions of r(x), g(x), and b(x) respectively define the value-taking methods of different gray levels in the red, green, and blue channels. After each channel is assigned a specific value, the Jet pseudo-color mapping is realized.
[0087] Second, calculate the histogram Bhattacharyya coefficient.
[0088] 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 histogram. 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:
[0089] ;
[0090] 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.
[0091] Third, construct a bimodal fusion image.
[0092] 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.
[0093] 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:
[0094] ;
[0095] 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 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 fusion image at the coordinate (x, y).
[0096] 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 give it a low weight, and is used 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 As the numerator of the fusion weight of the pseudo-color image to give it a high weight, As the numerator of the fusion weight of the original image to give it a low weight.
[0097] It should be noted that in order to make the fusion result obtain richer information and not lose the original information, this application obtains the desired fusion effect by assigning appropriate fusion weights. The fusion weight of each image in this application uses two Bhattacharyya coefficients. The Bhattacharyya coefficient can accurately measure the similarity of the histograms of two images. In this embodiment, the fusion weight is determined by the Bhattacharyya coefficient, which can help balance the information of the pseudo-color image and the original image, so that the enhanced features in the pseudo-color image and the real details in the original image are retained in the fusion image.
[0098] In a realizable embodiment, in step S2, the image brightness is enhanced by piecewise linear.
[0099] 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-level difference in the graying results of different fusion images. Using an image enhancement technique 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.
[0100] 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:
[0101] ;
[0102] Among them, s represents the set gray value, s = 10, which is the gray value expected to be output in 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 range of the image, [αT+β, b] is the gray 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.
[0103] Please refer specifically to 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].
[0104] Figure 3 In and respectively represent the first turning points of the dark image and the bright image for controlling the gray-scale transformation, 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.
[0105] 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 characteristics. 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, 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 appropriate 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 simultaneously, so as to more reasonably determine the key parameters of image enhancement and achieve better image enhancement effects.
[0106] 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 of poor enhancement effect on the fissure area in the image enhancement technology with fixed parameters through adaptive adjustment of parameters.
[0107] 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 a brightness piecewise linear function is constructed 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:
[0108] ;
[0109] where W and H are the length and width of the original image respectively, R(x, y), G(x, y), and B(x, y) represent the brightness values of the red, green, and blue channels of the image at the point (x, y) respectively, and n is the number of pixels in the image.
[0110] Please refer to Figure 7 and Figure 8 , Figure 7 in which (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 which (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.
[0111] It should be noted that due to many differences in the acquisition process of crack images, such as light intensity, background color, and image resolution, there are large differences in the graying results of different fused images. Using an image enhancement technique with fixed parameters to enhance the crack area has a poor effect. 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.
[0112] 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 this function are selected; if T > Br, then [α; β; γ; δ] = [0.2; 90; -1.2; 394] is selected.
[0113] 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 crack 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 crack recognition accuracy and background noise suppression, and can basically reconstruct the true situation of the cracks.
[0114] In a realizable implementation manner, in step S3, crack area segmentation.
[0115] 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 the precise segmentation of the crack area, which is beneficial to the subsequent extraction of crack parameters and development monitoring. Step S3 specifically includes the following steps:
[0116] First, top-hat transformation to suppress the background area;
[0117] Specifically, in this embodiment, the result of the closing operation is subtracted from the original image to obtain the bottom valley part filled by the closing operation. In the crack image, these bottom valley parts usually correspond to the darker crack areas, that is, the so-called "black top-hat". The top-hat transformation is expressed as:
[0118] ;
[0119] where I is the original image; B is the structuring element, is the closing operation; is the image after top-hat transformation;
[0120] Second, use the Otsu algorithm to binarize the image to determine a threshold T to maximize the between-class variance;
[0121] 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:
[0122] ;
[0123] 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;
[0124] Third, the disconnected parts in the crack region are connected by closing operation and the object boundary is smoothed;
[0125] Specifically, in morphological processing, the closing operation can be described as dilating the input image first and then eroding it. This process has a filling effect on the small holes inside the objects in the image. The expression of the closing operation is as follows:
[0126] ;
[0127] where, represents the image after the closing operation, represents the original binary image, represents the erosion operation, represents the dilation operation.
[0128] It should be noted that Figure 6 is the crack segmentation result map. From left to right, they are the original image, crack label, Otsu, Canny, Log, Prewitt, and the crack segmentation result of this embodiment.
[0129] Please refer to Figure 6 , the Otsu threshold segmentation algorithm has a good segmentation effect 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 cracks and the background and serious local noise, this algorithm cannot accurately separate the cracks from the background. Although the Canny edge detection operator algorithm can suppress noise interference, the edges of some segmentation results are blurred and further parameter analysis cannot be achieved; there is relatively dense noise in the segmentation results based on the Log edge detection operator algorithm, and the segmentation effect is not good. The processing results based on the Prewitt edge detection operator algorithm have serious crack loss.
[0130] It should be noted that, compared with the above algorithms, for crack images in different types of complex backgrounds, this embodiment can not only suppress background noise but also obtain better crack segmentation effects, which is beneficial to subsequent crack parameter extraction and development monitoring.
[0131] In an implementable embodiment, in step S4, crack parameter calculation.
[0132] Obtain the parameters of each crack region and calculate the following three crack parameters to achieve crack monitoring.
[0133] First, calculate the crack region area ratio;
[0134] 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 influence degree of cracks on the entire structure body by the crack area. Therefore, in this embodiment, the proportion of the crack region area is calculated to judge the damage degree of the structure body. The calculation formula for the crack region area ratio is expressed as:
[0135] ;
[0136] 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;
[0137] Second, calculate the crack length;
[0138] Specifically, the crack length is an important index in crack detection. The length of a crack is usually related to the stress concentration area. Long cracks often appear in places with stress concentration, such as the connection points of structures or load concentration areas. The present invention uses morphological operations to iteratively thin the binary image, gradually removing the edge pixels of the crack until a crack skeleton with a pixel width 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:
[0139] ;
[0140] Among them, N is the number of skeletons, is the number of pixels in the j-th skeleton, and j is an index variable;
[0141] Third, calculate the average crack width;
[0142] Specifically, the crack width usually reflects the damage and deformation degree of the structure body. 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 by the obtained crack area and length. The calculation formula for the average crack width is expressed as:
[0143] ;
[0144] Among them, B is the average width of the crack, A is the area of the crack, and L is the width of the crack. n in [] is the number of wall crack areas. is the number of pixels in the i-th crack area, and i is an index variable. N in [] is the number of skeletons. is the number of pixels in the j-th skeleton, and j is an index variable.
[0145] In this embodiment, in step S3, before calculating the crack parameters, all crack areas are marked using the region marking method. In this embodiment, before calculating the crack parameters, all crack areas are marked using the region marking method. The 8-connected region marking method is used to obtain multiple crack areas in the segmented image. This method can more clearly observe the distribution, shape, and topological structure of the cracks through visualizing the connected regions, thereby discovering potential structural body features and rules.
[0146] In an implementable embodiment, in step S4, crack parameter comparison.
[0147] Specifically, after calculating various crack parameters in step S3, this embodiment sets three preset parameters corresponding to the crack parameters to perform crack monitoring corresponding to different crack danger levels. The preset parameters can be customized according to the specific structural body type and engineering detection requirements.
[0148] In step S4, if all crack parameters are less than the preset parameters, the crack is a safe crack; if at least two of the crack parameters are less than the preset parameters, the crack is a crack to be observed; if at least two of the crack parameters are greater than the preset parameters, the crack is a dangerous crack.
[0149] Specifically, the safe crack is set as:
[0150] ;
[0151] Among them, is the logical "AND" in mathematics. This formula indicates that the safe crack requires that the crack area ratio is less than 1%, the crack length is less than 100, and the crack width is less than 5 at the same time.
[0152] The crack to be observed is set as:
[0153] ;
[0154] Among them, is the logical "OR" in mathematics. The crack area ratio is less than 1%, the crack length is less than 100, and the crack width is less than 5. This formula indicates that the crack to be observed requires satisfying two of these conditions at the same time.
[0155] The dangerous crack is set as:
[0156] ;
[0157] Wherein, is the mathematical logic "AND", the area ratio of the crack region is less than 1%, the crack length is less than 100, and the crack width is less than 5. This formula indicates that the dangerous crack requirements satisfy at most one of the conditions.
[0158] Specifically, according to the type of crack parameters, the safety of the crack can be judged, and a scientific and reasonable maintenance plan can be formulated to delay the structural aging.
[0159] Based on the same inventive concept, the present application also provides a crack monitoring system based on dual-modal image fusion and brightness piecewise linear enhancement. The crack monitoring system includes a dual-modal image fusion module, an image brightness piecewise linear enhancement module, a crack region segmentation module, a crack parameter extraction module, and a crack parameter comparison module.
[0160] Among them, the dual-modal image fusion module obtains a pseudo-color image of the crack 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;
[0161] 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;
[0162] The crack region segmentation module segments several crack regions based on the image enhanced by the image brightness piecewise linear enhancement module, determines the crack regions by the crack region marking method, and calculates the number of pixels of each crack region to obtain the crack parameters;
[0163] The crack parameter comparison module judges the relationship between each crack parameter and the preset parameter respectively based on the crack parameters calculated by the crack parameter extraction module to realize crack monitoring.
[0164] 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 crack monitoring method based on image fusion and brightness enhancement as described above.
[0165] The program product for implementing the above method in this application can be 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 this application is not limited to this. In this application, a readable storage medium can be any tangible medium that contains or stores a program, and this program can be used by or in combination with an instruction execution system, device, or component.
[0166] It should be noted that a computer-readable storage medium can include data signals propagated in a baseband or as part of a carrier wave, which carry the readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. A readable storage medium can also be any readable medium other than a readable storage medium, and this readable medium can send, propagate, or transmit a program for use by or in combination with an instruction execution system, device, or component. The program code contained on a readable storage medium can be transmitted using any appropriate medium, including but not limited to wireless, wired, optical fiber, RF, etc., or any suitable combination of the above.
[0167] The above are only the preferred embodiments of this application, and do not impose any formal limitations on this application. Although this application has been disclosed above with preferred embodiments, it is not intended to limit this application. Any person skilled in the art of this application can, without departing from the scope of the technical solution of this application, make some changes or modifications using the technical content prompted above as equivalent embodiments of equivalent changes. The implementation schemes in the above embodiments can also be further combined or replaced. However, as long as it does not depart from the content of the technical solution of this application, any simple modification, equivalent change, and modification made to the above embodiments based on the technical essence of this application still belong to the scope of the solution of this application.
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, characterized in that 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 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, wherein 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 top-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 fissure monitoring method based on image fusion and brightness enhancement according to claim 1, characterized in that 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: ; where 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. n in is the number of wall crack regions. is the number of pixels in the i-th crack region, and i is an index variable. N in is the number of skeleton lines. is the number of pixels in the j-th skeleton line, and j is an index variable.
7. The method according to claim 6, characterized in that In step S4, judging the relationships between the respective fracture parameters and their corresponding preset parameters includes: If all the fracture parameters are less than their corresponding preset parameters, the fracture is a safe fracture; if any one of the fracture parameters is less than its corresponding preset parameter, the fracture is a fracture to be observed; if at least two of the fracture parameters are greater than their corresponding preset parameters, the fracture is a dangerous fracture.
8. A crack monitoring system based on image fusion and brightness enhancement, characterized in that, The fracture monitoring system includes: A dual-modal image fusion module, which is used to obtain a pseudo-color image of the fracture 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 fracture area segmentation module and a fracture parameter extraction module, the fracture area segmentation module segments the enhanced image obtained by the image brightness piecewise linear enhancement module to obtain multiple segmented fracture areas, and calculates the fracture parameters of each fracture area; A fracture parameter comparison module, which judges the relationships between the respective fracture parameters and their corresponding preset parameters based on the fracture parameters calculated by the fracture parameter extraction module to achieve fracture 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 fracture 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