# Bridge Displacements Monitoring Method Based on Pixel Sequence
## 2 The DoG Algorithm Applied for Edge Detection
It mitigates biases in structural performance status information and enables more precise localization for feature point and edge extraction, as shown in Figure 2.  
Figure 1: The convolution of the DoG with an image. In the operation of the Difference of Gaussians (DoG) method, image processing operations, such as dilation and erosion, need to be applied to the images. The dilation algorithm enlarges the target area, amalgamating background points that touch the target area into the target object, consequently extending the boundary of the target outward. Its purpose is to fill in some holes in the target area and eliminate small grain noise contained in the target area. Conversely, the erosion algorithm diminishes the extent of the target area, leading to a reduction in the image's boundary and the elimination of small and insignificant target objects. The formulas for dilation and erosion are as follows:  
\[A\oplus B=\left\{x,y\right|\left(B\right)_{xy}\cap A\
eq\phi\right\} \tag{7}\] \[A\ominus B=\left\{x,y\right|\left|\left(B\right)_{xy}\subseteq A\right\}\]  
Figure 3 illustrates the application of the DoG system for structural displacement extraction. The DoG system proposed in this paper is divided into four main steps. Figure 3: Four main steps of the DoG system. \[\
abla D(x,y)=\left(\frac{\partial D}{\partial x},\ \frac{\partial D}{\partial y}\right) \tag{4}\]0 Diagram illustrating the effect of the DoG. In the validation experiments described in this paper, data collection is mainly divided into algorithm data collection and validation data collection. As shown in Step 1 of Figure 3, this section focuses on algorithm data collection. By adjusting the field of view (FOV) of the calibrated camera, we ensure that the optical signals of the entire bridge structure can be captured and preserved. This is essential for the subsequent comparison of algorithm displacement with LVDT displacement measurements to determine the accuracy of the DoG algorithm. As shown in Step 2 of Figure 3, the DoG algorithm proposed in this paper is mainly applied in the edge extraction phase of structural optical signal processing. By processing the structure under fixed multi-scale DoG filtering, the edge results can reflect the position of the structure in space. Under simulated load conditions, the structure will respond to different loads, resulting in deformation. The DoG edge processing can capture these deformation signals, leading to pixel-level deformation in the collected images. Therefore, when processing the structure, since the camera's attitude angle and field of view are fixed under the same working conditions, it is only necessary to compare the structural displacement response results at different load times and points to determine the degree of deformation. In Step 2, the collected video is segmented to obtain the optical signal of the structure at a specific moment. The DoG algorithm is then used to extract the edge information of the structure and track feature points. Since the edge signals are continuous [16; 17], feature points can be arbitrarily selected. Compared to traditional LVDT displacement meters, the DoG algorithm can extract an infinite number of feature points, effectively solving the problem of insufficient data completeness in traditional displacement extraction. Moreover, the feature points are derived from the natural edge contours of the structure itself, eliminating the need for preprocessing results during system operation and avoiding any impact on the bridge's traffic capacity in actual conditions [18]. By tracking the feature points, the displacement of the feature points and the edges near the feature points can be obtained, thereby determining the mechanical response of the structure. The mechanical response of the structure [19] is reflected by the pixel displacement, and through the above steps, the pixel-level displacement of the structure in the image can be obtained [20; 21].