# Segmentation of River Scenes Based on Water Surface Reflection Mechanism
## 3 Results and Discussion
### Experiments in Simple Scenes  
The performance of different methods was evaluated by Pixel Accuracy(\(PA\)), Mean Intersection over Union(\(MIoU\)) which are two types of widely used criteria in image segmentation [30], shown  as follows:  
\[PA=\frac{\sum_{i=0}^{k}p_{ii}}{\sum_{i=0}^{k}\sum_{j=0}^{k}p_{ij}}, \tag{18}\]  
\[MIoU=\frac{1}{k+1}\sum_{i=0}^{k}\frac{p_{ii}}{\sum_{j=0}^{k}p_{ij}+\sum_{j=0}^ {k}p_{ji}-p_{ii}}, \tag{19}\]  
where \(P_{ij}\) indicates the number of pixels of class \(i\) that are predicted to belong to class \(j\), where there are \(k+1\) classes in total. In this study, \(k+1=2\). To better evaluate the overall segmentation performance, \(PA\) and \(MIoU\), which may have different weights in practical applications, were merged to generate the weighted harmonic mean \(F_{\beta}\) as:  
\[F_{\beta}=\frac{\left(1+\beta^{2}\right)PA\times MIoU}{\beta^{2}\times PA+MIoU}, \tag{20}\]  
where \(\beta>0\) measures the relative importance between \(PA\) and \(MIoU\). When \(\beta>1\), \(MIoU\) has a greater impact. In practice, \(MIoU\) was slightly more important, thus \(\beta=1.5\) is adopted.  
The results of some examples are shown in Figure 10 where the detected water region by \"intensity + texture\" method is marked with blue, while those by \"edge detection\" and the proposed algorithm is highlighted in red for edges. Table 1. shows the criteria values of the result.  
Figure 8: Pre-processing operations.  
Figure 9: Pixel values before and after blurring operation.  
Figure 10: Segmentation results of different methods in simple scenes (**a**–**e**). From left to right, the first column shows the input images after pre-processing; The second and third column are the segmentation results using “intensity + texture” features and the adaptive threshold edge detection algorithm respectively; The fourth column are the results of our method.  
\begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline \multirow{2}{*}{**River Scene**} & \multicolumn{3}{c}{**Intensity + Texture**} & \multicolumn{3}{c}{**Edge Detection**} & \multicolumn{3}{c}{**Our Algorithm**} \\ \cline{2-10}  & **PA** & **MIoU** & \(F_{\beta}\) & **PA** & **MIoU** & \(F_{\beta}\) & **PA** & **MIoU** & \(F_{\beta}\) \\ \hline (a) & 0.997 & 0.915 & **0.939** & 0.964 & 0.926 & **0.937** & 0.987 & 0.969 & **0.967** \\ (b) & 0.901 & 0.824 & **0.846** & 0.995 & 0.592 & **0.676** & 0.953 & 0.928 & **0.948** \\ (c) & 0.837 & 0.821 & **0.826** & 0.976 & 0.932 & **0.945** & 0.981 & 0.947 & **0.956** \\ (d) & 0.920 & 0.851 & **0.871** & 0.993 & 0.829 & **0.873** & 0.974 & 0.927 & **0.946** \\ (e) & 0.921 & 0.881 & **0.893** & 0.998 & 0.746 & **0.809** & 0.871 & 0.957 & **0.969** \\ Average of \(110\) images & 0.915 & 0.847 & **0.867** & 0.973 & 0.795 & **0.842** & 0.966 & 0.923 & **0.938** \\ \hline \hline \end{tabular}
\end{table}
Table 1: Performance of different methods in simple scenes.  
All the three algorithms achieved not bad segmentation results, which meant they were all effective for segmentation of simple river scenes. But the proposed algorithm had a more stable performance. More importantly, the proposed algorithm took the least time, as obviously shown in Figure 11.  
The method utilizing \"intensit + texture\" features was not only to calculate the brightness and texture information of each small image patch, but also to achieve the decision by the result of the clustering algorithm. The edge detection-based method often obtained many edges at the initial time. The adaptive threshold method required a lot of calculations to pick the one that is most likely to be the edge of the river. Both of them required a large amount of computation. However, the algorithm designed in this paper was essentially a fast two-class classification process on each image patch by using a preset threshold. The improved LBP feature is based on the comparison of intensity of neighbor pixels instead of exact calculations. Therefore, the proposed algorithm consumed the least time.