A method, system and device for detecting defects in a wall of a rural house based on visual detection

By using dark-field scattering imaging and U-Net network processing, the problem of difficulty in identifying minute cracks in farmhouse walls under low light conditions was solved, achieving high-precision crack detection and parameter generation, and improving the accuracy and reliability of the detection results.

CN121053114BActive Publication Date: 2026-02-27CONSTR COMPREHENSIVE SURVEY RES & DESIGN INST
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511557033.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-29
Publication Date
2026-02-27
Estimated Expiration
2045-10-29

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately identify minute cracks on the surface of farmhouse walls in low-light or shadowy environments, and the accuracy and reliability of the detection results are insufficient.

Method used

Image data was acquired using dark-field scattering imaging, and crack signals were enhanced by combining polarization filtering and multi-scale differential processing. Image features were fused using the skip connection mechanism of the U-Net network, and crack parameters were generated through morphological processing.

Benefits of technology

It effectively improves the accuracy and reliability of crack detection under low light conditions, ensuring the integrity of minute cracks and the reliability of detection results, and providing reliable data support for the safety assessment of rural houses.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121053114B_ABST
    Figure CN121053114B_ABST
Patent Text Reader

Abstract

The application provides a kind of rural house wall defect detection method, system and device based on visual detection, it is related to visual detection technical field, wherein, the method comprises: by obtaining the dark field scattering image data of wall surface, suspected crack area is determined by visual enhancement processing and multi-scale difference analysis, utilizes the jump connection mechanism of U-Net network to fuse multi-level feature and outputs crack binary mask, then generates crack morphological parameter set by morphological post-processing and skeleton extraction, finally generates rural house wall defect evaluation report, especially for crack of rural house wall, early warning detection is convenient to assist dangerous house detection.The application improves the accuracy of rural house wall crack detection and is more practical.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of visual detection, and in particular to a rural house wall defect detection method, system and device based on visual detection. BACKGROUND

[0002] With the development of rural construction, rural house wall quality detection has become an important safety monitoring requirement. Fine cracks and other defects often appear on the surface of rural house walls. These defects have low contrast in low light or shadow environments and need to be identified and evaluated using effective technical means. Existing detection methods need to accurately capture fine features on the surface of the wall under complex lighting conditions and perform quantitative analysis of cracks.

[0003] One of the existing solutions for this requirement uses a crack detection technology based on ordinary image processing. This solution uses a high-definition camera to capture wall surface images, uses image enhancement algorithms to improve contrast, uses edge detection operators to identify potential crack areas, and finally calculates the basic geometric parameters of the cracks based on pixel statistics.

[0004] This solution has certain limitations in practical applications. Conventional image enhancement methods have limited enhancement effect on fine cracks in low light environments, edge detection algorithms are prone to misjudgment due to wall texture interference, morphological processing has unstable connection effect on irregular cracks, and the overall solution has weak adaptability to changes in lighting conditions, affecting the accuracy and reliability of the detection results. SUMMARY

[0005] The present application provides a rural house wall defect detection method, system and device based on visual detection to solve the problems of low accuracy and poor integrity of rural house wall crack detection in the prior art.

[0006] To solve the above technical problems, in a first aspect, the present application provides a rural house wall defect detection method based on visual detection, comprising:

[0007] Obtaining dark field scattering image data generated on the surface of a rural house wall;

[0008] Performing visual enhancement processing on the dark field scattering image data to obtain enhanced dark field scattering image data, performing multi-scale difference processing on the enhanced dark field scattering image data, and determining a suspected crack area according to the difference processing result;

[0009] Inputting image data corresponding to the suspected crack area into a pre-trained U-Net network, fusing image features of different levels in the U-Net network using a skip connection mechanism in the U-Net network, and outputting a crack binary mask;

[0010] performing morphological post-processing on the crack binary mask, and generating a set of crack morphological parameters based on the processed crack binary mask by using a skeleton extraction algorithm;

[0011] generating a rural house wall defect evaluation report according to the set of crack morphological parameters.

[0012] Optionally, the image data corresponding to the suspected crack area is input into a pre-trained U-Net network, and image features at different levels are fused by using a skip connection mechanism in the U-Net network to output a crack binary mask, including:

[0013] The image data corresponding to the suspected crack area is input into a U-Net network, and the image data is subjected to multiple downsampling operations by an encoder path of the U-Net network to obtain downsampled image features at different levels;

[0014] The downsampled image features are subjected to multiple upsampling operations by a decoder path of the U-Net network to obtain corresponding upsampled feature maps, and the downsampled image features and the corresponding upsampled feature maps are fused by the skip connection mechanism to obtain a final feature map;

[0015] The final feature map is subjected to convolution processing by an output layer of the U-Net network to generate a probability map of the suspected crack area;

[0016] The probability map is subjected to binarization processing to generate a crack binary mask.

[0017] Optionally, the downsampled image features are subjected to multiple upsampling operations by a decoder path of the U-Net network to obtain corresponding upsampled feature maps, and the downsampled image features and the corresponding upsampled feature maps are fused by the skip connection mechanism to obtain a final feature map, including:

[0018] The downsampled image features are subjected to a first upsampling operation by the decoder path to obtain a first-level upsampled feature map;

[0019] The first-level upsampled feature map and the downsampled image features at the corresponding level in the encoder path are fused by the skip connection mechanism, and the fusion result is taken as a new round of downsampled image;

[0020] The upsampling operation and the feature fusion operation are repeatedly performed until the resolution of the image data corresponding to the suspected crack area is restored to obtain the final feature map.

[0021] Optionally, the final feature map is subjected to convolution processing to generate a probability map of the suspected crack area, including:

[0022] perform channel dimension reduction processing on the final feature map using a convolution kernel;

[0023] perform nonlinear activation function processing on the reduced dimension feature map;

[0024] perform spatial context optimization on the activated feature map using a conditional random field model;

[0025] process the optimized feature map through a pixel-level classification operation to calculate a probability value for each pixel belonging to a crack category;

[0026] generate a probability map of the suspected crack area based on the probability value.

[0027] Optionally, the visual enhancement processing of the dark-field scattering image data to obtain enhanced dark-field scattering image data, the multi-scale difference processing of the enhanced dark-field scattering image data, and the determination of the suspected crack area according to the difference processing result, comprise:

[0028] When the passing direction of the polarization filter is perpendicular to the polarization direction of the specularly reflected light on the surface of the rural house wall, filter the light signal component in the dark-field scattering image data consistent with the polarization direction of the specularly reflected light, and retain the diffusely scattered light signal component orthogonal to the polarization direction of the specularly reflected light;

[0029] perform gain adjustment processing on the diffusely scattered light signal component to obtain enhanced dark-field scattering image data;

[0030] construct a plurality of background templates of different scales, and perform difference processing on each background template and the enhanced dark-field scattering image data;

[0031] weight and fuse all difference processing results to obtain a fused difference image, and adjust the fused difference image using an adaptive brightness compensation method;

[0032] According to the distribution characteristics of the pixel gray value in the adjusted difference image, extract a continuous region greater than a preset gray threshold from the adjusted difference image as a suspected crack area.

[0033] Optionally, the generating of the set of crack morphological parameters using a skeleton extraction algorithm based on the processed crack binary mask, comprises:

[0034] using a skeleton extraction algorithm, performing skeleton extraction on the processed crack binary mask to obtain a single-pixel-wide crack skeleton line;

[0035] performing a pixel point tracking operation on the crack skeleton line, and based on the tracking result, calculating a crack total length and a branch length to form a crack length parameter;

[0036] The crack width values are measured in the normal direction of each point of the crack skeleton line, and the crack average width and the maximum width are calculated according to the crack width values of all points to form a crack width parameter;

[0037] The number of branches and the curvature characteristics of each branch of the crack skeleton line are counted;

[0038] The crack length parameter, the crack width parameter, the number of branches and the curvature characteristics of each branch are integrated to generate a crack morphology parameter set.

[0039] Optionally, the generating of the rural house wall defect evaluation report according to the crack morphology parameter set comprises:

[0040] The crack length parameter and the crack width parameter in the crack morphology parameter set are compared and analyzed with preset safety thresholds respectively, and the danger level of each crack is determined according to the comparison and analysis results;

[0041] The number of branches and the curvature characteristics of each branch in the crack morphology parameter set are analyzed to generate a crack distribution feature map;

[0042] The crack distribution feature map and the danger level of each crack are combined to generate a rural house wall defect evaluation report.

[0043] In a second aspect, the present application provides a rural house wall defect detection system based on visual detection, comprising:

[0044] An acquisition module is configured to acquire dark-field scattering image data generated on the surface of a rural house wall;

[0045] An enhancement module is configured to perform visual enhancement processing on the dark-field scattering image data to obtain enhanced dark-field scattering image data, perform multi-scale difference processing on the enhanced dark-field scattering image data, and determine a suspected crack region according to the difference processing result;

[0046] An input module is configured to input image data corresponding to the suspected crack region to a pre-trained U-Net network, fuse image features of different levels by using a skip connection mechanism in the U-Net network, and output a crack binary mask;

[0047] A first generation module is configured to perform morphological post-processing on the crack binary mask, and generate a crack morphology parameter set by using a skeleton extraction algorithm based on the processed crack binary mask;

[0048] A second generation module is configured to generate a rural house wall defect evaluation report according to the crack morphology parameter set.

[0049] In a third aspect, the present application provides an electronic device comprising:

[0050] a memory for storing a computer program;

[0051] a processor for implementing the steps of the visual detection-based wall defect detection method for rural houses according to the first aspect when executing the computer program.

[0052] In a fourth aspect, the present application provides a computer-readable storage medium having a computer program stored therein, the computer program being capable of implementing the steps of the visual detection-based wall defect detection method for rural houses according to the first aspect when executed by a processor.

[0053] In the present application, a visual detection-based wall defect detection method, system and device for rural houses are provided, which comprises the following steps: acquiring dark-field scattering image data generated on the surface of a wall of a rural house; performing visual enhancement processing on the dark-field scattering image data to obtain enhanced dark-field scattering image data, performing multi-scale difference processing on the enhanced dark-field scattering image data, and determining a suspected crack region according to the difference processing result; inputting image data corresponding to the suspected crack region into a pre-trained U-Net network, fusing image features of different levels by using a skip connection mechanism in the U-Net network, and outputting a crack binary mask; performing morphological post-processing on the crack binary mask, and generating a set of crack morphological parameters by using a skeleton extraction algorithm based on the processed crack binary mask; and generating a wall defect evaluation report for the rural house according to the set of crack morphological parameters.

[0054] The technical solution provided by the present application has the following beneficial effects:

[0055] The present application effectively highlights the contrast between the wall surface cracks and the background by acquiring dark-field scattering image data, especially under low light conditions, the optical characteristics of fine cracks can be clearly captured. By performing visual enhancement and multi-scale difference processing on the image data, the signal-to-noise ratio of the crack region is improved, the interference of the wall surface texture and shadow is effectively suppressed, and the suspected crack region is accurately locked. By using the skip connection mechanism of the U-Net network, multi-scale features are deeply fused, ensuring the complete preservation of crack edge details and improving the accuracy of crack segmentation. By morphological post-processing and skeleton extraction, the broken crack segments are effectively connected, and the geometric morphological parameters of the cracks are accurately extracted, providing reliable data support for quantitative evaluation. By generating a defect evaluation report, the standardized output of the detection result is realized, and an intuitive and reliable basis for the safety evaluation of rural houses is provided.

[0056] Further, the application also combines the ways of multi-scale feature extraction by down-sampling and resolution recovery by up-sampling through the encoder-decoder structure of the U-Net network, and fuses the feature information of different levels by the skip connection mechanism, and finally outputs the accurate crack segmentation result through the probability map generation and binarization processing.

[0057] And the scheme realizes multi-scale perception and detail preservation of crack features, effectively improves the accuracy and integrity of crack segmentation, especially in handling irregular cracks and fine cracks, and provides high-quality binary mask data for subsequent quantitative analysis. BRIEF DESCRIPTION OF DRAWINGS

[0058] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings needed to be used in the embodiments or prior art description. Obviously, the drawings in the following description are some embodiments of the present application, and for those skilled in the art, other drawings can also be obtained without creative labor.

[0059] Figure 1 The flow chart of the agricultural house wall defect detection method based on visual detection provided by the embodiment of the present application;

[0060] Figure 2 The specific implementation schematic diagram of the agricultural house wall defect detection method based on visual detection provided by the embodiment of the present application;

[0061] Figure 3 The effect schematic diagram of the agricultural house wall defect detection method based on visual detection provided by the embodiment of the present application for detecting suspected crack area;

[0062] Figure 4 The calibration effect schematic diagram of the agricultural house wall defect detection method based on visual detection provided by the embodiment of the present application for detecting suspected crack area;

[0063] Figure 5 The structural schematic diagram of the agricultural house wall defect detection system based on visual detection provided by the embodiment of the present application. DETAILED DESCRIPTION

[0064] In order to make the person skilled in the art better understand the present application, the present application will be further described in detail below in combination with the drawings and specific embodiments. Obviously, the described embodiments are only some of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.

[0065] In the field of visual detection of rural house wall defects, the existing scheme based on conventional image processing has obvious limitations. Such scheme relies on ordinary optical imaging and traditional image enhancement algorithm, and has limited enhancement effect on fine cracks in low light or shadow interference environment, and it is difficult to effectively distinguish cracks from wall texture features. The edge detection process is easy to be misjudged by environmental interference, the continuity of irregular cracks is insufficient by morphological processing method, and the adaptability of the overall scheme to changes in light conditions is weak, which affects the accuracy and stability of the detection results.

[0066] To solve the above problems, the present application provides a rural house wall defect detection method based on visual detection. The method first obtains the dark field scattering image of the wall surface through optical imaging at a specific angle, and enhances the scattering signal of the crack area by using polarization filtering technology; then adopts multi-scale difference processing to eliminate background interference and accurately locate the suspected crack area; further realizes multi-level feature fusion through the encoder-decoder structure of the U-Net network, and maintains the integrity of crack details by using the jump connection mechanism; finally, the accurate crack parameters are obtained through morphological processing and skeleton extraction. The present application overcomes the detection limitations of traditional methods in low light environment through the synergistic effect of optical imaging optimization and deep learning processing, improves the accuracy and reliability of crack detection, and provides reliable technical support for rural house safety evaluation.

[0067] Embodiment one

[0068] The core of the present application is to provide a rural house wall defect detection method based on visual detection, and a flowchart of one specific embodiment is as shown in Figure 1 The method comprises:

[0069] Step 101: obtaining dark field scattering image data generated on the surface of rural house wall.

[0070] In step 101, the surface of rural house wall refers to the wall area of rural house. The data is obtained by low-angle illumination, so that the reflected light of the flat area of the wall cannot enter the sensor, while the defect area such as crack will produce scattering light signal. The dark field scattering image data refers to the image obtained by special illumination, which mainly contains the light signal scattered by the microstructure of the object surface.

[0071] In the embodiment of the present application, the illumination light source is inclined to irradiate the surface of rural house wall at a very small angle, so that the specular reflection light generated by the flat area of the wall cannot enter the receiving range of the image sensor, while the irregular defects such as cracks on the wall surface will scatter the incident light, and part of the scattered light can be received by the image sensor, thereby forming an image data with dark field as background and crack scattering light as bright feature. This imaging method can effectively enhance the contrast between cracks and background.

[0072] For example, in a certain farmhouse wall detection site, the illumination light source is inclined to irradiate the wall surface at an angle of 5 degrees, the CMOS image sensor is used to collect the scattered light signal of the wall surface, and the dark field scattering image data of 512*512 pixels is obtained. The flat area of the wall in the image presents a dark background, and the fine crack area shows bright features due to the scattering effect. The image data provides a high-quality input source for subsequent processing.

[0073] Step 102: performing visual enhancement processing on the dark field scattering image data to obtain enhanced dark field scattering image data, performing multi-scale difference processing on the enhanced dark field scattering image data, and determining a suspected crack area according to the difference processing result.

[0074] In step 102, the visual enhancement processing refers to the process of optimizing the image to improve the visual quality. The enhanced dark field scattering image data refers to the processed image data. The multi-scale difference processing refers to the process of difference calculation in multiple scales. The difference processing result refers to the result of difference calculation in different scales. The suspected crack area refers to the image area that may contain cracks.

[0075] In the embodiment of the present application, first, the polarization filter processing is used to enhance the visual quality of the dark field scattering image data. By adjusting the polarization filter angle to be orthogonal to the polarization direction of the reflected light of the wall surface, the specular reflection light component is suppressed, and the diffuse scattering light signal of the crack area is enhanced. Then, the enhanced image is subjected to multi-scale background difference processing. A plurality of background templates of different scales are constructed, and difference operation is performed on the enhanced image respectively. The difference results of each scale are weighted and fused, and then the adaptive brightness compensation method is used to adjust the fusion result. Finally, a dynamic threshold is set according to the pixel gray value distribution characteristics, and the continuous area exceeding the threshold is extracted as the suspected crack area. See Figure 3 and Figure 4 , Figure 3 The effect diagram of the detection method of the embodiment of the present application for detecting the suspected crack area is shown in FIG. 4. Figure 4 The calibration effect diagram of the detection method of the embodiment of the present application for detecting the suspected crack area is shown in FIG. 5. The main calibration is the crack branching position. The processing operation for the crack branching is specifically shown in step 604.

[0076] For example, the dark field scattering image data obtained in step 101 is subjected to polarization filtering processing, the filter rotation angle is adjusted to be 90 degrees different from the polarization direction of the wall surface reflected light, the mirror reflected light is filtered, the diffuse scattering light signal is retained, and an enhanced image is obtained; then, a background template of 3x3, 5x5 and 7x7 scales is respectively subjected to difference operation with the enhanced image, the weights are set to be 0.5, 0.3 and 0.2 respectively, and the fusion formula is R=0.5xD3+0.3xD5+0.2xD7, wherein R is the fusion result, and D3, D5 and D7 are difference results of the three scales respectively; after adaptive brightness compensation is performed on the fusion result, a gray threshold of 125 is set, and all continuous regions with a gray value greater than 125 are extracted as suspected crack regions.

[0077] Step 103: input the image data corresponding to the suspected crack region into a pre-trained U-Net network, fuse image features of different levels in the U-Net network by using a skip connection mechanism in the U-Net network, and output a crack binary mask.

[0078] In step 103, the Convolutional Neural Network Encoder-Decoder Architecture (U-Net) network is a convolutional neural network with an encoder-decoder structure. The skip connection mechanism refers to a structure for connecting features of the same scale in the encoder and the decoder. The image features of different levels refer to features extracted by the network at different depths. The crack binary mask refers to a binary image indicating the position of the crack.

[0079] In the embodiment of the application, the suspected crack region image data is input into the U-Net network, multi-level features are extracted by performing multiple downsampling operations through the encoder path, the spatial resolution is gradually restored by performing upsampling operations through the decoder path, the features of the same scale in the encoder path are fused with the decoder features in each upsampling process through the skip connection mechanism, and finally the fused features are subjected to convolution processing by the network output layer to generate a probability map, and the probability map is subjected to binary processing to generate a crack binary mask.

[0080] For example, the suspected crack region image obtained in step 102 is input into the pre-trained U-Net network, the encoder performs 4 times of downsampling to obtain a feature map of 16x16x512, the decoder performs 4 times of upsampling and fuses the features of the corresponding scale with the encoder each time, and finally outputs a probability map of 512x512, sets a binary threshold of 0.5, and generates a crack binary mask, wherein the value of the crack region is 1 and the value of the background region is 0.

[0081] Step 104: morphological post-processing is performed on the crack binary mask, and a skeleton extraction algorithm is used to generate a set of crack morphological parameters based on the processed crack binary mask.

[0082] In step 104, morphological post-processing refers to a method of image processing based on mathematical morphology. The processed crack binary mask refers to a binary image after morphological operation. The skeleton extraction algorithm refers to an algorithm for extracting the skeleton structure of an object. The set of crack morphological parameters includes crack geometric feature parameters.

[0083] In an embodiment of the present application, first, a circular structural element is used to perform a closing operation on the binary mask to connect the broken crack fragments, and a complete crack binary mask is obtained; then a thinning algorithm is used to extract a single-pixel-wide crack skeleton line; the crack length is calculated along the skeleton line; the crack width is measured in the normal direction of each point on the skeleton line; the number of branches and the curvature feature are counted; finally, all parameters are integrated to form a set of crack morphological parameters.

[0084] For example, the crack binary mask obtained in step 103 is subjected to a closing operation using a circular structural element with a radius of 3 to connect the broken cracks; a single-pixel-wide skeleton line is obtained using a thinning algorithm; the total length is calculated along the skeleton line wherein represents the total length of the crack, is the difference between adjacent pixel coordinates; the width is measured in the normal direction of each point on the skeleton line, the average width is 1.2 mm, and the maximum width is 3.5 mm; there are 3 branches, and the curvatures are 0.12, 0.08, and 0.15 respectively; a set of morphological parameters containing these parameters is formed.

[0085] Step 105: generating a rural house wall defect evaluation report according to the set of crack morphological parameters.

[0086] In step 105, the rural house wall defect evaluation report refers to a structured document containing the detection results.

[0087] In an embodiment of the present application, based on the set of crack morphological parameters, the crack parameters are compared and analyzed with the safety threshold to determine the risk level, a crack distribution feature map is generated, all information is combined to generate a structured report document containing crack location, size, risk level, etc., and finally a complete evaluation report is output.

[0088] For example, according to the morphological parameters obtained in step 104, the length of 235.6 mm is compared with the threshold value of 200 mm, the maximum width of 3.5 mm is compared with the threshold value of 2.0 mm, and a weighted formula is used:

[0089] ;

[0090] The risk level is determined as level 2, a crack distribution map is generated, and finally an evaluation report containing crack parameters, risk levels, distribution maps, and maintenance suggestions is generated.

[0091] The method effectively improves the contrast between cracks and backgrounds through dark-field scattering imaging, accurately identifies suspected crack regions through visual enhancement and multi-scale processing, realizes accurate crack segmentation through a U-Net network, obtains accurate crack parameters through morphological processing, and finally generates a complete defect evaluation report, thereby improving the accuracy and reliability of the detection of wall cracks of rural houses.

[0092] To solve the problems of complex background interference and difficulty in accurately segmenting fine cracks in the detection of wall cracks of rural houses, in some embodiments, step 103: the image data corresponding to the suspected crack region is input into a pre-trained U-Net network, and the image features of different levels are fused through the skip connection mechanism in the U-Net network to output a crack binary mask, as shown in FIG. 3, which includes: Figure 2

[0093] Step 201: input the image data corresponding to the suspected crack region into the U-Net network, and perform multiple down-sampling operations on the image data through the encoder path of the U-Net network to obtain down-sampled image features of different levels.

[0094] In step 201, the down-sampled image features refer to feature maps obtained by gradually reducing the spatial resolution of the image and increasing the number of feature channels through convolution and pooling operations, and different levels represent the degree of feature abstraction at different depths of the network.

[0095] In the embodiments of the present application, the image data of the suspected crack region is input into the encoder path of the U-Net network, and the image size is gradually reduced by repeatedly performing convolution and pooling operations. Each level of down-sampling operation will halve the size of the feature map and double the number of channels, thereby obtaining multi-scale feature representations from details to semantics.

[0096] Step 202: perform multiple up-sampling operations on the down-sampled image features through the decoder path of the U-Net network to obtain corresponding up-sampled feature maps, and fuse the down-sampled image features and the corresponding up-sampled feature maps through the skip connection mechanism to obtain a final feature map.

[0097] ​In step 202, the up-sampled feature map refers to a feature map that gradually restores the image spatial resolution through operations such as transposed convolution, and the feature fusion refers to an operation of splicing or adding the features of the encoder path with the features of the corresponding scale of the decoder path. The final feature map refers to a feature map obtained after multiple up-sampling and jump connection fusion operations of the U-Net network decoder path, which has the same spatial resolution as the input image and also fuses the multi-level feature information of the encoder path, containing both the detailed features extracted by the shallow network and the semantic features extracted by the deep network, providing a feature representation with both details and global semantic information for subsequent probability map generation.

[0098] In the embodiment of the present application, the deepest layer feature is up-sampled by the decoder path of the U-Net network, the feature map size is doubled and the channel number is reduced, then the feature map of the same scale in the encoder path is spliced and fused with the up-sampled feature map through the jump connection mechanism, and the process is repeated until the original image size is restored, and the final feature map containing rich details and semantic information is obtained.

[0099] Step 203: performing convolution processing on the final feature map through the output layer of the U-Net network to generate a probability map of the suspected crack region.

[0100] In step 203, the probability map refers to a graph composed of probability values of each pixel belonging to the crack category, with a value range of 0 to 1.

[0101] In the embodiment of the present application, the final feature map is subjected to 1x1 convolution operation through the output layer of the U-Net network, the channel number is reduced to 1, then the feature value of each pixel is mapped to the range of 0-1 through the Sigmoid activation function, and a probability map with the same size as the input image is generated, wherein each pixel value represents the probability of the position belonging to the crack region.

[0102] Step 204: performing binaryzation processing on the probability map to generate a crack binary mask.

[0103] In step 204, the binaryzation processing refers to the process of converting the probability map into a mask image with only two values.

[0104] In the embodiment of the present application, a threshold is set for the probability map, pixels with a probability value greater than or equal to the threshold are determined as crack pixels and set to 1, and pixels with a probability value less than the threshold are determined as background pixels and set to 0, to generate a final binary mask image.

[0105] The following is a specific example:

[0106] In a detection site of a rural house wall, the 512x512 pixel suspected crack region image data obtained in step 102 is input into the pre-trained U-Net network, the encoder path of the network performs 4 times of downsampling operation on the input image, the first downsampling operation converts the 512x512 image into a 256x256 feature map through convolution and pooling operation and increases the channel number to 64, the second downsampling operation obtains a 128x128 feature map and increases the channel number to 128, the third downsampling operation obtains a 64x64 feature map and increases the channel number to 256, and the fourth downsampling operation obtains a 16x16x512 feature map, so that the downsampled image features at different levels are obtained;

[0107] Then, the upsampling operation is performed through the decoder path, the first upsampling operation converts the 16x16x512 feature map into a 32x32x256 feature map and fuses the 64x64x256 feature map obtained through the third time of downsampling of the encoder after being cropped through the jump connection mechanism, the fusion mode is channel dimension splicing, a 32x32x512 feature map is obtained, the second upsampling operation converts the 32x32x512 feature map into a 64x64x128 feature map and fuses the 128x128x128 feature map obtained through the second time of downsampling of the encoder after being cropped, a 64x64x256 feature map is obtained, the third upsampling operation converts the 64x64x256 feature map into a 128x128x64 feature map and fuses the 256x256x64 feature map obtained through the first time of downsampling of the encoder after being cropped, a 128x128x128 feature map is obtained. The fourth upsampling operation converts the 128x128x128 feature map into a 512x512x1 feature map as the final feature map; then the final feature map is convoluted through the output layer using a 1x1 convolution kernel to generate a probability map of the suspected crack region, wherein each pixel value represents the probability that the position belongs to a crack;

[0108] Finally, the probability map is binarized, the threshold is set to 0.5, the pixels with a probability value greater than or equal to 0.5 are set to 1 to represent the crack region, and the pixels with a probability value less than 0.5 are set to 0 to represent the background region, and a 512x512 crack binary mask is generated, which accurately identifies the accurate position and shape of the wall surface crack.

[0109] In the embodiment of the present application, the scheme effectively maintains the crack detail information through multi-scale feature extraction and cross-level feature fusion, improves the segmentation accuracy of fine cracks, and enhances the anti-interference ability of the algorithm to complex background, thereby providing accurate and reliable binary mask data for subsequent quantitative analysis.

[0110] To solve the problem that feature information may lose details in the decoding process in the U-Net network, in some embodiments, step 202: the decoder path of the U-Net network is used to perform multiple upsampling operations on the down-sampled image features, obtain corresponding up-sampled feature maps, and perform feature fusion on the down-sampled image features and the corresponding up-sampled feature maps through the skip connection mechanism to obtain a final feature map, including:

[0111] Step 301: performing a first upsampling operation on the down-sampled image features through the decoder path to obtain a first-level up-sampled feature map.

[0112] In step 301, the first-level up-sampled feature map refers to a feature map obtained by performing a first upsampling operation on the deepest features output by the encoder path, and the spatial resolution of the feature map is doubled compared to the input features.

[0113] In the embodiments of the present application, the smallest down-sampled image features output by the encoder path are up-sampled through the transpose convolution operation to expand the feature map size by two times while reducing the number of channels, and a first-level up-sampled feature map is obtained.

[0114] Step 302: performing feature fusion on the first-level up-sampled feature map and the down-sampled image features of the corresponding level in the encoder path through the skip connection mechanism, and taking the fusion result as a new round of down-sampled image.

[0115] In step 302, feature fusion refers to the operation of splicing or adding the up-sampled feature map and the down-sampled image features of the same scale in the encoder path, and the new round of down-sampled image refers to the feature map after fusion as the input for the next stage of processing.

[0116] In the embodiments of the present application, the first-level up-sampled feature map and the down-sampled image features of the corresponding level in the encoder path are spliced in the channel dimension through the skip connection mechanism, so that the semantic information contained in the up-sampled feature is combined with the detail information retained in the down-sampled feature, and then the fused feature map is taken as the input for the next round of processing.

[0117] Step 303: repeating the upsampling operation and the feature fusion operation until the resolution of the image data corresponding to the suspected crack area is restored, and obtaining a final feature map.

[0118] In the embodiments of the present application, the upsampling and feature fusion operations are repeated, the feature map size is doubled each time, and the corresponding down-sampled features in the encoder path are fused, so that the spatial resolution of the feature map is gradually restored until the final feature map with the same size as the image data of the suspected crack area is obtained.

[0119] The following is a specific example:

[0120] In a certain rural house wall defect detection scene, for the 512x512 pixel suspected crack area image data obtained in step 102, the U-Net network decoder path is used to finely reconstruct the rural house wall crack features.

[0121] First, the 16x16x512 rural house wall deep features output by the encoder are first upsampled to obtain a 32x32x256 feature map, which contains the primary abstract features of the wall cracks; then the first-level upsampled feature map is spliced and fused with the rural house wall feature map obtained by the third time down-sampling of the encoder, wherein the encoder feature map is pre-processed to be 32x32x256 in size to ensure spatial alignment, and the fused 32x32x512 feature map retains the details and textures of the wall cracks and contains high-level semantic information.

[0122] The process is repeated, and after the second up-sampling, the rural house wall features obtained by the second down-sampling of the encoder are fused to obtain a 64x64x256 feature map, and after the third up-sampling, the rural house wall features obtained by the first down-sampling of the encoder are fused to obtain a 128x128x128 feature map; finally, the feature map is restored to 512x512x1 resolution by the fourth up-sampling to obtain the final feature map.

[0123] In the above entire process, the skip connection mechanism ensures that the edge details and morphological features of the rural house wall cracks are completely preserved in the multiple up-sampling processes, especially for the common fine cracks and irregular crack morphologies of rural house walls, the feature fusion operation effectively enhances the expression ability of the crack features. The final feature map accurately reflects the distribution characteristics and morphological details of the surface cracks of the rural house wall, providing an important basis for subsequent crack accurate segmentation. The processing process is specially designed for the rural house wall defect detection scene, fully considering the surface characteristics and crack features of the rural house wall, ensuring the accuracy and reliability of the detection results.

[0124] In the embodiment of the present application, the scheme effectively maintains the integrity of the crack edge and detail information through a multi-level feature fusion mechanism, enhances the feature expression ability of the network for fine cracks, and provides high-quality feature representation for subsequent accurate segmentation.

[0125] In order to solve the problem of detail preservation and spatial consistency optimization in the process of generating the rural house wall crack probability map, in some embodiments, step 203: performing convolution processing on the final feature map to generate a probability map of the suspected crack area, comprising:

[0126] Step 401: performing channel dimension reduction processing on the final feature map using a convolution kernel.

[0127] In step 401, the channel dimension reduction processing refers to a process of reducing the number of feature map channels through convolution operation, and the purpose is to compress multi-channel features into single-channel output.

[0128] In the embodiment of the application, a one-by-one convolution kernel is used to perform convolution operation on the final feature map, so that the number of feature map channels is reduced to a preset value, the dimension reduction processing of feature channels is realized, and the spatial resolution of the feature map is kept unchanged.

[0129] Step 402: performing nonlinear activation function processing on the reduced dimension feature map.

[0130] In step 402, the nonlinear activation function processing refers to a process of mapping feature values to a specific numerical range through a mathematical function, which is used to introduce nonlinear transformation capability.

[0131] In the embodiment of the application, the Sigmoid activation function is applied to process the reduced dimension feature map, and each feature value is mapped to between zero and one, so that the output value has a probability significance.

[0132] Step 403: using a conditional random field model to optimize the spatial context of the activated feature map.

[0133] In step 403, the conditional random field model is a probabilistic graph model considering spatial context relationship, which is used to optimize the correlation between pixels. The spatial context optimization refers to a process of adjusting the current pixel value by using the surrounding pixel information.

[0134] In the embodiment of the application, the conditional random field model is used to process the activated feature map, the spatial consistency of the feature value is optimized by considering the relationship between each pixel and its neighborhood pixels, and the interference of isolated noise points is reduced.

[0135] Step 404: processing the optimized feature map through pixel-level classification operation to calculate the probability value of each pixel belonging to the crack category.

[0136] In step 404, the pixel-level classification operation refers to a process of independently classifying and judging each pixel, and the probability value represents the confidence degree of the pixel belonging to a specific category.

[0137] In the embodiment of the application, the pixel-level classification processing is performed on the optimized feature map, and each pixel feature value is directly converted into the probability value of the pixel belonging to the crack category, and the feature value closer to one indicates a greater probability of belonging to the crack.

[0138] Step 405: generating a probability map of the suspected crack area based on the probability value.

[0139] In this embodiment of the invention, a probability map with the same size as the input image is generated based on the probability values ​​of all pixels, wherein the gray value of each pixel is proportional to its probability value of belonging to the crack region.

[0140] Here is a specific example:

[0141] At a site for detecting defects in the walls of a farmhouse, based on the obtained 512×512×1 final feature map, which contains deep feature information of surface cracks in the farmhouse walls.

[0142] First, a 1×1 convolutional kernel is used to reduce the dimensionality of the final feature map by channel dimension. Since the input is already a single-channel feature map, the size remains unchanged at 512×512×1. This step ensures the integrity of the features of cracks in the farmhouse walls. Next, a non-linear activation function is applied to the dimensionality-reduced feature map. The Sigmoid function is used to map each feature value to a value between 0 and 1. The expression for the Sigmoid function is: ,in This represents the probability value output by the Sigmoid function. The input feature values ​​are dimensionless, and this process converts the features of cracks in the walls of farmhouses into probability values.

[0143] Then, a conditional random field model is used to optimize the spatial context of the activated feature map. This model uses an energy function. To optimize pixel relationships, among which This represents the total energy of the conditional random field. Indicates the first The energy of a single pixel is dimensionless. Indicates the first and the The interaction energy between adjacent pixels is dimensionless; by minimizing the total energy... This will enhance the spatial continuity of cracked areas in the walls of farmhouses and reduce interference from isolated noise points.

[0144] Then, the optimized feature map is processed by a pixel-level classification operation, and each pixel's optimized feature value is directly taken as a probability value of the pixel belonging to the rural house wall crack category. Finally, a 512x512 probability map of the suspected crack region is generated based on the probability values of all pixels, wherein the closer the probability value is to 1, the greater the possibility that the position belongs to the rural house wall crack, and the closer the probability value is to 0, the greater the possibility that the position belongs to the wall background region. The entire processing process is specially designed for the rural house wall defect features, fully considers the surface characteristics and crack shape features of the rural house wall, and ensures that the probability map accurately reflects the real distribution of the rural house wall surface cracks, thereby providing a reliable basis for subsequent binarization processing. The finally obtained probability map clearly shows the distribution probability of the fine cracks on the surface of the rural house wall, wherein the probability value of the main crack region is greater than 0.9, and the probability value of the background region is less than 0.1, thereby effectively distinguishing the cracks from the wall texture features.

[0145] In the embodiments of the present application, the scheme realizes the conversion from features to probability values through channel dimension reduction and nonlinear activation, and the spatial context optimization enhances the spatial consistency of the probability map, thereby improving the accuracy and reliability of the rural house wall crack probability map and providing a high-quality probability basis for subsequent binarization processing.

[0146] In order to solve the problem that the rural house wall cracks are difficult to accurately identify under complex lighting conditions, in some embodiments, step 102: performing visual enhancement processing on the dark-field scattering image data to obtain enhanced dark-field scattering image data, performing multi-scale difference processing on the enhanced dark-field scattering image data, and determining a suspected crack region according to the difference processing result, including:

[0147] Step 501: When the passing direction of the polarization filter is perpendicular to the polarization direction of the specular reflection light on the surface of the rural house wall, filter the light signal component consistent with the polarization direction of the specular reflection light in the dark-field scattering image data, and retain the diffuse scattering light signal component orthogonal to the polarization direction of the specular reflection light.

[0148] In step 501, the passing direction of the polarization filter refers to a specific direction in which polarized light can pass through the filter, the polarization direction of the specular reflection light refers to the main polarization direction of the reflected light on the surface of the rural house wall, and the diffuse scattering light signal component refers to the non-polarized light signal scattered from the crack region.

[0149] In the embodiments of the present application, the passing direction of the polarization filter is kept perpendicular to the polarization direction of the specular reflection light on the surface of the rural house wall by rotating the polarization filter, so as to filter out the light signal component consistent with the polarization direction of the specular reflection light in the image data, and retain the diffuse scattering light signal component orthogonal to the polarization direction of the specular reflection light.

[0150] Step 502: gain adjustment processing is performed on the diffuse scattering light signal component to obtain enhanced dark-field scattering image data.

[0151] In step 502, the gain adjustment processing refers to the process of amplifying the light signal intensity.

[0152] In the embodiment of the present application, the signal intensity amplification processing is performed on the retained diffuse scattering light signal component, the signal intensity of the crack region is enhanced by increasing the gain value, and the enhanced dark-field scattering image data with higher contrast is obtained.

[0153] Step 503: a plurality of background templates of different scales are constructed, and each background template is differentially processed with the enhanced dark-field scattering image data.

[0154] In step 503, the background template refers to a reference template for representing the image background region, the multi-scale refers to the templates of different sizes, and the differential processing refers to the process of calculating the difference between the image and the template.

[0155] In the embodiment of the present application, a plurality of background templates of different sizes are constructed, and each background template is differentially calculated with the enhanced dark-field scattering image data to obtain differential results of multiple scales.

[0156] Step 504: all differential processing results are weighted and fused to obtain a fused differential image, and an adaptive brightness compensation method is used to adjust the fused differential image.

[0157] In step 504, the weighted fusion refers to the process of combining the differential results of different scales according to the weights, the fused differential image refers to the result image after combination, and the adaptive brightness compensation refers to the method of adjusting the brightness according to the local brightness characteristics of the image.

[0158] In the embodiment of the present application, the differential results of multiple scales are weighted and summed according to the preset weights to obtain the fused differential image, and then the adaptive brightness compensation method is used to adjust the brightness of the fused image according to the brightness distribution characteristics of the local region of the image.

[0159] Step 505: according to the distribution characteristics of the pixel gray value in the adjusted differential image, a continuous region greater than a preset gray threshold value is extracted from the adjusted differential image as a suspected crack region.

[0160] In step 505, the gray threshold value refers to the gray value limit for distinguishing cracks from backgrounds, and the continuous region refers to the pixel region whose gray value exceeds the threshold value and is connected to each other.

[0161] In the embodiment of the present application, according to the statistical distribution characteristics of the pixel gray value in the adjusted difference image, a suitable gray threshold is set, and all continuous regions with a gray value greater than the threshold in the image are extracted as suspected crack regions.

[0162] The following is a specific example:

[0163] In a certain rural house wall detection site, based on the 512x512 pixel dark field scattering image data obtained in step 101, the image is obtained by using a CMOS image sensor to collect the scattering light signal of the rural house wall surface, wherein the flat area of the wall presents a dark background, and the fine crack area shows a bright color feature. First, the visual enhancement processing is carried out, the polarization filter is rotated to the position which is 90 degrees different from the polarization direction of the specular reflection light of the rural house wall surface, the specular reflection light component is filtered out, and the diffuse scattering light signal component of the crack area is reserved, which effectively enhances the contrast between the rural house wall crack and the background. Then the gain adjustment processing is carried out on the diffuse scattering light signal, and the signal intensity is amplified by 1.5 times to obtain the enhanced dark field scattering image data, and the amplification multiple is the best enhancement coefficient of the rural house wall determined through experiment.

[0164] Then 3x3, 5x5 and 7x7 background templates are constructed, and difference processing is carried out with the enhanced image respectively, wherein each template is subjected to pixel-by-pixel gray value difference operation with the image to obtain three scale difference results D3, D5 and D7. All difference processing results are weighted and fused, and the fusion formula R is equal to 0.5xD3 plus 0.3xD5 plus 0.2xD7, wherein R represents the dimensionless fusion result, D3 represents the dimensionless 3x3 scale difference result, D5 represents the dimensionless 5x5 scale difference result, D7 represents the dimensionless 7x7 scale difference result, and the weight coefficients 0.5, 0.3 and 0.2 are the best proportion optimized through a large number of rural house wall image experiments. After obtaining the fused difference image, the self-adaptive brightness compensation method is used to adjust the image, which dynamically adjusts the contrast according to the gray value distribution in each 5x5 local area.

[0165] Finally, according to the distribution characteristics of the pixel gray value in the adjusted difference image, a gray threshold of 125 is set, which is the best value determined by statistically analyzing the gray distribution of 1000 rural house wall images, and all continuous regions with a gray value greater than 125 are extracted from the image as suspected crack regions, which accurately correspond to the real crack positions on the surface of the rural house wall, providing high-quality input data for subsequent processing. The whole processing process fully considers the optical properties and crack characteristics of the rural house wall surface, and ensures that the wall crack area can be accurately identified under complex lighting conditions.

[0166] In the embodiment of the present application, the scheme effectively enhances the contrast of the crack signal through polarization filtering and gain adjustment, eliminates background interference through multi-scale difference processing, and ensures accurate identification of the crack region under different light conditions by combining with adaptive brightness compensation, thereby improving the accuracy and reliability of the detection of the wall crack of the rural house.

[0167] The researchers found that the accurate quantification of the geometric parameters of the wall cracks of the rural house still needs to be improved, and in order to solve the problem of accurate quantification of the geometric parameters of the wall cracks of the rural house, in some embodiments of the present application, step 104: based on the processed crack binary mask, a skeleton extraction algorithm is used to generate a set of crack morphological parameters, including:

[0168] Step 601: using a skeleton extraction algorithm, performing skeleton extraction on the processed crack binary mask to obtain a single-pixel-wide crack skeleton line.

[0169] In step 601, the crack skeleton line refers to a single-pixel-wide line that represents the center line of the crack, and can reflect the overall trend and topological structure of the crack.

[0170] In the embodiment of the present application, a thinning algorithm is used to iteratively process the processed crack binary mask, and gradually remove the boundary pixels until all crack regions become single-pixel-wide, to obtain a complete crack skeleton line.

[0171] Step 602: performing a pixel point tracking operation on the crack skeleton line, and based on the tracking result, calculating the total length and the length of each branch of the crack to form a crack length parameter.

[0172] In step 602, the pixel point tracking operation refers to the process of sequentially accessing each pixel point along the trajectory of the skeleton line, and the crack length parameter contains the total length and the length of each branch.

[0173] In the embodiment of the present application, the pixel point tracking starts from the end point of the crack skeleton line, records the coordinate position of each pixel point, calculates the total length of the crack according to the distance between adjacent pixel points, and calculates the length of each branch when encountering a branch point.

[0174] Step 603: measuring the crack width value in the normal direction of each point of the crack skeleton line, and calculating the average width and the maximum width of the crack according to the crack width values of all points to form a crack width parameter.

[0175] In step 603, the normal direction refers to the direction perpendicular to the tangent of the skeleton line, and the crack width parameter contains the average width and the maximum width information.

[0176] In the embodiment of the present application, the width of the crack is measured by extending to both sides along the normal direction of each pixel point of the crack skeleton line until the background pixel is encountered, and the average width and the maximum width are calculated based on the width values of all the measured points.

[0177] Step 604: Count the number of branches of the crack skeleton line and the curvature features of each branch.

[0178] In step 604, the number of branches refers to the number of bifurcation points in the crack skeleton line, and the curvature feature refers to a parameter describing the degree of bending of the branch. Figure 4 The detection method of the embodiment of the present application is used to detect the calibration effect of the suspected crack area, and the main calibration is the crack bifurcation position.

[0179] In the embodiment of the present application, the number of branch points in the crack skeleton line is counted, and the curvature feature of each branch is calculated. The curvature is obtained by calculating the direction change rate between adjacent points on the branch.

[0180] Step 605: Integrate the crack length parameter, the crack width parameter, the number of branches, and the curvature feature of each branch to generate a set of crack morphological parameters.

[0181] In the embodiment of the present application, the calculated crack length parameter, width parameter, branch number, and branch curvature feature are integrated to form a complete set of crack morphological parameters.

[0182] The following is a specific example: in a certain farmhouse wall detection site, based on the crack binary mask after morphological post-processing obtained in step 103, the mask accurately identifies the crack area on the surface of the farmhouse wall, wherein the crack pixel value is 1 and the background pixel value is 0. First, the processed crack binary mask is thinned by using a skeleton extraction algorithm, and the boundary pixels are removed by multiple iterations to obtain a single-pixel-wide crack skeleton line. This skeleton line accurately reflects the center trend of the crack of the farmhouse wall.

[0183] As can be known from the above scheme, then the pixel point tracking operation is performed on the crack skeleton line, and the coordinate position is recorded pixel by pixel from the end point of the skeleton line. Based on the tracking result, the total length of the crack is calculated by using the formula: The total length of the crack is calculated as 235.6 mm by multiplying the pixel distance by the actual scale factor 0.2 mm per pixel; meanwhile, the length of each branch is calculated to form the complete crack length parameter. Then the crack width value in the original binary mask is measured in the normal direction of each point of the crack skeleton line, and the pixel distance is multiplied by the scale factor 0.2 mm per pixel to obtain the actual width value until the background pixel is encountered. The average width of the crack is calculated as 1.2 mm according to the width values of all the measured points, and the maximum width is calculated as 3.5 mm to form the crack width parameter. The number of branches of the crack skeleton line is counted as 3, and the curvature characteristics of each branch are calculated. The curvature values are obtained by calculating the tangent direction change rate of every 5 pixel points on the branch line, which are 0.12, 0.08 and 0.15 respectively. Finally, the crack length parameter including the total length 235.6 mm and the length of each branch, the crack width parameter including the average width 1.2 mm and the maximum width 3.5 mm, the number of branches 3 and the curvature characteristic values 0.12, 0.08 and 0.15 of each branch are integrated to generate a complete set of crack morphological parameters, which comprehensively describes the geometric characteristics of the wall crack of the rural house and provides an accurate quantitative basis for subsequent safety evaluation. The entire processing process fully considers the characteristics of the wall crack of the rural house, and ensures the accuracy and reliability of the parameter measurement.

[0184] In the embodiments of the present application, the scheme realizes accurate quantification of the morphological characteristics of the wall crack of the rural house through skeleton extraction and geometric parameter calculation, provides a reliable quantitative basis for crack risk assessment and maintenance decision, and improves the scientificity and accuracy of the defect detection of the wall of the rural house.

[0185] In order to solve the problem of quantitative evaluation and report generation of the detection result of the wall crack of the rural house, in some embodiments, step 105: generating a rural house wall defect evaluation report according to the crack morphological parameter set, comprises:

[0186] Step 701: comparing and analyzing the crack length parameter and the crack width parameter in the crack morphological parameter set with the preset safety threshold value respectively, and determining the risk level of each crack according to the comparison and analysis result.

[0187] In step 701, the safety threshold value refers to the crack size limit value set according to the building safety specification, and the risk level refers to the risk level divided according to the comparison result of the crack parameter and the safety threshold value.

[0188] In the embodiments of the present application, the crack length parameter and the crack width parameter are compared with the preset safety threshold value respectively, and the risk level of the crack is determined according to the degree of exceeding the threshold value. The exceeding standard of length and width is evaluated by a weighted calculation method to comprehensively evaluate the final risk level.

[0189] Step 702: crack distribution feature analysis is performed on the branch number and branch curvature characteristics in the crack morphology parameter set to generate a crack distribution feature map.

[0190] In step 702, the crack distribution feature map refers to a schematic diagram showing the spatial distribution of cracks on the wall surface, including branch location and curvature characteristics, etc.

[0191] In the embodiments of the present application, based on the branch number and branch curvature characteristics, combined with the actual position information of the cracks on the wall surface, a distribution map reflecting the crack distribution and morphological characteristics is generated, and different colors and line types are used to distinguish different characteristic branches.

[0192] Step 703: generate a rural house wall defect evaluation report in combination with the crack risk level and the crack distribution feature map.

[0193] In the embodiments of the present application, in combination with the crack risk level evaluation result and the crack distribution feature map, a structured report document is generated, which contains crack parameter details, risk level assessment, distribution diagram, and maintenance suggestions.

[0194] The following is a specific example:

[0195] In a certain rural house wall detection site, based on the crack morphology parameter set obtained in step 104, the set contains crack length parameter 235.6 mm, crack width parameter average width 1.2 mm and maximum width 3.5 mm, branch number 3 and branch curvature characteristic value 0.12, 0.08, 0.15. First, compare and analyze the crack length parameter and the crack width parameter in the crack morphology parameter set with the preset safety threshold value, wherein the crack length 235.6 mm is compared with the safety threshold value 200 mm, which exceeds the threshold value by 35.6 mm, and the maximum crack width 3.5 mm is compared with the safety threshold value 2.0 mm, which exceeds the threshold value by 1.5 mm. According to the comparison and analysis result, the weighted formula is used, and the value is 1 according to the exceeding degree. Substituting into the formula gives

[0196] ;

[0197] After rounding, the risk level is determined to be level 2.

[0198] Then, the branch number 3 and the branch curvature characteristic value 0.12, 0.08, 0.15 in the crack morphology parameter set are analyzed for crack distribution characteristics, combined with the actual position coordinates of the cracks on the wall surface of the rural house, to generate a crack distribution feature map. Different colors are used to distinguish branches with different curvature ranges, wherein branches with a curvature less than 0.1 are marked with green, branches with a curvature between 0.1 and 0.2 are marked with yellow, and branches with a curvature greater than 0.2 are marked with red.

[0199] Finally, the wall defect evaluation report of the rural house is generated in combination with the determined risk level 2 and the generated crack distribution feature map, the report contains a detailed crack parameter table, which clearly lists the total length of the crack 235.6 mm, the average width 1.2 mm, the maximum width 3.5 mm, the number of branches 3, the risk level is rated as 2, contains a color crack distribution feature map, and gives specific maintenance suggestions according to the risk level, suggests that the wall crack of the rural house should be repaired within three months, the report is generated in a standard document format, contains text description, data table and diagram description, and finally outputs a complete wall defect evaluation report of the rural house, which provides a scientific basis for the safety maintenance of the rural house.

[0200] In the embodiment of the present application, the scheme realizes the quantitative evaluation of the wall crack risk of the rural house through parameter comparison and level evaluation, intuitively displays the crack condition through the distribution feature map, and finally generates a comprehensive and accurate evaluation report, which provides a reliable decision basis for the safety maintenance of the rural house, and improves the practicability and integrity of the wall defect detection of the rural house.

[0201] Embodiment two

[0202] Figure 5 The structure schematic diagram of the wall defect detection system of the rural house based on visual detection provided in the embodiment of the present application is described in the specific implementation part:

[0203] The acquisition module 31 is configured to acquire dark field scattering image data generated on the surface of the wall of the rural house.

[0204] The enhancement module 32 is configured to perform visual enhancement processing on the dark field scattering image data to obtain enhanced dark field scattering image data, perform multi-scale difference processing on the enhanced dark field scattering image data, and determine a suspected crack area according to the difference processing result.

[0205] The input module 33 is configured to input image data corresponding to the suspected crack area to a pre-trained U-Net network, fuse image features of different levels in the U-Net network by using a skip connection mechanism in the U-Net network, and output a crack binary mask.

[0206] The first generation module 34 is configured to perform morphological post-processing on the crack binary mask, and generate a crack morphological parameter set by using a skeleton extraction algorithm based on the processed crack binary mask.

[0207] The second generation module 35 is configured to generate a wall defect evaluation report of the rural house according to the crack morphological parameter set.

[0208] The visual detection based rural house wall defect detection system of the embodiment of the present application is used to realize the visual detection based rural house wall defect detection method described above, and therefore the specific embodiments of the visual detection based rural house wall defect detection system can be seen from the embodiment part of the visual detection based rural house wall defect detection method described above, and the specific embodiments can be referred to the description of the corresponding embodiment part, which will not be repeated here.

[0209] Embodiment three

[0210] The embodiment provides an electronic device, including: a memory for storing a computer program; a processor for executing the computer program to realize the steps of the visual detection based rural house wall defect detection method described above.

[0211] Embodiment four

[0212] The embodiment provides a computer readable storage medium, and the computer readable storage medium stores a computer program, and the computer program is executed by a processor to realize the steps of the visual detection based rural house wall defect detection method described above.

[0213] In one exemplary embodiment, the computer readable storage medium described above can include but is not limited to: a U disk, a read only memory, a random access memory, a mobile hard disk, a magnetic disk or an optical disk and various media that can store computer programs.

[0214] The embodiment of the present application also provides a computer program product, and the computer program product includes a computer program, and the computer program is executed by a processor to realize the steps in the visual detection based rural house wall defect detection method embodiment described above.

[0215] The visual detection based rural house wall defect detection method, system and device provided by the present application are described in detail above. The principle and implementation of the present application are described by applying specific examples in this paper, and the above embodiment is only used to help understand the method and core idea of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the principle of the present application, the present application can be improved and modified, and these improvements and modifications also fall within the protection scope of the present application.

Claims

1. A method for detecting defects in the walls of rural houses based on visual inspection, characterized in that, include: Acquire dark field scattering image data generated on the surface of farmhouse walls; The dark field scattering image data is visually enhanced to obtain enhanced dark field scattering image data. The enhanced dark field scattering image data is then subjected to multi-scale differential processing. Based on the differential processing results, suspected crack regions are identified. The image data corresponding to the suspected crack region is input into a pre-trained U-Net network. The skip connection mechanism in the U-Net network is used to fuse image features from different levels and output a binary crack mask. A circular structuring element is used to perform a closing operation on the binary crack mask, and a set of crack morphological parameters is generated based on the processed binary crack mask using a skeleton extraction algorithm. Based on the set of crack morphology parameters, a defect assessment report for the rural house wall is generated; The process involves visually enhancing the dark field scattering image data to obtain enhanced dark field scattering image data, performing multi-scale differential processing on the enhanced dark field scattering image data, and determining suspected crack regions based on the differential processing results, including: When the direction of the polarization filter is perpendicular to the polarization direction of the specular reflected light from the surface of the farmhouse wall, the light signal components in the dark field scattering image data that are consistent with the polarization direction of the specular reflected light are filtered out, while the diffuse scattering light signal components that are orthogonal to the polarization direction of the specular reflected light are retained. Gain adjustment processing is performed on the diffuse scattering light signal components to obtain enhanced dark field scattering image data; Multiple background templates of different scales were constructed, and each background template was differentially processed with the enhanced dark field scattering image data. All differential processing results are weighted and fused to obtain a fused differential image, and an adaptive brightness compensation method is used to adjust the fused differential image. Based on the distribution characteristics of pixel grayscale values ​​in the adjusted differential image, continuous regions with grayscale values ​​greater than a preset threshold are extracted from the adjusted differential image as suspected crack regions.

2. The method according to claim 1, characterized in that, The step of inputting the image data corresponding to the suspected crack region into a pre-trained U-Net network, and using the skip connection mechanism in the U-Net network to fuse image features from different levels to output a binary crack mask includes: The image data corresponding to the suspected crack area is input into the U-Net network. Through the encoder path of the U-Net network, the image data is downsampled multiple times to obtain downsampled image features at different levels. The downsampled image features are upsampled multiple times through the decoder path of the U-Net network to obtain the corresponding upsampled feature map. The downsampled image features and the corresponding upsampled feature map are then fused through the skip connection mechanism to obtain the final feature map. The output layer of the U-Net network is used to perform convolution processing on the final feature map to generate a probability map of the suspected crack region. The probability map is binarized to generate a crack binary mask.

3. The method according to claim 2, characterized in that, The process involves performing multiple upsampling operations on the downsampled image features through the decoder path of the U-Net network to obtain corresponding upsampled feature maps, and then fusing the downsampled image features with the corresponding upsampled feature maps using the skip connection mechanism to obtain the final feature map. This includes: The downsampled image features are first upsampled using the decoder path to obtain a first-level upsampled feature map. The first-level upsampled feature map and the downsampled image features of the corresponding level in the encoder path are fused through the skip connection mechanism, and the fusion result is used as a new round of downsampled image; Repeat the upsampling and feature fusion operations until the resolution of the image data corresponding to the suspected crack region is restored to obtain the final feature map.

4. The method according to claim 2, characterized in that, The step of performing convolution processing on the final feature map to generate a probability map of the suspected crack region includes: The final feature map is subjected to channel dimension reduction using convolutional kernels; The reduced feature map is processed by a non-linear activation function; A conditional random field model is used to optimize the spatial context of the activated feature map; The optimized feature map is processed by pixel-level classification operations, and the probability value of each pixel belonging to the crack category is calculated. Based on the probability values, a probability map of the suspected crack area is generated.

5. The method according to claim 1, characterized in that, The set of crack morphological parameters is generated based on the processed crack binary mask using a skeleton extraction algorithm, including: Using a skeleton extraction algorithm, the skeleton of the processed crack binary mask is extracted to obtain a crack skeleton line with a width of one pixel. Pixel-point tracking is performed on the crack skeleton line. Based on the tracking results, the total crack length and the length of each branch are calculated to form crack length parameters. Measure the crack width value in the normal direction at each point of the crack skeleton line, and calculate the average crack width and maximum crack width based on the crack width values ​​at all points to form crack width parameters; The number of branches and curvature characteristics of each branch of the crack skeleton line were statistically analyzed. The crack length parameter, crack width parameter, number of branches, and curvature characteristics of each branch are integrated to generate a set of crack morphology parameters.

6. The method according to claim 1, characterized in that, The step of generating a rural house wall defect assessment report based on the set of crack morphology parameters includes: The crack length and crack width parameters in the crack morphology parameter set are compared and analyzed with preset safety thresholds, and the hazard level of each crack is determined based on the comparison and analysis results. The crack distribution characteristics are analyzed by examining the number of branches and the curvature characteristics of each branch in the set of crack morphological parameters, and a crack distribution characteristic map is generated. Based on the hazard level of the cracks and the crack distribution characteristic map, a defect assessment report for the rural house walls is generated.

7. A vision-based inspection system for detecting defects in the walls of rural houses, characterized in that, include: The acquisition module is used to acquire dark field scattering image data generated on the surface of farmhouse walls; An enhancement module is used to perform visual enhancement processing on the dark field scattering image data to obtain enhanced dark field scattering image data, perform multi-scale differential processing on the enhanced dark field scattering image data, and determine the suspected crack region based on the differential processing results. The input module is used to input the image data corresponding to the suspected crack region into a pre-trained U-Net network, and use the skip connection mechanism in the U-Net network to fuse image features at different levels and output a crack binary mask. The first generation module is used to perform a closing operation on the binary crack mask using circular structural elements, and to generate a set of crack morphological parameters based on the processed binary crack mask using a skeleton extraction algorithm. The second generation module is used to generate a rural house wall defect assessment report based on the set of crack morphology parameters. The process involves visually enhancing the dark field scattering image data to obtain enhanced dark field scattering image data, performing multi-scale differential processing on the enhanced dark field scattering image data, and determining suspected crack regions based on the differential processing results, including: When the direction of the polarization filter is perpendicular to the polarization direction of the specular reflected light from the surface of the farmhouse wall, the light signal components in the dark field scattering image data that are consistent with the polarization direction of the specular reflected light are filtered out, while the diffuse scattering light signal components that are orthogonal to the polarization direction of the specular reflected light are retained. Gain adjustment processing is performed on the diffuse scattering light signal components to obtain enhanced dark field scattering image data; Multiple background templates of different scales were constructed, and each background template was differentially processed with the enhanced dark field scattering image data. All differential processing results are weighted and fused to obtain a fused differential image, and an adaptive brightness compensation method is used to adjust the fused differential image. Based on the distribution characteristics of pixel grayscale values ​​in the adjusted differential image, continuous regions with grayscale values ​​greater than a preset threshold are extracted from the adjusted differential image as suspected crack regions.

8. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor, configured to execute the computer program to implement the steps of the vision-based detection method for detecting defects in rural house walls as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, enables the implementation of the visual inspection-based method for detecting defects in rural house walls as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Water tunnel crack detection method based on UNet network

    CN117952898A

  • SEM image microdefect analysis method and system based on machine learning

    CN120782724A