## 5 Result and Error Analysis
\begin{table}
\begin{tabular}{c c c c c} \hline \hline
**Algorithm** & **Parameter** & **AAE** & **SAD** & **Time Consuming** \\ \hline \multirow{3}{*}{cross-correlation} & 32 \(\times\) 32 & 12.14 & 21.04 & 6.2 \\  & 48 \(\times\) 48 & 14.85 & 23.86 & 5.5 \\  & 64 \(\times\) 64 & 15.73 & 24.43 & 4.7 \\ \hline \multirow{3}{*}{H-S algorithm} & \(\alpha=0.25\) & 3.92 & 9.11 & 66 \\  & \(\alpha=0.5\) & 5.31 & 8.54 & 62 \\  & \(\alpha=0.75\) & 7.04 & 7.99 & 65 \\ \hline \multirow{3}{*}{Pyramid L-K} & 0 Layer & 4.59 & 6.85 & 54 \\  & 1 Layer & 2.43 & 5.33 & 28 \\ \cline{1-1}  & 2 Layers & 5.12 & 8.39 & 17 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Performance Comparison of Pyramid L-K, Cross-Correlation algorithms. Figure 11: Ultrasonic particle image sequence with volume concentration of 10% and flow rate of 25 cm/s. **(a)** The current frame; **(b)** The next frame. Figure 12: Flow fields and velocity clouds derived by applying Pyramid L-K optical flow and Cross-Correlation algorithm to ultrasound particle image sequence with volume concentration of 10% and flow velocity of 25 cm/s. **(a1)** Flow spectrum obtained by the Cross-Correlation algorithm when the template size is \(32\times 32\); **(a2)** Velocity cloud obtained by the Cross-Correlation algorithm when the template size is \(32\times 32\); **(b1)** Vector diagram of H-S optical flow field when the Smoothing factor is 0.25; **(b2)** Velocity cloud of H-S optical flow field when the Smoothing factor is 0.25; **(c1)** Vector diagram of L-K optical flow field when the number of layers is 2; **(c2)** Velocity cloud of L-K optical flow field when number of layers is 2. The velocity vector fields obtained after processing by each algorithm are shown in Figure 12(a1-c1), from which it can be intuitively seen that the flow spectra obtained by the H-S optical flow and Pyramid L-K optical flow based algorithms are better and the flow fields are smoother with only a few error matches, while the results obtained by the cross-correlation algorithm based on template matching have more error vectors and the velocity vector fields are not smooth enough. On the other hand, Figure 12(a2-c2) qualitatively compare the errors of H-S optical flow, Pyramid L-K optical flow, and Cross-Correlation algorithm. From that it can be seen that the velocity cloud map of the cross-correlation algorithm has the largest number and area of read spot regions, which reflects the largest error of the algorithm. It is due to the high concentration of particles in the sand-bearing water flow, which makes the correlation plane emerge with multiple peaks and leads to a large number of erroneous displacement vectors. There are some small red spots which appear in the lower left corner of the velocity cloud from the H-S optical flow algorithm. These indicate that the error is slightly larger in this area than the others. Because the concentration of sand in this region is high, the secondary reflection of ultrasound in these places is more serious, and the grayscale of the ultrasound image changes more drastically. Under this condition, the basic constraint of the H-S optical flow algorithm, i.e., the assumption of grayscale conservation, is not strictly valid, resulting large errors. The velocity cloud map from the Pyramid L-K optical flow algorithm is the smoothest and with the smallest error. However, the errors are larger at the edges of the observation area than other areas, which is because the L-K optical flow algorithm uses local constraints so that the calculation of the optical flow at each pixel needs to depend on the optical flow values of other pixels in the neighborhood. While the grayscale values at the edge of the image are zero, the optical flow in those regions can not be calculated accurately. To quantitatively analyze the processing results of various algorithms, Table 1 lists the mean angular error, standard angular error and operation time of the H-S optical flow, Pyramid L-K optical flow and FFT Cross-Correlation algorithms.