## 2 Materials and Methods
### Improved Optical Flow Estimation Method
#### 2.2.2. Occlusion Determination Based on the Delaunay Triangulation  
The motion occlusion problem, also known as 'ghosting', has always been difficult to solve in optical flow estimation and moving object detection. The movement of the objects between the previous and subsequent images causes the formation of a 'ghost' when the background area covered by the moving foreground in the last frame is exposed in the following frame. Figure 2 shows that from \(I_{t}\) to \(I_{t+1}\), the occluded point \(\mathrm{P}_{1}\) in the \(I_{t}\) image appears in \(I_{t+1}\) because of the movement of foreground objects, whereas points \(\mathrm{P}_{2}\) and \(\mathrm{P}_{3}\) change from appearance to occlusion. From \(I_{t+1}\) to \(I_{t+2}\), the occluded point \(\mathrm{P}_{2}\) changes from occlusion to appearance. All these points bring a false optical flow and lead to 'ghosting' problems. Two methods were used to solve this problem: the first is the general introduction of the punishment mechanism using the non-square penalty function. The second is to combine the Delaunay triangulation to ascertain occlusion decisions in the moving edge regions. Only relying on the non-square penalty function cannot solve the occlusion problem well; the Delaunay [31] triangulation occlusion judgment was also incorporated to increase the accuracy of moving object extraction. The Delaunay structure and optical flow estimation proposed by [PERSON] et al. [32] were applied to determine whether the point is a moving occlusion point. Because motion occlusion occurs in the edge region of the moving target, the occlusion is determined by detecting the brightness variationsof the pixels' triangular grid in the edge regions of the moving object. The optical flow estimation after occlusion processing is defined as \(\omega_{\Lambda}\), and its calculating equation is defined as follows:  
\[\omega_{\Lambda}=\Lambda\omega \tag{5}\]  
\[\text{s.t. }\ \Lambda=\left\{ \begin{array}{cc}1&\text{normal}\\ 0&\text{occlusion}\end{array} \right.\]  
where \(\omega=\left(uv\right)^{T}\) is the optical flow vector field and \(\Lambda\) represents the occlusion of each pixel. The \(\Lambda\) judgment method is divided into two steps:  
The motion edge region information \(R_{edge}\) in the image can be extracted according to the estimated image optical flow field. The calculation equation is expressed as follows:  
\[R_{edge}=\text{edge}(\omega,Laplacian) \tag{6}\]  
where the 'edge' represents the boundary extraction algorithm and the Laplacian edge detection algorithm is used. According to the estimated image optical flow vector field, each pixel point position \(B=\left(ij\right)^{T}\) in \(I_{t}\) was calculated and added to \(\omega=\left(uv\right)^{T}\) at the same points to determine the corresponding point \(I_{t+1}(i+uy+v)\) in \(I_{t+1}\). Next, the grey difference \(\Delta I\) of \(I_{t+1}\) and \(I_{t}\) of the estimated optical flow corresponding points were calculated. The calculation equation is defined as follows:  
\[\Delta I=I_{t+1}(B+\omega)-I_{t}(B) \tag{7}\]  
when \(\Delta I=0\), the corresponding position of the continuous frames has a consistent grey level, indicating that point B is not occluded, \(\Lambda=1\). When \(\Delta I\
eq 0\), the occlusion situation needs to be determined on a case-by-case basis. For the under-determined point in the \(R_{edge}\) of \(I_{t}\), the change in the brightness value of the triangle to which it belongs is calculated. Similarly, the Delaunay triangulation about the brightness difference map is constructed to determine the occlusion. Specifically, \(B_{1}(i,j)\) is taken in \(I_{t}\) along with the adjacent coordinate points \(B_{2}(i+1,j)\) and \(B_{3}(i,j+1)\), which constitutes the determination of the Delaunay triangulation.