# Self-Guided Pixel-Wise Calibration for Low-Light Image Enhancement
## 3 Method
### Pixel-Wise Guided Filter  
During the shooting process, a certain amount of noise is generated, starting with the absorption of photons by the camera sensor, followed by the conversion of the optical signal into an electrical signal, and subsequently into a digital signal [25]. In low-light conditions, the weak signal is more susceptible to interference, exacerbating the noise issue [26]. Moreover, the S-curve-based algorithm cannot distinguish between the noise and signal factors intelligently. As a result, the noise and signal of the low-light image are amplified to the same extent, severely compromising the texture details of the enhanced image. A common denoising approach involves minimizing the mean square error between a noisy image and a clean reference one. However, this method is not applicable in the absence of a ground truth. Moreover, low-light images typically exhibit lower noise levels compared to enhanced images. Therefore, the following question arises: _can we use information from the low-light image to denoise the enhanced image_? However, directly aligning the enhanced image with the low-light image would compromise the brightness level of the enhanced image, contradicting our goal. To address this issue, we propose the PGF, inspired by a previous work named guided filtering [27]. We find that this filter can effectively leverage the information from low-light images to denoise enhanced images without compromising their brightness. The main idea of guided filtering is predicated on assuming a local linear relationship between the output image and the guidance image, which can be expressed as follows:  
\[D=a*G+b, \tag{1}\]  
Figure 1: The pipeline of SGPC. Firstly, the network iteratively enhances the low-light input image by fitting pixel-wise best-fitting curves. Then, it combines a PGF and CCM to further refine the enhancement results. Finally, it uses the exposure control loss \(\mathcal{L}_{exp}\), which is computed based on the input image and the output image, to suppress incorrect exposure of the output image. Where \(clamp(\cdot)\) represents scaling, \(f(\cdot)\) represents our network, and \(N=8\). The usual problems of excessive noise and color variations in low-light images are well addressed by this method. where \(D\) represents the clean image after denoising, \(G\) indicates the guidance image, \(*\) is pixel-by-pixel multiplication, and \(a,b\) denote the linear coefficients in local regions. In addition, the denoising module is conventionally designed with the expectation that the input and output images would exhibit the highest similarity degree. Accordingly, Equation (1) is also required to satisfy the constraints as follows:  
\[min(D-N)^{2}, \tag{2}\]  
where \(N\) is the noisy image. By combining Equations (1) and (2), the guiding filter relation can be obtained as follows:  
\[E(a,b)=\sum_{i\in w}\Bigl{(}\left(aG_{i}+b-N_{i}\right)^{2}+ea^{2}\Bigr{)}, \tag{3}\]  
where \(\epsilon\) is the regularization parameter that controls the degree of filtering, \(w\) is the filter window, and \(E\) represents the difference between the clean and noisy images. Finding a set of coefficients \(a\) and \(b\) that minimize \(E\) corresponds to obtaining a clean image. In guided filtering algorithms, the noisy image itself is commonly employed as the guidance image when a clean reference image is unavailable. However, in the context of low-light image enhancement, the low-light image holds a significant reference value compared to the enhanced image with high-level noise. Therefore, guiding the filtering process of each pixel in the enhanced image by referencing information from the low-light image is proposed. Furthermore, the enhanced image inevitably contains dark regions with intricate textures. To eliminate this noise while conserving as many texture details as possible, it becomes imperative to fine-tune the filtering strength. Moreover, this adjustment is governed by the regularization parameters within the guided filtering process.