## 2 Materials and Methods
### Improved Optical Flow Estimation Method
#### 2.2.2. Occlusion Determination Based on the Delaunay Triangulation
The Delaunay triangulation area can be calculated as follows:  
\[\Delta I_{\Delta}=\varphi_{1}\Delta I_{B_{1}}+\varphi_{2}\Delta I_{B_{2}}+ \varphi_{3}\Delta I_{B_{3}} \tag{8}\]  
where \(\varphi_{1}\), \(\varphi_{2}\), and \(\varphi_{3}\) represent the weights of three points \(B_{1}\), \(B_{2}\), and \(B_{3}\), respectively, because they are adjacent coordinate points: \(\varphi_{1}=\varphi_{2}=\varphi_{3}=1/3\). The greyscale difference was compared between the triangulation and the pixel points in a \(25\times 25\) neighborhood size around it to determine the occlusion of the point in the domain. The specific determination method is: if \(\Delta I_{B}>\Delta I_{\Delta}\), the point is occluded and \(\Lambda=0\). If \(\Delta I_{B}<\Delta I_{\Delta}\), the point is not occluded and \(\Lambda=1\). The pseudo-code of improved optical flow estimation is as Algorithm 1:  
Figure 2: The occlusion problems in moving object detection. ```
Input:\(l_{l}\) and \(l_{l+1}\) in image sequence Output: Optical flow estimation result \(\mathbf{\omega_{\mathrm{A}}}\) of \(l_{l}\) at time \(t\)  Build the image pyramid \(l_{l}^{k}\) and \(l_{l+1}^{k}\) from bottom to up, which \(k\in(1,2,\cdots n)\)  QCalculate the initial value of the top-level optical flow \(\omega_{l}^{1}\)  for \(k=2\) to \(n\)do  The optical flow of current layer \(d\omega_{l}^{k}\) is calculated according to \(E=E_{Data}+\pi E_{Smooth}\)  Calculate the initial optical flow of next layer \(\omega_{l}^{k+1}=\omega_{l}^{k}+d\omega_{l}^{k}\)  end  The optical flow of the current image \(l_{l}\) is updated as \(\omega=\omega_{l}^{n}\)  Detecting the edge of optical flow \(\omega_{l}^{n}\approx R_{edge}=\mathrm{edge}(\omega,sobel)\)  Delaunay triangulation is established in the edge area \(R_{edge}\)  Calculating the grey difference: \(\Delta I=I_{l+1}(B+\omega)-I_{l}(B)\)  if \(\Delta I=0\)  \(\Lambda=1\)  else  for \(i=1\) to \(K\)  Calculating the change in brightness of triangle \(B_{1}^{i}\) point:  \(\Delta I_{\Delta}=\varphi_{1}\Delta I_{B_{1}}+\varphi_{2}\Delta I_{B_{2}}+ \varphi_{3}\Delta I_{B_{3}}\)  if \(\Delta I_{B}>\Delta I_{\Delta}\)  \(\Lambda=0\)  else  \(\Lambda=1\)  end  Estimating the optical flow after occlusion judgment: \(\omega_{\Lambda}=\Lambda\omega\)
```  
**Algorithm 1** Improved optical flow estimation  
Figure 3 shows the effects of occlusion determination on image optical flow estimation. The optical flow in the right side of the head and the bottom of the arm of the moving target is termed a 'ghost' due to motion occlusion. The optical flow in the 'ghost region' should be the same as the background region, which produces a false optical flow in the occlusion area. It has a wrong optical flow estimation. The optical flow estimation after occlusion removal can be corrected more after motion occlusion processing, thereby improving the accuracies of optical flow estimation and the subsequent motion target region extraction. The optical flow estimation map following occlusion removal can be viewed to be more corrected after motion occlusion processing, which increases the accuracies of optical flow estimation and subsequent motion target area extractions. Figure 3: Optical flow estimation diagram based on motion occlusion determination. (**a**) The current image, (**b**) the ground optical flow value, (**c**) the optical flow vector estimation value without occlusion determination, and (**d**) the optical flow vector estimation after the occlusion removal value.