## 4 Recognition and Operation of Facade Protrusions
### Matching of Process Parameters
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Liquid Pressure (MPa)** & **Distance from the Gun (cm)** & **Gun Movement Speed (cm/s)** & **Spraying Widths (mm)** \\ \hline
0.3 & 20 & 0.79 & 13 \\
0.5 & 30 & 0.87 & 12 \\
0.7 & 40 & 0.64 & 8 \\
0.8 & 20 & 1.69 & 19 \\
1.0 & 30 & 3.76 & 38 \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Database of process parameters for painting. ### Rust Removal Inspection Algorithm

For facade protrusions, the brightness of the image with incomplete rust removal differs obviously from the brightness of the image with complete rust removal. With reference to the manual comparison of sample photographs, the use of histograms is less costly and faster to inspect when performing image calculation and processing. Therefore, the histogram comparison method is used to inspect the effect of the rust removal, using the characteristic pictures of qualified rust removal as a benchmark. Histograms can count many features of an image, such as grey-scale values, gradients and orientation. The grey-scale histogram describes the number of pixels corresponding to each grey value in the image and is used to express the frequency of occurrence of each grey value in the image. For two digital images, the histogram is calculated and compared using a defined criterion. If the histogram statistics of the two images are similar, then the number of pixels corresponding to the individual grey values of the two images is also similar and the two images can be considered to be very close to each other [31]. In this paper, the cardinality comparison method was used for the histogram comparison. The chi-square comparison method is derived from the chi-square test and is used to express the extent to which the measured value of an actual sample deviates from the theoretically calculated value. Based on this, the histogram comparison method was defined as Equation (1) [32]:

\[d(H_{1},H_{2})=\Sigma_{l}\frac{\left(H_{1}(I)-H_{2}(I)\right)^{2}}{H_{1}(I)+H_ {2}(I)} \tag{1}\]

where \(H_{1}(I)\) is histogram of actual gray value, \(H_{2}(I)\) is histogram of complete rust removal gray value, and \(d(H_{1},H_{2})\) is the rust removal comparison value. Figure 5: Flow chart of facade operation, detection and process parameters adjustment: (**a**) inspection of the effect of rust removal operation and parameters adjustment; (**b**) inspection of the effect of painting operation and parameters adjustment. The size of the cardinality depends on the extent of deviation between the actual value and the theoretical value. The larger the cardinality, the less similar the two images are, and the closer the cardinality is to 0, the more similar they are. A cardinality of 0 means that H1 = H2 when the similarity is the highest. ### Painting Inspection Algorithm

When painting, wall-climbing robots can have problems concerning areas of missed painting, and the color of the missed area can be obviously different from the painted area [33]. Edge detection can, therefore, be used to extract the outline of the missed painting area to calculate the missed painting distance, which can be used to control the spray gun offset by the corresponding distance for dynamic adjustment of the paint. The Canny edge detection algorithm is a multi-level edge detection algorithm, similar to the Marr edge detection method, which is a smoothing method followed by derivative method. It is widely used in the field of computer vision due to its advantages such as high detection accuracy and speed. Therefore, in this paper, the Canny edge detection algorithm is used to detect the edge lines of the missed painting area. After the edge detection of the image, the curve of the missed painting area can be obtained and the maximum pixel distance in the horizontal swing direction of the gun in the missed painting area can be obtained using image processing techniques. Extrapolating the actual size of reality from the dimensions in the image requires knowledge of the pixel equivalent corresponding to this image.