# Vision-Based Damage Detection Method Using Multi-Scale Local Information Entropy and Data Fusion
## 2 Methodology
### High-Spatial-Resolution Mode Shapes via Phase-Based Optical Flow Estimation  
According to the fact that the video recording process is a projection of structural motion onto the image plane, structural vibration can be measured from video records by analyzing the temporally displaced image intensity \(I(x+u(x,y,t),y+v(x,y,t))\) across frames [34]. In this context, \(x\) and \(y\) represent pixel coordinates, while \(u\) and \(v\) denote the optical flow, which incorporates spatially localized and time-varying vibration signals in the \(x\) and \(y\) directions, respectively. Recent research has shown that optical flow estimation based on phase possesses several appealing properties, including insensitivity to lighting changes and calculation stability [35]. The flow diagram for phase-based optical flow estimation is presented in Figure 2.  
Based on [PERSON]'s shift theorem, which states that a global motion in the time domain corresponds to a related linear phase shift in the frequency domain, local phase information gives way to local motion estimation. In this paper, we use complex Gabor quadrature filters [36; 37] to acquire the local phase. The mathematical expression for a 2D Gabor filter is given by  
\[g(x,y,\lambda,\theta,\psi,\sigma,\gamma)=exp(-\frac{x^{{}^{\prime}}\;2+\gamma ^{2}y^{{}^{\prime}}\;2}{2\sigma^{2}})exp\left(i(2\pi\frac{x^{\prime}}{\lambda }+\psi)\right)=G_{\theta}^{2D}+\mathrm{i}\;H_{\theta}^{2D} \tag{1}\]  
Figure 1: An overview of the workflow of the proposed damage detection method. In the general form of the 2D Gabor filter in Equation (1), \(i\) is the unit imaginary number, \(x\) and \(y\) are the independent spatial variables, \(\lambda\) represents the wavelength of the sinusoid, \(\theta\) specifies the orientation of the parallel stripes of the Gabor kernels, \(\psi\) is the phase offset, \(\sigma\) is the standard deviation of the Gaussian function modulating the sinusoid, \(\gamma\) is the spatial aspect ratio that determines the ellipticity of the Gabor kernels, \(x^{\prime}=xcos\theta+ysin\theta\), and \(y^{\prime}=-xsin\theta+ycos\theta\). For simplicity, the 2D Gabor filter can also be expressed as a real part and an imaginary part, i.e., \(G_{\theta}^{2D}\) and \(H_{\theta}^{2D}\). As an example, the real and imaginary pairs for 2D Gabor filters in four varying orientations are shown in Figure 3.  
For a motion video with image intensity \(I\) (\(x,y\), \(t\)) at spatial location (\(x,y\)) and time \(t\), the local image amplitude and phase in the orientation \(\theta\) can be derived by convolving the image with a complex 2D Gabor kernel:  
\[A_{\theta}(x,y,t)e^{i\phi_{\theta}(x,y,t)}=(G_{\theta}^{2D}+i\ H_{\theta}^{2D} )\otimes I(x,y,t) \tag{2}\]  
where \(A_{\theta}\) is the local image amplitude, \(\phi_{\theta}\) is the local image phase, and \(\otimes\) represents the convolution operation. It has been demonstrated that the constant contours of the local phase through time provide a good approximation to the motion field and the displacement signal [38], which can be written as  
\[\phi_{\theta}(x,y,t)=c,\ c\in R \tag{3}\]  
Figure 3: Complex Gabor filters in different orientations: (**a**) the real parts from \(\theta=0\) to \(\theta=90^{\circ}\), (**b**) the imaginary parts from \(\theta=0\) to \(\theta=90^{\circ}\). Figure 2: Flow diagram for phase-based optical flow estimation. for some constant \(c\). Differentiating Equation (3) with respect to time \(t\)  
\[\left(\frac{\partial\phi_{\theta}(x,y,t)}{\partial x},\frac{\partial\phi_{\theta} (x,y,t)}{\partial y},\frac{\partial\phi_{\theta}(x,y,t)}{\partial t}\right)\,(u, v,1)=0 \tag{4}\]  
where \(u\) and \(v\) represent the pixel shift in the \(x\) and \(y\) directions, respectively, known as the optical flow described above.