Research on Image Recognition of Building Wall Design Defects Based on Partial Differential Equation

. The detection of building wall surface defects is of great signi ﬁ cance to eliminate potential safety hazards. In this paper, a research on building wall design defect image recognition based on partial di ﬀ erential equation is proposed. Collect the image data of building surface defects, sample and quantify the collected images, and preprocess the defect images such as digital threshold segmentation, ﬁ ltering, and enhancement. Then, the improved partial di ﬀ erential equation is used to recognize the image as a whole. The second-order partial di ﬀ erential di ﬀ usion equation and the fourth-order partial di ﬀ erential equation are used to recognize the high-frequency and low-frequency bands of the image, respectively. The kernel principal component analysis algorithm is used to transfer the overall image input space to the high-dimensional feature space. The kernel function is used to calculate the inner product in di ﬀ erent subband images of the high-dimensional feature space to reduce the dimension of the overall image. The processed coe ﬃ cients are inversely transformed by nondownsampling contour wave to realize the overall image recognition and ensure that the edge information of the source image does not disappear. Experimental results show that compared with other algorithms, the proposed algorithm has better e ﬀ ect and better stability.


Introduction
In recent years, with the rapid development of construction engineering technology, people's requirements for construction quality are becoming more and more strict. For buildings, the surface is composed of concrete materials, which is easy to form defects in the changing external environment [1,2]. In the engineering practice and the quality research of modern engineering materials, the most common quality problem of building structure is the defect of wall surface, and the damage of building wall always starts from the defect. Small defects will interfere with the safety of the building, while large defects will destroy the structural integrity, shorten the service life of the building, lead to safety accidents, endanger people's life and property safety, and produce serious consequences [3,4]. Building wall defects cannot be avoided, but the damage level of building defects to buildings can be reduced by timely identification. At present, the harmful and harmless boundary of building defects is mainly determined based on engineering construction standards and basic life experience. For some special projects, psychological and aesthetic needs should be considered [5]. With the building getting higher and higher, how to avoid some defects and realize nonmanual identification under external interference has become an urgent problem to be solved in this field. It is found that by identifying the building wall defect image, the defect pixel characteristics can be analyzed in advance, the building wall defects can be effectively identified, and the labor cost can be reduced [6,7].
Many researchers have improved the traditional image pattern recognition methods. Literature [8] carries out defect image recognition through the color feature discrimination method. This method registers two different defect images through the registration algorithm combining gradient and cross cumulative residual entropy and uses the pixel ratio method to recognize the defect image of building wall. However, this method has poor recognition accuracy under the condition of uncertain illumination. Literature [9] mainly extracts the image features of building wall defects through the SiTF algorithm, saves XML feature literature, creates an image feature database, saves the feature file information and the basic information of the image, and finally uses the combination of GPS matching and SIFT feature matching to identify the building wall defect image, but this method is limited by GPS and takes a long time. Reference [10] proposed a support vector machine method, which uses Canny operator to obtain the edge image of building wall defects, uses Hough transform algorithm to extract the straight lines in the defect edge image, then detects the position relationship between the straight lines, detects them through the localization principle, and generates a straight line relationship diagram according to the position relationship between the straight lines. Finally, the closed geometry is obtained by traversing the line graph to realize the image recognition of building wall defects, but this method has the problems of long time-consuming and large error.
To solve the above problems, the image recognition of building wall design defects based on partial differential equation is studied. By introducing the second-order partial differential diffusion equation and the fourth-order partial differential equation, the high-frequency and low-frequency segments of the image are recognized, and the kernel function is used to calculate the inner product in different subband images of the high-dimensional feature space to reduce the dimension of the overall image, so as to realize the recognition of the building wall defect image. The first part of this paper is the introduction of the research background and research status at home and abroad. The second part is the data acquisition and preprocessing of building wall design defect image. The third part is the defect image target recognition based on partial differential equation. The fourth part is the experimental results and analysis. The fifth part is the summary of the full text. The experimental results show that the improved method is superior to the traditional recognition method in terms of preprocessing effect, recognition time, and accuracy.

Image Enhancement of Building Wall Design Defects
The research on defect image recognition of building wall design based on partial differential equation needs to collect the image data of building surface defects and then sample and quantify the collected images to realize the digital processing of defect images. Collecting defect image data mainly starts from three aspects: collecting defect images by manual field acquisition, collecting defect images in the laboratory, and collecting defect images by UAV [11,12]. Among them, the manual field acquisition method is relatively simple, mainly through manual image acquisition, and the tool is pa line scanning camera. When collecting images in the laboratory, it is mainly to collect the image data of building concrete beam bending related experiments, and the acquisition tool is SLR digital camera. When collecting defect images by UAV, the aircraft model is RTK, which is equipped with aerial camera.

Image Data Acquisition of Building Wall Defects.
In order to make the generalization ability and robustness of the training model stronger, the image diversity needs to be fully considered when collecting the defect image [13]. The acquisition distance of some images is less than 0.5 m, and the acquisition distance of the remaining images is 0.5~1 m. The influencing factors such as shadow and illumination are fully considered during acquisition. A total of 240 images were collected by manual field acquisition, with a pixel resolution of 4806 × 3 654. A total of 120 images were collected in the laboratory with a resolution of 2253 × 1 865. A total of 360 images were collected by UAV, with a pixel resolution of 4468 × 3846. Among the collected images, 700 images are used in the process of model test, verification, and training, and the remaining images are used in the secondary test. In order to increase the amount of data in the overall data set and obtain higher recognition accuracy of the model, image clipping is implemented for the collected image, so that the resolution change rate of image pixels is 150 × 150. The defect image is automatically clipped through the window sliding segmentation algorithm in Python language. Then, part of the background images without defects and concrete are removed, and finally, the images are marked. The marked contents are defect free images and defect images, which are used as the database for testing, verification, and training. There are 20000 images in the defect image database. Random selection is made to generate test set, verification set, and training set. By clipping this step, we can ensure that the data in the database is richer and contains a wider range of image types, such as large defect, small defect, edge defect, distortion defect, bulge, texture, scratch, and other defect free images.
In this paper, the research on wall defects is mainly divided into two types: crack area and defect area. In order to better understand the image data of building surface defects, the dimension reduction visualization of the data set is implemented through random embedding of t-distributed neighborhood. Sample and quantize the collected images, and the specific process of digital processing is shown in Figure 1.

Image Data Preprocessing of Building Wall Defects.
For the image data obtained after digital processing, it also needs to be preprocessed. The specific steps include threshold segmentation, filtering, and enhancement.

Threshold Segmentation
Processing. The threshold segmentation method is Ostu automatic segmentation method, which belongs to the global segmentation method with automatic parameter selection. It mainly uses image gray statistics to obtain the gray histogram. The threshold is solved by maximizing the interclass variance. The threshold is used as the judgment standard to classify image pixels, which are divided into background and foreground.
Firstly, the actual gray expectation of the first pixel is calculated, that is,

Advances in Mathematical Physics
In Equation (1), Q 1 represents the actual gray level expectation of the first pixel; q i represents the actual occurrence frequency of the pixel whose gray level is i in the image; K represents a gray threshold.
The actual gray level expectation of the second pixel is calculated, that is, In Equation (2), Q 2 represents the actual gray level expectation of the second pixel; L represents the corresponding number of gray scales in the gray space.
Next, the actual weighted expectation of the first pixel is calculated.
And calculate the corresponding weighted expectation of all pixels in the image.
Finally, the actual interclass variance of the two pixels is calculated, namely, In Equation (5), 2b represents the actual interclass variance of two pixels.

Filter
Processing. The filter selected for filtering processing is LPF filter. The specific filtering processing process is as follows: the expression of filtering function is as follows: In Equation (6), Iðt, sÞ represents the filter function; F 0 represents cut-off frequency; Fðu, vÞ represents frequency domain coordinates.
The expression of frequency domain function is as follows: In Equation (7), t and s represent the left and right coordinates of frequency domain pixels.
Calculate the postfrequency domain filter function according to the above formula: In Equation (8), G′ðt, sÞ represents the postfrequency domain filter function.
Finally, the corresponding function after filtering in the original spatial domain is calculated.
In Equation (9), g′ðt, sÞ represents the corresponding function after filtering in the original spatial domain; P, Q represents the filtering threshold.

Enhanced Processing.
Image enhancement is to improve the visual effect of the image, improve the clarity of the image, highlight some interesting features, and 3 Advances in Mathematical Physics suppress the uninterested features, so as to expand the difference between the features of different objects in the image and meet the needs of analysis. The adaptive enhancement method is used for enhancement processing, and the specific processing steps are as follows: Firstly, calculate the expected total gray value of defect image. The specific calculation formula is as follows: In Equation (10), λ represents the expected total gray value of the defect image.
Finally, the adaptive image enhancement is implemented. The specific formula is as follows: In Equation (11), hðx, yÞ represent the image coordinates after adaptive enhancement; g max ′ represents the maximum value of the corresponding function after filtering in the original spatial domain; g min ′ represents the minimum value of the corresponding function after filtering in the original spatial domain.

Defect Image Target Recognition Based on Partial Differential Equation
The existing image segmentation technology is applied to recognize the defect image area under the condition of background [14]. The results show that the interference radiation sources in the defect image under the condition of background (such as sky background and door and window openings) cause great interference to the recognition of the defect area. Even lead to the existing image segmentation technology cannot complete the recognition of defective image regions under background conditions. The digital threshold segmentation, filtering, and enhancement of the defect image are preprocessed. The kernel principal component analysis algorithm is used to transfer the overall image input space to the high-dimensional feature space. The kernel function is used to calculate the inner product in different subband images of the high-dimensional feature space to reduce the dimension of the overall image. Therefore, this paper proposes a defect image target recognition algorithm under background conditions, and its basic technical flow chart is shown in Figure 2: 3.1. Background Removal. In this paper, the background in the defect image is divided into sky background, door and window opening background, and other interference radiation source background, and the removal methods of sky background and door and window opening background are studied [15,16]. Background removal is mainly to eliminate uninterested useless information, while the main purpose of image preprocessing is to eliminate irrelevant information in the image, restore useful real information, enhance the detectability of relevant information, and simplify the data to the greatest extent. The first step is to remove the background of door and window openings. The specific processing flow is as follows: the first step is to cut the "rectangle" of door and window openings, select the coordinates of four feature points of the outer contour of door and window openings in the defect image, and construct the cutting rectangle through the coordinate values of the feature points of the outer contour. The second step is to correct the pixel value in the clipping rectangle [7]. If the pixel value in the clipping rectangle is assigned as the average value or median value of the defect image temperature value, a false edge is manually added for subsequent defect detection. After the "rectangular" cutting of the door and window opening and the correction of the pixel value in the cutting rectangle, the interference radiation source of the door and window opening has been completely removed, and the removed cutting area does not produce an obvious false boundary [17].
The second is the removal of sky background. When there is only sky interference radiation source except the   Advances in Mathematical Physics target radiation source in the defect image, the temperature statistical histogram of the defect image presents the characteristics of bimodal. Therefore, the specific process of the sky interference radiation source removal method in the defect image is as follows: first, the minimum error method is applied to segment the defect image containing the sky interference radiation source, and the pixel values of the segmented image area are processed. The second step is to compare the size relationship between the optimal threshold and the average temperature of the defect image. When the optimal threshold is less than the average temperature of the defect image, repeat step 1. When the optimal threshold is greater than or equal to the average temperature of the defect image, the algorithm ends. After repeated application of the minimum error method image segmentation technology, the sky interference radiation source in the defect image is accurately stripped, and the stripping boundary is relatively clear. There is no residual sky interference radiation source in the stripped defect image. However, in the calculation process of the algorithm, the minimum error image segmentation technology repeats more times, resulting in the problem of low calculation efficiency. Therefore, the algorithm needs to be further optimized and improved.

Defect Target Recognition Algorithm Based on Improved Partial Differential Equation.
Based on the improved partial differential equation image target recognition, the highfrequency and low-frequency images are processed by second-order partial differential diffusion equation and fourth-order partial differential equation. The processed coefficients are inversely transformed by nondownsampling contour wave, and the dimension reduction is realized by kernel principal component analysis algorithm. After managing different subbands by blocks, the reconstructed data are obtained by kernel principal component analysis algorithm, and finally, the overall image recognition is realized. The image recognition process is shown in Figure 3. As can be seen from Figure 3, image recognition in this paper is divided into two parts, namely, overall image processing and local image recognition. Different from other traditional methods, this paper uses contour wave transform to decompose the source image, decompose in different directions on different scales, and obtain different subbands to remove image noise more accurately, so as to effectively improve the accuracy of image recognition.
Anisotropy is the characteristic of partial differential equation. The second-order partial differential diffusion equation is as follows: where gðx, y, tÞ represents the medium conversion amount converted with time and space, and gðx, y, 0Þ is its starting state; ∇n represents the concentration conversion direction and conversion amount of the specified part in the medium (i.e., gradient operator); div denotes divergence operator; mðx, y, tÞ represents the diffusion coefficient, which can be expressed as follows: where t is a constant greater than zero, indicating the gradient threshold, and mj∇nj a nonincreasing function greater than zero, and if ½0,+∞ ⟶ ½0,+∞, then It can be seen from the above formula that the boundary does not disappear because the gradient extends around the boundary and the regularization ends. The edge contour data and most of the noise of the image are located in the highfrequency band of nondownsampling contour wave transform, so when using the second-order partial differential diffusion equation for high-frequency processing, it can not only identify, but also ensure that the edge information of the source image does not disappear.
The gray gradual change information of the image is located in the low-frequency band. Compared with the high-frequency band, the noise in the low-frequency band is less. The second-order partial differential diffusion equation can not only eliminate the noise in a large-scale range, but also lead to a high degree of gradient sudden change.
In order to realize that there is no image block or step problem in the process of low-frequency processing, the fourthorder partial differential equation is used for identification, and the boundary is replaced by piecewise inclined plane, which solves the block or step problem caused by the second-order partial differential diffusion equation. This method can not only identify, but also ensure that the image 5 Advances in Mathematical Physics boundary does not disappear, so the fourth-order partial differential equation diffusion algorithm can better deal with the key gray conversion information of the source image in the low-frequency coefficients. The processed high-frequency coefficients and low-frequency coefficients are transformed by nondownsampling inverse contour wave to obtain the overall recognized image.
The basic calculation process of the improved partial differential equation is as follows: Step 1. Extract the defect image that has processed the interference radiation source in the image and filter the image with Gaussian function to suppress the high-frequency noise in the image. The size of Gaussian template selected in this paper is 5 × 5. The cut-off frequency is 1.2.
Step 2. The temperature value of pixels in the filtered defect image is calculated by first-order differential, and the temperature gradient amplitude matrix and temperature gradient direction matrix are obtained. The first-order differential calculation template selected in this paper is as follows: The calculation formula of temperature gradient amplitude and temperature gradient direction of each pixel in the defect image is as follows: where Uðx, yÞ, θðx, yÞ is the temperature gradient amplitude in X direction and Y direction of pixel in defect image.
Step 3. The nonmaximum suppression principle is applied to preliminarily extract the edge of the temperature abnormal area in the defect image. The specific implementation steps of extracting the edge of the temperature abnormal area of the defect image by using the nonmaximum suppression principle are as follows: firstly, the gradient direction of each pixel is determined. In this paper, the gradient direction is divided into four levels: 0, 45, 90, 135, and its reverse extension line by using linear interpolation technology. Secondly, find the local maximum of the gradient of the defective image pixel. By comparing the gradient value of each pixel in the defective image with the two values in its gradient direction, according to the comparison results, when the gradient value of the pixel is the maximum of the three values, the gradient value of the pixel remains unchanged; otherwise, the gradient value of the pixel is set to 0.
Step 4. Determine the size of the threshold and further extract the edge of the temperature abnormal area of the defect image according to the double threshold method. The basic idea of the double threshold method is to use two thresholds T1 and T2 (T1 > T2). T1 is used to find the boundary of each temperature anomaly area, and T2 is used to supplement and connect the boundary of the temperature anomaly area. The improved partial differential equation improves the ability of antinoise interference and has higher calculation efficiency, more ideal edge detection effect, and clearer edge.
In order to verify the feasibility of defect image target recognition algorithm under background conditions, this paper selects two groups of defect images under background conditions and carries out image defect recognition. The results are shown in Figure 4: As shown in Figure 4, the temperature anomaly area of the two groups of defect images with background conditions is accurately located and the edge is relatively clear, but the extracted edge is not closed and the edge line segment is too thick. At the same time, there are few wrong recognition phenomena in the two groups of images. As shown in the black circular area in Figure 4 and the yellow rectangular area, through the above observation, this paper believes that the algorithm has good feasibility and high accuracy for defect target recognition of defect image with background. At the same time, the algorithm still has shortcomings and needs further research and improvement.

Area Extraction of Defect Image
Area. The area extraction of defect image area is the last step of defect image detection, and it is also a key step to obtain quantitative data in the quality evaluation of building exterior wall based on infrared technology. Therefore, the area extraction algorithm of defect image region is studied in this paper. Defect area can effectively measure the damage degree of defects and quantitatively evaluate the safety performance of buildings. The calculation process is as follows: Step 1. Extract the coordinate values of each point on the drawn spline curve. Determine the maximum and minimum values of abscissa among the coordinate values of each point on the spline curve and the maximum and minimum values of the ordinate, so as to determine the general range of the defect area.
Step 3. Extract the boundary feature point coordinates of the defect area; Xmin and Xmax are divided into n interval segments with a step of 1, and the X coordinates and corresponding Y coordinates of the points on the spline curve located in each interval segment are found. The extracted X and Y coordinates are rounded to zero and recorded in specific variables, where Xmin and Xmax are the minimum and maximum X coordinates of each point on the spline curve.
Step 3. Calculate the number of pixels in the defect area according to the extracted X and Y coordinate values of 6 Advances in Mathematical Physics the boundary feature points of the defect area. The specific method is to find the maximum and minimum values of the longitudinal coordinates of the boundary feature points under the same X coordinate value according to the order of the X coordinate values of the boundary feature points from small to large for the "convex" defect. The number of pixels surrounded by the spline curve in the X-coordinate interval is calculated by using the formula Y max ðIÞ − Y min ðIÞ + 1. Then, count the total number of pixels surrounded by splines in all X-coordinate intervals. For the "concave" defect, at the "concave" of the defect, the ordinate values of the boundary feature points under the same X-coordinate value are arranged from small to large, and their values show the following law: continuous increment-jump increment-continuous increment-jump increment-continuous increment. Among them, the jumping increasing segment of the even number is the nondefect area, that is, the "concave" of the curve. Therefore, the calculation of the number of defective pixels of the "concave" defect is divided into two steps: first, count the number of pixels of the defect area according to the calculation method of the number of pixels of the "convex" defect area. Then, the "recess" of the defect is determined, and the number of pixels in the "recess" area is counted. Finally, the number of pixels in the "recess" area is removed from the total number of pixels. Among them, the jumping increasing section is determined by using the difference function to find the increasing steps of Y value.
The basic principle of the defect image area extraction algorithm proposed in this paper is shown in Figure 5: The advantage of this paper is to use the improved partial differential equation to identify the image as a whole. The second-order partial differential diffusion equation and the fourth-order partial differential equation are used to identify the high-frequency and low-frequency segments of the image, respectively. Not only the wall cracks are identified, but also the defect area is calculated.

Experimental Results and Analysis
In order to verify the effectiveness and feasibility of the improved defect image recognition method, experimental comparative analysis is needed. In the experiment, the improved method and the traditional method are pretreated, respectively. It can be seen that under the condition of taking the defect coincidence degree, clarity, grain coincidence degree, and displayed defect width as indicators, when using the color feature discrimination method, the processing effect clarity is low, the defect line is unclear, the coincidence with the original image is also very poor, and the defect width and the defect width of the original image are not accurately displayed. When the support vector machine method is used for preprocessing, the processing effect is better, the coincidence degree with the defect texture of the original image is low, and the defect width is not fully expressed. When the improved method is adopted, the processing effect is clear, the defect line is clear, the coincidence with the original image is good, and the defect width is very close to the defect width of the original image.
The heat conduction process of the outer wall of the building is affected by the wall defects and damage, so that under the action of external radiation sources, the temperature distribution at the wall defects is significantly different from that in the normal area. By analyzing the infrared thermal image of the wall, we can intuitively show the location of the defect and preliminarily judge the severity of the defect. In order to further verify the effectiveness and feasibility of the improved method in identifying building wall defect images, under the condition of uncertain identification sample size, the experimental comparative analysis is carried out with the identification coefficient as a reference. The results are shown in Figures 6-8. The solid line in the figure is the image recognition benchmark, that is, the image "ship," and the dots are nonzero elements.
It can be seen from Figures 6-8 that when the improved method is adopted, it can be seen from the image that the nonzero elements are very sparse, most of them are approximately 0, and the nonzero items are not distributed on various types, mainly concentrated on the image "ship," and the maximum coefficient value also corresponds to the image "ship," with good recognition effect. When using the color feature discrimination method, the coefficients of wt as the test sample in this region are obtained by using the random Gaussian matrix and NMF and then solved by the minimum norm. The nonzero terms are distributed in various categories, and there are many large coefficients. It is difficult to judge which category the coefficients correspond to, and the recognition effect is not obvious.
In order to further verify the effectiveness and feasibility of the improved method in identifying the defect image of building wall, under the condition of uncertain identification amount, the experimental comparative analysis is carried      Table 1 and Figure 9. According to the experimental results of recognition rate in Table 1, the recognition rate of the design method is higher than that of the color feature method and the building surface defect recognition method based on codec network.

Defect Identification Area Junction.
In the test, the identification range of the design method, the color feature method, and the building surface defect identification method based on codec network is shown in Table 2 and Figure 10. According to the identification range experimental results in Table 2, the identification range of the design method is greater than that of the color feature method and the building surface defect identification method based on codec network.

Conclusion
As the focus of building wall defect detection, detecting its surface defects can not only repair and fill the defects in time and prevent the occurrence of building hazards, but also avoid economic losses caused by aging or structural damage. At present, there are deficiencies in the overall method of building surface crack defect recognition, so it is of great significance to study the problem of building surface defect recognition. In this paper, a research on building wall design defect image recognition based on partial differential equation is proposed. Based on the characteristic distribution of the image and the improved partial differential equation model, the building wall crack image recognition method first carries out the preprocessing of digital threshold segmentation, filtering, and enhancement of the defect image    9 Advances in Mathematical Physics and then uses the second-order partial differential diffusion equation and the fourth-order partial differential equation to recognize the high-frequency and low-frequency segments of the image. The kernel function is used to calculate the inner product in different subband images of highdimensional feature space, reduce the dimension of the overall image, realize the defect target recognition in the building wall image under complex background, and make a preliminary study on the calculation of defect area. The experimental results show that the improved method is superior to the traditional recognition method in terms of preprocessing effect, recognition coefficient and recognition rate, and the complexity of calculation method. We can also build a deep learning convolution neural network model and study it by using the input image module, suggestion box generation module, convolution feature extraction module, classification, and frame regression module. As a new quality evaluation method, there are still many problems in the application research of infrared technology in the field of building exterior wall quality evaluation. However, with the development of discipline and the progress of science and technology, the existing problems will be gradually solved, and infrared technology will be further and more widely used in the field of building exterior wall quality evaluation.

Data Availability
The data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.