## 5 Result and Error Analysis
From the table, it can be seen that the FFT Cross-Correlation is the fastest, but its average angular error and standard angular error are the largest, too. The H-S algorithm has the longest operation time, but its accuracy is better than the FFT Cross-Correlation algorithm. By adjusting the smoothing factor, the average angular error can be reduced to 3.92. The Pyramid L-K algorithm has a better calculation efficiency than the H-S algorithm, and the best accuracy among the three algorithms. It shows that the Pyramid L-K algorithm can achieve the good balance of computational efficiency and accuracy by choosing the appropriate number of layers. It can also be seen from Table 1 that when the template size increases from 32 \(\times\) 32 to 64 \(\times\) 64, the calculated average angular error does not change much. The Cross-Correlation algorithm is not very sensitive to its parameter. However, the H-S optical flow and Pyramid L-K optical flow algorithms are particularly sensitive to their parameters. Therefore, it is necessary to choose carefully when using parameters to keep the error from increasing. For verifying the effectiveness of the Pyramid L-K optical flow algorithm in the case of large flow velocities, experiments are conducted using a sequence of 50 consecutive frames of ultrasonic particle images with a volume concentration of 10% and a flow velocity of 35 cm/s, as shown in Figure 13, to acquire a time-averaged flow field. Figure 14(a1-c1) shows the optical flow field obtained using the Pyramid L-K optical flow algorithm for the number of stratifications 0, 1, and 2, and Figure 14(a2-c2) shows the velocity clouds corresponding to the optical flow field. From Figure 14(a1-c1), we can see that the Pyramid L-K optical flow algorithm can calculate the optical flow at each point in the image observation area. However, with the increase in the number of layers, the optical flow calculation at the boundary of the observation area becomes worse. This is caused by the edge effect of the Pyramid L-K optical flow algorithm as discussed previously. Figure 14: The optical flow field and velocity clouds with a volume concentration of 10% and a flow velocity of 35 cm/s. (**a1**) Vector diagram of optical flow field when the number of layers is 1; (**a2**) Velocity cloud diagram when number of layers is 1; (**b1**) Vector diagram of optical flow field when the number of layers is 2; (**b2**) Velocity cloud diagram when number of layers is 2; (**c1**) Vector diagram of optical flow field when the number of layers is 3; (**c2**) Velocity cloud diagram when number of layers is 3. Figure 13: The sequence of ultrasound particle images with a volume concentration of 10% and a flow velocity of 35 cm/s. (**a**) The current frame; (**b**) The next frame. Table 2 shows the mean angular error, standard angular error and operation time of the optical flow vector field calculated by the proposed ultrasound image velocimetry algorithm. From the results, it can be seen that the mean angular error decreases from 4.87 to 3.74, and the standard angular error decreases from 7.13 to 5.64 when the number of stratification increases from 0 to 1. When the number of stratification increases from 1 to 2, the mean angular error increases from 3.74 to 5.43 and the standard angular error increases from 5.64 to 8.67, which is because the basic constraints of the L-K algorithm are: motion velocity is small and the local pixel motion is consistency.