*2.2. Edge Detection*

The edge of structural image is an important carrier of overall deformation information. Edge detection is a method to analyze the main features of images [21]; it can greatly reduce the amount of data, eliminate information not related to deformation monitoring, and retain the basic attributes of structure. The basic task of edge detection is to recognize the step change of the gray value of the structure edge in the image, which can be further used to obtain the feature edge of the structure. According to [22], the step edge is related to the peak value of the first-order derivative of the gray level of the image, and the degree of change of the gray value can be expressed by gradient. The gradient of image function is a vector with direction and size, as shown below:

$$\mathbf{G}(\mathbf{x}, \mathbf{y}) = \begin{bmatrix} \mathbf{G}\_{\mathbf{x}} \\ \mathbf{G}\_{\mathbf{y}} \end{bmatrix} = \begin{bmatrix} \frac{\partial f}{\partial x} \\ \frac{\partial f}{\partial y} \end{bmatrix}. \tag{15}$$

It can be seen that the direction of the vector *<sup>G</sup>*(*<sup>x</sup>*, *y*) is the change rate of the gray value of function *f*(*<sup>x</sup>*, *y*).

The amplitude of the gradient can be expressed as:

$$\left|\mathcal{G}(\mathbf{x},\mathbf{y})\right| = \sqrt{\mathcal{G}\_{\mathbf{x}}^{2} + \mathcal{G}\_{\mathbf{y}}^{2}}.\tag{16}$$

In this paper, the absolute value is used to approximate the gradient amplitude:

$$\left| G(x, y) \right| \approx \max \{ \left| G\_x \right|, \left| G\_y \right| \}. \tag{17}$$

The direction of the gradient can be derived as:

$$\alpha(\mathbf{x}, \mathbf{y}) = \arctan(\mathbb{G}\_{\mathbf{y}}/\mathbb{G}\_{\mathbf{x}}) \tag{18}$$

where α is the angle between the direction vector and the *x*-axis.

From the above formulas, it is suggested that the degree of the change in gray levels can be detected by the discrete approximation function of gradient. At the edge of the structure, the gray value will change [23], resulting in the maximum value of the gradient function. On this end, the edge can be extracted through the above features.

From the above algorithm, we can see that the essence of the image edge is the point of discontinuous gray level, or where the gray level changes dramatically. The drastic change of gray level of edge means that near the edge point, the signal has high frequency components in the spatial domain. Therefore, the edge detection method is essentially to detect the high-frequency component of the signal, but it is difficult to distinguish the high-frequency component of the gray signal from the environmental noise of the actual structure photogrammetry, which makes it difficult to accurately extract the edge information of the structure. Taking one-dimensional signal of the structure image as an example, as shown in Figure 2, if point A is regarded as the edge point of the signal and there is a jump in the signal, then whether there is an edge at point B and point C needs to be treated with caution. In fact, point B and point C are probably the combination of the signal and some noise.

**Figure 2.** Illustration of the edge point and noise point.

Edges with continuous gradients, such as point A in Figure 2, are very rare in actual structure images. Most of the structural edge points will be accompanied by environmental noise, forming a large number of complex edge points such as points B and C. Therefore, it is necessary to study the false edges caused by noise in order to ensure the accuracy of structural deformation monitoring.

#### **3. Static Test of the Beam**

A static test has been carried out on a steel truss–concrete composite beam, to validate the proposed method, as shown in Figure 3.

The specimen is simply supported by two hinge bearings at the both ends, as shown in Figure 3a. Two hydraulic jacks have been used to apply the two-points bending load on the specimen. Three dial meters have been placed at the quarter-span and the midspan of the specimen, to measure the structural deflection.

The specimen has been loaded with a step-by-step prototype from 0 to 600 kN, with an increment of 100 kN. The loading protype is shown in Figure 4. It is worth stating that the measurement at each step has been made two minutes after the target load is reached, to allow the well-deformation of the specimen.

During the test, the digital image of the specimen is also collected using Canon EOS 5DS R low-cost digital camera; the camera and lens parameters are shown in Table 1. The spatial position of the camera in this experiment is set in the non-orthogonal projection position to simulate the normal condition in engineering practice, as aforementioned. During the whole process, the space position and azimuth of the camera should be maintained to ensure the consistency of projection centers of structure images in the whole process. In order to prevent the camera from being disturbed, shooting remote controller is used to control camera parameters and shutter shooting.

**Figure 3.** The tested steel–concrete composite beam (unit: mm); (**a**) elevational view; (**b**) sectional view; (**c**) detail size.

**Figure 4.** Test loading protype.


**Table 1.** Parametric table of camera and lens.

As a common practice, the system error exists in the measurement due to the physic limitation of the applied hardware. Specifically, the accuracy of the photogrammetry-based method has a stronger dependence on the capacity of hardware when compared with the traditional methods. Therefore, the calibration of photogrammetry equipment is an essential part of the measurement. Generally, the largest part of error in photogrammetric hardware originates from lens distortion [24]. On this end, the checkerboard lattice calibration method [25,26] has been applied to calibrate the lens of photogrammetric camera. The calibration has been conducted with a total of 25 checkerboard lattice images, and the lens distortion parameters are obtained. Based on that, the photogrammetric images obtained in this paper have been corrected. The calibration process is shown in Figure 5.

**Figure 5.** Camera calibration intersection photography.

The results of camera calibration parameters are shown in Table 2.



In the calibration, the distortion correction formula [27] has been used to correct the structural image element by element. As a result, the ideal image without lens distortion has been obtained, which can be further used for the extraction of structural deformation in the next. The distortion correction e ffect of the image is shown in Figure 6.

**Figure 6.** Camera calibration distortion adjustment; (**a**) original image; (**b**) image after distortion correction.

In reality, the landform around the structure makes it di fficult to obtain the orthogonal projection image, so that it can only be tilt photographed on both sides. According to the practical application requirements, the actual situation is simulated in the test, i.e., the camera takes pictures of the test beam at a fixed tilt angle. As shown in Figure 7a, the distance between the camera and the ground is about 3.5 m, and the distance between the camera and the test beam is about 3.0 m. Obviously, there is a large horizontal angle between the optical axis of the camera and the normal direction of the vertical plane of the test beam, and there is also an elevation angle in the vertical direction. This photogrammetric method simulates the possible inclination angle of the camera in the actual structure survey; unlike orthographic projection, this tilt photography will cause the structure image to be a ffected by the perspective relationship and present near-large-far-small imaging features, which will a ffect the extraction of structural deformation information. Figure 7 shows the image acquisition result of the specimen. It is worth noting in the image that the specimen near the right bearing is blocked by the reaction frame, which can reflect the usual monitoring conditions of actual structure. Thus, it is crucial to obtain the deformation data of the sheltered part of the structure, which is also a key part of the present study.

**Figure 7.** Field layout of static load test; (**a**) camera placement position; (**b**) collecting shape data of experimental beam.
