## 3 Method
### Waterdrop Trajectory Detection  
Detecting a waterdrop is difficult because of its transparency, motion blur, etc. ; therefore, we focus on detecting waterdrop trajectories in this study. It is assumed that water drips from the leaking position continuously and vertically without wind. Thus, the waterdrop trajectories are captured as vertical lines in the stereo images after aligning the pan axis of the stereo camera with gravity. Therefore, waterdrop trajectory detection can be accomplished by detecting vertical lines in images that belong to the waterdrop trajectories. The challenge is to distinguish waterdrop trajectories from images with severe radiation noise. Waterdrops appear in certain vertical lines in such images. Meanwhile, radiation noise can be treated as independent and identically distributed (i.i.d.) random noise. Thus, statistical operations can distinguish between the waterdrop trajectories and radiation noise. Initially, we captured waterdrops for a few seconds using the stereo camera from a fixed position in the pedestal, resulting in \(N_{\text{frame}}\) stereo images \(\mathcal{I}^{L},\mathcal{I}^{R}=\{I^{L}_{1},\dots,I^{L}_{N_{\text{frame}}} \},\{I^{R}_{1},\dots,I^{R}_{N_{\text{frame}}}\}\), where \(I^{L}_{i}\) and \(I^{R}_{i}\in\mathbb{R}^{H\times W}\) represent the grayscale left and right images with a resolution of \(H\times W\), respectively. Figure 2: Overview of the proposed method. (**a**) Capturing waterdrops for a few seconds using a stereo camera in the pedestal. Blue eclipses represent waterdrops, and white circles and lines represent the radiation noise in the stereo images. (**b**) Waterdrop trajectory detection and matching. The red and green rectangles represent the corresponding trajectories. (**c**) Estimation of the leakage position by triangulating the corresponding trajectory lines. The concept of the triangulation is illustrated as dot lines, and the cyan stars on the inspection system represent the stereo cameras. This figure illustrates a top view of the pedestal. The remaining detection procedure is illustrated in Figure 3. First, background subtraction is applied to the stereo images \(\mathcal{I}^{L}\) and \(\mathcal{I}^{R}\) to extract the waterdrops and radiation noise, as shown in Figure 3a, which is formulated as follows:  
\[F_{i}^{L} =|I_{i}^{L}-\texttt{median}(\mathcal{I}^{L})|, \tag{1}\] \[\mathcal{F}^{L} =\{F_{1}^{L},\dots,F_{N_{\text{frame}}}^{L}\}, \tag{2}\]  
where \(F_{i}^{L}\in\mathbb{R}^{H\times W}\) denotes the extracted waterdrops and radiation noise, and \(\texttt{median}(\cdot)\) represents the temporal median filter. The same operation is applied to \(\mathcal{I}^{R}\), and \(\mathcal{F}^{R}\) is obtained. It is worth noting that we also employed a background subtraction method proposed in [17]; however, their method failed to extract waterdrops because waterdrops tended to be categorized as background. Next, vertical lines that belong to the waterdrop trajectories are detected from \(\mathcal{F}^{L}\) and \(\mathcal{F}^{R}\) using the following approach: The same procedure is applied to \(\mathcal{F}^{L}\) and \(\mathcal{F}^{R}\); hence, we omit the superscript and describe the extracted waterdrops and radiation noise as \(\mathcal{F}\). As explained above, radiation noise can be treated as i.i.d. random noise, whereas waterdrops appear in certain vertical lines in the images; therefore, vertically aggregated values of \(\mathcal{F}\) show a statistical difference. As can be seen in Figure 3b, the aggregated value \(g_{j}\in\mathbb{R}\) obtained from the \(j\)-th column of \(\mathcal{F}\) is calculated as follows:  
\[g_{j}=\frac{1}{N_{\text{frame}}}\frac{1}{H}\sum_{n=1}^{N_{\text{frame}}}\sum_ {i=1}^{H}F_{n}(i,j), \tag{3}\]  
where \(F_{n}(i,j)\in\mathbb{R}\) is the value of \(F_{n}\) at the \(i\)-th row and \(j\)-th column. The final waterdrop trajectory detection result \(\{h_{1},\dots,h_{W}\}\) is calculated from \(\{g_{1},\dots,g_{W}\}\) using Algorithm 1, which is illustrated in Figure 3c.