# Tracking System for a Coal Mine Drilling Robot for Low-Illumination Environments
## 3 The Proposed Method
### Dealing with Low-Illumination Environments  
#### 3.5.1 Low-Light Image Enhancement  
Image enhancement algorithms have been presented by several researchers [43; 44; 45]. This study uses the low illumination image enhancement (LIME) method presented by [PERSON] et al. [43]. The model of low illumination image has the following forms:  
\[1-\mathbf{L}=(1-\mathbf{R})\odot\widetilde{\mathbf{T}}+\delta(1-\widetilde{ \mathbf{T}}), \tag{12}\]  
where \(\mathbf{L}\) is the captured image (low illumination), \(\mathbf{R}\) is the desired recovery, \(\mathbf{T}\) represents the illumination map, and \(\delta\) is the global atmospheric light (global illumination). This model (Equation (12)) [46] is based on inverted low-light images \(1-\mathbf{L}\), which look like hazy images. LIME first estimates an initial illumination map and then refines it in the second step. In the first step, the following preliminary initial estimates of the non-uniform lighting for each individual pixel \(p\) are used:  
\[\hat{\mathbf{T}}(p)\leftarrow\max_{c\in\{R,G,B\}}\mathbf{L}^{c}(p), \tag{13}\]  
The goal is to ensure that the obtained \(\hat{\mathbf{T}}(p)\) recovery is not saturated; \(c\) is the maximum value of the three color channels; a small constant \(\varepsilon\) is defined to avoid a zero denominator:  
\[\mathbf{R}(p)=\frac{\mathbf{L}(p)}{\Big{(}\max_{c}\mathbf{L}^{c}(p)+ \varepsilon\Big{)}} \tag{14}\]  
Subsequently, the atmospheric light \(\delta\) is substituted into the \(1-\mathbf{L}\) model Equation (12):  
\[\widetilde{\mathbf{T}}(p)\gets 1-\delta^{-1}+\max_{c}\mathbf{L}^{c}(p) \cdot\delta^{-1}, \tag{15}\]  
\[\mathbf{R}(p)=\frac{\mathbf{L}(p)-1+\delta}{\Big{(}1-\delta^{-1}+\max_{c} \mathbf{L}^{c}(p)\cdot\delta^{-1}+\varepsilon\Big{)}}+(1-\delta), \tag{16}\]  
The initial illumination map \(\hat{\mathbf{T}}(p)\) is obtained by Equation (13) due to its conciseness, and the refined illumination map \(\mathbf{T}(p)\) is obtained using the following optimization function:  
\[\min_{\mathbf{T}(p)}\lVert\hat{\mathbf{T}}(p)-\mathbf{T}(p)\rVert_{F}^{2}+ \beta\lVert\mathbf{W}\odot\
abla\mathbf{T}(p)\rVert_{1}, \tag{17}\]  
where \(\beta\) is a regularization weight, \(\lVert\bullet\rVert_{F}\) and \(\lVert\bullet\rVert_{1}\) designate the Frobenius and \(\ell_{1}\) norms, respectively. \(\mathbf{W}\) is a weight matrix, and \(\
abla\) is the first-order derivative filter consisting of \(\
abla_{h}\mathbf{T}(p)\) (horizontal) and \(\
abla_{v}\mathbf{T}(p)\) (vertical). The relative total variation (RTV) [47] and the two-throughout Gaussian kernel Equation (18) were used as the standard deviation \(\sigma\) to select the weight matrix \(\mathbf{W}\). For each location, the weight \(\mathbf{W}_{o}(p)\) is determined in the following manner; the subscript \(o\) represents the orientation of the element (\(h\) or \(v\)):  
\[G_{o}(p,q)\propto\exp\biggl{(}-\frac{dist(p,q)}{2\sigma^{2}}\biggr{)}, \tag{18}\]  
\[\mathbf{W}_{o}(p)\leftarrow\sum_{q\in\Omega(p)}\frac{G_{o}(p,q)}{\left|\sum_{ q\in\Omega(p)}G_{o}(p,q)\
abla_{o}\hat{\mathbf{T}}(q)\right|+\varepsilon}, \tag{19}\]  
where \(\Omega(p)\) is a region centered at pixel \(p\), \(q\) is the location index within the region, and \(|\bullet|\) is the absolute value operator. Equation (17) can be approximately calculated by the following:  
\[\min_{\mathbf{T}}\left\|\hat{\mathbf{T}}(p)-\mathbf{T}(p)\right\|_{F}^{2}+ \beta\sum_{p}\frac{\mathbf{W}_{h}(p)(\
abla_{h}\mathbf{T}(p))^{2}}{\left| \
abla_{h}\hat{\mathbf{T}}(p)\right|+\varepsilon}+\frac{\mathbf{W}_{v}(p)( \
abla_{v}\mathbf{T}(p))^{2}}{\left|\
abla_{v}\hat{\mathbf{T}}(p)\right|+ \varepsilon}, \tag{20}\]  
Hence, Equation (13) can be employed to initially estimate the illumination map \(\hat{\mathbf{T}}(p)\). After the refined illumination map \(\mathbf{T}(p)\) is obtained by Equation (17), \(\mathbf{R}\) can be recovered by Equation (14).