# Method for Detecting Underwater Microbubbles Using Dual-Mode Fusion of Laser Polarization
## 2 Dual-Mode Fusion Detection Mechanism
### Dual-Mode Fusion Discrimination  
In this section, we define that there are two states of image grayscale in this case: \(G_{1}\) denotes the image grayscale at the moment of the presence of bubbles; \(G_{2}\) denotes the background image grayscale when there are no bubbles. Assume that \(p\) is the probability that the channel is disturbed by the change in bubble number density: \(P(V=G_{1})=p\), \(P(V=G_{2})=1-p\) and \(\sigma_{1}^{2}\) is the value of image gray-scale fluctuation GF (gray fluctuation) caused by the change of bubbles. Specifically, this is expressed as follows:  
\[\sigma_{1}^{2}(G_{1},G_{2},p)=\frac{-(G_{2}-G_{1})^{2}p^{2}+(G_{2}-G_{1})^{2} p}{G_{1}^{2}p^{2}+G_{1}^{2}(1-p)^{2}+2G_{1}G_{2}p(1-p)} \tag{12}\]  
where \(G_{1},G_{2}\) are the target and ambient background gray level thresholds, respectively. The image gray level fluctuation probability \(p\) is specifically denoted as follows:  
\[p=\frac{\sum\limits_{i=1}^{n}sN_{i}}{N_{\text{max}}} \tag{13}\]  
\(N_{i}\) is the pixel size occupied by a particular scatter, and \(s\) is the confidence level of whether a particular optical spot image is a bubble. Where \(s=\int_{-\infty}^{P_{x}^{\prime}}\frac{1}{\sqrt{2\pi}\sigma}(\frac{-(z-\overline {P_{room}})^{2}}{2\sigma^{2}})dx\), where \(P_{x}^{\prime}\) is the line polarization at a certain optical scatter within the image, \(\overline{P_{room}}\) is the average value of the line polarization of the simulated bubble, \(d=\frac{((P_{\text{min}}^{\prime}+P_{\text{max}}^{\prime})/2)^{2}}{P_{\text  
\(N_{p}\) is the number of pixel points and the number of pixels occupied by the scattering area, \(\overline{s}\) is the average confidence level in the area, \(\overline{s}=\int_{-\infty}^{\overline{p_{x}}}\frac{1}{\sqrt{2\pi}d}(\frac{-(z- \overline{P_{room}})^{2}}{2d^{2}})dx\), and \(\overline{P_{x}^{r}}\) is the average linear polarization of the optical scattering area of the image. Meanwhile, the number of pixel points per scattering is linearly related to the scattering area, i.e., it is linearly related to the square of the scattering diameter, so the probability can be expressed as:  
\[p=\frac{\overline{s}N_{num}\omega{D_{s}}^{2}}{N_{max}} \tag{15}\]  
\(N_{\text{num}}\) is the total number of scattered spots in the image, \(\omega\) is the scale factor and \(D_{s}\) is the diameter of scattered spots. Therefore, the gray scale fluctuation coefficient \(\sigma_{1}^{2}\) can be expressed as:  
\[\sigma_{1}^{2}(G_{1},G_{2},N_{num},D_{s})=\frac{-(G_{2}-G_{1})^{2}(\frac{ \overline{s}N_{num}\omega{D_{s}}^{2}}{N_{max}})^{2}+(G_{2}-G_{1})^{2}(\frac{ \overline{s}N_{num}\omega{D_{s}}^{2}}{N_{max}})}{G_{1}^{2}(\frac{\overline{s} N_{num}\omega{D_{s}}^{2}}{N_{max}})_{1}^{2}+G_{1}^{2}(1-(\frac{\overline{s}N_{num} \omega{D_{s}}^{2}}{N_{max}}))^{2}+2G_{1}G_{2}(\frac{\overline{s}N_{num}\omega {D_{s}}^{2}}{N_{max}})(1-(\frac{\overline{s}N_{num}\omega{D_{s}}^{2}}{N_{max}} ))} \tag{16}\]  
\(G_{1},G_{2}\) are the target and ambient background gray level thresholds, respectively, which are variable parameters, so we can write a set of variable parameters after normalizing them:  
\[\sigma_{1}^{2}(a,b,N_{num},D_{s})=\frac{-(b-a)^{2}(\frac{\overline{s}N_{num} \omega{D_{s}}^{2}}{N_{max}})^{2}+(b-a)^{2}(\frac{\overline{s}N_{num}\omega{D_{ s}}^{2}}{N_{max}})}{a^{2}(\frac{\overline{s}N_{num}\omega{D_{s}}^{2}}{N_{max}})_{1}^{2 }+a^{2}(1-(\frac{\overline{s}N_{num}\omega{D_{s}}^{2}}{N_{max}}))^{2}+2 ab( \frac{\overline{s}N_{num}\omega{D_{s}}^{2}}{N_{max}})(1-(\frac{\overline{s}N_ {num}\omega{D_{s}}^{2}}{N_{max}}))} \tag{17}\]  
where \(a,b\) are the normalized characteristic parameters, which can be flexibly adjusted with the change in the density and size of the number of detected bubbles.