# Enhancement of Underwater Images with Retinex Transmission Map and Adaptive Color Correction
## 3 Proposed Underwater Image Enhancement Method
### Retinex Transmission Map Estimation  
In most underwater image restoration methods [4; 15], the backscattered light \(B(x)\) is needed to estimate the medium transmission map \(t(x)\). Then, the error in estimating \(B(x)\) will accumulate into the estimation of \(t(x)\). If using minimization filter to estimate \(t(x)\), due to block effect, the estimated medium transmission map \(t(x)\) has to be refined by the Guided filter to reduce the negative influence of block effect, which in turn causes a certain amount of calculation burden. Our proposed transmission map estimation method is designed to avoid the above problems.  
We begin by deriving \(t^{c}(x)\) from Equation (3):  
\[t^{c}(x)=\frac{B^{c}(x)-I^{c}(x)}{B^{c}(x)-I^{c}(x)}. \tag{5}\]  
In order to utilize the above relationship to estimate the medium transmission map without knowing \(B(x)\) in advance, we perform global white balance on the input image \(I(x)\) firstly, resulting in the white balanced version \(\bar{I}(x)\). Now, no chromatic component dominates the underwater image. Such operation can be considered as fixing background light to achromatic \(B_{a}(x)=(1,1,1)\). In addition, we assume that the imaging model in Equation (3) is now valid for \(\bar{I}(x)\) under the achromatic background light, however, with a color-shifting scene radiance from the original underwater target scene, denoted by \(J_{a}(x)\). Note that \(t(x)\) still remains the same since it is scene radiance independent.  
Thus, transmission map \(t^{c}(x)\) can be derived as in Equation (5) by using the white balanced \(\bar{I}(x)\), the achromatic \(B_{a}(x)\), and the new scene radiance \(J_{a}(x)\):  
\[t^{c}(x)=\frac{1-\bar{I}^{c}(x)}{1-J_{a}^{c}(x)}. \tag{6}\]  
In Equation (6), \(J_{a}^{c}(x)\) is unknown, embodying the fictitious change of the target scene due to white balance operation. Fortunately, since \(t^{c}(x)\) has a piecewise smoothing property, multi-scale Retinex can be used to estimate \(J_{a}^{c}(x)\)[23]:  
\[J_{a}^{c}(x)=1-Retinex(1-\bar{I}^{c}(x)),\]where \(Retinex(\cdot)\) represents a multi-scale Retinex operator presented in [9], which computes a triplet of lightness values for each pixel.  
Therefore, the transmission map can be obtained as follows:  
\[t^{c}(x)=\frac{1-\bar{I}^{c}(x)}{Retinex(1-\bar{I}^{c}(x))}. \tag{8}\]  
Compared with other transmission map estimation methods, the method we proposed avoids using the estimated \(B^{c}(x)\) to estimate the medium transmission map, and there is no negative influence of block effect, so the calculation is relatively simple. The obtained transmission map is shown in Figure 1. As mentioned earlier, we utilize white balance to change the scene chromaticity of the input image before estimating the medium transmission map. The white balance step we used is the gray world white balance algorithm [24]. The algorithm firstly computes the average value of \(I^{r}(x)\), \(I^{g}(x)\), \(I^{b}(x)\), which is represented by \(\bar{I}^{r}\), \(\bar{I}\bar{s}\), \(\bar{I}^{b}\), and the gray average value of the entire image can be obtained as \(\bar{I}=(\bar{I}^{r}+\bar{I}^{g}+\bar{I}^{b})/3\). Finally, use the following formula for white balance:  
\[\begin{cases}\bar{I}^{r}(x)=k_{r}\cdot I^{r}(x)\\ \bar{I}^{g}(x)=k_{g}\cdot I^{g}(x)\\ \bar{I}^{b}(x)=k_{b}\cdot I^{b}(x)\end{cases}, \tag{9}\]  
where, \(k_{r},k_{g},k_{b}\) are the gains of the three channels, \(k_{r}=\bar{I}/\bar{I}^{r}\), \(k_{g}=\bar{I}/\bar{I}^{g}\), \(k_{b}=\bar{I}/\bar{I}^{b}\).