# Segmentation of River Scenes Based on Water Surface Reflection Mechanism
## 2 Materials and Methods
### Light Reflection Mechanism of Water Surface  
In order to study the imaging law of water in rivers, it is necessary to first understand the general reflection mechanism of objects. According to [PERSON], the intensity of object surface through various types of reflections reaches the image sensor is [22]:  
\[I(x)=\int_{\omega}e(\lambda)\rho_{k}s(x,\lambda)d\lambda, \tag{1}\]  
where \(e(\lambda)\) is the color of the light source, \(s(x,\lambda)\) is the surface reflection value, \(\rho_{k}\) is the sensitive function of the camera (\(k\in\{\rm R,G,B\}\)), \(\omega\) represents the visible spectral range, and \(x\) denotes the corresponding space coordinates. For a particular color camera, the pixel intensity values in the image are only related to the reflected light [23]. On this basis, the relationship between the pixel value of the water and the light reflection of the water surface is further expressed as follows:  
\[I=LR_{\rm total}, \tag{2}\]  
where \(L\) is the illumination factor related to the illumination condition, \(R_{\rm total}\) is the total reflection energy. In river scenes, \(R_{\rm total}\) is mainly composed of the following four parts [21]: the energy that reflected off the water surface \(R_{\rm r}\), that scattered by water molecules to the camera \(R_{\rm o}\), that reflected or scattered by materials suspended in the water to the camera \(R_{\rm s}\), and that reflected off the bottom of the water the camera \(R_{\rm p}\):  
\[R_{\rm total}=R_{\rm r}+R_{\rm o}+R_{\rm s}+R_{\rm p}. \tag{3}\]  
Since the reflection from the water surface to the camera \(R_{\rm r}\) plays a dominant role in \(R_{\rm total}\), that is, (2) and (3) can be further simplified as:  
\[I\approx LR_{\rm r}. \tag{4}\]  
Figure 1: Flowchart of the proposed algorithm. For light polarized perpendicular to and parallel to the plane of incidence, \(R_{\mathrm{r}}\) can be respectively decomposed into \(R_{\mathrm{r},\perp}(\theta)\) and \(R_{\mathrm{r},\parallel}(\theta)\), where \(\theta\) is the incident angle, \(\theta\in\left(0,\frac{\pi}{2}\right)\), as shown in (5):  
\[R_{r}(\theta)=\frac{R_{\mathrm{r},\perp}(\theta)+R_{\mathrm{r},\parallel}( \theta)}{2}. \tag{5}\]  
According to Fresnel Law:  
\[R_{\mathrm{r},\perp}(\theta)=[\frac{n_{1}\cos\theta-n_{2}\sqrt{1-\left(\frac{ n_{1}}{n_{2}}\sin\theta\right)^{2}}}{n_{1}\cos\theta+n_{2}\sqrt{1-\left(\frac{ n_{1}}{n_{2}}\sin\theta\right)^{2}}}]^{2}, \tag{6}\]  
\[R_{\mathrm{r},\parallel}(\theta)=[\frac{n_{1}\sqrt{1-\left(\frac{n_{1}}{n_{2} }\sin\theta\right)^{2}-n_{2}\cos\theta}}{n_{1}\sqrt{1-\left(\frac{n_{1}}{n_{2} }\sin\theta\right)^{2}+n_{2}\cos\theta}}]^{2}, \tag{7}\]  
where \(n_{1}\) is the refractive index of air, \(n_{2}\) is the refractive index of water, and \(\theta\) is the angle of incidence. \(n_{1}=1.0\) and \(n_{2}=1.33\) are taken under ideal conditions.The water region reaches the sensor through various types of reflections, as shown in Figure 2, where \(l\) is the horizontal displacement of the point to the camera lens, \(h\) is the height at which the camera is placed (in a certain scene, the image sensor used to capture images is commonly fixed). According to the simplified scenario shown in Figure 2, \(\alpha\approx\theta\) can be obtained from the geometric relationship, thus \(R_{\mathrm{r}}(\theta)\) can be converted into a function \(R_{\mathrm{r}}(l)\) about the horizontal displacement, just make:  
\[\theta\approx\arctan\frac{l}{h} \tag{8}\]  
and then substitute (8) into (5). Since only qualitative rather than quantitative law is used in the subsequent algorithm design for the water region detection, the above equation do not need to be strictly equal.