## 2 Research and Design of Slope Displacement Monitoring System
### Video Image Processing  
The video monitoring system proposed in this paper adopts the structure mode of \"two points and one line\" to monitor the displacement of the wall surface of the new greenable gravity retaining wall through real-time video and uploads the video information in the form of a data stream to the control system for video image processing. The video image processing process is as follows: video image greyscale \(\rightarrow\) video image histogram equalisation \(\rightarrow\) video image noise reduction \(\rightarrow\) video image target edge monitoring \(\rightarrow\) video image segmentation processing. The process of gravity retaining wall deformation discrimination based on video monitoring technology is shown in Figure 3.  
1. Video image greyscaling. Given that the video monitoring system captures images in colour, which can be data-intensive, greyscale conversion is essential. Upon receiving the video data, the system initially converts the video images to greyscale to enhance processing efficiency for the control system.
2. Video image histogram equalisation. Following greyscale conversion, contrast enhancement is necessary. This study employs histogram equalisation to intensify the contrast between the target object and the background within the video images. This process transforms the histogram of the video image from a more concentrated distribution of greyscale values to a uniform distribution.
3. Video image noise reduction processing. During the acquisition of video images in surveillance systems, image data can be susceptible to external environmental factors such as noise interference. This interference may lead to the distortion of video image information, potentially affecting the monitoring of the target. Hence, it is imperative to carry out noise reduction processing on the video images.  
Figure 3: Discriminant process of wall deformation of gravity retaining wall.  
Video image target edge detection. To enhance the efficiency of video image detection, the video images undergo processing to extract the edges of the monitored target. During image processing, only the monitoring target and its adjacent elements are chosen for edge monitoring.
5. Video image segmentation processing. Once the target edge within the video image has been identified, the image can be segmented. The background surrounding the target is subsequently converted to greyscale. This process significantly reduces the data size of the video image and, in turn, enhances the efficiency of the video image processing. In this study, the greyscale threshold segmentation method is used for video image segmentation processing, which is based on the principle of converting the input video image \(f(a,\,b)\) to the output video image \(g(a,\,b)\), and the conversion formula is shown below.  
\[g(a,b)=\left\{\begin{array}{ll}1&f(a,b)\geq T\\ 0&f(a,b)<T\end{array}\right\} \tag{1}\]  
where \(T\) is the segmentation threshold; \(f(a,\,b)\) is the grey value of the input video image at \((a,\,b)\); \(g(a,\,b)\) is the grey value of the output video image at \((a,\,b)\); \(g(a,\,b)\) is taken to be 1 for the video image of the target; and \(g(a,\,b)\) is taken to be 0 for the pixels of the background image outside the target in the video image.